From 2d3cd610ede23e82383634e969f3d99f562f42b0 Mon Sep 17 00:00:00 2001 From: naddy Date: Wed, 18 Oct 2006 13:10:37 +0000 Subject: [PATCH] unconditionally use -fPIC (over -fpic) --- lang/tcl/8.0/Makefile | 4 ++-- lang/tcl/8.0/patches/patch-Makefile_in | 13 ++++++----- lang/tcl/8.0/patches/patch-configure | 21 ++++++----------- lang/tcl/8.3/Makefile | 4 ++-- lang/tcl/8.3/patches/patch-Makefile_in | 25 ++++++++++---------- lang/tcl/8.3/patches/patch-configure | 27 ++++++++-------------- lang/tcl/8.3/patches/patch-tclConfig_sh_in | 10 ++++---- lang/tcl/8.4/Makefile | 4 ++-- lang/tcl/8.4/patches/patch-tcl_m4 | 14 ++++------- 9 files changed, 51 insertions(+), 71 deletions(-) diff --git a/lang/tcl/8.0/Makefile b/lang/tcl/8.0/Makefile index c229d917da9..ab7ef0a6d6a 100644 --- a/lang/tcl/8.0/Makefile +++ b/lang/tcl/8.0/Makefile @@ -1,10 +1,10 @@ -# $OpenBSD: Makefile,v 1.16 2006/02/04 23:50:20 steven Exp $ +# $OpenBSD: Makefile,v 1.17 2006/10/18 13:10:37 naddy Exp $ # $FreeBSD: Makefile,v 1.4 1997/12/01 16:50:49 pst Exp $ COMMENT= "Tool Command Language" DISTNAME= tcl8.0.5 -PKGNAME= tcl-8.0.5 +PKGNAME= tcl-8.0.5p0 SHARED_LIBS= tcl80 1.5 CATEGORIES= lang lang/tcl MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=tcl/} diff --git a/lang/tcl/8.0/patches/patch-Makefile_in b/lang/tcl/8.0/patches/patch-Makefile_in index 7f5f3dfabec..ce48096eb0c 100644 --- a/lang/tcl/8.0/patches/patch-Makefile_in +++ b/lang/tcl/8.0/patches/patch-Makefile_in @@ -1,6 +1,6 @@ -$OpenBSD: patch-Makefile_in,v 1.1 2001/10/10 04:17:40 pvalchev Exp $ ---- Makefile.in.orig Mon Mar 8 23:51:26 1999 -+++ Makefile.in Tue Oct 9 21:51:56 2001 +$OpenBSD: patch-Makefile_in,v 1.2 2006/10/18 13:10:37 naddy Exp $ +--- Makefile.in.orig Tue Mar 9 07:51:26 1999 ++++ Makefile.in Wed Oct 18 12:28:39 2006 @@ -34,6 +34,9 @@ exec_prefix = @exec_prefix@ # when installing files. INSTALL_ROOT = @@ -11,7 +11,7 @@ $OpenBSD: patch-Makefile_in,v 1.1 2001/10/10 04:17:40 pvalchev Exp $ # Directory from which applications will reference the library of Tcl # scripts (note: you can set the TCL_LIBRARY environment variable at # run-time to override this value): -@@ -331,14 +334,18 @@ DL_SRCS = \ +@@ -331,15 +334,19 @@ DL_SRCS = \ SRCS = $(GENERIC_SRCS) $(UNIX_SRCS) @@ -24,14 +24,15 @@ $OpenBSD: patch-Makefile_in,v 1.1 2001/10/10 04:17:40 pvalchev Exp $ rm -f ${TCL_LIB_FILE} @MAKE_LIB@ - $(RANLIB) ${TCL_LIB_FILE} -+ + +libtcl80.a: ${OBJS} + rm -f libtcl80.a + ar cr libtcl80.a ${OBJS} + $(RANLIB) libtcl80.a - ++ # Make target which outputs the list of the .o contained in the Tcl lib # usefull to build a single big shared library containing Tcl and other + # extensions. used for the Tcl Plugin. -- dl @@ -433,7 +440,7 @@ install: install-binaries install-librar # some ranlibs write to current directory, and this might not always be # possible (e.g. if installing as root). diff --git a/lang/tcl/8.0/patches/patch-configure b/lang/tcl/8.0/patches/patch-configure index 351a704341f..b8ece17fa92 100644 --- a/lang/tcl/8.0/patches/patch-configure +++ b/lang/tcl/8.0/patches/patch-configure @@ -1,20 +1,13 @@ -$OpenBSD: patch-configure,v 1.4 2006/01/08 12:43:52 alek Exp $ ---- configure.orig Mon Mar 8 23:51:26 1999 -+++ configure Tue Feb 5 16:06:42 2002 -@@ -4095,16 +4095,21 @@ rm -f conftest* - fi +$OpenBSD: patch-configure,v 1.5 2006/10/18 13:10:37 naddy Exp $ +--- configure.orig Tue Mar 9 07:51:26 1999 ++++ configure Wed Oct 18 12:33:05 2006 +@@ -4096,15 +4096,15 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 -- + - SHLIB_CFLAGS="-fpic" - SHLIB_LD="ld -Bshareable -x" -+ -+ case `machine` in -+ sparc|sparc64) -+ SHLIB_CFLAGS="-fPIC";; -+ *) -+ SHLIB_CFLAGS="-fpic";; -+ esac ++ SHLIB_CFLAGS="-fPIC" + SHLIB_LD="${CC} -shared ${SHLIB_CFLAGS}" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" @@ -27,7 +20,7 @@ $OpenBSD: patch-configure,v 1.4 2006/01/08 12:43:52 alek Exp $ else echo "$ac_t""no" 1>&6 -@@ -4656,10 +4661,9 @@ if test "$tcl_ok" = "yes" -a "${SHLIB_SU +@@ -4656,10 +4656,9 @@ if test "$tcl_ok" = "yes" -a "${SHLIB_SU TCL_LD_SEARCH_FLAGS="${LD_SEARCH_FLAGS}" eval "TCL_LIB_FILE=libtcl${TCL_SHARED_LIB_SUFFIX}" if test "x$DL_OBJS" = "xtclLoadAout.o"; then diff --git a/lang/tcl/8.3/Makefile b/lang/tcl/8.3/Makefile index fb3eb7fd8a8..d10a911c7b6 100644 --- a/lang/tcl/8.3/Makefile +++ b/lang/tcl/8.3/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.22 2006/02/04 23:50:20 steven Exp $ +# $OpenBSD: Makefile,v 1.23 2006/10/18 13:10:37 naddy Exp $ # Uses pthreads (can but does not at the moment) COMMENT= "Tool Command Language" @@ -6,7 +6,7 @@ COMMENT= "Tool Command Language" VERSION= 8.3.5 DISTNAME= tcl${VERSION}-src -PKGNAME= tcl-${VERSION} +PKGNAME= tcl-${VERSION}p0 SHARED_LIBS= tcl83 1.3 CATEGORIES= lang lang/tcl MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=tcl/} diff --git a/lang/tcl/8.3/patches/patch-Makefile_in b/lang/tcl/8.3/patches/patch-Makefile_in index fdc4a70e628..1f9975622be 100644 --- a/lang/tcl/8.3/patches/patch-Makefile_in +++ b/lang/tcl/8.3/patches/patch-Makefile_in @@ -1,6 +1,6 @@ -$OpenBSD: patch-Makefile_in,v 1.1 2002/11/29 09:45:51 kevlo Exp $ ---- Makefile.in.orig Fri Oct 18 20:44:46 2002 -+++ Makefile.in Fri Nov 29 16:28:19 2002 +$OpenBSD: patch-Makefile_in,v 1.2 2006/10/18 13:10:37 naddy Exp $ +--- Makefile.in.orig Fri Oct 18 22:44:46 2002 ++++ Makefile.in Wed Oct 18 12:59:42 2006 @@ -37,6 +37,9 @@ mandir = @mandir@ # when installing files. INSTALL_ROOT = @@ -20,7 +20,7 @@ $OpenBSD: patch-Makefile_in,v 1.1 2002/11/29 09:45:51 kevlo Exp $ libraries: -@@ -418,12 +421,15 @@ doc: +@@ -418,13 +421,16 @@ doc: ${TCL_LIB_FILE}: ${OBJS} ${STUB_LIB_FILE} rm -f ${TCL_LIB_FILE} @MAKE_LIB@ @@ -30,14 +30,15 @@ $OpenBSD: patch-Makefile_in,v 1.1 2002/11/29 09:45:51 kevlo Exp $ rm -f ${STUB_LIB_FILE} @MAKE_STUB_LIB@ - $(RANLIB) ${STUB_LIB_FILE} -+ + +libtcl83.a: ${OBJS} + rm -f libtcl83.a + ar cr libtcl83.a ${OBJS} + $(RANLIB) libtcl83.a - ++ # Make target which outputs the list of the .o contained in the Tcl lib # usefull to build a single big shared library containing Tcl and other + # extensions. used for the Tcl Plugin. -- dl @@ -559,8 +565,10 @@ install-binaries: binaries fi @echo "Installing $(TCL_LIB_FILE) to $(LIB_INSTALL_DIR)/" @@ -78,15 +79,15 @@ $OpenBSD: patch-Makefile_in,v 1.1 2002/11/29 09:45:51 kevlo Exp $ - $(GENERIC_DIR)/tclPlatDecls.h ; \ + @echo "Installing libraries, tcl.h and other headers" + @for i in $(GENERIC_DIR)/*.h ; \ -+ do \ -+ echo "Installing $$i"; \ -+ $(INSTALL_DATA) $$i $(INSTALL_ROOT)$(GENERIC_INCLUDE_INSTALL_DIR); \ -+ done; -+ @for i in $(UNIX_DIR)/*.h ; \ do \ - $(INSTALL_DATA) $$i $(INCLUDE_INSTALL_DIR); \ -+ $(INSTALL_DATA) $$i $(INSTALL_ROOT)$(UNIX_INCLUDE_INSTALL_DIR); \ ++ echo "Installing $$i"; \ ++ $(INSTALL_DATA) $$i $(INSTALL_ROOT)$(GENERIC_INCLUDE_INSTALL_DIR); \ done; ++ @for i in $(UNIX_DIR)/*.h ; \ ++ do \ ++ $(INSTALL_DATA) $$i $(INSTALL_ROOT)$(UNIX_INCLUDE_INSTALL_DIR); \ ++ done; + @ln -sf $(GENERIC_INCLUDE_INSTALL_DIR)/tcl.h $(INCLUDE_INSTALL_DIR)/tcl.h + @ln -sf $(GENERIC_INCLUDE_INSTALL_DIR)/tclDecls.h $(INCLUDE_INSTALL_DIR)/tclDecls.h + @ln -sf $(GENERIC_INCLUDE_INSTALL_DIR)/tclPlatDecls.h $(INCLUDE_INSTALL_DIR)/tclPlatDecls.h diff --git a/lang/tcl/8.3/patches/patch-configure b/lang/tcl/8.3/patches/patch-configure index 5fdbd0d6172..d43c58c7ac7 100644 --- a/lang/tcl/8.3/patches/patch-configure +++ b/lang/tcl/8.3/patches/patch-configure @@ -1,25 +1,16 @@ -$OpenBSD: patch-configure,v 1.10 2006/01/08 12:57:04 alek Exp $ ---- configure.orig Fri Oct 18 20:44:46 2002 -+++ configure Fri Nov 29 16:28:19 2002 -@@ -5441,9 +5441,14 @@ fi - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 +$OpenBSD: patch-configure,v 1.11 2006/10/18 13:10:37 naddy Exp $ +--- configure.orig Fri Oct 18 22:44:46 2002 ++++ configure Wed Oct 18 13:02:50 2006 +@@ -5443,7 +5443,7 @@ if eval "test \"`echo '$ac_cv_header_'$a -- # NetBSD/SPARC needs -fPIC, -fpic will not do. -- SHLIB_CFLAGS="-fPIC" + # NetBSD/SPARC needs -fPIC, -fpic will not do. + SHLIB_CFLAGS="-fPIC" - SHLIB_LD="ld -Bshareable -x" -+ # OpenBSD/SPARC[64] needs -fPIC, -fpic will not do. -+ case `machine` in -+ sparc|sparc64) -+ SHLIB_CFLAGS="-fPIC";; -+ *) -+ SHLIB_CFLAGS="-fpic";; -+ esac + SHLIB_LD="${CC} -shared ${SHLIB_CFLAGS}" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" -@@ -5465,11 +5470,11 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>& +@@ -5465,11 +5465,11 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>& egrep "yes" >/dev/null 2>&1; then rm -rf conftest* echo "$ac_t""yes" 1>&6 @@ -33,7 +24,7 @@ $OpenBSD: patch-configure,v 1.10 2006/01/08 12:57:04 alek Exp $ fi rm -f conftest* -@@ -6292,7 +6297,7 @@ else +@@ -6292,7 +6292,7 @@ else esac TCL_SHLIB_CFLAGS="" eval "TCL_LIB_FILE=libtcl${TCL_UNSHARED_LIB_SUFFIX}" @@ -42,7 +33,7 @@ $OpenBSD: patch-configure,v 1.10 2006/01/08 12:57:04 alek Exp $ fi # tclConfig.sh needs a version of the _LIB_SUFFIX that has been eval'ed -@@ -6359,7 +6364,7 @@ eval "TCL_STUB_LIB_FILE=libtclstub${TCL_ +@@ -6359,7 +6359,7 @@ eval "TCL_STUB_LIB_FILE=libtclstub${TCL_ # Replace DBGX with TCL_DBGX eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" diff --git a/lang/tcl/8.3/patches/patch-tclConfig_sh_in b/lang/tcl/8.3/patches/patch-tclConfig_sh_in index e964677cb4c..9c7e3fb2364 100644 --- a/lang/tcl/8.3/patches/patch-tclConfig_sh_in +++ b/lang/tcl/8.3/patches/patch-tclConfig_sh_in @@ -1,6 +1,6 @@ -$OpenBSD: patch-tclConfig_sh_in,v 1.1 2003/11/08 04:50:58 kevlo Exp $ ---- tclConfig.sh.in.orig 2002-10-18 20:44:46.000000000 +0000 -+++ tclConfig.sh.in 2003-11-08 09:30:18.000000000 +0000 +$OpenBSD: patch-tclConfig_sh_in,v 1.2 2006/10/18 13:10:37 naddy Exp $ +--- tclConfig.sh.in.orig Fri Oct 18 22:44:46 2002 ++++ tclConfig.sh.in Wed Oct 18 12:59:42 2006 @@ -109,10 +109,6 @@ TCL_RANLIB='@RANLIB@' TCL_LIB_FLAG='@TCL_LIB_FLAG@' @@ -37,9 +37,9 @@ $OpenBSD: patch-tclConfig_sh_in,v 1.1 2003/11/08 04:50:58 kevlo Exp $ -# String to pass to linker to pick up the Tcl stub library from its # installed directory. TCL_STUB_LIB_SPEC='@TCL_STUB_LIB_SPEC@' - +- -# Path to the Tcl stub library in the build directory. -TCL_BUILD_STUB_LIB_PATH='@TCL_BUILD_STUB_LIB_PATH@' -- + # Path to the Tcl stub library in the install directory. TCL_STUB_LIB_PATH='@TCL_STUB_LIB_PATH@' diff --git a/lang/tcl/8.4/Makefile b/lang/tcl/8.4/Makefile index 5cf59158c2c..4f21de5a570 100644 --- a/lang/tcl/8.4/Makefile +++ b/lang/tcl/8.4/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.15 2006/09/29 22:10:53 steven Exp $ +# $OpenBSD: Makefile,v 1.16 2006/10/18 13:10:37 naddy Exp $ # Uses pthreads (can but does not at the moment) COMMENT= "Tool Command Language" @@ -6,7 +6,7 @@ COMMENT= "Tool Command Language" VERSION= 8.4.7 DISTNAME= tcl${VERSION}-src -PKGNAME= tcl-${VERSION}p2 +PKGNAME= tcl-${VERSION}p3 SHARED_LIBS= tcl84 1.0 CATEGORIES= lang lang/tcl MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=tcl/} diff --git a/lang/tcl/8.4/patches/patch-tcl_m4 b/lang/tcl/8.4/patches/patch-tcl_m4 index 70b07342758..c15d8edecda 100644 --- a/lang/tcl/8.4/patches/patch-tcl_m4 +++ b/lang/tcl/8.4/patches/patch-tcl_m4 @@ -1,6 +1,6 @@ ---- tcl.m4.orig Mon Jul 26 21:40:46 2004 -+++ tcl.m4 Sat Aug 7 13:31:43 2004 -@@ -1256,24 +1256,48 @@ dnl AC_CHECK_TOOL(AR, ar) +--- tcl.m4.orig Mon Jul 26 23:40:46 2004 ++++ tcl.m4 Wed Oct 18 13:39:29 2006 +@@ -1256,24 +1256,42 @@ dnl AC_CHECK_TOOL(AR, ar) TCL_LIB_VERSIONS_OK=nodots ;; OpenBSD-*) @@ -27,13 +27,7 @@ + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' + ;; + *) -+ # OpenBSD/SPARC[64] needs -fPIC, -fpic will not do. -+ case `machine` in -+ sparc|sparc64) -+ SHLIB_CFLAGS="-fPIC";; -+ *) -+ SHLIB_CFLAGS="-fpic";; -+ esac ++ SHLIB_CFLAGS="-fPIC" + SHLIB_LD="${CC} -shared ${SHLIB_CFLAGS}" + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so"