summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authoragc <agc>2002-09-04 14:47:32 +0000
committeragc <agc>2002-09-04 14:47:32 +0000
commit5c18ecbd1e9c2dd9ee1b1599ca35d0578b2e188d (patch)
treec5f617edba6ae81af7be6e5d984ab9fdbe5a97f4 /misc
parentc1e1344cf693a2f7f40a257987f12caad992a0fc (diff)
downloadpkgsrc-5c18ecbd1e9c2dd9ee1b1599ca35d0578b2e188d.tar.gz
Apply patches from Lubomir Sedlacik <salo@Xtrmntr.org> in PR 18115 to
generalise the linker flags used to export symbols by setting them on a per-OS basis. > many packages force -Wl,-export-dynamic which is not portable outside GNU ld > and cause problems e.g. on Solaris. some of these packages use if > conditionals either only for NetBSD or except SunOS, but the state is not > coherent and it may complicate later when support for new OS is added to > pkgsrc (e.g. ongoing work on HP-UX support). > > jlam proposed the following framework in discussion on tech-pkg: > > http://mail-index.netbsd.org/tech-pkg/2002/06/21/0009.html > > now, ${EXPORT_SYMBOLS_LDFLAGS} is used instead of directly defining > -Wl,-export-dynamic which is set in appropriate defs.*.mk to reasonable > values. packages should be converted to this framework by: > > 1) replacing LDFLAGS+= -Wl,-export-dynamic and LIBS+= -export-dynamic with: > > LDFLAGS+= ${EXPORT_SYMBOLS_LDFLAGS} > > 2) for use in patchfiles, add this variable to MAKE_ENV if needed: > > MAKE_ENV+= EXPORT_SYMBOLS_LDFLAGS=${EXPORT_SYMBOLS_LDFLAGS} > > 3) replace occurances of -Wl,-export-dynamic and -export-dynamic in patch > files with: > > $(EXPORT_SYMBOLS_LDFLAGS)
Diffstat (limited to 'misc')
-rw-r--r--misc/kdeutils2/Makefile11
-rw-r--r--misc/kdeutils3/Makefile13
-rw-r--r--misc/koffice/Makefile.common7
3 files changed, 15 insertions, 16 deletions
diff --git a/misc/kdeutils2/Makefile b/misc/kdeutils2/Makefile
index d4794169169..d53902dd188 100644
--- a/misc/kdeutils2/Makefile
+++ b/misc/kdeutils2/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2002/03/13 17:37:27 fredb Exp $
+# $NetBSD: Makefile,v 1.11 2002/09/04 14:47:38 agc Exp $
DISTNAME= kdeutils-2.2.2
PKGREVISION= 1
@@ -10,14 +10,13 @@ BUILD_DEPENDS+= qt2-designer-kde>=2.3.1nb2:../../x11/qt2-designer-kde
USE_BUILDLINK_ONLY= YES
-.include "../../mk/bsd.prefs.mk"
+# Ensure we export symbols in the linked shared object.
+LDFLAGS+= ${EXPORT_SYMBOLS_LDFLAGS}
-.if ${OPSYS} == "NetBSD"
-LIBS= -Wl,--export-dynamic
+.include "../../mk/bsd.prefs.mk"
-. if exists(/usr/include/machine/apmvar.h)
+.if ${OPSYS} == "NetBSD" && exists(/usr/include/machine/apmvar.h)
CPPFLAGS+= -D__NetBSD_APM__
-. endif
.endif
post-install:
diff --git a/misc/kdeutils3/Makefile b/misc/kdeutils3/Makefile
index 2b9332a0823..fe7ddd65383 100644
--- a/misc/kdeutils3/Makefile
+++ b/misc/kdeutils3/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2002/08/28 07:15:37 skrll Exp $
+# $NetBSD: Makefile,v 1.4 2002/09/04 14:47:38 agc Exp $
DISTNAME= kdeutils-3.0.3
COMMENT= Utilities for the KDE integrated X11 desktop
@@ -7,14 +7,13 @@ COMMENT= Utilities for the KDE integrated X11 desktop
USE_BUILDLINK_ONLY= YES
-.include "../../mk/bsd.prefs.mk"
+# Ensure we export symbols in the linked shared object.
+LDFLAGS+= ${EXPORT_SYMBOLS_LDFLAGS}
-.if ${OPSYS} == "NetBSD"
-LIBS= -Wl,--export-dynamic
+.include "../../mk/bsd.prefs.mk"
-. if exists(/usr/include/machine/apmvar.h)
-CPPFLAGS+= -D__NetBSD_APM__
-. endif
+.if ${OPSYS} == "NetBSD" && exists(/usr/include/machine/apmvar.h)
+.include "../../mk/bsd.prefs.mk"
.endif
post-install:
diff --git a/misc/koffice/Makefile.common b/misc/koffice/Makefile.common
index 7f13cc2baad..ab075e32806 100644
--- a/misc/koffice/Makefile.common
+++ b/misc/koffice/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.1 2002/06/20 19:13:50 jschauma Exp $
+# $NetBSD: Makefile.common,v 1.2 2002/09/04 14:47:38 agc Exp $
CATEGORIES= misc kde
VERSION= 1.1.1
@@ -11,9 +11,10 @@ USE_BUILDLINK_ONLY= YES
REPLACE_PERL= kpresenter/kprconverter.pl
-.if ${OPSYS} == "NetBSD"
-LIBS+= -Wl,--export-dynamic
+# Ensure we export symbols in the linked shared object.
+LDFLAGS+= ${EXPORT_SYMBOLS_LDFLAGS}
+.if ${OPSYS} == "NetBSD"
# On egcs-1.1.2, the C++ compiler system isn't quite ISO-compliant. It lacks
# a std::auto_ptr implementation in <memory>, doesn't handle static inline
# functions in headers properly (although that concept, in itself, is quite