summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2003-03-14 19:37:30 +0000
committerjlam <jlam@pkgsrc.org>2003-03-14 19:37:30 +0000
commit3ef633718c6eecbd852195de9329d45632a10352 (patch)
tree4ee2e06249d68477cf3fb68be1f095453bcec90d /lang
parent1940384395085677c2036358dfcccfad791a4dd8 (diff)
downloadpkgsrc-3ef633718c6eecbd852195de9329d45632a10352.tar.gz
(1) Publicly export the value of _OPSYS_RPATH_NAME as RPATH_FLAG;
Makefiles simply need to use this value often, for better or for worse. (2) Create a new variable FIX_RPATH that lists variables that should be cleansed of -R or -rpath values if ${_USE_RPATH} is "no". By default, FIX_RPATH contains LIBS, X11_LDFLAGS, and LDFLAGS, and additional variables may be appended from package Makefiles.
Diffstat (limited to 'lang')
-rw-r--r--lang/ocaml/Makefile7
-rw-r--r--lang/perl5/Makefile7
-rw-r--r--lang/perl5/module.mk3
-rw-r--r--lang/perl58/Makefile7
-rw-r--r--lang/python15/buildlink2.mk5
-rw-r--r--lang/python20/Makefile8
-rw-r--r--lang/python20/buildlink2.mk5
-rw-r--r--lang/python21-pth/buildlink2.mk5
-rw-r--r--lang/python21/buildlink2.mk5
-rw-r--r--lang/python22-pth/buildlink2.mk5
-rw-r--r--lang/python22/buildlink2.mk5
11 files changed, 38 insertions, 24 deletions
diff --git a/lang/ocaml/Makefile b/lang/ocaml/Makefile
index d243a836199..9391bd525d3 100644
--- a/lang/ocaml/Makefile
+++ b/lang/ocaml/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2002/08/22 02:56:51 jschauma Exp $
+# $NetBSD: Makefile,v 1.13 2003/03/14 19:37:42 jlam Exp $
#
DISTNAME= ocaml-3.06
@@ -16,7 +16,10 @@ HAS_CONFIGURE= yes
CONFIGURE_ARGS+= -prefix ${LOCALBASE}
CONFIGURE_ARGS+= -tklibs -L${LOCALBASE}/lib
CONFIGURE_ARGS+= -tkdefs "-I${LOCALBASE}/include "
-CONFIGURE_ARGS+= -libs "-Wl,-R${X11BASE}/lib -Wl,-R${LOCALBASE}/lib"
+CONFIGURE_ARGS+= -libs "${OCAML_LDFLAGS}"
+OCAML_LDFLAGS= -Wl,${RPATH_FLAG}${X11BASE}/lib \
+ -Wl,${RPATH_FLAG}${LOCALBASE}/lib
+FIX_RPATH+= OCAML_LDFLAGS
ALL_TARGET= world
diff --git a/lang/perl5/Makefile b/lang/perl5/Makefile
index 02385dcc479..c43e04989b8 100644
--- a/lang/perl5/Makefile
+++ b/lang/perl5/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.62 2003/02/27 04:32:33 grant Exp $
+# $NetBSD: Makefile,v 1.63 2003/03/14 19:37:43 jlam Exp $
.include "../../lang/perl5/Makefile.common"
@@ -60,10 +60,11 @@ LOCINCPATH= ${LOCALBASE}/include
# flags to the link command in the right way.
#
.if ${OBJECT_FMT} == "a.out"
-LOCLIBRPATHFLAGS= ${LOCLIBPATH:S/^/-R/g}
+LOCLIBRPATHFLAGS= ${LOCLIBPATH:S/^/${RPATH_FLAG}/g}
.else
-LOCLIBRPATHFLAGS= ${LOCLIBPATH:S/^/-Wl,-R/g}
+LOCLIBRPATHFLAGS= ${LOCLIBPATH:S/^/-Wl,${RPATH_FLAG}/g}
.endif
+FIX_RPATH+= LOCLIBRPATHFLAGS
.if defined(LIBSWANTED.${OPSYS})
CONFIGURE_ARGS+= -Dlibswanted="${LIBSWANTED.${OPSYS}}"
diff --git a/lang/perl5/module.mk b/lang/perl5/module.mk
index 5473a4c328b..39070fc6a32 100644
--- a/lang/perl5/module.mk
+++ b/lang/perl5/module.mk
@@ -1,4 +1,4 @@
-# $NetBSD: module.mk,v 1.7 2003/03/05 16:07:44 seb Exp $
+# $NetBSD: module.mk,v 1.8 2003/03/14 19:37:43 jlam Exp $
#
# This Makefile fragment is intended to be included by packages that build
# and install perl5 modules.
@@ -54,6 +54,7 @@ do-configure: perl5-configure
# customizing the LDFLAGS passed to the compiler/linker.
#
.if defined(PERL5_LDFLAGS) && !empty(PERL5_LDFLAGS)
+FIX_RPATH+= PERL5_LDFLAGS
LDFLAGS+= ${PERL5_LDFLAGS}
. include "../../mk/bsd.prefs.mk"
. if ${OBJECT_FMT} == "a.out"
diff --git a/lang/perl58/Makefile b/lang/perl58/Makefile
index a9ca871f3fb..faf55e40465 100644
--- a/lang/perl58/Makefile
+++ b/lang/perl58/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2003/02/27 04:32:33 grant Exp $
+# $NetBSD: Makefile,v 1.11 2003/03/14 19:37:43 jlam Exp $
.include "Makefile.common"
@@ -80,12 +80,13 @@ LOCINCPATH= ${LOCALBASE}/include
# flags to the link command in the right way.
#
.if ${OBJECT_FMT} == "a.out"
-LOCLIBRPATHFLAGS= ${LOCLIBPATH:S/^/-R/g}
+LOCLIBRPATHFLAGS= ${LOCLIBPATH:S/^/${RPATH_FLAG}/g}
.elif ${OBJECT_FMT} == "ELF"
-LOCLIBRPATHFLAGS= ${LOCLIBPATH:S/^/-Wl,-R/g}
+LOCLIBRPATHFLAGS= ${LOCLIBPATH:S/^/-Wl,${RPATH_FLAG}/g}
.else
LOCLIBRPATHFLAGS= # empty
.endif
+FIX_RPATH+= LOCLIBRPATHFLAGS
.if defined(LIBSWANTED.${OPSYS})
CONFIGURE_ARGS+= -Dlibswanted="${LIBSWANTED.${OPSYS}}"
diff --git a/lang/python15/buildlink2.mk b/lang/python15/buildlink2.mk
index 1323f4c9060..788d6762315 100644
--- a/lang/python15/buildlink2.mk
+++ b/lang/python15/buildlink2.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink2.mk,v 1.7 2002/10/13 07:16:50 jlam Exp $
+# $NetBSD: buildlink2.mk,v 1.8 2003/03/14 19:37:43 jlam Exp $
.if !defined(PYTHON15_BUILDLINK2_MK)
PYTHON15_BUILDLINK2_MK= # defined
@@ -25,7 +25,8 @@ BUILDLINK_CPPFLAGS.python15+= \
-I${BUILDLINK_PREFIX.python15}/include/python1.5
BUILDLINK_LDFLAGS.python15+= \
-L${BUILDLINK_PREFIX.python15}/lib/python1.5/config \
- -Wl,-R${BUILDLINK_PREFIX.python15}/lib/python1.5/config
+ -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.python15}/lib/python1.5/config
+FIX_RPATH+= BUILDLINK_LDFLAGS.python15
BUILDLINK_TARGETS+= python15-buildlink
diff --git a/lang/python20/Makefile b/lang/python20/Makefile
index cbeeded07f0..877dd1d5290 100644
--- a/lang/python20/Makefile
+++ b/lang/python20/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2002/10/25 12:45:00 wiz Exp $
+# $NetBSD: Makefile,v 1.6 2003/03/14 19:37:44 jlam Exp $
#
DISTNAME= Python-2.0.1
@@ -32,7 +32,8 @@ SCRIPTS_ENV+= 'OPT=${CFLAGS}'
SSLFLAGS= -DUSE_SSL -I${BUILDLINK_PREFIX.openssl}/include/openssl \
-L${BUILDLINK_PREFIX.openssl}/lib \
- -Wl,-R${BUILDLINK_PREFIX.openssl}/lib -lssl -lcrypto
+ -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.openssl}/lib -lssl -lcrypto
+FIX_RPATH+= SSLFLAGS
# Handle the module setup file:
# - disable a few broken modules on 64 bit platforms (nothing important)
@@ -41,7 +42,8 @@ SSLFLAGS= -DUSE_SSL -I${BUILDLINK_PREFIX.openssl}/include/openssl \
.if ${OPSYS} == "SunOS"
ZOULARIS?= ${PREFIX}/bsd
-MODADD= -I${ZOULARIS}/include -L${ZOULARIS}/lib -R${ZOULARIS}/lib
+MODADD= -I${ZOULARIS}/include -L${ZOULARIS}/lib ${RPATH_FLAG}${ZOULARIS}/lib
+FIX_RPATH+= MODADD
.endif
pre-configure:
diff --git a/lang/python20/buildlink2.mk b/lang/python20/buildlink2.mk
index da291768d4e..7260c60df8a 100644
--- a/lang/python20/buildlink2.mk
+++ b/lang/python20/buildlink2.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink2.mk,v 1.8 2002/10/13 07:16:51 jlam Exp $
+# $NetBSD: buildlink2.mk,v 1.9 2003/03/14 19:37:44 jlam Exp $
.if !defined(PYTHON20_BUILDLINK2_MK)
PYTHON20_BUILDLINK2_MK= # defined
@@ -25,7 +25,8 @@ BUILDLINK_CPPFLAGS.python20+= \
-I${BUILDLINK_PREFIX.python20}/include/python2.0
BUILDLINK_LDFLAGS.python20+= \
-L${BUILDLINK_PREFIX.python20}/lib/python2.0/config \
- -Wl,-R${BUILDLINK_PREFIX.python20}/lib/python2.0/config
+ -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.python20}/lib/python2.0/config
+FIX_RPATH+= BUILDLINK_LDFLAGS.python20
BUILDLINK_TARGETS+= python20-buildlink
diff --git a/lang/python21-pth/buildlink2.mk b/lang/python21-pth/buildlink2.mk
index 471e831ced7..c113866d7d5 100644
--- a/lang/python21-pth/buildlink2.mk
+++ b/lang/python21-pth/buildlink2.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink2.mk,v 1.7 2002/10/13 07:16:51 jlam Exp $
+# $NetBSD: buildlink2.mk,v 1.8 2003/03/14 19:37:45 jlam Exp $
.if !defined(PYTHON21_BUILDLINK2_MK)
PYTHON21_BUILDLINK2_MK= # defined
@@ -25,7 +25,8 @@ BUILDLINK_CPPFLAGS.python21-pth+= \
-I${BUILDLINK_PREFIX.python21-pth}/include/python2p1
BUILDLINK_LDFLAGS.python21-pth+= \
-L${BUILDLINK_PREFIX.python21-pth}/lib/python2p1/config \
- -Wl,-R${BUILDLINK_PREFIX.python21-pth}/lib/python2p1/config
+ -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.python21-pth}/lib/python2p1/config
+FIX_RPATH+= BUILDLINK_LDFLAGS.python21-pth
BUILDLINK_TARGETS+= python21-pth-buildlink
diff --git a/lang/python21/buildlink2.mk b/lang/python21/buildlink2.mk
index d6941377a18..cf4c3b17be9 100644
--- a/lang/python21/buildlink2.mk
+++ b/lang/python21/buildlink2.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink2.mk,v 1.7 2002/10/13 07:16:52 jlam Exp $
+# $NetBSD: buildlink2.mk,v 1.8 2003/03/14 19:37:45 jlam Exp $
.if !defined(PYTHON21_BUILDLINK2_MK)
PYTHON21_BUILDLINK2_MK= # defined
@@ -25,7 +25,8 @@ BUILDLINK_CPPFLAGS.python21+= \
-I${BUILDLINK_PREFIX.python21}/include/python2.1
BUILDLINK_LDFLAGS.python21+= \
-L${BUILDLINK_PREFIX.python21}/lib/python2.1/config \
- -Wl,-R${BUILDLINK_PREFIX.python21}/lib/python2.1/config
+ -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.python21}/lib/python2.1/config
+FIX_RPATH+= BUILDLINK_LDFLAGS.python21
BUILDLINK_TARGETS+= python21-buildlink
diff --git a/lang/python22-pth/buildlink2.mk b/lang/python22-pth/buildlink2.mk
index 0b1a9375016..df4f418b200 100644
--- a/lang/python22-pth/buildlink2.mk
+++ b/lang/python22-pth/buildlink2.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink2.mk,v 1.1.1.1 2002/10/25 10:48:47 drochner Exp $
+# $NetBSD: buildlink2.mk,v 1.2 2003/03/14 19:37:45 jlam Exp $
.if !defined(PYTHON22_BUILDLINK2_MK)
PYTHON22_BUILDLINK2_MK= # defined
@@ -25,7 +25,8 @@ BUILDLINK_CPPFLAGS.python22-pth+= \
-I${BUILDLINK_PREFIX.python22-pth}/include/python2p2
BUILDLINK_LDFLAGS.python22-pth+= \
-L${BUILDLINK_PREFIX.python22-pth}/lib/python2p2/config \
- -Wl,-R${BUILDLINK_PREFIX.python22-pth}/lib/python2p2/config
+ -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.python22-pth}/lib/python2p2/config
+FIX_RPATH+= BUILDLINK_LDFLAGS.python22-pth
BUILDLINK_TARGETS+= python22-pth-buildlink
diff --git a/lang/python22/buildlink2.mk b/lang/python22/buildlink2.mk
index 6d70bc5ecf0..bf8e64dfc25 100644
--- a/lang/python22/buildlink2.mk
+++ b/lang/python22/buildlink2.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink2.mk,v 1.10 2002/10/13 07:16:52 jlam Exp $
+# $NetBSD: buildlink2.mk,v 1.11 2003/03/14 19:37:46 jlam Exp $
.if !defined(PYTHON22_BUILDLINK2_MK)
PYTHON22_BUILDLINK2_MK= # defined
@@ -25,7 +25,8 @@ BUILDLINK_CPPFLAGS.python22+= \
-I${BUILDLINK_PREFIX.python22}/include/python2.2
BUILDLINK_LDFLAGS.python22+= \
-L${BUILDLINK_PREFIX.python22}/lib/python2.2/config \
- -Wl,-R${BUILDLINK_PREFIX.python22}/lib/python2.2/config
+ -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.python22}/lib/python2.2/config
+FIX_RPATH+= BUILDLINK_LDFLAGS.python22
BUILDLINK_TARGETS+= python22-buildlink