summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjlam <jlam>2003-03-14 19:37:30 +0000
committerjlam <jlam>2003-03-14 19:37:30 +0000
commitf69d0aee59b843edb712e3c7201d67c1860a9902 (patch)
tree4ee2e06249d68477cf3fb68be1f095453bcec90d
parent2045c3a17f778f4291f00ac8495b025fac1eb26c (diff)
downloadpkgsrc-f69d0aee59b843edb712e3c7201d67c1860a9902.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.
-rw-r--r--audio/kdemultimedia/Makefile8
-rw-r--r--cad/fasthenry/Makefile4
-rw-r--r--chat/fugu/Makefile4
-rw-r--r--chat/kicq/Makefile7
-rw-r--r--converters/libiconv/buildlink2.mk4
-rw-r--r--cross/bfd-crunchide/Makefile7
-rw-r--r--cross/bfd-mdsetimage/Makefile7
-rw-r--r--databases/freetds/buildlink2.mk5
-rw-r--r--databases/mysql-client/Makefile.common4
-rw-r--r--databases/mysql-client/buildlink2.mk5
-rw-r--r--databases/p5-DBD-Sybase/Makefile4
-rw-r--r--databases/php3-mysql/Makefile4
-rw-r--r--databases/php4-mysql/Makefile4
-rw-r--r--databases/sqsh/Makefile4
-rw-r--r--devel/gettext-lib/buildlink2.mk5
-rw-r--r--editors/TeXmacs/Makefile4
-rw-r--r--emulators/atari800/Makefile6
-rw-r--r--games/abuse/Makefile4
-rw-r--r--games/backgammon/Makefile7
-rw-r--r--games/kdegames/Makefile7
-rw-r--r--games/kdetoys/Makefile7
-rw-r--r--games/netmaze/Makefile4
-rw-r--r--graphics/avifile-devel/Makefile9
-rw-r--r--graphics/imlib/Makefile4
-rw-r--r--graphics/jhead/Makefile4
-rw-r--r--graphics/kdegraphics/Makefile7
-rw-r--r--graphics/ogle/buildlink2.mk4
-rw-r--r--graphics/png2html/Makefile5
-rw-r--r--graphics/pstoedit/Makefile4
-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
-rw-r--r--mail/bbmail/Makefile4
-rw-r--r--mail/postfix/Makefile16
-rw-r--r--mail/teapop/Makefile4
-rw-r--r--math/R/buildlink2.mk5
-rw-r--r--math/octave/Makefile4
-rw-r--r--misc/kdeutils/Makefile7
-rw-r--r--misc/openoffice/Makefile4
-rw-r--r--mk/bsd.pkg.mk32
-rw-r--r--mk/bsd.prefs.mk6
-rw-r--r--net/bind9-current/Makefile4
-rw-r--r--net/bind9/Makefile4
-rw-r--r--net/coda_client/Makefile9
-rw-r--r--net/kdenetwork/Makefile7
-rw-r--r--net/pureftpd/Makefile4
-rw-r--r--net/snort-mysql/Makefile6
-rw-r--r--print/ghostscript-gnu/Makefile.common4
-rw-r--r--print/ghostscript-nox11/Makefile.common6
-rw-r--r--security/pgp2/Makefile6
-rw-r--r--security/ssh/Makefile6
-rw-r--r--shells/zsh/Makefile4
-rw-r--r--sysutils/kdf/Makefile7
-rw-r--r--textproc/pyxml/Makefile6
-rw-r--r--textproc/xerces-c/Makefile6
-rw-r--r--time/korganizer/Makefile7
-rw-r--r--time/kworldwatch/Makefile7
-rw-r--r--time/xtu/Makefile4
-rw-r--r--wm/amiwm/Makefile7
-rw-r--r--www/ap-ssl/Makefile8
-rw-r--r--www/apache/Makefile4
-rw-r--r--www/apache6/Makefile4
-rw-r--r--www/galeon/Makefile4
-rw-r--r--www/mozilla/Makefile.common4
-rw-r--r--www/skipstone/Makefile6
-rw-r--r--x11/bbapm/Makefile4
-rw-r--r--x11/gnome-python/Makefile5
-rw-r--r--x11/gtk/Makefile4
-rw-r--r--x11/kdebase/Makefile7
-rw-r--r--x11/kdelibs/Makefile7
-rw-r--r--x11/khostchooser/Makefile7
-rw-r--r--x11/qt1/buildlink2.mk7
-rw-r--r--x11/qt2-libs/buildlink2.mk7
-rw-r--r--x11/qt3-libs/buildlink2.mk7
82 files changed, 290 insertions, 195 deletions
diff --git a/audio/kdemultimedia/Makefile b/audio/kdemultimedia/Makefile
index 1685f60b4ef..b789caac594 100644
--- a/audio/kdemultimedia/Makefile
+++ b/audio/kdemultimedia/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.14 2003/03/13 12:13:17 wiz Exp $
+# $NetBSD: Makefile,v 1.15 2003/03/14 19:37:30 jlam Exp $
DISTNAME= kdemultimedia-1.1.2
PKGREVISION= 1
@@ -22,7 +22,11 @@ CONFIGURE_ARGS= "--datadir=${KDEBASEDIR}/share/kde" \
CFLAGS+= -I${LOCALBASE}/include
CONFIGURE_ENV= KDEDIR=${KDEBASEDIR} \
CXXFLAGS="${CFLAGS}" \
- all_libraries="-L${LOCALBASE}/lib -Wl,-R${LOCALBASE}/lib -L${X11BASE}/lib -Wl,-R${X11BASE}/lib"
+ all_libraries="${KDE_LDFLAGS}"
+
+KDE_LDFLAGS= -L${LOCALBASE}/lib -L${X11BASE}/lib
+KDE_LDFLAGS+= -Wl,${RPATH_FLAG}${LOCALBASE}/lib -Wl,${RPATH_FLAG}${X11BASE}/lib
+FIX_RPATH+= KDE_LDFLAGS
post-install:
@${CHMOD} -R go-w ${KDEBASEDIR}/share/kde/apps/kscd/cddb
diff --git a/cad/fasthenry/Makefile b/cad/fasthenry/Makefile
index 44207cf6873..0423f39f580 100644
--- a/cad/fasthenry/Makefile
+++ b/cad/fasthenry/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2002/09/29 03:31:13 jlam Exp $
+# $NetBSD: Makefile,v 1.12 2003/03/14 19:37:31 jlam Exp $
#
DISTNAME= fasthenry-3.0-12Nov96
@@ -32,7 +32,7 @@ CONFIGURE_ARGS= default
#>
. include "../../math/libffm/buildlink2.mk"
DEPENDS+= libffm-[0-9]*:../../math/libffm
-LIBS= -L${LOCALBASE}/lib -Wl,-R${LOCALBASE}/lib -lffm -lm
+LIBS= -L${LOCALBASE}/lib -Wl,${RPATH_FLAG}${LOCALBASE}/lib -lffm -lm
MAKE_ENV+= LIBS="${LIBS}"
.else
LIBS= -lm
diff --git a/chat/fugu/Makefile b/chat/fugu/Makefile
index b2ba3d802e3..58dfbdcdc99 100644
--- a/chat/fugu/Makefile
+++ b/chat/fugu/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2002/12/08 02:17:45 salo Exp $
+# $NetBSD: Makefile,v 1.7 2003/03/14 19:37:32 jlam Exp $
#
DISTNAME= fugu-1.0
@@ -15,7 +15,7 @@ USE_BUILDLINK2= YES
GNU_CONFIGURE= YES
CONFIGURE_ENV+= vi_cv_path_python=${PYTHONBIN}
LDFLAGS+= -L${BUILDLINK_PREFIX.py-Pmw}/lib \
- -Wl,-R${BUILDLINK_PREFIX.py-Pmw}/lib
+ -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.py-Pmw}/lib
CPPFLAGS+= -I${BUILDLINK_PREFIX.py-Pmw}/include \
-I${BUILDLINK_PREFIX.rsaref}/include/rsaref \
-I${BUILDLINK_PREFIX.rsaref}/include
diff --git a/chat/kicq/Makefile b/chat/kicq/Makefile
index 701950d8354..41a58e0ebad 100644
--- a/chat/kicq/Makefile
+++ b/chat/kicq/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2003/03/12 21:02:25 jschauma Exp $
+# $NetBSD: Makefile,v 1.12 2003/03/14 19:37:32 jlam Exp $
DISTNAME= kicq-1.0.0
PKGREVISION= 1
@@ -25,6 +25,9 @@ CONFIGURE_ARGS+= --datadir=${KDEBASEDIR}/share/kde \
--with-icq-libs=${LOCALBASE}/lib
CONFIGURE_ENV+= KDEDIR=${KDEBASEDIR} \
CXXFLAGS="${CFLAGS}" \
- all_libraries="-Wl,-R${QT1DIR}/qt1/lib -L${LOCALBASE}/lib -Wl,-R${LOCALBASE}/lib -L${X11BASE}/lib -Wl,-R${X11BASE}/lib -ltiff -ljpeg -lpng -lz"
+ all_libraries="${KDE_LDFLAGS}"
+
+FIX_RPATH+= KDE_LDFLAGS
+KDE_LDFLAGS= -Wl,${RPATH_FLAG}${QT1DIR}/qt1/lib -L${LOCALBASE}/lib -Wl,${RPATH_FLAG}${LOCALBASE}/lib -L${X11BASE}/lib -Wl,${RPATH_FLAG}${X11BASE}/lib -ltiff -ljpeg -lpng -lz"
.include "../../mk/bsd.pkg.mk"
diff --git a/converters/libiconv/buildlink2.mk b/converters/libiconv/buildlink2.mk
index ec71c73f7aa..eb881eabf80 100644
--- a/converters/libiconv/buildlink2.mk
+++ b/converters/libiconv/buildlink2.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink2.mk,v 1.4 2003/03/07 05:58:31 jlam Exp $
+# $NetBSD: buildlink2.mk,v 1.5 2003/03/14 19:37:32 jlam Exp $
.if !defined(ICONV_BUILDLINK2_MK)
ICONV_BUILDLINK2_MK= # defined
@@ -38,7 +38,7 @@ BUILDLINK_PACKAGES+= iconv
EVAL_PREFIX+= BUILDLINK_PREFIX.iconv=libiconv
BUILDLINK_PREFIX.iconv_DEFAULT= ${LOCALBASE}
BUILDLINK_LIBICONV_LDADD= -L${BUILDLINK_PREFIX.iconv}/lib
-BUILDLINK_LIBICONV_LDADD+= -Wl,-R${BUILDLINK_PREFIX.iconv}/lib
+BUILDLINK_LIBICONV_LDADD+= -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.iconv}/lib
BUILDLINK_LIBICONV_LDADD+= -liconv
.else
BUILDLINK_PREFIX.iconv= /usr
diff --git a/cross/bfd-crunchide/Makefile b/cross/bfd-crunchide/Makefile
index 131d9ea8637..c6047f6933e 100644
--- a/cross/bfd-crunchide/Makefile
+++ b/cross/bfd-crunchide/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2001/09/09 20:36:17 agc Exp $
+# $NetBSD: Makefile,v 1.9 2003/03/14 19:37:33 jlam Exp $
DISTNAME= bfd-crunchide-1.1
CATEGORIES= cross
@@ -20,7 +20,10 @@ USE_CROSSBASE= yes
BFD_VERSION= 2.9.1
CPPFLAGS+= -I${PREFIX}/include
MAKE_ENV+= BFD_VERSION=${BFD_VERSION} \
- LIBS="-L${PREFIX}/lib -Wl,-R${PREFIX}/lib -lbfd-${BFD_VERSION} -liberty"
+ LIBS="${BFD_LIBS}"
+
+FIX_RPATH+= BFD_LIBS
+BFD_LIBS= -L${PREFIX}/lib -Wl,${RPATH_FLAG}${PREFIX}/lib -lbfd-${BFD_VERSION} -liberty
do-extract:
@${MKDIR} ${WRKSRC}
diff --git a/cross/bfd-mdsetimage/Makefile b/cross/bfd-mdsetimage/Makefile
index 54c13b3fd0f..c0351d7db98 100644
--- a/cross/bfd-mdsetimage/Makefile
+++ b/cross/bfd-mdsetimage/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2001/09/09 20:36:18 agc Exp $
+# $NetBSD: Makefile,v 1.9 2003/03/14 19:37:33 jlam Exp $
DISTNAME= bfd-mdsetimage-1.15.1
CATEGORIES= cross
@@ -20,7 +20,10 @@ USE_CROSSBASE= yes
BFD_VERSION= 2.9.1
CPPFLAGS+= -I${PREFIX}/include
MAKE_ENV+= BFD_VERSION=${BFD_VERSION} \
- LIBS="-L${PREFIX}/lib -Wl,-R${PREFIX}/lib -lbfd-${BFD_VERSION} -liberty"
+ LIBS="${BFD_LIBS}"
+
+FIX_RPATH+= BFD_LIBS
+BFD_LIBS= -L${PREFIX}/lib -Wl,${RPATH_FLAG}${PREFIX}/lib -lbfd-${BFD_VERSION} -liberty
do-extract:
@${MKDIR} ${WRKSRC}
diff --git a/databases/freetds/buildlink2.mk b/databases/freetds/buildlink2.mk
index 223f49fa41d..2fcb8970c13 100644
--- a/databases/freetds/buildlink2.mk
+++ b/databases/freetds/buildlink2.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink2.mk,v 1.5 2002/10/12 09:40:00 wiz Exp $
+# $NetBSD: buildlink2.mk,v 1.6 2003/03/14 19:37:33 jlam Exp $
.if !defined(FREETDS_BUILDLINK2_MK)
FREETDS_BUILDLINK2_MK= # defined
@@ -14,7 +14,8 @@ BUILDLINK_FILES.freetds+= freetds/lib/*
BUILDLINK_CPPFLAGS.freetds= -I${BUILDLINK_PREFIX.freetds}/freetds/include
BUILDLINK_LDFLAGS.freetds= -L${BUILDLINK_PREFIX.freetds}/freetds/lib
-BUILDLINK_LDFLAGS.freetds+= -Wl,-R${BUILDLINK_PREFIX.freetds}/freetds/lib
+BUILDLINK_LDFLAGS.freetds+= -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.freetds}/freetds/lib
+FIX_RPATH+= BUILDLINK_LDFLAGS.freetds
BUILDLINK_TARGETS+= freetds-buildlink
diff --git a/databases/mysql-client/Makefile.common b/databases/mysql-client/Makefile.common
index b3e53de13b9..77e23bdd9e3 100644
--- a/databases/mysql-client/Makefile.common
+++ b/databases/mysql-client/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.12 2003/01/20 23:16:38 lukem Exp $
+# $NetBSD: Makefile.common,v 1.13 2003/03/14 19:37:34 jlam Exp $
DISTNAME= mysql-3.23.49
CATEGORIES= databases
@@ -43,7 +43,7 @@ CPPFLAGS+= -Dunix
USE_PERL5= # defined
USE_LIBTOOL= # defined
LTCONFIG_OVERRIDE= ${WRKSRC}/ltconfig
-LDFLAGS+= -Wl,-R${LOCALBASE}/lib/mysql
+LDFLAGS+= -Wl,${RPATH_FLAG}${LOCALBASE}/lib/mysql
post-extract:
cd ${WRKSRC}; \
diff --git a/databases/mysql-client/buildlink2.mk b/databases/mysql-client/buildlink2.mk
index 10cc78b1060..16ebecc9cf0 100644
--- a/databases/mysql-client/buildlink2.mk
+++ b/databases/mysql-client/buildlink2.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink2.mk,v 1.4 2002/12/13 14:19:54 tron Exp $
+# $NetBSD: buildlink2.mk,v 1.5 2003/03/14 19:37:34 jlam Exp $
.if !defined(MYSQL_CLIENT_BUILDLINK2_MK)
MYSQL_CLIENT_BUILDLINK2_MK= # defined
@@ -12,9 +12,10 @@ BUILDLINK_PREFIX.mysql-client_DEFAULT= ${LOCALBASE}
BUILDLINK_FILES.mysql-client= include/mysql/*.h
BUILDLINK_FILES.mysql-client+= lib/mysql/libmysqlclient.*
+FIX_RPATH+= BUILDLINK_LDFLAGS.mysql-client
BUILDLINK_LDFLAGS.mysql-client= \
-L${BUILDLINK_PREFIX.mysql-client}/lib/mysql \
- -Wl,-R${BUILDLINK_PREFIX.mysql-client}/lib/mysql
+ -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.mysql-client}/lib/mysql
.include "../../devel/zlib/buildlink2.mk"
diff --git a/databases/p5-DBD-Sybase/Makefile b/databases/p5-DBD-Sybase/Makefile
index 6473d2ed580..153e240dc22 100644
--- a/databases/p5-DBD-Sybase/Makefile
+++ b/databases/p5-DBD-Sybase/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2002/10/27 19:41:53 seb Exp $
+# $NetBSD: Makefile,v 1.9 2003/03/14 19:37:34 jlam Exp $
#
DISTNAME= DBD-Sybase-0.94
@@ -14,7 +14,7 @@ COMMENT= perl DBI/DBD driver for Sybase/MS-SQL databases
USE_BUILDLINK2= YES
PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/DBD/Sybase/.packlist
-PERL5_LDFLAGS+= -Wl,-R${BUILDLINK_PREFIX.freetds}/freetds/lib
+PERL5_LDFLAGS+= -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.freetds}/freetds/lib
MAKE_ENV+= SYBASE=${BUILDLINK_PREFIX.freetds}/freetds
.include "../../databases/freetds/buildlink2.mk"
diff --git a/databases/php3-mysql/Makefile b/databases/php3-mysql/Makefile
index c6c038ede50..e8f338804f0 100644
--- a/databases/php3-mysql/Makefile
+++ b/databases/php3-mysql/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2002/10/09 11:55:53 wiz Exp $
+# $NetBSD: Makefile,v 1.3 2003/03/14 19:37:35 jlam Exp $
MODNAME= mysql
CATEGORIES+= databases
@@ -13,7 +13,7 @@ BUILDLINK_DEPENDS.mysql-client= mysql-client>=3.23.35
CONFIGURE_ARGS+= --with-mysql=${BUILDLINK_PREFIX.mysql-client}
MOD_CPPFLAGS+= -I${BUILDLINK_PREFIX.mysql-client}/include/mysql
-MOD_LDFLAGS+= -L${BUILDLINK_PREFIX.mysql-client}/lib/mysql -R${LOCALBASE}/lib/mysql
+MOD_LDFLAGS+= -L${BUILDLINK_PREFIX.mysql-client}/lib/mysql ${RPATH_FLAG}${LOCALBASE}/lib/mysql
MOD_LIBS+= -lmysqlclient -lm
.include "../../databases/mysql-client/buildlink2.mk"
diff --git a/databases/php4-mysql/Makefile b/databases/php4-mysql/Makefile
index 8850f94b32d..7f26e316bc8 100644
--- a/databases/php4-mysql/Makefile
+++ b/databases/php4-mysql/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2003/01/02 23:35:43 lukem Exp $
+# $NetBSD: Makefile,v 1.7 2003/03/14 19:37:35 jlam Exp $
MODNAME= mysql
CATEGORIES+= databases
@@ -11,7 +11,7 @@ USE_BUILDLINK2= # defined
EVAL_PREFIX+= MYSQLDIR=mysql-client
CONFIGURE_ARGS+= --with-${MODNAME}=shared,${MYSQLDIR}
-LDFLAGS+= -Wl,-R${LOCALBASE}/lib/mysql
+LDFLAGS+= -Wl,${RPATH_FLAG}${LOCALBASE}/lib/mysql
.include "../../databases/mysql-client/buildlink2.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/databases/sqsh/Makefile b/databases/sqsh/Makefile
index a6085e0f8a6..04d8f3fcf6a 100644
--- a/databases/sqsh/Makefile
+++ b/databases/sqsh/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2002/10/12 09:40:38 wiz Exp $
+# $NetBSD: Makefile,v 1.12 2003/03/14 19:37:36 jlam Exp $
DISTNAME= sqsh-1.7-src
PKGNAME= sqsh-1.7
@@ -19,7 +19,7 @@ CONFIGURE_ARGS+= --with-readline
CONFIGURE_ENV+= SYBASE="${BUILDLINK_PREFIX.freetds}/${SYBASE}"
SYBASE= freetds
-LDFLAGS+= -Wl,-R${BUILDLINK_PREFIX.freetds}/${SYBASE}/lib
+LDFLAGS+= -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.freetds}/${SYBASE}/lib
CONFIGURE_ENV+= INCDIRS="${BUILDLINK_PREFIX.readline}/include"
CONFIGURE_ENV+= LIBDIRS="${BUILDLINK_PREFIX.readline}/lib"
diff --git a/devel/gettext-lib/buildlink2.mk b/devel/gettext-lib/buildlink2.mk
index 9bb04b11e73..44361abdc5e 100644
--- a/devel/gettext-lib/buildlink2.mk
+++ b/devel/gettext-lib/buildlink2.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink2.mk,v 1.19 2003/03/07 05:59:48 jlam Exp $
+# $NetBSD: buildlink2.mk,v 1.20 2003/03/14 19:37:36 jlam Exp $
.if !defined(GETTEXT_BUILDLINK2_MK)
GETTEXT_BUILDLINK2_MK= # defined
@@ -88,7 +88,7 @@ _BLNK_LIBINTL= # empty
.if ${_NEED_GNU_GETTEXT} == "YES"
_BLNK_INCINTL+= -I${BUILDLINK_PREFIX.gettext}/include
_BLNK_LIBINTL+= -L${BUILDLINK_PREFIX.gettext}/lib
-_BLNK_LIBINTL+= -Wl,-R${BUILDLINK_PREFIX.gettext}/lib
+_BLNK_LIBINTL+= -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.gettext}/lib
_BLNK_LIBINTL+= -lintl
. if ${_GETTEXT_NEEDS_ICONV} == "YES"
_BLNK_LIBINTL+= ${BUILDLINK_LIBICONV_LDADD}
@@ -98,6 +98,7 @@ _BLNK_LIBINTL+= ${BUILDLINK_LIBICONV_LDADD}
_BLNK_LIBINTL+= -lintl
. endif
.endif
+FIX_RPATH+= _BLNK_LIBINTL
# The following section is written to avoid using a conditional based on
# ${GNU_CONFIGURE}.
diff --git a/editors/TeXmacs/Makefile b/editors/TeXmacs/Makefile
index 54775f91cea..467a1c977f9 100644
--- a/editors/TeXmacs/Makefile
+++ b/editors/TeXmacs/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2003/01/30 00:08:57 jmmv Exp $
+# $NetBSD: Makefile,v 1.13 2003/03/14 19:37:37 jlam Exp $
DISTNAME= TeXmacs-1.0.1-src
PKGNAME= ${DISTNAME:S/-src//}
@@ -19,7 +19,7 @@ USE_GMAKE= yes
USE_X11= yes
GNU_CONFIGURE= yes
-LDFLAGS+= -Wl,-R${PREFIX}/libexec/${PKGNAME}/lib
+LDFLAGS+= -Wl,${RPATH_FLAG}${PREFIX}/libexec/${PKGNAME}/lib
PKG_DOCDIR= ${PREFIX}/share/doc/TeXmacs
PKG_CXXFLAGS= -DPKG_DOCDIR=\"\\\"${PKG_DOCDIR}\\\"\"
diff --git a/emulators/atari800/Makefile b/emulators/atari800/Makefile
index aaae9a2ae2d..e735fd7c470 100644
--- a/emulators/atari800/Makefile
+++ b/emulators/atari800/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.16 2002/12/06 21:06:19 cjep Exp $
+# $NetBSD: Makefile,v 1.17 2003/03/14 19:37:37 jlam Exp $
#
DISTNAME= atari800-1.2.5
@@ -33,7 +33,7 @@ post-extract:
@cd ${WRKDIR} && ${LOCALBASE}/bin/unzip -Lqo ${DISTDIR}/xf25.zip
do-build:
- @cd ${WRKSRC} && LDFLAGS="-s -L${X11BASE}/lib -Wl,-R,${X11BASE}/lib" LIBS=-lossaudio ./configure --prefix=${PREFIX} --with-x --enable-MONITOR_BREAK --enable-MONITOR_HINTS --enable-MONITOR_ASSEMBLER --enable-SOUND --enable-SET_LED --target=x11-shm
+ @cd ${WRKSRC} && LDFLAGS="-s ${X11_LDFLAGS}" LIBS=-lossaudio ./configure --prefix=${PREFIX} --with-x --enable-MONITOR_BREAK --enable-MONITOR_HINTS --enable-MONITOR_ASSEMBLER --enable-SOUND --enable-SET_LED --target=x11-shm
@${ECHO} '#define PREFIX "${PREFIX}"' >> ${WRKSRC}/config.h
@cd ${WRKSRC} && ${GMAKE}
${MV} ${WRKSRC}/atari800 ${WRKSRC}/atari800-shm
@@ -43,7 +43,7 @@ do-build:
@cd ${WRKSRC} && ${GMAKE}
${MV} ${WRKSRC}/atari800 ${WRKSRC}/atari800-curses
@cd ${WRKSRC} && ${GMAKE} clean
- @cd ${WRKSRC} && LDFLAGS="-s -L${X11BASE}/lib -Wl,-R,${X11BASE}/lib" LIBS=-lossaudio ./configure --prefix=${PREFIX} --with-x --enable-MONITOR_BREAK --enable-MONITOR_HINTS --enable-MONITOR_ASSEMBLER --enable-SOUND --enable-SET_LED --target=x11
+ @cd ${WRKSRC} && LDFLAGS="-s ${X11_LDFLAGS}" LIBS=-lossaudio ./configure --prefix=${PREFIX} --with-x --enable-MONITOR_BREAK --enable-MONITOR_HINTS --enable-MONITOR_ASSEMBLER --enable-SOUND --enable-SET_LED --target=x11
@${ECHO} '#define PREFIX "${PREFIX}"' >> ${WRKSRC}/config.h
@cd ${WRKSRC} && ${GMAKE}
${SED} -e 's,@PREFIX@,${PREFIX},g' <${FILESDIR}/atari800.cfg \
diff --git a/games/abuse/Makefile b/games/abuse/Makefile
index 967e2a35c03..2a9d96a8d27 100644
--- a/games/abuse/Makefile
+++ b/games/abuse/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2001/11/29 01:12:32 hubertf Exp $
+# $NetBSD: Makefile,v 1.11 2003/03/14 19:37:37 jlam Exp $
DISTNAME= abuse_pd
PKGNAME= abuse-2.0
@@ -13,7 +13,7 @@ COMMENT= Full color 320x200 arcade quality platform shooter
USE_X11BASE= yes
GNU_CONFIGURE= yes
-CONFIGURE_ENV+= LDFLAGS="-Wl,-R${X11BASE}/lib"
+CONFIGURE_ENV+= LDFLAGS="${X11_LDFLAGS}"
USE_GMAKE= yes
NOT_FOR_PLATFORM= NetBSD-*-arm32
diff --git a/games/backgammon/Makefile b/games/backgammon/Makefile
index 12489368e88..0b7cbd877f6 100644
--- a/games/backgammon/Makefile
+++ b/games/backgammon/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2002/11/04 23:27:19 wiz Exp $
+# $NetBSD: Makefile,v 1.8 2003/03/14 19:37:38 jlam Exp $
#
DISTNAME= bacKgammon-1.9.1b
@@ -24,6 +24,9 @@ CONFIGURE_ENV= KDEDIR=${KDEBASEDIR} \
MOC=${QT1DIR}/qt1/bin/moc \
QTDIR=${QT1DIR}/qt1 \
CXXFLAGS="${CFLAGS}" \
- all_libraries="-L${LOCALBASE}/lib -Wl,-R${LOCALBASE}/lib -L${X11BASE}/lib -Wl,-R${X11BASE}/lib"
+ all_libraries="${KDE_LDFLAGS}"
+
+FIX_RPATH+= KDE_LDFLAGS
+KDE_LDFLAGS= -L${LOCALBASE}/lib -Wl,${RPATH_FLAG}${LOCALBASE}/lib -L${X11BASE}/lib -Wl,${RPATH_FLAG}${X11BASE}/lib
.include "../../mk/bsd.pkg.mk"
diff --git a/games/kdegames/Makefile b/games/kdegames/Makefile
index fe806d6852f..d142a599b63 100644
--- a/games/kdegames/Makefile
+++ b/games/kdegames/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.47 2003/03/13 12:13:17 wiz Exp $
+# $NetBSD: Makefile,v 1.48 2003/03/14 19:37:38 jlam Exp $
# FreeBSD Id: Makefile,v 1.3 1997/11/05 04:19:49 asami Exp
#
@@ -25,6 +25,9 @@ CONFIGURE_ARGS= "--datadir=${KDEBASEDIR}/share/kde" \
CFLAGS+= -I${LOCALBASE}/include
CONFIGURE_ENV= KDEDIR=${KDEBASEDIR} \
CXXFLAGS="${CFLAGS}" \
- all_libraries="-L${LOCALBASE}/lib -Wl,-R${LOCALBASE}/lib -L${X11BASE}/lib -Wl,-R${X11BASE}/lib"
+ all_libraries="${KDE_LDFLAGS}"
+
+FIX_RPATH+= KDE_LDFLAGS
+KDE_LDFLAGS= -L${LOCALBASE}/lib -Wl,${RPATH_FLAG}${LOCALBASE}/lib -L${X11BASE}/lib -Wl,${RPATH_FLAG}${X11BASE}/lib
.include "../../mk/bsd.pkg.mk"
diff --git a/games/kdetoys/Makefile b/games/kdetoys/Makefile
index 43f9f898823..0ed633c40b7 100644
--- a/games/kdetoys/Makefile
+++ b/games/kdetoys/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.15 2003/03/12 21:02:24 jschauma Exp $
+# $NetBSD: Makefile,v 1.16 2003/03/14 19:37:39 jlam Exp $
DISTNAME= kdetoys-1.1.2
PKGREVISION= 1
@@ -25,6 +25,9 @@ CFLAGS+= -I${LOCALBASE}/include
CONFIGURE_ENV= KDEDIR=${KDEBASEDIR} \
QTDIR=${QT1DIR}/qt1 \
CXXFLAGS="${CFLAGS}" \
- all_libraries="-L${X11BASE}/lib -Wl,-R${X11BASE}/lib -L${LOCALBASE}/lib -Wl,-R${LOCALBASE}/lib"
+ all_libraries="${KDE_LDFLAGS}"
+
+FIX_RPATH+= KDE_LDFLAGS
+KDE_LDFLAGS= -L${LOCALBASE}/lib -Wl,${RPATH_FLAG}${LOCALBASE}/lib -L${X11BASE}/lib -Wl,${RPATH_FLAG}${X11BASE}/lib
.include "../../mk/bsd.pkg.mk"
diff --git a/games/netmaze/Makefile b/games/netmaze/Makefile
index 8029cd6b80c..0746ca6f767 100644
--- a/games/netmaze/Makefile
+++ b/games/netmaze/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2003/02/26 04:07:48 jschauma Exp $
+# $NetBSD: Makefile,v 1.4 2003/03/14 19:37:39 jlam Exp $
DISTNAME= netmaze0.81
PKGNAME= netmaze-0.81
@@ -15,7 +15,7 @@ WRKSRC= ${WRKDIR}/netmaze
post-patch:
${MV} ${WRKSRC}/Imakefile ${WRKSRC}/Imakefile.bak
- ${SED} -e 's|@X11LIBS@|-Wl,-R${X11BASE}/lib|g' \
+ ${SED} -e 's|@X11LIBS@|${X11_LDFLAGS}|g' \
< ${WRKSRC}/Imakefile.bak > ${WRKSRC}/Imakefile
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/avifile-devel/Makefile b/graphics/avifile-devel/Makefile
index d43ec73b823..b1b3cb9c8d5 100644
--- a/graphics/avifile-devel/Makefile
+++ b/graphics/avifile-devel/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.30 2003/02/13 16:31:24 fredb Exp $
+# $NetBSD: Makefile,v 1.31 2003/03/14 19:37:39 jlam Exp $
#
DISTNAME= avifile-0.6.20010814
@@ -53,9 +53,10 @@ AVIFILE_USE_QT?= NO
PLIST_SRC= ${PKGDIR}/PLIST.qt
PLIST_SRC+= ${PKGDIR}/PLIST
-CXXFLAGS+= -Wl,-R${QTDIR}/lib
-CXXFLAGS+= -Wl,-R${LOCALBASE}/lib
-CXXFLAGS+= -Wl,-R${X11BASE}/lib
+CXXFLAGS+= -Wl,${RPATH_FLAG}${QTDIR}/lib
+CXXFLAGS+= -Wl,${RPATH_FLAG}${LOCALBASE}/lib
+CXXFLAGS+= -Wl,${RPATH_FLAG}${X11BASE}/lib
+FIX_RPATH+= CXXFLAGS
CONFIGURE_ARGS+= --enable-qt
CONFIGURE_ARGS+= --with-qt-dir="${QTDIR}"
diff --git a/graphics/imlib/Makefile b/graphics/imlib/Makefile
index b437e80ad1f..f8ccf8b2392 100644
--- a/graphics/imlib/Makefile
+++ b/graphics/imlib/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.73 2003/01/28 22:03:24 jlam Exp $
+# $NetBSD: Makefile,v 1.74 2003/03/14 19:37:40 jlam Exp $
#
DISTNAME= imlib-1.9.14
@@ -41,7 +41,7 @@ CONF_FILES+= ${EGDIR}/im_palette-tiny.pal \
# The following ensures that `imlib-config --libs' includes the correct
# linker flags for linking the X11 libs.
#
-X_LDFLAGS= -Wl,-R${X11BASE}/lib -L${X11BASE}/lib
+X_LDFLAGS= ${X11_LDFLAGS}
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/imlib
diff --git a/graphics/jhead/Makefile b/graphics/jhead/Makefile
index ef82c407d02..3d06f42a240 100644
--- a/graphics/jhead/Makefile
+++ b/graphics/jhead/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 2003/01/09 15:28:07 mycroft Exp $
+# $NetBSD: Makefile,v 1.10 2003/03/14 19:37:40 jlam Exp $
#
DISTNAME= jhead-1.9
@@ -9,7 +9,7 @@ MAINTAINER= veego@netbsd.org
HOMEPAGE= http://www.sentex.net/~mwandel/jhead/
COMMENT= Extract EXIF header from JPEG image
-LIBS= -lm -L${BUILDLINK_PREFIX.jpeg}/lib -Wl,-R${BUILDLINK_PREFIX.jpeg}/lib -ljpeg
+LIBS= -lm -L${BUILDLINK_PREFIX.jpeg}/lib -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.jpeg}/lib -ljpeg
USE_BUILDLINK2= yes
diff --git a/graphics/kdegraphics/Makefile b/graphics/kdegraphics/Makefile
index 913809b266b..aa4b3fe3cc8 100644
--- a/graphics/kdegraphics/Makefile
+++ b/graphics/kdegraphics/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.39 2003/03/13 12:13:17 wiz Exp $
+# $NetBSD: Makefile,v 1.40 2003/03/14 19:37:40 jlam Exp $
#
DISTNAME= kdegraphics-1.1.2
@@ -26,6 +26,9 @@ CONFIGURE_ARGS= "--datadir=${KDEBASEDIR}/share/kde" \
CFLAGS+= -I${LOCALBASE}/include
CONFIGURE_ENV= KDEDIR=${KDEBASEDIR} \
CXXFLAGS="${CFLAGS}" \
- all_libraries="-Wl,-R${LOCALBASE}/lib -L${LOCALBASE}/lib -Wl,-R${X11BASE}/lib -L${X11BASE}/lib"
+ all_libraries="${KDE_LDFLAGS}"
+
+FIX_RPATH+= KDE_LDFLAGS
+KDE_LDFLAGS= -L${LOCALBASE}/lib -Wl,${RPATH_FLAG}${LOCALBASE}/lib -L${X11BASE}/lib -Wl,${RPATH_FLAG}${X11BASE}/lib
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/ogle/buildlink2.mk b/graphics/ogle/buildlink2.mk
index 1758b4d1e97..6d7e45a6502 100644
--- a/graphics/ogle/buildlink2.mk
+++ b/graphics/ogle/buildlink2.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink2.mk,v 1.2 2002/09/22 10:06:00 jlam Exp $
+# $NetBSD: buildlink2.mk,v 1.3 2003/03/14 19:37:41 jlam Exp $
.if !defined(OGLE_BUILDLINK2_MK)
OGLE_BUILDLINK2_MK= # defined
@@ -14,7 +14,7 @@ BUILDLINK_FILES.ogle+= lib/ogle/libmsgevents.*
BUILDLINK_FILES.ogle+= lib/ogle/libdvdcontrol.*
BUILDLINK_LDFLAGS.ogle= -L${BUILDLINK_PREFIX.ogle}/lib/ogle
-BUILDLINK_LDFLAGS.ogle+= -Wl,-R${BUILDLINK_PREFIX.ogle}/lib/ogle
+BUILDLINK_LDFLAGS.ogle+= -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.ogle}/lib/ogle
BUILDLINK_TARGETS+= ogle-buildlink
diff --git a/graphics/png2html/Makefile b/graphics/png2html/Makefile
index 05a8b39e068..21f33113a0f 100644
--- a/graphics/png2html/Makefile
+++ b/graphics/png2html/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2002/10/09 11:47:46 wiz Exp $
+# $NetBSD: Makefile,v 1.7 2003/03/14 19:37:42 jlam Exp $
#
DISTNAME= png2html-1.1
@@ -11,7 +11,8 @@ HOMEPAGE= http://www.engr.mun.ca/~holden/png2html.html
COMMENT= Takes a PNG image and transforms it to a web page
USE_BUILDLINK2= YES
-CFLAGS+= -L${BUILDLINK_PREFIX.gd}/lib -Wl,-R${BUILDLINK_PREFIX.gd}/lib
+FIX_RPATH+= CFLAGS
+CFLAGS+= -L${BUILDLINK_PREFIX.gd}/lib -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.gd}/lib
do-install:
${INSTALL_MAN_DIR} ${PREFIX}/share/doc/png2html
diff --git a/graphics/pstoedit/Makefile b/graphics/pstoedit/Makefile
index f1676bd209f..06d7ce477f1 100644
--- a/graphics/pstoedit/Makefile
+++ b/graphics/pstoedit/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2002/09/13 06:53:35 jlam Exp $
+# $NetBSD: Makefile,v 1.13 2003/03/14 19:37:42 jlam Exp $
DISTNAME= pstoedit_3_31
PKGNAME= pstoedit-3.31
@@ -23,7 +23,7 @@ USE_LIBTOOL= yes
GNU_CONFIGURE= yes
CONFIGURE_ENV+= LIBTOOL="${LIBTOOL}" LIBPLOTTERLA="${X11PREFIX}/lib/libplotter.la"
CONFIGURE_ENV+= CXXFLAGS="${CFLAGS} -Dunix"
-CONFIGURE_ENV+= LDLIBS="-Wl,-R${X11BASE}/lib -L${X11BASE}/lib"
+CONFIGURE_ENV+= LDLIBS="${X11_LDFLAGS}"
CONFIGURE_ENV+= AWK=${AWK} GS=${LOCALBASE}/bin/gs
CONFIGURE_ARGS+=--datadir=${PREFIX}/share
CONFIGURE_ARGS+=--libdir=${PREFIX}/lib/pstoedit # plugin dir -- unused for now
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
diff --git a/mail/bbmail/Makefile b/mail/bbmail/Makefile
index 10acb6b2587..5ea5bf3b94c 100644
--- a/mail/bbmail/Makefile
+++ b/mail/bbmail/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2002/07/13 15:35:17 jschauma Exp $
+# $NetBSD: Makefile,v 1.3 2003/03/14 19:37:46 jlam Exp $
#
DISTNAME= bbmail-0.8.2
@@ -10,7 +10,7 @@ HOMEPAGE= http://bbtools.windsofstorm.net/
COMMENT= mailbox monitor (not only) for the blackbox windowmanager
GNU_CONFIGURE= YES
-LDFLAGS+= -Wl,-R${X11PREFIX}/lib
+USE_X11= YES
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/bbmail ${PREFIX}/bin/
diff --git a/mail/postfix/Makefile b/mail/postfix/Makefile
index 05f4b5e3586..79bcc532df0 100644
--- a/mail/postfix/Makefile
+++ b/mail/postfix/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.85 2003/03/07 03:08:33 taca Exp $
+# $NetBSD: Makefile,v 1.86 2003/03/14 19:37:47 jlam Exp $
DISTNAME= postfix-2.0.6
CATEGORIES= mail
@@ -26,6 +26,8 @@ CCARGS+= -DDEF_DAEMON_DIR=\"${LIBEXECDIR}\"
.include "../../mk/bsd.prefs.mk"
+FIX_RPATH+= AUXLIBS
+
#.if defined(POSTFIX_USE_INET6) && ${POSTFIX_USE_INET6} == "YES"
#PATCHFILES+= tls+ipv6-1.13-pf-2.0.6.patch.gz
#PATCH_SITES+= ftp://ftp.stack.nl/pub/postfix/tls+ipv6/1.13/
@@ -34,7 +36,7 @@ CCARGS+= -DDEF_DAEMON_DIR=\"${LIBEXECDIR}\"
#
#CCARGS+= -DHAS_SSL
#AUXLIBS+= -L${BUILDLINK_PREFIX.openssl}/lib \
-# -Wl,-R${BUILDLINK_PREFIX.openssl}/lib \
+# -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.openssl}/lib \
# -lssl -lcrypto
#BUILD_DEFS+= POSTFIX_USE_TLS
#
@@ -46,7 +48,7 @@ CCARGS+= -DDEF_DAEMON_DIR=\"${LIBEXECDIR}\"
.include "../../devel/pcre/buildlink2.mk"
CCARGS+= -DHAS_PCRE
AUXLIBS+= -L${BUILDLINK_PREFIX.pcre}/lib \
- -Wl,-R${BUILDLINK_PREFIX.pcre}/lib \
+ -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.pcre}/lib \
-lpcre
BUILD_DEFS+= POSTFIX_USE_PCRE
.else
@@ -57,7 +59,7 @@ CCARGS+= -DNO_PCRE
.include "../../databases/openldap/buildlink2.mk"
CCARGS+= -DHAS_LDAP
AUXLIBS+= -L${BUILDLINK_PREFIX.openldap}/lib \
- -Wl,-R${BUILDLINK_PREFIX.openldap}/lib \
+ -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.openldap}/lib \
-lldap -llber
BUILD_DEFS+= POSTFIX_USE_LDAP
.endif
@@ -66,7 +68,7 @@ BUILD_DEFS+= POSTFIX_USE_LDAP
.include "../../databases/mysql-client/buildlink2.mk"
CCARGS+= -DHAS_MYSQL -I${BUILDLINK_PREFIX.mysql-client}/include/mysql
AUXLIBS+= -L${BUILDLINK_PREFIX.mysql-client}/lib/mysql \
- -Wl,-R${BUILDLINK_PREFIX.mysql-client}/lib/mysql \
+ -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.mysql-client}/lib/mysql \
-lmysqlclient -lz -lm
BUILD_DEFS+= POSTFIX_USE_MYSQL
.endif
@@ -79,7 +81,7 @@ BUILD_DEFS+= POSTFIX_USE_MYSQL
#
#CCARGS+= -DHAS_SSL
#AUXLIBS+= -L${BUILDLINK_PREFIX.openssl}/lib \
-# -Wl,-R${BUILDLINK_PREFIX.openssl}/lib \
+# -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.openssl}/lib \
# -lssl -lcrypto
#BUILD_DEFS+= POSTFIX_USE_TLS
#
@@ -91,7 +93,7 @@ BUILD_DEFS+= POSTFIX_USE_MYSQL
.include "../../security/cyrus-sasl/buildlink2.mk"
CCARGS+= -DUSE_SASL_AUTH
AUXLIBS+= -L${BUILDLINK_PREFIX.cyrus-sasl}/lib \
- -Wl,-R${BUILDLINK_PREFIX.cyrus-sasl}/lib \
+ -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.cyrus-sasl}/lib \
-lsasl
BUILD_DEFS+= USE_SASL
diff --git a/mail/teapop/Makefile b/mail/teapop/Makefile
index fe65cdb11d4..2b61766dee0 100644
--- a/mail/teapop/Makefile
+++ b/mail/teapop/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.14 2003/01/28 22:03:42 jlam Exp $
+# $NetBSD: Makefile,v 1.15 2003/03/14 19:37:47 jlam Exp $
DISTNAME= teapop-0.3.5
CATEGORIES= mail
@@ -40,7 +40,7 @@ CONFIGURE_ARGS+=--disable-vpop
.if defined(TEAPOP_WITH_MYSQL)
.include "../../databases/mysql-client/buildlink2.mk"
CONFIGURE_ARGS+= --with-mysql=${BUILDLINK_PREFIX.mysql-client}
-LDFLAGS+= -L${BUILDLINK_PREFIX.mysql-client}/lib/mysql -Wl,-R${BUILDLINK_PREFIX.mysql-client}/lib/mysql
+LDFLAGS+= ${BUILDLINK_LDFLAGS.mysql-client}
.endif
post-install:
diff --git a/math/R/buildlink2.mk b/math/R/buildlink2.mk
index 3ec7fc38a42..fa8f4776982 100644
--- a/math/R/buildlink2.mk
+++ b/math/R/buildlink2.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink2.mk,v 1.1 2002/12/10 11:58:10 markd Exp $
+# $NetBSD: buildlink2.mk,v 1.2 2003/03/14 19:37:48 jlam Exp $
#
# This Makefile fragment is included by packages that use the R shared library.
#
@@ -17,7 +17,8 @@ BUILDLINK_FILES.R+= lib/R/include/*
BUILDLINK_FILES.R+= lib/R/include/R_ext/*
BUILDLINK_CPPFLAGS.R= -I${BUILDLINK_PREFIX.R}/lib/R/include
-BUILDLINK_LDFLAGS.R= -L${BUILDLINK_PREFIX.R}/lib/R/bin -Wl,-R${BUILDLINK_PREFIX.R}/lib/R/bin
+BUILDLINK_LDFLAGS.R= -L${BUILDLINK_PREFIX.R}/lib/R/bin -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.R}/lib/R/bin
+FIX_RPATH+= BUILDLINK_LDFLAGS.R
BUILDLINK_TARGETS+= R-buildlink
diff --git a/math/octave/Makefile b/math/octave/Makefile
index 8e01446e0af..b40cac9c07b 100644
--- a/math/octave/Makefile
+++ b/math/octave/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.30 2002/03/13 17:37:24 fredb Exp $
+# $NetBSD: Makefile,v 1.31 2003/03/14 19:37:48 jlam Exp $
# FreeBSD Id: Makefile,v 1.18 1998/09/27 20:10:45 steve Exp
DISTNAME= octave-2.0.16
@@ -26,7 +26,7 @@ USE_LIBTOOL= yes
USE_GMAKE= yes
CONFIGURE_ENV+= FFLAGS="${CFLAGS}" OBJECT_FMT="${OBJECT_FMT}"
CPPFLAGS+= -I${WRKDIR}/include
-LDFLAGS+= -Wl,-R${PREFIX}/lib -L${PREFIX}/lib
+LDFLAGS+= -Wl,${RPATH_FLAG}${PREFIX}/lib -L${PREFIX}/lib
INFO_FILES= liboctave.info octave.info
LIBOCTAVE_INFO= liboctave.info liboctave.info-1 liboctave.info-2 liboctave.info-3
diff --git a/misc/kdeutils/Makefile b/misc/kdeutils/Makefile
index 5bc9df93dbc..38a0bf8c079 100644
--- a/misc/kdeutils/Makefile
+++ b/misc/kdeutils/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.48 2003/03/12 21:02:25 jschauma Exp $
+# $NetBSD: Makefile,v 1.49 2003/03/14 19:37:50 jlam Exp $
# FreeBSD Id: Makefile,v 1.4 1997/11/28 00:04:18 se Exp
#
@@ -23,7 +23,10 @@ CONFIGURE_ARGS= "--with-qt-dir=${QT1DIR}/qt1"
CFLAGS+= -I${LOCALBASE}/include
CONFIGURE_ENV= KDEDIR=${KDEBASEDIR} \
CXXFLAGS="${CFLAGS}" \
- all_libraries="-L${LOCALBASE}/lib -Wl,-R${LOCALBASE}/lib -L${X11BASE}/lib -Wl,-R${X11BASE}/lib"
+ all_libraries="${KDE_LDFLAGS}"
+
+FIX_RPATH+= KDE_LDFLAGS
+KDE_LDFLAGS= -L${LOCALBASE}/lib -Wl,${RPATH_FLAG}${LOCALBASE}/lib -L${X11BASE}/lib -Wl,${RPATH_FLAG}${X11BASE}/lib
.include "../../mk/bsd.prefs.mk"
diff --git a/misc/openoffice/Makefile b/misc/openoffice/Makefile
index b2c255d7584..d6bc88d5e3f 100644
--- a/misc/openoffice/Makefile
+++ b/misc/openoffice/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.33 2003/01/22 22:46:34 rh Exp $
+# $NetBSD: Makefile,v 1.34 2003/03/14 19:37:51 jlam Exp $
DISTNAME= openoffice-0.0.0.641
PKGREVISION= 1
@@ -36,7 +36,7 @@ CXX= ${GCCPREFIX}/bin/c++
CPP= ${GCCPREFIX}/bin/cpp
F77= ${GCCPREFIX}/bin/g77
PKG_FC= ${GCCPREFIX}/bin/g77
-LDFLAGS+= -R${GCCPREFIX}/lib
+LDFLAGS+= ${RPATH_FLAG}${GCCPREFIX}/lib
.endif
BUILD_DEPENDS+= bison-[0-9]*:../../devel/bison
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index d2d00bcc8ee..7d8c2095f7a 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1150 2003/03/04 14:50:09 seb Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1151 2003/03/14 19:37:49 jlam Exp $
#
# This file is in the public domain.
#
@@ -269,23 +269,16 @@ SHCOMMENT?= ${ECHO_MSG} >/dev/null '***'
DISTINFO_FILE?= ${.CURDIR}/distinfo
+FIX_RPATH+= LIBS
.if defined(USE_X11)
X11_LDFLAGS= # empty
-. if ${_USE_RPATH} == "yes"
-X11_LDFLAGS+= -Wl,${_OPSYS_RPATH_NAME}${X11BASE}/lib
-. endif
+X11_LDFLAGS+= -Wl,${RPATH_FLAG}${X11BASE}/lib
X11_LDFLAGS+= -L${X11BASE}/lib
LDFLAGS+= ${X11_LDFLAGS}
.endif
-.if ${_USE_RPATH} == "yes"
-LDFLAGS+= -Wl,${_OPSYS_RPATH_NAME}${LOCALBASE}/lib
-.else
-. if !empty(USE_BUILDLINK2:M[nN][oO])
-LDFLAGS:= ${LDFLAGS:N*-Wl,-R*:N*-rpath*}
-. endif
-.endif
-
+LDFLAGS+= -Wl,${RPATH_FLAG}${LOCALBASE}/lib
LDFLAGS+= -L${LOCALBASE}/lib
+FIX_RPATH+= X11_LDFLAGS LDFLAGS
MAKE_ENV+= LDFLAGS="${LDFLAGS}"
CONFIGURE_ENV+= LDFLAGS="${LDFLAGS}" M4="${M4}" YACC="${YACC}"
@@ -531,7 +524,7 @@ MESSAGE_SUBST_SED= ${MESSAGE_SUBST:S/=/}!/:S/$/!g/:S/^/ -e s!\\\${/}
.endif
PKGCONFIG_OVERRIDE_SED= \
- '-e s|^\(Libs:.*[ ]\)-L\([ ]*[^ ]*\)\(.*\)$$|\1-Wl,${_OPSYS_RPATH_NAME}\2 -L\2\3|'
+ '-e s|^\(Libs:.*[ ]\)-L\([ ]*[^ ]*\)\(.*\)$$|\1-Wl,${RPATH_FLAG}\2 -L\2\3|'
# Latest version of digest(1) required for pkgsrc
DIGEST_REQD= 20010302
@@ -662,6 +655,19 @@ RMAN?= ${X11BASE}/bin/rman
. endif
.endif
+# FIX_RPATH will remove compiler or linker settings related to run-time
+# library search path settings if _USE_RPATH is "no".
+#
+.if !empty(_USE_RPATH:M[nN][oO])
+. if defined(FIX_RPATH) && !empty(FIX_RPATH)
+. for var in ${FIX_RPATH}
+. for _rpath_flag in ${RPATH_FLAG} -R -rpath -rpath-link
+${var}:= ${${var}:N-Wl,${_rpath_flag}*:N${_rpath_flag}*}
+. endfor
+. endfor
+. endif
+.endif
+
.if defined(EVAL_PREFIX)
. for def in ${EVAL_PREFIX}
. if !defined(${def:C/=.*//}_DEFAULT)
diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk
index f07206139e3..8bb63a707f1 100644
--- a/mk/bsd.prefs.mk
+++ b/mk/bsd.prefs.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.106 2003/01/25 22:39:56 jschauma Exp $
+# $NetBSD: bsd.prefs.mk,v 1.107 2003/03/14 19:37:49 jlam Exp $
#
# Make file, included to get the site preferences, if any. Should
# only be included by package Makefiles before any .if defined()
@@ -248,6 +248,10 @@ X11PREFIX= ${X11BASE}
XMKMF_CMD?= ${X11PREFIX}/bin/xmkmf
.endif
+# RPATH_FLAG publicly exports the linker flag used to specify run-time
+# library search paths.
+#
+RPATH_FLAG?= ${_OPSYS_RPATH_NAME}
.ifndef DIGEST
DIGEST:= ${LOCALBASE}/bin/digest
diff --git a/net/bind9-current/Makefile b/net/bind9-current/Makefile
index b1f46bf3de0..44cdb11491d 100644
--- a/net/bind9-current/Makefile
+++ b/net/bind9-current/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.40 2002/12/19 03:46:46 itojun Exp $
+# $NetBSD: Makefile,v 1.41 2003/03/14 19:37:51 jlam Exp $
#
DISTNAME= bind-${BIND_VERSION}
@@ -28,7 +28,7 @@ CONFIGURE_ARGS+=--disable-threads # Until we have real threads
CONFIGURE_ARGS+=--with-libtool=yes \
--sysconfdir=/etc \
--localstatedir=/var
-#LDFLAGS+= -Wl,-R${LOCALBASE}/pthreads/lib -L${LOCALBASE}/pthreads/lib
+#LDFLAGS+= -Wl,${RPATH_FLAG}${LOCALBASE}/pthreads/lib -L${LOCALBASE}/pthreads/lib
# use external OpenSSL. comment out the following line and the buildlink
# include at the bottom to use OpenSSL shipped with BIND9.
CONFIGURE_ARGS+=--with-openssl=${SSLBASE}
diff --git a/net/bind9/Makefile b/net/bind9/Makefile
index 30b5a772b5a..f95cbefd610 100644
--- a/net/bind9/Makefile
+++ b/net/bind9/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.47 2003/03/10 03:01:09 hubertf Exp $
+# $NetBSD: Makefile,v 1.48 2003/03/14 19:37:52 jlam Exp $
#
DISTNAME= bind-${BIND_VERSION}
@@ -26,7 +26,7 @@ GNU_CONFIGURE= yes
CONFIGURE_ARGS+=--with-libtool=yes \
--sysconfdir=/etc \
--localstatedir=/var
-#LDFLAGS+= -Wl,-R${LOCALBASE}/pthreads/lib -L${LOCALBASE}/pthreads/lib
+#LDFLAGS+= -Wl,${RPATH_FLAG}${LOCALBASE}/pthreads/lib -L${LOCALBASE}/pthreads/lib
# use external OpenSSL. comment out the following line and the buildlink
# include at the bottom to use OpenSSL shipped with BIND9.
CONFIGURE_ARGS+=--with-openssl=${SSLBASE}
diff --git a/net/coda_client/Makefile b/net/coda_client/Makefile
index 237d53c548b..0713f2e3134 100644
--- a/net/coda_client/Makefile
+++ b/net/coda_client/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2002/11/01 16:34:40 wiz Exp $
+# $NetBSD: Makefile,v 1.20 2003/03/14 19:37:52 jlam Exp $
#
DISTNAME= coda-4.6.6
@@ -27,10 +27,13 @@ USE_PERL5= yes
GNU_CONFIGURE= yes
USE_GMAKE= yes
+FIX_RPATH+= GDBM_LDADD
+GDBM_LDADD= -Wl,${RPATH_FLAG}${PREFIX}/lib -L${PREFIX}/lib -lgdbm
+
pre-configure:
- cd ${WRKSRC} && \
+ cd ${WRKSRC} && \
for F in coda-src/advice/Makefile.in; do \
- ${SED} -e "s_-lgdbm_-Wl,-R${PREFIX}/lib -L${PREFIX}/lib -lgdbm_"\
+ ${SED} -e "s_-lgdbm_${GDBM_LDADD}_" \
< $$F > $$F.patched && \
${MV} $$F.patched $$F; \
done
diff --git a/net/kdenetwork/Makefile b/net/kdenetwork/Makefile
index cd3b433aeb3..162bb27bda7 100644
--- a/net/kdenetwork/Makefile
+++ b/net/kdenetwork/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.61 2003/03/12 21:02:24 jschauma Exp $
+# $NetBSD: Makefile,v 1.62 2003/03/14 19:37:53 jlam Exp $
# FreeBSD Id: Makefile,v 1.3 1997/11/05 04:19:54 asami Exp
#
@@ -27,7 +27,10 @@ CONFIGURE_ARGS= "--datadir=${KDEBASEDIR}/share/kde" \
"--with-qt-dir=${QT1DIR}/qt1"
CONFIGURE_ENV= KDEDIR=${KDEBASEDIR} \
CXXFLAGS="${CFLAGS}" \
- all_libraries="-L${LOCALBASE}/lib -Wl,-R${LOCALBASE}/lib -L${X11BASE}/lib -Wl,-R${X11BASE}/lib"
+ all_libraries="${KDE_LDFLAGS}"
+
+FIX_RPATH+= KDE_LDFLAGS
+KDE_LDFLAGS= -L${LOCALBASE}/lib -Wl,${RPATH_FLAG}${LOCALBASE}/lib -L${X11BASE}/lib -Wl,${RPATH_FLAG}${X11BASE}/lib
GCC_VERSION!= gcc --version
.if (${GCC_VERSION:C/-.*$$//} == egcs)
diff --git a/net/pureftpd/Makefile b/net/pureftpd/Makefile
index cda880dd01b..4129a0af9f4 100644
--- a/net/pureftpd/Makefile
+++ b/net/pureftpd/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 2003/03/07 18:21:48 salo Exp $
+# $NetBSD: Makefile,v 1.10 2003/03/14 19:37:53 jlam Exp $
#
DISTNAME= pure-ftpd-1.0.14
@@ -27,7 +27,7 @@ DEPENDS+= mysql-client>=3.23:../../databases/mysql-client
CONFIGURE_ARGS+=--with-mysql=${LOCALBASE} \
--with-quotas
CCPFLAGS+= -I${LOCALBASE}/include/mysql
-LDFLAGS+= -L${LOCALBASE}/lib/mysql -Wl,-R${LOCALBASE}/lib/mysql
+LDFLAGS+= -L${LOCALBASE}/lib/mysql -Wl,${RPATH_FLAG}${LOCALBASE}/lib/mysql
BUILD_DEFS+= PURE_FTPD_USE_MYSQL
.endif
diff --git a/net/snort-mysql/Makefile b/net/snort-mysql/Makefile
index 9ed27b7e1d3..bee85ebd7a8 100644
--- a/net/snort-mysql/Makefile
+++ b/net/snort-mysql/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2002/10/10 12:23:38 wiz Exp $
+# $NetBSD: Makefile,v 1.3 2003/03/14 19:37:54 jlam Exp $
#
.include "../../net/snort/Makefile.common"
@@ -20,9 +20,7 @@ DISTINFO_FILE= ${PKGDIR}/distinfo
.include "../../mk/bsd.prefs.mk"
-.if ${_USE_RPATH} == "yes"
-LDFLAGS+= -Wl,-R${BUILDLINK_PREFIX.mysql-client}/lib/mysql
-.endif
+LDFLAGS+= ${BUILDLINK_LDFLAGS.mysql-client}
.include "../../databases/mysql-client/buildlink2.mk"
.include "../../net/libpcap/buildlink2.mk"
diff --git a/print/ghostscript-gnu/Makefile.common b/print/ghostscript-gnu/Makefile.common
index 1ade7d60bf6..b60b3e18ec7 100644
--- a/print/ghostscript-gnu/Makefile.common
+++ b/print/ghostscript-gnu/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.5 2002/09/18 22:17:29 jlam Exp $
+# $NetBSD: Makefile.common,v 1.6 2003/03/14 19:37:54 jlam Exp $
DISTNAME= ghostscript-${GS_VERS}
GS_VERS= 7.05
@@ -51,7 +51,7 @@ MAKE_FLAGS+= XCFLAGS="${CFLAGS}"
MAKE_FLAGS+= XLDFLAGS="${LDFLAGS}"
.if ${OPSYS} == "SunOS"
-LDFLAGS+= -L${ZOULARISBASE}/lib -Wl,-R${ZOULARISBASE}/lib
+LDFLAGS+= -L${ZOULARISBASE}/lib -Wl,${RPATH_FLAG}${ZOULARISBASE}/lib
.endif
REPLACE_PERL= lib/fixmswrd.pl
diff --git a/print/ghostscript-nox11/Makefile.common b/print/ghostscript-nox11/Makefile.common
index c16c507d223..98c56c2d349 100644
--- a/print/ghostscript-nox11/Makefile.common
+++ b/print/ghostscript-nox11/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.42 2002/12/23 16:27:12 cjep Exp $
+# $NetBSD: Makefile.common,v 1.43 2003/03/14 19:37:54 jlam Exp $
DISTNAME= ghostscript-${GS_VERS}
GS_VERS= 6.01
@@ -138,7 +138,7 @@ ALL_TARGET= std
. include "../../lang/gcc/buildlink2.mk"
.endif
.if defined(ZOULARISBASE)
-LDFLAGS+= -L${ZOULARISBASE}/lib -Wl,-R${ZOULARISBASE}/lib
+LDFLAGS+= -L${ZOULARISBASE}/lib -Wl,${RPATH_FLAG}${ZOULARISBASE}/lib
.endif
.if defined(PAPERSIZE) && (${PAPERSIZE} == "A4" || ${PAPERSIZE} == "a4")
@@ -155,7 +155,7 @@ MAKE_FLAGS+= GS_DISPLAY_DEVICE="${GS_DISPLAY_DEVICE}"
MAKE_FLAGS+= XINCLUDE= XLIBDIRS= XLIBS="${XLIBS}"
.if ${OPSYS} == "SunOS"
-LDFLAGS+= -L${LOCALBASE}/bsd/lib -Wl,-R${LOCALBASE}/bsd/lib
+LDFLAGS+= -L${LOCALBASE}/bsd/lib -Wl,${RPATH_FLAG}${LOCALBASE}/bsd/lib
.endif
# Define whether this platform has floating point hardware:
diff --git a/security/pgp2/Makefile b/security/pgp2/Makefile
index 34802750e8f..c288e4ac319 100644
--- a/security/pgp2/Makefile
+++ b/security/pgp2/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.31 2002/08/14 02:39:30 grant Exp $
+# $NetBSD: Makefile,v 1.32 2003/03/14 19:37:55 jlam Exp $
# FreeBSD Id: Makefile,v 1.20 1997/08/27 13:06:01 ache Exp
#
@@ -24,7 +24,7 @@ LICENCE= fee-based-commercial-use
PKGNAME= pgp-2.6.3a
DEPENDS+= rsaref-2.0p3:../../security/rsaref
RSAINC= -I${PREFIX}/include
-RSALIBS= -Wl,-R${PREFIX}/lib -L${PREFIX}/lib -lrsaref
+RSALIBS= -Wl,${RPATH_FLAG}${PREFIX}/lib -L${PREFIX}/lib -lrsaref
RSAOBJS= rsaglue2.o
CFLAGS= -DUSA
.else
@@ -35,6 +35,8 @@ RSAOBJS= rsaglue1.o
CFLAGS=
.endif
+FIX_RPATH+= RSALIBS
+
PGPLIB= ${PREFIX}/share/pgp
CFLAGS+= -DPGP_SYSTEM_DIR=\\\"${PGPLIB}/\\\"
diff --git a/security/ssh/Makefile b/security/ssh/Makefile
index 4a815a993e2..86ec7287e3c 100644
--- a/security/ssh/Makefile
+++ b/security/ssh/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.103 2003/01/04 11:51:29 cjep Exp $
+# $NetBSD: Makefile,v 1.104 2003/03/14 19:37:55 jlam Exp $
# FreeBSD Id: Makefile,v 1.47 1997/11/10 22:04:42 dima Exp
#
@@ -57,8 +57,10 @@ CONFIGURE_ENV+= X_CFLAGS="-I${LOCALBASE}/include"
.if defined(USE_RSAREF2) && ${USE_RSAREF2} == YES
DEPENDS+= rsaref-2.0p3:../../security/rsaref
CONFIGURE_ARGS+= --with-rsaref="${LOCALBASE}/lib"
-CONFIGURE_ENV+= LDFLAGS="-Wl,-R${LOCALBASE}/lib"
+CONFIGURE_ENV+= LDFLAGS="${SSH_LDFLAGS}"
CFLAGS+= -I${LOCALBASE}/include
+SSH_LDFLAGS= -Wl,${RPATH_FLAG}${LOCALBASE}/lib
+FIX_RPATH+= SSH_LDFLAGS
.endif
# Include support for the SecureID card
diff --git a/shells/zsh/Makefile b/shells/zsh/Makefile
index 249a4bb25a7..abe5c3e470d 100644
--- a/shells/zsh/Makefile
+++ b/shells/zsh/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.38 2003/02/06 04:24:12 uebayasi Exp $
+# $NetBSD: Makefile,v 1.39 2003/03/14 19:37:55 jlam Exp $
DISTNAME= zsh-4.0.6
CATEGORIES= shells
@@ -28,7 +28,7 @@ LDFLAGS+= -static
.if ${OPSYS} == "SunOS"
PLIST_SRC= ${PKGDIR}/PLIST.dynamic ${PKGDIR}/PLIST
.else
-LDFLAGS+= -Wl,-R${PREFIX}/lib/zsh
+LDFLAGS+= -Wl,${RPATH_FLAG}${PREFIX}/lib/zsh
PLIST_SRC= ${PKGDIR}/PLIST.shlibs ${PKGDIR}/PLIST.dynamic ${PKGDIR}/PLIST
.endif
.endif
diff --git a/sysutils/kdf/Makefile b/sysutils/kdf/Makefile
index 8e18e0d12b6..d538081cfc6 100644
--- a/sysutils/kdf/Makefile
+++ b/sysutils/kdf/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.16 2002/10/23 11:54:03 wiz Exp $
+# $NetBSD: Makefile,v 1.17 2003/03/14 19:37:56 jlam Exp $
#
DISTNAME= kdf-0.5.1
@@ -24,7 +24,10 @@ CONFIGURE_ARGS+=--datadir=${BUILDLINK_PREFIX.kdebase}/share/kde \
--enable-path-check
CONFIGURE_ENV= KDEDIR=${BUILDLINK_PREFIX.kdebase} \
CXXFLAGS="${CFLAGS}" \
- all_libraries="-L${LOCALBASE}/lib -Wl,-R${LOCALBASE}/lib"
+ all_libraries="${KDE_LDFLAGS}"
+
+FIX_RPATH+= KDE_LDFLAGS
+KDE_LDFLAGS= -L${LOCALBASE}/lib -Wl,${RPATH_FLAG}${LOCALBASE}/lib -L${X11BASE}/lib -Wl,${RPATH_FLAG}${X11BASE}/lib
.include "../../devel/gettext-lib/buildlink2.mk"
.include "../../x11/kdebase/buildlink2.mk"
diff --git a/textproc/pyxml/Makefile b/textproc/pyxml/Makefile
index 79c48dddbb9..b10c1e220da 100644
--- a/textproc/pyxml/Makefile
+++ b/textproc/pyxml/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.15 2003/01/30 10:50:59 drochner Exp $
+# $NetBSD: Makefile,v 1.16 2003/03/14 19:37:56 jlam Exp $
#
DISTNAME= PyXML-0.8.2
@@ -17,7 +17,9 @@ PYDISTUTILSPKG= yes
PYBINMODULE= yes
BUILDLINK_DEPENDS.expat= expat>=1.95.6
PYSETUPBUILDARGS+= --with-libexpat=${BUILDLINK_DIR}
-PYSETUPBUILDARGS+= --ldflags=-Wl,-R${BUILDLINK_PREFIX.expat}/lib
+PYSETUPBUILDARGS+= --ldflags="${EXPAT_LDFLAGS}"
+EXPAT_LDFLAGS= -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.expat}/lib
+FIX_RPATH+= EXPAT_LDFLAGS
PYXML_SCRIPTS= scripts/xmlproc_parse \
scripts/xmlproc_val
diff --git a/textproc/xerces-c/Makefile b/textproc/xerces-c/Makefile
index 63060bcce42..ccdb9570d52 100644
--- a/textproc/xerces-c/Makefile
+++ b/textproc/xerces-c/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2002/10/30 09:46:42 seb Exp $
+# $NetBSD: Makefile,v 1.6 2003/03/14 19:37:57 jlam Exp $
#
DISTNAME= xerces-c-src1_3_0
@@ -26,8 +26,8 @@ FLAGS+= -O2 -I${ICUROOT}/include \
CFLAGS+= ${FLAGS}
CXXFLAGS+= ${FLAGS}
-LIBS= -L${ICUROOT}/lib -Wl,-R${ICUROOT}/lib
-LIBS+= -L${ICUROOT}/lib/icu/current -Wl,-R${ICUROOT}/lib/icu/current
+LIBS= -L${ICUROOT}/lib -Wl,${RPATH_FLAG}${ICUROOT}/lib
+LIBS+= -L${ICUROOT}/lib/icu/current -Wl,${RPATH_FLAG}${ICUROOT}/lib/icu/current
CONFIGURE_ENV+= XERCESCROOT="${WRKDIR}/xerces-c-src1_3_0" \
ICUROOT=${ICUROOT} \
diff --git a/time/korganizer/Makefile b/time/korganizer/Makefile
index 9de623f8a99..4c92b4d6908 100644
--- a/time/korganizer/Makefile
+++ b/time/korganizer/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2003/03/12 21:02:26 jschauma Exp $
+# $NetBSD: Makefile,v 1.5 2003/03/14 19:37:57 jlam Exp $
DISTNAME= korganizer-1.1.2
PKGREVISION= 1
@@ -24,6 +24,9 @@ CFLAGS+= -I${LOCALBASE}/include
CONFIGURE_ENV= KDEDIR=${KDEBASEDIR} \
QTDIR=${QT1DIR}/qt1 \
CXXFLAGS="${CFLAGS}" \
- all_libraries="-L${LOCALBASE}/lib -Wl,-R${LOCALBASE}/lib -L${X11BASE}/lib -Wl,-R${X11BASE}/lib"
+ all_libraries="${KDE_LDFLAGS}"
+
+FIX_RPATH+= KDE_LDFLAGS
+KDE_LDFLAGS= -L${LOCALBASE}/lib -Wl,${RPATH_FLAG}${LOCALBASE}/lib -L${X11BASE}/lib -Wl,${RPATH_FLAG}${X11BASE}/lib
.include "../../mk/bsd.pkg.mk"
diff --git a/time/kworldwatch/Makefile b/time/kworldwatch/Makefile
index 62fea244171..00494aa40df 100644
--- a/time/kworldwatch/Makefile
+++ b/time/kworldwatch/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 2002/10/21 15:29:25 wiz Exp $
+# $NetBSD: Makefile,v 1.10 2003/03/14 19:37:58 jlam Exp $
#
DISTNAME= kworldwatch-0.6
@@ -24,7 +24,10 @@ CONFIGURE_ARGS+=--datadir=${BUILDLINK_PREFIX.kdebase}/share/kde \
--enable-path-check
CONFIGURE_ENV= KDEDIR=${BUILDLINK_PREFIX.kdebase} \
CXXFLAGS="${CFLAGS}" \
- all_libraries="-L${LOCALBASE}/lib -Wl,-R${LOCALBASE}/lib -L${X11BASE}/lib -Wl,-R${X11BASE}/lib"
+ all_libraries="${KDE_LDFLAGS}"
+
+FIX_RPATH+= KDE_LDFLAGS
+KDE_LDFLAGS= -L${LOCALBASE}/lib -Wl,${RPATH_FLAG}${LOCALBASE}/lib -L${X11BASE}/lib -Wl,${RPATH_FLAG}${X11BASE}/lib
.include "../../devel/gettext-lib/buildlink2.mk"
.include "../../x11/kdebase/buildlink2.mk"
diff --git a/time/xtu/Makefile b/time/xtu/Makefile
index 547718b7943..032d1f6bedc 100644
--- a/time/xtu/Makefile
+++ b/time/xtu/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1.1.1 2002/02/27 21:24:58 agc Exp $
+# $NetBSD: Makefile,v 1.2 2003/03/14 19:37:58 jlam Exp $
#
DISTNAME= xtu-1.1
@@ -12,7 +12,7 @@ COMMENT= Small configurable X11 analog clock
USE_X11= yes
do-build:
- cd ${WRKSRC} && ${CC} *.c -o xtu -I${X11BASE}/include -L${X11BASE}/lib -Wl,-R${X11BASE}/lib -lX11 -lXext
+ cd ${WRKSRC} && ${CC} *.c -o xtu -I${X11BASE}/include ${X11_LDFLAGS} -lX11 -lXext
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/xtu ${PREFIX}/bin/
diff --git a/wm/amiwm/Makefile b/wm/amiwm/Makefile
index 561cfc4a421..04ddaa53ee9 100644
--- a/wm/amiwm/Makefile
+++ b/wm/amiwm/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2002/08/25 21:51:27 jlam Exp $
+# $NetBSD: Makefile,v 1.8 2003/03/14 19:37:59 jlam Exp $
#
DISTNAME= amiwm0.20pl48
@@ -19,7 +19,10 @@ USE_BUILDLINK2= yes
USE_X11= yes
GNU_CONFIGURE= yes
CONFIGURE_ENV= CFLAGS="-DHAVE_X11_EXTENSIONS_SHAPE_H=1 -O" \
- X_PRE_LIBS="-Wl,-R${X11BASE}/lib" \
+ X_PRE_LIBS="${X_PRE_LIBS}" \
X_EXTRA_LIBS="-lXt"
+X_PRE_LIBS= -Wl,${RPATH_FLAG}${X11BASE}/lib
+FIX_RPATH+= X_PRE_LIBS
+
.include "../../mk/bsd.pkg.mk"
diff --git a/www/ap-ssl/Makefile b/www/ap-ssl/Makefile
index 267a6b4b985..71d6bc1cee5 100644
--- a/www/ap-ssl/Makefile
+++ b/www/ap-ssl/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.66 2003/01/28 22:04:26 jlam Exp $
+# $NetBSD: Makefile,v 1.67 2003/03/14 19:37:59 jlam Exp $
DISTNAME= mod_ssl-2.8.12-1.3.27
PKGNAME= ap-ssl-2.8.12
@@ -25,9 +25,9 @@ CONFIGURE_ARGS+= --with-ssl=${SSLBASE}
.include "../../mk/bsd.prefs.mk"
-.if ${_USE_RPATH} == "yes"
-MAKE_ENV+= SSL_RPATH_LDFLAGS="-R${SSLBASE}/lib"
-.endif
+SSL_RPATH_LDFLAGS= ${RPATH_FLAG}${SSLBASE}/lib
+FIX_RPATH+= SSL_RPATH_LDFLAGS
+MAKE_ENV+= SSL_RPATH_LDFLAGS="${SSL_RPATH_LDFLAGS}"
PKG_SYSCONFVAR= apache
PKG_SYSCONFSUBDIR?= httpd
diff --git a/www/apache/Makefile b/www/apache/Makefile
index eb1074aa6ae..72ffd3a9f0f 100644
--- a/www/apache/Makefile
+++ b/www/apache/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.121 2003/02/23 15:55:57 jmmv Exp $
+# $NetBSD: Makefile,v 1.122 2003/03/14 19:38:00 jlam Exp $
#
# This pkg does not compile in mod_ssl, only the `mod_ssl EAPI' (a set of
# code hooks that allow mod_ssl to be compiled separately later, if desired).
@@ -128,7 +128,7 @@ CONFIGURE_ENV+= INCLUDES="${BUILDLINK_CPPFLAGS.db}"
# on Solaris, we also need libdbm
. if ${OPSYS} == "SunOS"
CONFIGURE_ENV+= LIBS="-ldbm -ldb2"
-LDFLAGS+= -Wl,-R/usr/ucblib -L/usr/ucblib
+LDFLAGS+= -Wl,${RPATH_FLAG}/usr/ucblib -L/usr/ucblib
. else
CONFIGURE_ENV+= LIBS="-ldb2"
. endif
diff --git a/www/apache6/Makefile b/www/apache6/Makefile
index 17086d83bdb..37ccbd8feb2 100644
--- a/www/apache6/Makefile
+++ b/www/apache6/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.68 2003/02/23 15:55:58 jmmv Exp $
+# $NetBSD: Makefile,v 1.69 2003/03/14 19:38:00 jlam Exp $
#
# This package does not compile in mod_ssl support hooks, as it conflicts
# with IPv6-enable patch.
@@ -123,7 +123,7 @@ CONFIGURE_ENV+= INCLUDES="-I${BUILDLINK_PREFIX.db}/include/db2"
# on Solaris, we also need libdbm
. if ${OPSYS} == "SunOS"
CONFIGURE_ENV+= LIBS="-ldbm -ldb2"
-LDFLAGS+= -Wl,-R/usr/ucblib -L/usr/ucblib
+LDFLAGS+= -Wl,${RPATH_FLAG}/usr/ucblib -L/usr/ucblib
. else
CONFIGURE_ENV+= LIBS="-ldb2"
. endif
diff --git a/www/galeon/Makefile b/www/galeon/Makefile
index f9979cf9e3f..fee16101f60 100644
--- a/www/galeon/Makefile
+++ b/www/galeon/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.44 2003/02/18 14:56:02 jmmv Exp $
+# $NetBSD: Makefile,v 1.45 2003/03/14 19:38:01 jlam Exp $
DISTNAME= galeon-1.2.8
PKGREVISION= 2
@@ -42,7 +42,7 @@ CONFIGURE_ARGS+= --with-mozilla-snapshot=1.2
.include "../../x11/gnome-libs/buildlink2.mk"
MOZ_LIBDIR= ${PREFIX}/lib/mozilla
-LDFLAGS+= -Wl,-R${MOZ_LIBDIR}
+LDFLAGS+= -Wl,${RPATH_FLAG}${MOZ_LIBDIR}
# Ensure we export symbols in the linked shared object.
LDFLAGS+= ${EXPORT_SYMBOLS_LDFLAGS}
diff --git a/www/mozilla/Makefile.common b/www/mozilla/Makefile.common
index 9e8963cccbd..ffb87868cf1 100644
--- a/www/mozilla/Makefile.common
+++ b/www/mozilla/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.10 2003/02/02 08:08:04 taya Exp $
+# $NetBSD: Makefile.common,v 1.11 2003/03/14 19:38:02 jlam Exp $
MOZ_DIST_VER?= ${MOZ_VER}
DISTNAME?= mozilla-source-${MOZ_DIST_VER}
@@ -46,7 +46,7 @@ NOT_FOR_PLATFORM= NetBSD-1.4.*-* NetBSD-*-m68k
MOZ_LIBDIR= ${PREFIX}/lib/${MOZILLA}
MAKE_ENV+= LIBRUNPATH=${MOZ_LIBDIR}
CONFIGURE_ENV+= LIBRUNPATH=${MOZ_LIBDIR}
-LDFLAGS+= -Wl,-R${MOZ_LIBDIR}
+LDFLAGS+= -Wl,${RPATH_FLAG}${MOZ_LIBDIR}
.ifdef BUILD_SVG
MAKE_ENV+= MOZ_INTERNAL_LIBART_LGPL=1
diff --git a/www/skipstone/Makefile b/www/skipstone/Makefile
index e369804ab99..6548b67e4c1 100644
--- a/www/skipstone/Makefile
+++ b/www/skipstone/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.15 2003/01/10 19:14:14 wiz Exp $
+# $NetBSD: Makefile,v 1.16 2003/03/14 19:38:03 jlam Exp $
DISTNAME= skipstone-0.8.3
CATEGORIES= www
@@ -17,13 +17,13 @@ GNU_CONFIGURE= yes
CONFIGURE_ARGS= --prefix=${PREFIX} \
--with-mozilla-includes=${BUILDLINK_PREFIX.mozilla}/include/mozilla \
--with-mozilla-libs=${BUILDLINK_PREFIX.mozilla}/lib/mozilla
-LDFLAGS+= -Wl,-R${BUILDLINK_PREFIX.mozilla}/lib/mozilla
+LDFLAGS+= -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.mozilla}/lib/mozilla
# for mozilla-stable (1.0 series)
#CONFIGURE_ARGS= --prefix=${PREFIX} \
# --with-mozilla-includes=${BUILDLINK_PREFIX.mozilla-stable}/include/mozilla-stable \
# --with-mozilla-libs=${BUILDLINK_PREFIX.mozilla-stable}/lib/mozilla-stable
-#LDFLAGS+= -Wl,-R${BUILDLINK_PREFIX.mozilla-stable}/lib/mozilla-stable
+#LDFLAGS+= -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.mozilla-stable}/lib/mozilla-stable
#.include "../../www/mozilla-stable/buildlink2.mk"
.include "../../www/mozilla/buildlink2.mk"
diff --git a/x11/bbapm/Makefile b/x11/bbapm/Makefile
index 454d78b15cc..84abca3097d 100644
--- a/x11/bbapm/Makefile
+++ b/x11/bbapm/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2002/09/08 00:03:56 jschauma Exp $
+# $NetBSD: Makefile,v 1.4 2003/03/14 19:38:04 jlam Exp $
# based on
# FreeBSD port:
# ID: ports/x11-wm/bbapm/Makefile,v 1.5 2002/09/02 01:30:15 lioux Exp
@@ -14,7 +14,7 @@ HOMEPAGE= http://bbtools.windsofstorm.net/
COMMENT= APM monitor for Blackbox
GNU_CONFIGURE= yes
-LDFLAGS+= -Wl,-R${X11BASE}/lib
+USE_X11= yes
# For now:
# We use i386/apmvar.h; other architectures will require modification
diff --git a/x11/gnome-python/Makefile b/x11/gnome-python/Makefile
index 1c7a53af9e0..be4960d3b58 100644
--- a/x11/gnome-python/Makefile
+++ b/x11/gnome-python/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.31 2003/02/22 00:49:27 mycroft Exp $
+# $NetBSD: Makefile,v 1.32 2003/03/14 19:38:04 jlam Exp $
DISTNAME= gnome-python-1.4.4
PKGNAME= ${PYPKGPREFIX}-gnome-1.4.4
@@ -26,11 +26,12 @@ PYBINMODULE= yes
.include "../../mk/bsd.prefs.mk"
+# XXX This doesn't quite work if _USE_RPATH=no.
.if (${OBJECT_FMT} == a.out)
post-configure:
.for DIR in pygtk pygnome
${MV} ${WRKSRC}/${DIR}/Makefile ${WRKSRC}/${DIR}/Makefile.old
- ${SED} -e 's#-Wl,-R#-R#g' ${WRKSRC}/${DIR}/Makefile.old \
+ ${SED} -e 's#-Wl,-R#${RPATH_FLAG}#g' ${WRKSRC}/${DIR}/Makefile.old \
>${WRKSRC}/${DIR}/Makefile
.endfor
.endif
diff --git a/x11/gtk/Makefile b/x11/gtk/Makefile
index f7158c5b67a..dec0a112451 100644
--- a/x11/gtk/Makefile
+++ b/x11/gtk/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.78 2002/12/19 13:09:37 grant Exp $
+# $NetBSD: Makefile,v 1.79 2003/03/14 19:38:05 jlam Exp $
DISTNAME= gtk+-1.2.10
PKGREVISION= 3
@@ -36,7 +36,7 @@ PLIST_SUBST+= LOCALBASE=${LOCALBASE}
# The following ensures that `gtk-config --libs' includes the correct linker
# flags for linking the X11 libs.
#
-X_LDFLAGS= -L${X11BASE}/lib -Wl,-R${X11BASE}/lib
+X_LDFLAGS= ${X11_LDFLAGS}
GTK_VERSION= ${DISTNAME:S/gtk+-//}
GTK_MAJOR_VERSION= ${GTK_VERSION:C/\..*//}
diff --git a/x11/kdebase/Makefile b/x11/kdebase/Makefile
index 7bd6cf51a99..206d389b17a 100644
--- a/x11/kdebase/Makefile
+++ b/x11/kdebase/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.87 2003/03/09 19:28:17 jschauma Exp $
+# $NetBSD: Makefile,v 1.88 2003/03/14 19:38:05 jlam Exp $
# FreeBSD Id: Makefile,v 1.6 1997/11/27 00:35:27 se Exp
DISTNAME= kdebase-1.1.2
@@ -26,7 +26,10 @@ CONFIGURE_ARGS= "--datadir=${PREFIX}/share/kde" \
"--with-qt-dir=${QTDIR}/qt1"
CONFIGURE_ENV= KDEDIR=${PREFIX} \
CXXFLAGS="${CFLAGS} -DRMAN='\"${RMAN}\"'" \
- all_libraries="-Wl,-R${LOCALBASE}/lib -L${LOCALBASE}/lib -Wl,-R${X11BASE}/lib -L${X11BASE}/lib"
+ all_libraries="${KDE_LDFLAGS}"
+
+FIX_RPATH+= KDE_LDFLAGS
+KDE_LDFLAGS= -L${LOCALBASE}/lib -Wl,${RPATH_FLAG}${LOCALBASE}/lib -L${X11BASE}/lib -Wl,${RPATH_FLAG}${X11BASE}/lib
EXTRACT_ONLY= ${DISTNAME}.tar.bz2
PLIST_SRC= ${WRKDIR}/PLIST
diff --git a/x11/kdelibs/Makefile b/x11/kdelibs/Makefile
index 13475d237de..05578f22f29 100644
--- a/x11/kdelibs/Makefile
+++ b/x11/kdelibs/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.62 2002/10/20 14:06:00 wiz Exp $
+# $NetBSD: Makefile,v 1.63 2003/03/14 19:38:06 jlam Exp $
# FreeBSD Id: Makefile,v 1.5 1997/11/27 00:25:46 se Exp
#
@@ -26,7 +26,10 @@ CONFIGURE_ARGS= "--datadir=${PREFIX}/share/kde" \
CONFIGURE_ENV= KDEDIR=${PREFIX} \
CXXFLAGS="${CFLAGS}" \
- all_libraries="-Wl,-R${LOCALBASE}/lib -L${LOCALBASE}/lib -Wl,-R${X11BASE}/lib -L${X11BASE}/lib"
+ all_libraries="${KDE_LDFLAGS}"
+
+FIX_RPATH+= KDE_LDFLAGS
+KDE_LDFLAGS= -L${LOCALBASE}/lib -Wl,${RPATH_FLAG}${LOCALBASE}/lib -L${X11BASE}/lib -Wl,${RPATH_FLAG}${X11BASE}/lib
.include "../../graphics/jpeg/buildlink2.mk"
.include "../../graphics/png/buildlink2.mk"
diff --git a/x11/khostchooser/Makefile b/x11/khostchooser/Makefile
index 5bef956de2c..74282ebad0e 100644
--- a/x11/khostchooser/Makefile
+++ b/x11/khostchooser/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.18 2002/10/21 13:48:54 wiz Exp $
+# $NetBSD: Makefile,v 1.19 2003/03/14 19:38:06 jlam Exp $
#
DISTNAME= khostchooser-0.3
@@ -24,7 +24,10 @@ CONFIGURE_ARGS= --datadir=${PREFIX}/share/kde \
--with-qt-dir=${QTDIR}
CONFIGURE_ENV= KDEDIR=${PREFIX} \
CXXFLAGS="${CFLAGS}" \
- all_libraries="-Wl,-R${LOCALBASE}/lib -L${LOCALBASE}/lib -Wl,-R${X11BASE}/lib -L${X11BASE}/lib"
+ all_libraries="${KDE_LDFLAGS}"
+
+FIX_RPATH+= KDE_LDFLAGS
+KDE_LDFLAGS= -L${LOCALBASE}/lib -Wl,${RPATH_FLAG}${LOCALBASE}/lib -L${X11BASE}/lib -Wl,${RPATH_FLAG}${X11BASE}/lib
.include "../../graphics/libungif/buildlink2.mk"
.include "../../graphics/xpm/buildlink2.mk"
diff --git a/x11/qt1/buildlink2.mk b/x11/qt1/buildlink2.mk
index 61639a97ac2..d56778c39b0 100644
--- a/x11/qt1/buildlink2.mk
+++ b/x11/qt1/buildlink2.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink2.mk,v 1.1 2002/10/20 14:00:41 wiz Exp $
+# $NetBSD: buildlink2.mk,v 1.2 2003/03/14 19:38:06 jlam Exp $
.if !defined(QT1_BUILDLINK2_MK)
QT1_BUILDLINK2_MK= # defined
@@ -15,13 +15,14 @@ BUILDLINK_FILES.qt1+= qt1/lib/libqt.*
QTDIR= ${BUILDLINK_PREFIX.qt1}/qt1
BUILDLINK_CPPFLAGS.qt1= -I${QTDIR}/include
-BUILDLINK_LDFLAGS.qt1= -L${QTDIR}/lib -Wl,-R${QTDIR}/lib
+BUILDLINK_LDFLAGS.qt1= -L${QTDIR}/lib -Wl,${RPATH_FLAG}${QTDIR}/lib
+FIX_RPATH+= BUILDLINK_LDFLAGS.qt1
CONFIGURE_ENV+= QTDIR="${QTDIR}"
CONFIGURE_ENV+= MOC="${QTDIR}/bin/moc"
MAKE_ENV+= QTDIR="${QTDIR}"
MAKE_ENV+= MOC="${QTDIR}/bin/moc"
-LDFLAGS+= -Wl,-R${QTDIR}/lib
+LDFLAGS+= -Wl,${RPATH_FLAG}${QTDIR}/lib
BUILDLINK_TARGETS+= qt1-buildlink
diff --git a/x11/qt2-libs/buildlink2.mk b/x11/qt2-libs/buildlink2.mk
index 6fcde7b7568..1a5fcd23d4f 100644
--- a/x11/qt2-libs/buildlink2.mk
+++ b/x11/qt2-libs/buildlink2.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink2.mk,v 1.4 2003/03/12 22:07:30 jschauma Exp $
+# $NetBSD: buildlink2.mk,v 1.5 2003/03/14 19:38:07 jlam Exp $
.if !defined(QT2_LIBS_BUILDLINK2_MK)
QT2_LIBS_BUILDLINK2_MK= # defined
@@ -15,7 +15,8 @@ BUILDLINK_FILES.qt2-libs+= qt2/lib/libqt.*
QTDIR= ${BUILDLINK_PREFIX.qt2-libs}/qt2
BUILDLINK_CPPFLAGS.qt2-libs= -I${QTDIR}/include
-BUILDLINK_LDFLAGS.qt2-libs= -L${QTDIR}/lib -Wl,-R${QTDIR}/lib
+BUILDLINK_LDFLAGS.qt2-libs= -L${QTDIR}/lib -Wl,${RPATH_FLAG}${QTDIR}/lib
+FIX_RPATH+= BUILDLINK_LDFLAGS.qt2-libs
.include "../../devel/zlib/buildlink2.mk"
.include "../../graphics/MesaLib/buildlink2.mk"
@@ -28,7 +29,7 @@ CONFIGURE_ENV+= QTDIR="${QTDIR}"
CONFIGURE_ENV+= MOC="${QTDIR}/bin/moc"
MAKE_ENV+= QTDIR="${QTDIR}"
MAKE_ENV+= MOC="${QTDIR}/bin/moc"
-LDFLAGS+= -Wl,-R${QTDIR}/lib
+LDFLAGS+= -Wl,${RPATH_FLAG}${QTDIR}/lib
BUILDLINK_TARGETS+= qt2-libs-buildlink
diff --git a/x11/qt3-libs/buildlink2.mk b/x11/qt3-libs/buildlink2.mk
index 8775ea9d5c7..da670f528df 100644
--- a/x11/qt3-libs/buildlink2.mk
+++ b/x11/qt3-libs/buildlink2.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink2.mk,v 1.11 2003/03/14 11:27:09 markd Exp $
+# $NetBSD: buildlink2.mk,v 1.12 2003/03/14 19:38:07 jlam Exp $
.if !defined(QT3_LIBS_BUILDLINK2_MK)
QT3_LIBS_BUILDLINK2_MK= # defined
@@ -16,7 +16,8 @@ BUILDLINK_FILES.qt3-libs+= qt3/lib/libqt-mt.*
QTDIR= ${BUILDLINK_PREFIX.qt3-libs}/qt3
BUILDLINK_CPPFLAGS.qt3-libs= -I${QTDIR}/include
-BUILDLINK_LDFLAGS.qt3-libs= -L${QTDIR}/lib -Wl,-R${QTDIR}/lib
+BUILDLINK_LDFLAGS.qt3-libs= -L${QTDIR}/lib -Wl,${RPATH_FLAG}${QTDIR}/lib
+FIX_RPATH+= BUILDLINK_LDFLAGS.qt3-libs
PTHREAD_OPTS+= require
@@ -31,7 +32,7 @@ PTHREAD_OPTS+= require
CONFIGURE_ENV+= MOC="${QTDIR}/bin/moc"
MAKE_ENV+= MOC="${QTDIR}/bin/moc"
-LDFLAGS+= -Wl,-R${QTDIR}/lib
+LDFLAGS+= -Wl,${RPATH_FLAG}${QTDIR}/lib
.if !defined(BUILD_QT3)
CONFIGURE_ENV+= QTDIR="${QTDIR}"