summaryrefslogtreecommitdiff
path: root/recipes/tcltk/files/tk-add-soname.patch
blob: f1f132f2a4863e417340032034b846c2242826ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
Patch by Chris Waters removes -rpath from search flags and adds -soname
to library build options.

Also, it fixes Makefile.in to put correct Tk library filename to pkgIndex.tcl

--- tk8.4-8.4.19.orig/unix/configure
+++ tk8.4-8.4.19/unix/configure
@@ -2568,12 +2568,15 @@
 	    # get rid of the warnings.
 	    #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
 
+	    # following line added by CW for Debian GNU/Linux
+	    TK_SHLIB_LD_EXTRAS="-Wl,-soname,\${TK_LIB_FILE}.0"
+
 	    if test "$have_dl" = yes; then
 		SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
 		DL_OBJS="tclLoadDl.o"
 		DL_LIBS="-ldl"
 		LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
-		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+		CC_SEARCH_FLAGS=""
 		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
 	    else
 		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
--- tk8.4-8.4.19.orig/unix/Makefile.in
+++ tk8.4-8.4.19/unix/Makefile.in
@@ -635,7 +635,7 @@
 	    relative=`echo | awk '{ORS=" "; split("$(TK_PKG_DIR)",a,"/"); for (f in a) {print ".."}}'`;\
 	    echo "if {[package vcompare [package provide Tcl] $(TCLVERSION)] != 0} { return }";\
 	    echo "package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)\
-		[list load [file join \$$dir $${relative}$(TK_LIB_FILE)] Tk]";\
+		[list load [file join $(LIB_RUNTIME_DIR) $(TK_LIB_FILE).0] Tk]";\
 	    ) > $(PKG_INDEX); \
 	    fi
 	@echo "Installing $(LIB_FILE) to $(LIB_INSTALL_DIR)/"
--- tk8.4-8.4.19.orig/unix/tcl.m4
+++ tk8.4-8.4.19/unix/tcl.m4
@@ -1346,20 +1346,23 @@
 	    # get rid of the warnings.
 	    #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
 
+	    # following line added by CW for Debian GNU/Linux
+	    TK_SHLIB_LD_EXTRAS="-Wl,-soname,\${TK_LIB_FILE}.0"
+
 	    if test "$have_dl" = yes; then
 		SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
 		DL_OBJS="tclLoadDl.o"
 		DL_LIBS="-ldl"
 		LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
-		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+		CC_SEARCH_FLAGS=""
+		LD_SEARCH_FLAGS="${CC_SEARCH_FLAGS}"
 	    else
 		AC_CHECK_HEADER(dld.h, [
 		    SHLIB_LD="ld -shared"
 		    DL_OBJS="tclLoadDld.o"
 		    DL_LIBS="-ldld"
 		    CC_SEARCH_FLAGS=""
-		    LD_SEARCH_FLAGS=""])
+		    LD_SEARCH_FLAGS="${CC_SEARCH_FLAGS}"])
 	    fi
 	    if test "`uname -m`" = "alpha" ; then
 		CFLAGS="$CFLAGS -mieee"