diff options
author | tijl <tijl@FreeBSD.org> | 2014-08-30 04:16:45 +0800 |
---|---|---|
committer | tijl <tijl@FreeBSD.org> | 2014-08-30 04:16:45 +0800 |
commit | c5f8511ede8c171c65ba77ee8764ff48f232c741 (patch) | |
tree | e4b1b88a487fa55727f8d1847398f50b797244b9 | |
parent | dbbaddd50b998cc391da8b17fb2813e869aa8146 (diff) | |
download | freebsd-ports-gnome-c5f8511ede8c171c65ba77ee8764ff48f232c741.tar.gz freebsd-ports-gnome-c5f8511ede8c171c65ba77ee8764ff48f232c741.tar.zst freebsd-ports-gnome-c5f8511ede8c171c65ba77ee8764ff48f232c741.zip |
Enable shared libbfd library and use it in devel/fnccheck to fix a linking
problem
Reported by: amdmi3
-rw-r--r-- | devel/fnccheck/Makefile | 14 | ||||
-rw-r--r-- | devel/libbfd/Makefile | 17 | ||||
-rw-r--r-- | devel/libbfd/files/patch-configure | 11 | ||||
-rw-r--r-- | devel/libbfd/pkg-plist | 2 |
4 files changed, 28 insertions, 16 deletions
diff --git a/devel/fnccheck/Makefile b/devel/fnccheck/Makefile index 4ed455da07cf..d4aee4674bfa 100644 --- a/devel/fnccheck/Makefile +++ b/devel/fnccheck/Makefile @@ -13,17 +13,15 @@ COMMENT= Profiling library/utilities for C/C++ programs LICENSE= GPLv2 LGPL21 LICENSE_COMB= multi -BUILD_DEPENDS= gnulibiberty>0:${PORTSDIR}/devel/gnulibiberty \ - libbfd>0:${PORTSDIR}/devel/libbfd +LIB_DEPENDS= libbfd.so:${PORTSDIR}/devel/libbfd USES= libtool USE_AUTOTOOLS= libtoolize aclocal automake autoconf -LIBTOOLIZE_ARGS=--force AUTOMAKE_ARGS= --force-missing --add-missing --foreign USE_LDCONFIG= yes CPPFLAGS+= -I${LOCALBASE}/include -LDFLAGS+= -L${LOCALBASE}/lib -pthread +LIBS+= -L${LOCALBASE}/lib STRIP= # none @@ -31,15 +29,9 @@ INFO= libfc post-patch: @${FIND} ${WRKSRC} -name "Makefile.am" | ${XARGS} ${REINPLACE_CMD} -e \ - 's|-ldl -lpthread|| ; \ - s|-lbfd$$|-lbfd -liberty| ; \ + 's|-ldl|| ; \ s|-Wall -O3|-Wall|' @${REINPLACE_CMD} -e \ '/^SUBDIRS/s|test||' ${WRKSRC}/Makefile.am -# XXX: work around an issue with automake-1.13 erroring out on a -# non-existent m4 directory before libtoolize creates it -pre-configure:: - @${MKDIR} ${WRKSRC}/m4 - .include <bsd.port.mk> diff --git a/devel/libbfd/Makefile b/devel/libbfd/Makefile index d704f31e7d07..1354a3073961 100644 --- a/devel/libbfd/Makefile +++ b/devel/libbfd/Makefile @@ -3,7 +3,7 @@ PORTNAME= libbfd PORTVERSION= 2.19.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel MASTER_SITES= ${MASTER_SITE_SOURCEWARE} MASTER_SITE_SUBDIR= binutils/releases @@ -12,8 +12,6 @@ DISTNAME= binutils-${PORTVERSION} MAINTAINER= joerg@FreeBSD.org COMMENT= Universal BFD library from GNU binutils -BUILD_DEPENDS= ${LOCALBASE}/lib/libiberty.a:${PORTSDIR}/devel/gnulibiberty - CONFLICTS= mingw-binutils-[0-9]* binutils-[0-9]* WRKSRC= ${WRKDIR}/binutils-${PORTVERSION}/bfd @@ -21,12 +19,21 @@ WRKSRC= ${WRKDIR}/binutils-${PORTVERSION}/bfd USES= gmake libtool tar:bzip2 GNU_CONFIGURE= yes CONFIGURE_ARGS= --enable-install-libbfd \ - --enable-commonbfdlib \ --disable-nls \ - --without-pic \ + --enable-shared \ --enable-targets=all \ --disable-werror CONFIGURE_TARGET=${ARCH:S/amd64/x86_64/}-portbld-${OPSYS:tl}${OSREL} INFO= bfd +pre-configure: +# Configure and build pic version of libiberty + (cd ${WRKSRC}/../libiberty && \ + ${SETENV} CC="${CC}" CFLAGS="${CFLAGS}" CPP="${CPP}" \ + CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" \ + LIBS="${LIBS}" ${CONFIGURE_ENV} ./configure \ + ${CONFIGURE_ARGS} --build=${CONFIGURE_TARGET} && \ + ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} \ + ${MAKE_ARGS}) + .include <bsd.port.mk> diff --git a/devel/libbfd/files/patch-configure b/devel/libbfd/files/patch-configure new file mode 100644 index 000000000000..09c4304b45dc --- /dev/null +++ b/devel/libbfd/files/patch-configure @@ -0,0 +1,11 @@ +--- configure.orig ++++ configure +@@ -19503,7 +19503,7 @@ case "${host}" in + WIN32LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32" + fi + ;; +-*-*-linux*) ++*) + # We borrow WIN32LIBADD so that the shared libbfd won't depend on + # libiberty.a. + x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` diff --git a/devel/libbfd/pkg-plist b/devel/libbfd/pkg-plist index 5155fe538d6d..ebf52dbe6d35 100644 --- a/devel/libbfd/pkg-plist +++ b/devel/libbfd/pkg-plist @@ -2,4 +2,6 @@ include/ansidecl.h include/bfd.h include/bfdlink.h include/symcat.h +lib/libbfd-2.19.1.so lib/libbfd.a +lib/libbfd.so |