update Wed Feb 10 06:37:00 PST 2010
[pkgsrc.git] / x11 / tk83 / patches / patch-aa
1 $NetBSD: patch-aa,v 1.4 2009/12/17 18:23:49 abs Exp $
2
3 --- unix/Makefile.in.orig       2001-10-20 00:24:40.000000000 +0000
4 +++ unix/Makefile.in
5 @@ -37,7 +37,7 @@ mandir                        = @mandir@
6  # to be different than those used for actually reference files at
7  # run-time.  INSTALL_ROOT is prepended to $prefix and $exec_prefix
8  # when installing files.
9 -INSTALL_ROOT           =
10 +INSTALL_ROOT           = $(DESTDIR)
11  
12  # Directory from which applications will reference the library of Tcl
13  # scripts (note: you can set the TK_LIBRARY environment variable at
14 @@ -76,7 +76,7 @@ MANN_INSTALL_DIR      = $(MAN_INSTALL_DIR)/ma
15  # The directory containing the Tcl sources and headers appropriate
16  # for this version of Tk ("srcdir" will be replaced or has already
17  # been replaced by the configure script):
18 -TCL_GENERIC_DIR                = @TCL_SRC_DIR@/generic
19 +TCL_GENERIC_DIR                = $(TCL_BIN_DIR)/../include/tcl/generic
20  
21  # The directory containing the Tcl library archive file appropriate
22  # for this version of Tk:
23 @@ -100,7 +100,7 @@ CFLAGS_OPTIMIZE             = @CFLAGS_OPTIMIZE@
24  #CFLAGS                        = $(CFLAGS_DEBUG)
25  #CFLAGS                        = $(CFLAGS_OPTIMIZE)
26  #CFLAGS                        = $(CFLAGS_DEBUG) $(CFLAGS_OPTIMIZE)
27 -CFLAGS                 = @CFLAGS@ @CFLAGS_DEFAULT@
28 +CFLAGS                 += @CFLAGS@ @CFLAGS_DEFAULT@
29  
30  # Flags to pass to the linker
31  LDFLAGS_DEBUG          = @LDFLAGS_DEBUG@
32 @@ -159,8 +159,8 @@ SHELL                       = /bin/sh
33  # "install" around;  better to use the install-sh script that comes
34  # with the distribution, which is slower but guaranteed to work.
35  
36 -INSTALL                        = @srcdir@/install-sh -c
37 -INSTALL_PROGRAM                = ${INSTALL}
38 +INSTALL                        = ${LIBTOOL} --mode=install @srcdir@/install-sh -c
39 +INSTALL_PROGRAM                = ${INSTALL} -s
40  INSTALL_DATA           = ${INSTALL} -m 644
41  
42  # The following specifies which Tcl executable to use for make targets
43 @@ -209,7 +209,7 @@ WISH_LIBS = $(TCL_LIB_SPEC) @LIBS@ $(X11
44  # The values of the symbolis normally set by the configure script.
45  
46  STLIB_LD               = @STLIB_LD@
47 -SHLIB_LD               = @SHLIB_LD@
48 +SHLIB_LD               = ${LIBTOOL} --mode=link @CC@ -rpath ${PREFIX}/lib
49  SHLIB_LD_LIBS          = @SHLIB_LD_LIBS@
50  
51  # Additional search flags needed to find the various shared libraries
52 @@ -240,7 +240,8 @@ TOOL_DIR            = @TCL_SRC_DIR@/tools
53  # either.
54  #----------------------------------------------------------------
55  
56 -CC                     = @CC@
57 +CC                     = ${LIBTOOL} --mode=compile @CC@
58 +LD                     = ${LIBTOOL} --mode=link @CC@ -Wl,-R${PREFIX}/lib -Wl,-R${X11BASE}/lib
59  
60  CC_SWITCHES_NO_STUBS = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \
61  -I${UNIX_DIR} -I${GENERIC_DIR} \
62 @@ -373,6 +374,7 @@ ${TK_LIB_FILE}: ${OBJS}
63         rm -f ${TK_LIB_FILE}
64         @MAKE_LIB@
65         $(RANLIB) ${TK_LIB_FILE}
66 +       ${TOUCH} ${TK_LIB_FILE}
67  
68  ${STUB_LIB_FILE}: ${STUB_LIB_OBJS}
69         rm -f ${STUB_LIB_FILE}
70 @@ -391,9 +393,9 @@ objs: ${OBJS}
71  
72  
73  wish: $(WISH_OBJS) $(TK_LIB_FILE) $(TK_STUB_LIB_FILE)
74 -       $(CC) $(LDFLAGS) $(WISH_OBJS) \
75 +       $(LD) $(LDFLAGS) $(WISH_OBJS) \
76                 @TK_BUILD_LIB_SPEC@ \
77 -               $(WISH_LIBS) $(TK_CC_SEARCH_FLAGS) -o wish
78 +               $(WISH_LIBS) -o wish
79  
80  # This rule is executed if the user tried to run tktest without first
81  # building tcltest in the Tcl bin directory. Just do it for them.
82 @@ -402,12 +404,12 @@ ${TCL_BIN_DIR}/tcltest:
83         make tcltest
84  
85  tktest: ${TCL_BIN_DIR}/tcltest $(TKTEST_OBJS) $(TK_LIB_FILE)
86 -       ${CC} $(LDFLAGS) $(TKTEST_OBJS) \
87 +       ${LD} $(LDFLAGS) $(TKTEST_OBJS) \
88                 @TK_BUILD_LIB_SPEC@ \
89 -               $(WISH_LIBS) $(TK_CC_SEARCH_FLAGS) -o tktest
90 +               $(WISH_LIBS) -o tktest
91  
92  xttest: test.o tkTest.o tkSquare.o $(TK_LIB_FILE)
93 -       ${CC} $(LDFLAGS) test.o tkTest.o tkSquare.o \
94 +       ${LD} $(LDFLAGS) test.o tkTest.o tkSquare.o \
95                 @TK_BUILD_LIB_SPEC@ \
96                 $(WISH_LIBS) $(TK_LD_SEARCH_FLAGS) -lXt -o xttest
97  
98 @@ -462,7 +464,7 @@ install-binaries: $(TK_LIB_FILE) $(TK_ST
99             chmod +x $(UNIX_DIR)/mkLinks; \
100             fi
101         @echo "Installing $(TK_LIB_FILE) to $(LIB_INSTALL_DIR)/"
102 -       @$(INSTALL_DATA) $(TK_LIB_FILE) $(LIB_INSTALL_DIR)/$(TK_LIB_FILE)
103 +       @$(INSTALL_DATA) $(TK_LIB_FILE:C/\.so.*/.la/) $(LIB_INSTALL_DIR)/$(TK_LIB_FILE)
104         @(cd $(LIB_INSTALL_DIR); $(RANLIB) $(TK_LIB_FILE))
105         @chmod 555 $(LIB_INSTALL_DIR)/$(TK_LIB_FILE)
106         @echo "Installing wish as $(BIN_INSTALL_DIR)/wish$(VERSION)"