diff options
author | jlam <jlam> | 2001-05-24 02:58:15 +0000 |
---|---|---|
committer | jlam <jlam> | 2001-05-24 02:58:15 +0000 |
commit | fa20ea6756eb6aa683d64cd9c5a7177f2f64d1df (patch) | |
tree | 495393ace765a7734b3aaeaf29ee8f22ac6f3075 /lang/tcl | |
parent | b799506e8a71184226e7026bb269197240e5aa1e (diff) | |
download | pkgsrc-fa20ea6756eb6aa683d64cd9c5a7177f2f64d1df.tar.gz |
Fix the installed tclConfig.sh so it's possible to use its values to generate
a shared library that depends on libtcl83.so. The TCL_SHLIB_LD command was
set to the incorrect value for ELF platforms, relying on "ld" which doesn't
understand the -Wl,... options it receives via ${TCL_LIB_SPEC}. Patch the
configure script to set TCL_SHLIB_LD to the proper value on NetBSD systems
depending on whether they are ELF or a.out, and also modify TCL_LIB_SPEC
to include -Wl,-rpath,... or -R... accordingly.
Bump version number to 8.3.2nb2.
Diffstat (limited to 'lang/tcl')
-rw-r--r-- | lang/tcl/Makefile | 4 | ||||
-rw-r--r-- | lang/tcl/distinfo | 6 | ||||
-rw-r--r-- | lang/tcl/patches/patch-ab | 108 | ||||
-rw-r--r-- | lang/tcl/patches/patch-ae | 43 | ||||
-rw-r--r-- | lang/tcl/patches/patch-af | 47 |
5 files changed, 180 insertions, 28 deletions
diff --git a/lang/tcl/Makefile b/lang/tcl/Makefile index 7772f700901..93f8e30e6f4 100644 --- a/lang/tcl/Makefile +++ b/lang/tcl/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.7 2001/02/25 04:17:56 hubertf Exp $ +# $NetBSD: Makefile,v 1.8 2001/05/24 02:58:15 jlam Exp $ # DISTNAME= tcl8.3.2 -PKGNAME= tcl-8.3.2nb1 +PKGNAME= tcl-8.3.2nb2 CATEGORIES= lang MASTER_SITES= ftp://ftp.scriptics.com/pub/tcl/tcl8_3/ \ ftp://gd.tuwien.ac.at/languages/tcl/scriptics/tcl8_3/ \ diff --git a/lang/tcl/distinfo b/lang/tcl/distinfo index b42c3d7a75c..a7325361a0e 100644 --- a/lang/tcl/distinfo +++ b/lang/tcl/distinfo @@ -1,8 +1,10 @@ -$NetBSD: distinfo,v 1.2 2001/04/19 15:00:59 agc Exp $ +$NetBSD: distinfo,v 1.3 2001/05/24 02:58:15 jlam Exp $ SHA1 (tcl8.3.2.tar.gz) = be2701bca3f4fd9c49ef3e2e8932f8b0a10d28fa Size (tcl8.3.2.tar.gz) = 2594407 bytes SHA1 (patch-aa) = d0ca1287d6d4416da4bad69525285ccd785b553f -SHA1 (patch-ab) = 069b45b4013c308daa67cd0f5ba8d79501a7329b +SHA1 (patch-ab) = f6dc76f918a3539d2bab9d552b5c6be2e6e364ce SHA1 (patch-ac) = 6f6f8e8b0ab6744662e7365511161e29affe62fc SHA1 (patch-ad) = 22412c6b564e7b6baced01c4c35bc6efa994fc8f +SHA1 (patch-ae) = 0ec38469f8f9dbfdce6a6c3f5311f03903e10741 +SHA1 (patch-af) = 4436c93d0f4bee56c539584bdf6f3f082589b445 diff --git a/lang/tcl/patches/patch-ab b/lang/tcl/patches/patch-ab index 99cf94ab5ff..1e9505a729e 100644 --- a/lang/tcl/patches/patch-ab +++ b/lang/tcl/patches/patch-ab @@ -1,17 +1,68 @@ -$NetBSD: patch-ab,v 1.7 2001/01/24 20:13:40 wiz Exp $ +$NetBSD: patch-ab,v 1.8 2001/05/24 02:58:16 jlam Exp $ ---- configure.orig Tue Aug 8 21:17:11 2000 -+++ configure Wed Jan 24 21:08:05 2001 -@@ -4773,7 +4773,7 @@ - ECHO_VERSION='`echo ${VERSION}`' - TCL_LIB_VERSIONS_OK=ok - CFLAGS_DEBUG=-g -- CFLAGS_OPTIMIZE=-O -+ CFLAGS_OPTIMIZE= - if test "$using_gcc" = "yes" ; then - CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int" - else -@@ -5789,7 +5789,7 @@ +--- configure.orig Tue Aug 8 15:17:11 2000 ++++ configure +@@ -4766,6 +4766,7 @@ + + do64bit_ok=no + fullSrcDir=`cd $srcdir; pwd` ++ TCL_LIB_SPEC_RPATH="" + EXTRA_CFLAGS="" + TCL_EXPORT_FILE_SUFFIX="" + UNSHARED_LIB_SUFFIX="" +@@ -5065,17 +5066,15 @@ + + # NetBSD/SPARC needs -fPIC, -fpic will not do. + SHLIB_CFLAGS="-fPIC" +- SHLIB_LD="ld -Bshareable -x" + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + LDFLAGS="" +- LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' + echo $ac_n "checking for ELF""... $ac_c" 1>&6 +-echo "configure:5077: checking for ELF" >&5 ++echo "configure:5076: checking for ELF" >&5 + cat > conftest.$ac_ext <<EOF +-#line 5079 "configure" ++#line 5078 "configure" + #include "confdefs.h" + + #ifdef __ELF__ +@@ -5086,11 +5085,20 @@ + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* +- echo "$ac_t""yes" 1>&6 ++ ++ echo "$ac_t""yes" 1>&6 ++ SHLIB_LD='${TCL_CC} -shared -Wl,-x' ++ LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' ++ TCL_LIB_SPEC_RPATH='-Wl,-rpath,${exec_prefix}/lib' + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so' ++ + else + rm -rf conftest* +- echo "$ac_t""no" 1>&6 ++ ++ echo "$ac_t""no" 1>&6 ++ SHLIB_LD="ld -Bshareable -x" ++ LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}' ++ TCL_LIB_SPEC_RPATH='-R${exec_prefix}/lib' + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0' + + fi +@@ -5752,7 +5760,7 @@ + + + echo $ac_n "checking how to build libraries""... $ac_c" 1>&6 +-echo "configure:5756: checking how to build libraries" >&5 ++echo "configure:5764: checking how to build libraries" >&5 + # Check whether --enable-shared or --disable-shared was given. + if test "${enable_shared+set}" = set; then + enableval="$enable_shared" +@@ -5789,7 +5797,7 @@ if test "x$DL_OBJS" = "xtclLoadAout.o"; then MAKE_LIB="ar cr \${TCL_LIB_FILE} \${OBJS}" else @@ -20,33 +71,42 @@ $NetBSD: patch-ab,v 1.7 2001/01/24 20:13:40 wiz Exp $ RANLIB=":" fi else -@@ -5829,7 +5829,7 @@ +@@ -5829,7 +5837,7 @@ TCL_LIB_FLAG="-ltcl`echo ${TCL_VERSION} | tr -d .`\${TCL_DBGX}" fi TCL_BUILD_LIB_SPEC="-L`pwd` ${TCL_LIB_FLAG}" - TCL_LIB_SPEC="-L${exec_prefix}/lib ${TCL_LIB_FLAG}" -+ TCL_LIB_SPEC="-L${exec_prefix}/lib -Wl,-R${exec_prefix}/lib ${TCL_LIB_FLAG}" ++ TCL_LIB_SPEC="${TCL_LIB_SPEC_RPATH} -L${exec_prefix}/lib ${TCL_LIB_FLAG}" else TCL_BUILD_EXP_FILE="lib.exp" eval "TCL_EXP_FILE=libtcl${TCL_EXPORT_FILE_SUFFIX}" -@@ -5859,9 +5859,9 @@ +@@ -5859,9 +5867,9 @@ #-------------------------------------------------------------------- if test "$prefix" != "$exec_prefix"; then - TCL_PACKAGE_PATH="${exec_prefix}/lib ${prefix}/lib" -+ TCL_PACKAGE_PATH="${exec_prefix}/lib/tcl ${prefix}/lib/tcl" ++ TCL_PACKAGE_PATH="${exec_prefix}/lib/tcl ${prefix}/lib" else - TCL_PACKAGE_PATH="${prefix}/lib" + TCL_PACKAGE_PATH="${prefix}/lib/tcl" fi #-------------------------------------------------------------------- -@@ -6097,6 +6097,8 @@ - s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g - s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g - s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g +@@ -5943,6 +5951,8 @@ + + + ++ ++ + trap '' 1 2 15 + cat > confcache <<\EOF + # This file is a shell script that caches the results of configure +@@ -6106,6 +6116,8 @@ + s%@TCL_STUB_LIB_PATH@%$TCL_STUB_LIB_PATH%g + s%@MAKE_STUB_LIB@%$MAKE_STUB_LIB%g + s%@BUILD_DLTEST@%$BUILD_DLTEST%g +s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g +s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g - s%@STUB_LIB_FILE@%$STUB_LIB_FILE%g - s%@TCL_STUB_LIB_FILE@%$TCL_STUB_LIB_FILE%g - s%@TCL_STUB_LIB_FLAG@%$TCL_STUB_LIB_FLAG%g + s%@CFG_TCL_SHARED_LIB_SUFFIX@%$CFG_TCL_SHARED_LIB_SUFFIX%g + s%@CFG_TCL_UNSHARED_LIB_SUFFIX@%$CFG_TCL_UNSHARED_LIB_SUFFIX%g + s%@CFG_TCL_EXPORT_FILE_SUFFIX@%$CFG_TCL_EXPORT_FILE_SUFFIX%g diff --git a/lang/tcl/patches/patch-ae b/lang/tcl/patches/patch-ae new file mode 100644 index 00000000000..07a149310af --- /dev/null +++ b/lang/tcl/patches/patch-ae @@ -0,0 +1,43 @@ +$NetBSD: patch-ae,v 1.1 2001/05/24 02:58:16 jlam Exp $ + +--- configure.in.orig Tue Aug 8 15:17:11 2000 ++++ configure.in +@@ -440,7 +440,7 @@ + if test "x$DL_OBJS" = "xtclLoadAout.o"; then + MAKE_LIB="ar cr \${TCL_LIB_FILE} \${OBJS}" + else +- MAKE_LIB="\${SHLIB_LD} -o \${TCL_LIB_FILE} \${OBJS} ${SHLIB_LD_LIBS}" ++ MAKE_LIB="\${SHLIB_LD} -o \${TCL_LIB_FILE:C/\.so.*/.la/} \${OBJS:.o=.lo} ${SHLIB_LD_LIBS} -version-info 1:0" + RANLIB=":" + fi + else +@@ -480,7 +480,7 @@ + TCL_LIB_FLAG="-ltcl`echo ${TCL_VERSION} | tr -d .`\${TCL_DBGX}" + fi + TCL_BUILD_LIB_SPEC="-L`pwd` ${TCL_LIB_FLAG}" +- TCL_LIB_SPEC="-L${exec_prefix}/lib ${TCL_LIB_FLAG}" ++ TCL_LIB_SPEC="${TCL_LIB_SPEC_RPATH} -L${exec_prefix}/lib ${TCL_LIB_FLAG}" + else + TCL_BUILD_EXP_FILE="lib.exp" + eval "TCL_EXP_FILE=libtcl${TCL_EXPORT_FILE_SUFFIX}" +@@ -510,9 +510,9 @@ + #-------------------------------------------------------------------- + + if test "$prefix" != "$exec_prefix"; then +- TCL_PACKAGE_PATH="${exec_prefix}/lib ${prefix}/lib" ++ TCL_PACKAGE_PATH="${exec_prefix}/lib/tcl ${prefix}/lib" + else +- TCL_PACKAGE_PATH="${prefix}/lib" ++ TCL_PACKAGE_PATH="${prefix}/lib/tcl" + fi + + #-------------------------------------------------------------------- +@@ -558,6 +558,8 @@ + + AC_SUBST(BUILD_DLTEST) + AC_SUBST(CFLAGS) ++AC_SUBST(LDFLAGS_DEBUG) ++AC_SUBST(LDFLAGS_OPTIMIZE) + AC_SUBST(CFG_TCL_SHARED_LIB_SUFFIX) + AC_SUBST(CFG_TCL_UNSHARED_LIB_SUFFIX) + AC_SUBST(CFG_TCL_EXPORT_FILE_SUFFIX) diff --git a/lang/tcl/patches/patch-af b/lang/tcl/patches/patch-af new file mode 100644 index 00000000000..9c9af8da547 --- /dev/null +++ b/lang/tcl/patches/patch-af @@ -0,0 +1,47 @@ +$NetBSD: patch-af,v 1.1 2001/05/24 02:58:16 jlam Exp $ + +--- tcl.m4.orig Tue Aug 8 15:17:11 2000 ++++ tcl.m4 +@@ -595,6 +595,7 @@ + + do64bit_ok=no + fullSrcDir=`cd $srcdir; pwd` ++ TCL_LIB_SPEC_RPATH="" + EXTRA_CFLAGS="" + TCL_EXPORT_FILE_SUFFIX="" + UNSHARED_LIB_SUFFIX="" +@@ -794,24 +795,29 @@ + AC_CHECK_HEADER(dlfcn.h, [ + # NetBSD/SPARC needs -fPIC, -fpic will not do. + SHLIB_CFLAGS="-fPIC" +- SHLIB_LD="ld -Bshareable -x" + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + LDFLAGS="" +- LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' + AC_MSG_CHECKING(for ELF) + AC_EGREP_CPP(yes, [ + #ifdef __ELF__ + yes + #endif +- ], ++ ], [ + AC_MSG_RESULT(yes) +- SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so', ++ SHLIB_LD='${TCL_CC} -shared -Wl,-x' ++ LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' ++ TCL_LIB_SPEC_RPATH='-Wl,-rpath,${exec_prefix}/lib' ++ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so' ++ ], [ + AC_MSG_RESULT(no) ++ SHLIB_LD="ld -Bshareable -x" ++ LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}' ++ TCL_LIB_SPEC_RPATH='-R${exec_prefix}/lib' + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0' +- ) ++ ]) + ], [ + SHLIB_CFLAGS="" + SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r" |