$OpenBSD: patch-unix_Makefile_in,v 1.12 2013/09/20 10:10:05 stu Exp $
--- unix/Makefile.in.orig	Fri Aug 30 12:28:24 2013
+++ unix/Makefile.in	Thu Sep  5 17:46:15 2013
@@ -541,6 +541,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 square tcolor timer widget
@@ -572,6 +573,10 @@ ${STUB_LIB_FILE}: ${STUB_LIB_OBJS}
 	rm -f $@
 	@MAKE_STUB_LIB@
 
+libtk85.a: ${OBJS}
+	rm -f $@
+	${STLIB_LD} $@ ${OBJS} ; ${RANLIB} $@
+
 # Make target which outputs the list of the .o contained in the Tk lib
 # usefull to build a single big shared library containing Tcl/Tk and other
 # extensions.  used for the Tcl Plugin.  -- dl
@@ -712,10 +717,10 @@ install-binaries: $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) $
 	    echo "}";\
 	    fi \
 	    ) > "$(PKG_INDEX)"; \
+	    chmod 444 "$(PKG_INDEX)"; \
 	    fi
 	@echo "Installing $(LIB_FILE) to $(DLL_INSTALL_DIR)/"
 	@@INSTALL_LIB@
-	@chmod 555 "$(DLL_INSTALL_DIR)/$(LIB_FILE)"
 	@if test -f "tk${MAJOR_VERSION}${MINOR_VERSION}.dll"; then \
 	    $(INSTALL_LIBRARY) "tk${MAJOR_VERSION}${MINOR_VERSION}.dll" "$(DLL_INSTALL_DIR)";\
 	    chmod 555 "$(DLL_INSTALL_DIR)/tk${MAJOR_VERSION}${MINOR_VERSION}.dll";\
@@ -785,6 +790,7 @@ 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); \
@@ -792,7 +798,7 @@ install-demos:
 	    if test $$i = "square"; then \
 	    rm -f  "$(DEMO_INSTALL_DIR)/$$i"; \
 	    else \
-	    chmod 755 "$(DEMO_INSTALL_DIR)/$$i"; \
+	    chmod 555 "$(DEMO_INSTALL_DIR)/$$i"; \
 	    fi; \
 	    done;
 	@echo "Installing demo image files to $(DEMO_INSTALL_DIR)/images/";
