Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Aug 2014 20:16:46 +0000 (UTC)
From:      Tijl Coosemans <tijl@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r366561 - in head/devel: fnccheck libbfd libbfd/files
Message-ID:  <201408292016.s7TKGkvo053452@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tijl
Date: Fri Aug 29 20:16:45 2014
New Revision: 366561
URL: http://svnweb.freebsd.org/changeset/ports/366561
QAT: https://qat.redports.org/buildarchive/r366561/

Log:
  Enable shared libbfd library and use it in devel/fnccheck to fix a linking
  problem
  
  Reported by:	amdmi3

Added:
  head/devel/libbfd/files/
  head/devel/libbfd/files/patch-configure   (contents, props changed)
Modified:
  head/devel/fnccheck/Makefile
  head/devel/libbfd/Makefile
  head/devel/libbfd/pkg-plist

Modified: head/devel/fnccheck/Makefile
==============================================================================
--- head/devel/fnccheck/Makefile	Fri Aug 29 19:49:33 2014	(r366560)
+++ head/devel/fnccheck/Makefile	Fri Aug 29 20:16:45 2014	(r366561)
@@ -13,17 +13,15 @@ COMMENT=	Profiling library/utilities for
 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>

Modified: head/devel/libbfd/Makefile
==============================================================================
--- head/devel/libbfd/Makefile	Fri Aug 29 19:49:33 2014	(r366560)
+++ head/devel/libbfd/Makefile	Fri Aug 29 20:16:45 2014	(r366561)
@@ -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-${PORTVERSIO
 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>

Added: head/devel/libbfd/files/patch-configure
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libbfd/files/patch-configure	Fri Aug 29 20:16:45 2014	(r366561)
@@ -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'`

Modified: head/devel/libbfd/pkg-plist
==============================================================================
--- head/devel/libbfd/pkg-plist	Fri Aug 29 19:49:33 2014	(r366560)
+++ head/devel/libbfd/pkg-plist	Fri Aug 29 20:16:45 2014	(r366561)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201408292016.s7TKGkvo053452>