$OpenBSD: patch-unix_Makefile_in,v 1.7 2011/01/05 16:18:09 stu Exp $
--- unix/Makefile.in.orig	Thu Sep  2 14:12:14 2010
+++ unix/Makefile.in	Mon Dec  6 21:08:12 2010
@@ -552,6 +552,7 @@ PUBLIC_HDRS = $(GENERIC_DIR)/tk.h $(GENERIC_DIR)/tkDec
 # The private headers we want installed for install-private-headers
 PRIVATE_HDRS = $(GENERIC_DIR)/tkInt.h $(GENERIC_DIR)/tkIntDecls.h \
 	$(GENERIC_DIR)/tkIntPlatDecls.h $(GENERIC_DIR)/tkPort.h \
+	$(GENERIC_DIR)/default.h $(UNIX_DIR)/tkUnixDefault.h \
 	$(TTK_HDRS) $(@TK_WINDOWINGSYSTEM@_PRIVATE_HDRS)
 
 DEMOPROGS = browse hello ixset rmt rolodex tcolor timer widget
@@ -584,6 +585,10 @@ ${STUB_LIB_FILE}: ${STUB_LIB_OBJS}
 	rm -f $@
 	@MAKE_STUB_LIB@
 
+libtk85.a: ${OBJS}
+	rm -f $@
+	${STLIB_LD} $@ ${OBJS} ; ${RANLIB} $@
+
 # Build Aqua resource files
 ${TK_RSRC_FILE}: $(AQUA_RESOURCES)
 	rm -f $@
@@ -704,14 +709,10 @@ install-binaries: $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) w
 	    do \
 	    if [ ! -d "$$i" ] ; then \
 		echo "Making directory $$i"; \
-		mkdir -p "$$i"; \
-		chmod 755 "$$i"; \
+		$(INSTALL_DATA_DIR) "$$i"; \
 		else true; \
 		fi; \
 	    done;
-	@if test ! -x $(SRC_DIR)/install-sh; then \
-	    chmod +x $(SRC_DIR)/install-sh; \
-	    fi
 	@if test "x$(TK_SHARED_BUILD)" = "x1"; then \
 	    echo "Creating package index $(PKG_INDEX)"; \
 	    rm -f "$(PKG_INDEX)"; \
@@ -721,10 +722,10 @@ install-binaries: $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) w
 	    echo "package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL)\
 		[list load [file join \$$dir $${relative}$(TK_LIB_FILE)] Tk]";\
 	    ) > "$(PKG_INDEX)"; \
+	    chmod 444 "$(PKG_INDEX)"; \
 	    fi
 	@echo "Installing $(LIB_FILE) to $(LIB_INSTALL_DIR)/"
 	@@INSTALL_LIB@
-	@chmod 555 "$(LIB_INSTALL_DIR)"/$(LIB_FILE)
 	@echo "Installing wish@EXEEXT@ as $(BIN_INSTALL_DIR)/wish$(VERSION)@EXEEXT@"
 	@$(INSTALL_PROGRAM) wish@EXEEXT@ "$(BIN_INSTALL_DIR)"/wish$(VERSION)@EXEEXT@
 	@echo "Installing tkConfig.sh to $(CONFIG_INSTALL_DIR)/"
@@ -744,14 +745,10 @@ install-libraries: libraries
 	    do \
 	    if [ -n "$$i" -a ! -d "$$i" ] ; then \
 		echo "Making directory $$i"; \
-		mkdir -p "$$i"; \
-		chmod 755 "$$i"; \
+		$(INSTALL_DATA_DIR) "$$i"; \
 		else true; \
 		fi; \
 	    done;
-	@if test ! -x $(SRC_DIR)/install-sh; then \
-	    chmod +x $(SRC_DIR)/install-sh; \
-	    fi
 	@echo "Installing header files";
 	@for i in $(PUBLIC_HDRS); \
 	    do \
@@ -794,8 +791,7 @@ install-demos:
 	    do \
 	    if [ ! -d "$$i" ] ; then \
 		echo "Making directory $$i"; \
-		mkdir -p "$$i"; \
-		chmod 755 "$$i"; \
+		$(INSTALL_DATA_DIR) "$$i"; \
 		else true; \
 		fi; \
 	    done;
@@ -805,11 +801,12 @@ install-demos:
 	    if [ -f $$i ] ; then \
 		sed -e '3 s|exec wish|exec wish$(VERSION)|' \
 			$$i > "$(DEMO_INSTALL_DIR)"/`basename $$i`; \
+		chmod 444 "$(DEMO_INSTALL_DIR)"/`basename $$i`; \
 	    fi; \
 	    done;
 	@for i in $(DEMOPROGS); \
 	    do \
-	    chmod 755 "$(DEMO_INSTALL_DIR)"/$$i; \
+	    chmod 555 "$(DEMO_INSTALL_DIR)"/$$i; \
 	    done;
 	@echo "Installing demo images";
 	@for i in $(TOP_DIR)/library/demos/images/*; \
@@ -824,8 +821,7 @@ install-doc:
 	    do \
 	    if [ ! -d "$$i" ] ; then \
 		echo "Making directory $$i"; \
-		mkdir -p "$$i"; \
-		chmod 755 "$$i"; \
+		$(INSTALL_DATA_DIR) "$$i"; \
 		else true; \
 		fi; \
 	    done;
@@ -850,14 +846,10 @@ install-private-headers: libraries
 	    do \
 	    if [ ! -d "$$i" ] ; then \
 		echo "Making directory $$i"; \
-		mkdir -p "$$i"; \
-		chmod 755 "$$i"; \
+		$(INSTALL_DATA_DIR) "$$i"; \
 		else true; \
 		fi; \
 	    done;
-	@if test ! -x $(SRC_DIR)/install-sh; then \
-	    chmod +x $(SRC_DIR)/install-sh; \
-	    fi
 	@echo "Installing private header files";
 	@for i in $(PRIVATE_HDRS); \
 	    do \
