unconditionally use -fPIC; sync patches

This commit is contained in:
naddy 2006-10-18 14:27:43 +00:00
parent 7718d75964
commit 59d17838da
6 changed files with 40 additions and 54 deletions

View File

@ -1,11 +1,11 @@
# $OpenBSD: Makefile,v 1.23 2006/09/18 10:21:49 espie Exp $
# $OpenBSD: Makefile,v 1.24 2006/10/18 14:27:43 naddy Exp $
COMMENT= "graphical toolkit for Tcl"
VERSION= 8.3.5
DISTNAME= tk${VERSION}-src
PKGNAME= tk-${VERSION}
PKGNAME= tk-${VERSION}p0
SHARED_LIBS= tk83 1.3
CATEGORIES= x11 x11/tk
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=tcl/}

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-Makefile_in,v 1.3 2004/12/05 11:39:06 sturm Exp $
--- Makefile.in.orig Wed Oct 23 17:45:50 2002
+++ Makefile.in Mon Dec 2 15:41:08 2002
@@ -356,7 +356,7 @@
$OpenBSD: patch-Makefile_in,v 1.4 2006/10/18 14:27:43 naddy Exp $
--- Makefile.in.orig Wed Oct 23 19:45:50 2002
+++ Makefile.in Wed Oct 18 15:33:39 2006
@@ -356,7 +356,7 @@ DEMOPROGS = browse hello ixset rmt rolod
all: binaries libraries doc
@ -10,7 +10,7 @@ $OpenBSD: patch-Makefile_in,v 1.3 2004/12/05 11:39:06 sturm Exp $
libraries:
@@ -371,12 +371,15 @@
@@ -371,13 +371,16 @@ doc: $(SRC_DIR)/doc/man.macros
${TK_LIB_FILE}: ${OBJS}
rm -f ${TK_LIB_FILE}
@MAKE_LIB@
@ -20,15 +20,16 @@ $OpenBSD: patch-Makefile_in,v 1.3 2004/12/05 11:39:06 sturm Exp $
rm -f ${STUB_LIB_FILE}
@MAKE_STUB_LIB@
- $(RANLIB) ${STUB_LIB_FILE}
+
+libtk83.a: ${OBJS}
+ rm -f libtk83.a
+ ar cr libtk83.a ${OBJS}
+ $(RANLIB) libtk83.a
+
# 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
@@ -478,12 +481,15 @@
# extensions. used for the Tcl Plugin. -- dl
@@ -478,12 +481,15 @@ install-binaries: $(TK_LIB_FILE) $(TK_ST
fi
@echo "Installing $(TK_LIB_FILE) to $(LIB_INSTALL_DIR)/"
@$(INSTALL_DATA) $(TK_LIB_FILE) $(LIB_INSTALL_DIR)/$(TK_LIB_FILE)
@ -46,7 +47,7 @@ $OpenBSD: patch-Makefile_in,v 1.3 2004/12/05 11:39:06 sturm Exp $
@if test "$(TK_BUILD_EXP_FILE)" != ""; then \
echo "Installing $(TK_EXP_FILE) to $(LIB_INSTALL_DIR)/"; \
$(INSTALL_DATA) $(TK_BUILD_EXP_FILE) \
@@ -497,6 +503,7 @@
@@ -497,6 +503,7 @@ install-binaries: $(TK_LIB_FILE) $(TK_ST
install-libraries:
@for i in $(INCLUDE_INSTALL_DIR) \
@ -54,20 +55,20 @@ $OpenBSD: patch-Makefile_in,v 1.3 2004/12/05 11:39:06 sturm Exp $
$(SCRIPT_INSTALL_DIR) $(SCRIPT_INSTALL_DIR)/images; \
do \
if [ ! -d $$i ] ; then \
@@ -510,11 +517,19 @@
@@ -510,11 +517,19 @@ install-libraries:
chmod +x $(UNIX_DIR)/install-sh; \
fi
@echo "Installing header files";
- @for i in $(GENERIC_DIR)/tk.h $(GENERIC_DIR)/tkPlatDecls.h \
- $(GENERIC_DIR)/tkDecls.h ; \
+ @for i in $(GENERIC_DIR)/*.h ; \
+ do \
do \
- $(INSTALL_DATA) $$i $(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 $(INCLUDE_INSTALL_DIR); \
+ do \
+ $(INSTALL_DATA) $$i $(INSTALL_ROOT)$(UNIX_INCLUDE_INSTALL_DIR); \
done;
+ @ln -sf $(GENERIC_INCLUDE_INSTALL_DIR)/tk.h $(INCLUDE_INSTALL_DIR)/tk.h

View File

@ -1,24 +1,15 @@
--- configure.orig Wed Oct 23 19:45:50 2002
+++ configure Tue Jan 14 23:08:34 2003
@@ -2438,9 +2438,14 @@
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
+++ configure Wed Oct 18 15:47:12 2006
@@ -2440,7 +2440,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"
@@ -2462,11 +2467,11 @@
@@ -2462,11 +2462,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
@ -32,7 +23,7 @@
fi
rm -f conftest*
@@ -3074,6 +3079,7 @@
@@ -3074,6 +3074,7 @@ EOF
fi
fi
@ -40,7 +31,7 @@
LIB_RUNTIME_DIR='${LIB_RUNTIME_DIR}'
@@ -4029,16 +4035,16 @@
@@ -4029,16 +4030,16 @@ echo "configure:4027: checking for X11 l
for i in $dirs ; do
if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
echo "$ac_t""$i" 1>&6
@ -60,7 +51,7 @@
fi
fi
if test "$XLIBSW" = nope ; then
@@ -4778,13 +4784,12 @@
@@ -4778,13 +4779,12 @@ if test "${SHARED_BUILD}" = "1" -a "${SH
TK_SHLIB_CFLAGS="${SHLIB_CFLAGS}"
TK_LIB_FILE=libtk${TK_SHARED_LIB_SUFFIX}
MAKE_LIB="\${SHLIB_LD} -o \$@ \${OBJS} \$(TK_LD_SEARCH_FLAGS) \${TCL_STUB_LIB_SPEC} \${SHLIB_LD_LIBS}"
@ -76,7 +67,7 @@
TCL_STUB_FLAGS=""
fi
@@ -4833,7 +4838,7 @@
@@ -4833,7 +4833,7 @@ TK_SHARED_BUILD=${SHARED_BUILD}
eval "TK_STUB_LIB_FILE=libtkstub${TK_UNSHARED_LIB_SUFFIX}"
# FIXME: Should we add MAKE_STUB_LIB to tclConfig.sh ?

View File

@ -1,11 +1,11 @@
# $OpenBSD: Makefile,v 1.11 2006/01/08 20:56:08 naddy Exp $
# $OpenBSD: Makefile,v 1.12 2006/10/18 14:27:43 naddy Exp $
COMMENT= "graphical toolkit for Tcl"
VERSION= 8.4.7
DISTNAME= tk${VERSION}-src
PKGNAME= tk-${VERSION}
PKGNAME= tk-${VERSION}p0
SHARED_LIBS= tk84 1.0
CATEGORIES= x11 x11/tk
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=tcl/}

View File

@ -1,16 +1,16 @@
$OpenBSD: patch-configure_in,v 1.2 2004/05/20 21:25:46 miod Exp $
--- configure.in.orig 2004-03-02 00:04:48.000000000 +0000
+++ configure.in 2004-05-17 10:34:16.000000000 +0000
@@ -108,6 +108,8 @@ SC_CONFIG_CFLAGS
SC_ENABLE_SYMBOLS
$OpenBSD: patch-configure_in,v 1.3 2006/10/18 14:27:43 naddy Exp $
--- configure.in.orig Thu Jul 29 23:57:48 2004
+++ configure.in Wed Oct 18 16:07:09 2006
@@ -114,6 +114,8 @@ SC_TCL_64BIT_FLAGS
# search path to reflect this.
#------------------------------------------------------------------------
+TCL_SRC_DIR=${prefix}/include/tcl${TCL_VERSION}
+
LIB_RUNTIME_DIR='${LIB_RUNTIME_DIR}'
TK_DBGX=${DBGX}
@@ -361,7 +363,7 @@ eval eval "TK_UNSHARED_LIB_SUFFIX=${UNSH
if test "$TCL_EXEC_PREFIX" != "$exec_prefix"; then
@@ -346,7 +348,7 @@ eval eval "TK_UNSHARED_LIB_SUFFIX=${UNSH
if test "${SHARED_BUILD}" = "1" -a "${SHLIB_SUFFIX}" != ""; then
SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TCL_STUB_LIB_SPEC}"

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-tcl_m4,v 1.5 2006/01/08 20:56:08 naddy Exp $
--- tcl.m4.orig Sat Aug 7 13:40:15 2004
+++ tcl.m4 Sat Aug 7 13:44:10 2004
@@ -1256,24 +1256,48 @@ dnl AC_CHECK_TOOL(AR, ar)
$OpenBSD: patch-tcl_m4,v 1.6 2006/10/18 14:27:43 naddy Exp $
--- tcl.m4.orig Thu Jul 29 23:57:48 2004
+++ tcl.m4 Wed Oct 18 16:08:46 2006
@@ -1256,24 +1256,42 @@ dnl AC_CHECK_TOOL(AR, ar)
TCL_LIB_VERSIONS_OK=nodots
;;
OpenBSD-*)
@ -28,13 +28,7 @@ $OpenBSD: patch-tcl_m4,v 1.5 2006/01/08 20:56:08 naddy Exp $
+ 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"