diff options
author | tijl <tijl@FreeBSD.org> | 2014-06-11 22:49:59 +0800 |
---|---|---|
committer | tijl <tijl@FreeBSD.org> | 2014-06-11 22:49:59 +0800 |
commit | 67f12d415fec83113a7ddfbc9655db98b4e70a28 (patch) | |
tree | c4f78cbaf45ab044db3e157be708afd711a4e841 /lang | |
parent | 2088f53b95d04c86b1aece3d66aaca36ec5aaec2 (diff) | |
download | freebsd-ports-gnome-67f12d415fec83113a7ddfbc9655db98b4e70a28.tar.gz freebsd-ports-gnome-67f12d415fec83113a7ddfbc9655db98b4e70a28.tar.zst freebsd-ports-gnome-67f12d415fec83113a7ddfbc9655db98b4e70a28.zip |
Support LIBS like LDFLAGS.
- Add LIBS="${LIBS}" to MAKE_ENV and CONFIGURE_ENV.
- Add an option helper for LIBS.
- Adjust all ports that already use LIBS. Also remove references to
PTHREAD_CFLAGS and PTHREAD_LIBS while here.
- Some ports did not support having a LIBS environment variable and
required additional patches.
Somewhat simplified a linker command line looks like:
${CC} ${src_LDFLAGS} ${LDFLAGS} ${src_LIBS} ${LIBS}
where src_LDFLAGS and src_LIBS are controlled by upstream and LDFLAGS and
LIBS can be controlled by us. If possible -L and -l flags need to be
added to LIBS to make sure they appear after any -L and -l flags set by
upstream. Many ports currently add -L${LOCALBASE}/lib to LDFLAGS but this
may appear too early on the command line causing installed libraries to
be linked in instead of freshly built ones.
Additional changes:
benchmarks/netio: Replace WITH_IPV6 with an IPV6 option.
comms/gnokii: Replace some patches with USES=pathfix. Also remove -fPIC.
graphics/gimageview: USES=libtool and install desktop file in DESKTOPDIR.
graphics/visionworkbench: Remove FreeBSD 7 support.
multimedia/libmovtar: New LIB_DEPENDS syntax.
multimedia/opencinematools: Use standard do-build.
net/siproxd: USES=libtool:keepla (port actually needs .la files for plugins)
net-mgmt/nagios: Remove -fPIC.
net-mgmt/nagios4: Remove -fPIC.
print/cups-base: Only add -lssp_nonshared on i386 and OSVERSION < 1000036.
security/p11-kit: Replace PTHREAD_LIBS in CONFIGURE_ENV with
ac_cv_func_pthread_mutexattr_init=no in CONFIGURE_ARGS. This skips a test
in configure that falsely detects pthread_mutexattr_init in our libc.
sysutils/dar: Fix iconv detection.
x11/rxvt-unicode: Remove -lstdc++ and patch configure to remove a FreeBSD
hack and use $CXX as linker as on other platforms.
PR: 190592
Exp-run by: antoine
Approved by: portmgr (antoine)
Diffstat (limited to 'lang')
-rw-r--r-- | lang/hugs/Makefile | 5 | ||||
-rw-r--r-- | lang/lush/Makefile | 2 | ||||
-rw-r--r-- | lang/php5/Makefile | 2 | ||||
-rw-r--r-- | lang/php53/Makefile | 2 | ||||
-rw-r--r-- | lang/php55/Makefile | 2 | ||||
-rw-r--r-- | lang/python27/Makefile | 6 | ||||
-rw-r--r-- | lang/ruby19/Makefile | 9 | ||||
-rw-r--r-- | lang/ruby20/Makefile | 9 | ||||
-rw-r--r-- | lang/ruby21/Makefile | 9 |
9 files changed, 18 insertions, 28 deletions
diff --git a/lang/hugs/Makefile b/lang/hugs/Makefile index c39e532deb30..78f3f0b65d0b 100644 --- a/lang/hugs/Makefile +++ b/lang/hugs/Makefile @@ -43,11 +43,8 @@ PLIST_SUB+= X11="@comment " MAN1= hugs.1 -.if ${MACHINE_ARCH:tl} == "amd64" -CFLAGS+= "-fPIC" -.endif - post-patch: + @${REINPLACE_CMD} 's/LIBS/LIBRARIES/' ${WRKSRC}/libraries/Makefile.in @${REINPLACE_CMD} -e '/^install :: install_notes/d ; \ /^install :: install_guide/d' \ ${WRKSRC}/src/MkInstal.in diff --git a/lang/lush/Makefile b/lang/lush/Makefile index f53cb543c77f..d16ec7b58662 100644 --- a/lang/lush/Makefile +++ b/lang/lush/Makefile @@ -18,8 +18,8 @@ GNU_CONFIGURE= yes WRKSRC= ${WRKDIR}/lush -CONFIGURE_ENV= LIBS="${LIBS} ${PTHREAD_LIBS} -lintl -lfontconfig -L${LOCALBASE}/lib" CPPFLAGS+= -I${LOCALBASE}/include +LIBS+= -L${LOCALBASE}/lib -lintl -lfontconfig CONFIGURE_ARGS= --without-bfd diff --git a/lang/php5/Makefile b/lang/php5/Makefile index 1a6248b06b9c..1db2c155f409 100644 --- a/lang/php5/Makefile +++ b/lang/php5/Makefile @@ -143,7 +143,7 @@ CONFIGURE_ENV+= ac_cv_pthreads_lib="" \ lt_cv_path_SED="sed" .if ${PORT_OPTIONS:MLINKTHR} -CONFIGURE_ENV+= LIBS="${LIBS} ${PTHREAD_LIBS}" +LIBS+= ${PTHREAD_LIBS} .endif .if ${PORT_OPTIONS:MZTS} diff --git a/lang/php53/Makefile b/lang/php53/Makefile index 73a4cfebb1bc..ec8597209fa0 100644 --- a/lang/php53/Makefile +++ b/lang/php53/Makefile @@ -139,7 +139,7 @@ CONFIGURE_ENV+= ac_cv_pthreads_lib="" \ lt_cv_path_SED="sed" .if ${PORT_OPTIONS:MLINKTHR} -CONFIGURE_ENV+= LIBS="${LIBS} ${PTHREAD_LIBS}" +LIBS+= ${PTHREAD_LIBS} .endif .if ${PORT_OPTIONS:MDEBUG} diff --git a/lang/php55/Makefile b/lang/php55/Makefile index c01ac13cb450..59d655cf63c8 100644 --- a/lang/php55/Makefile +++ b/lang/php55/Makefile @@ -143,7 +143,7 @@ CONFIGURE_ENV+= ac_cv_pthreads_lib="" \ lt_cv_path_SED="sed" .if ${PORT_OPTIONS:MLINKTHR} -CONFIGURE_ENV+= LIBS="${LIBS} ${PTHREAD_LIBS}" +LIBS+= ${PTHREAD_LIBS} .endif .if ${PORT_OPTIONS:MDEBUG} diff --git a/lang/python27/Makefile b/lang/python27/Makefile index beee2a3310f2..f057d2e55acc 100644 --- a/lang/python27/Makefile +++ b/lang/python27/Makefile @@ -65,12 +65,8 @@ NLS_DESC= Enable Gettext support for the locale module .if ${PORT_OPTIONS:MNLS} USES+= gettext -LDFLAGS+= -L${LOCALBASE}/lib -# We use CPPFLAGS over CFLAGS here due to -I ordering causing things like -# elementtree and pyexpat to break with python27, or to silence preprocessor -# complaints with python33 CPPFLAGS+= -I${LOCALBASE}/include -CONFIGURE_ENV+= LIBS="-lintl" +LIBS+= -L${LOCALBASE}/lib -lintl .else CONFIGURE_ENV+= ac_cv_lib_intl_textdomain=no ac_cv_header_libintl_h=no .endif diff --git a/lang/ruby19/Makefile b/lang/ruby19/Makefile index 17db8517dcfa..f0f505e989ee 100644 --- a/lang/ruby19/Makefile +++ b/lang/ruby19/Makefile @@ -65,8 +65,9 @@ _SUF2= ,${PORTEPOCH} _SUF1= _${PORTREVISION} .endif -CFLAGS+= ${PTHREAD_CFLAGS} # Keep this, else ruby will fail to load -LDFLAGS+= ${PTHREAD_LIBS} # libraries dependent op libpthread. +CPPFLAGS+= -I${LOCALBASE}/include +# Keep this, else ruby will fail to load libraries dependent op libpthread. +LIBS+= -L${LOCALBASE}/lib ${PTHREAD_LIBS} # # Disable doc generation if requested or docs disabled at all @@ -77,9 +78,7 @@ CONFIGURE_ARGS+= --enable-install-doc CONFIGURE_ARGS+= --disable-install-doc .endif -CONFIGURE_ENV= CFLAGS="-I${LOCALBASE}/include ${CFLAGS}" \ - LIBS="-L${LOCALBASE}/lib ${LDFLAGS}" \ - debugflags= +CONFIGURE_ENV= debugflags= .if ${RUBY_VER} == ${RUBY_DEFAULT_VER} MLINKS= ${RUBY_NAME}.1 ruby.1 diff --git a/lang/ruby20/Makefile b/lang/ruby20/Makefile index 44d8924c7702..8b1f4d013ead 100644 --- a/lang/ruby20/Makefile +++ b/lang/ruby20/Makefile @@ -70,8 +70,9 @@ _SUF2= ,${PORTEPOCH} _SUF1= _${PORTREVISION} .endif -CFLAGS+= ${PTHREAD_CFLAGS} # Keep this, else ruby will fail to load -LDFLAGS+= ${PTHREAD_LIBS} # libraries dependent op libpthread. +CPPFLAGS+= -I${LOCALBASE}/include +# Keep this, else ruby will fail to load libraries dependent op libpthread. +LIBS+= -L${LOCALBASE}/lib ${PTHREAD_LIBS} # # Disable doc generation if requested or docs disabled at all @@ -86,9 +87,7 @@ CONFIGURE_ARGS+= --disable-install-doc CONFIGURE_ARGS+= --disable-dtrace .endif -CONFIGURE_ENV= CFLAGS="-I${LOCALBASE}/include ${CFLAGS}" \ - LIBS="-L${LOCALBASE}/lib ${LDFLAGS}" \ - debugflags= +CONFIGURE_ENV= debugflags= .if ${PORT_OPTIONS:MLIBEDIT} BUILD_DEPENDS+= libedit>=0:${PORTSDIR}/devel/libedit diff --git a/lang/ruby21/Makefile b/lang/ruby21/Makefile index 6ca089a7db7a..cb2fd8827ff4 100644 --- a/lang/ruby21/Makefile +++ b/lang/ruby21/Makefile @@ -70,8 +70,9 @@ _SUF2= ,${PORTEPOCH} _SUF1= _${PORTREVISION} .endif -CFLAGS+= ${PTHREAD_CFLAGS} # Keep this, else ruby will fail to load -LDFLAGS+= ${PTHREAD_LIBS} # libraries dependent op libpthread. +CPPFLAGS+= -I${LOCALBASE}/include +# Keep this, else ruby will fail to load libraries dependent op libpthread. +LIBS+= -L${LOCALBASE}/lib ${PTHREAD_LIBS} # # Disable doc generation if requested or docs disabled at all @@ -86,9 +87,7 @@ CONFIGURE_ARGS+= --disable-install-doc CONFIGURE_ARGS+= --disable-dtrace .endif -CONFIGURE_ENV= CFLAGS="-I${LOCALBASE}/include ${CFLAGS}" \ - LIBS="-L${LOCALBASE}/lib ${LDFLAGS}" \ - debugflags= +CONFIGURE_ENV= debugflags= .if ${PORT_OPTIONS:MLIBEDIT} BUILD_DEPENDS+= libedit>=0:${PORTSDIR}/devel/libedit |