Date: Tue, 28 Jan 2014 18:25:52 +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: r341646 - in head/Mk: . Uses Message-ID: <201401281825.s0SIPqQF011376@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tijl Date: Tue Jan 28 18:25:52 2014 New Revision: 341646 URL: http://svnweb.freebsd.org/changeset/ports/341646 QAT: https://qat.redports.org/buildarchive/r341646/ Log: Introduce USES=libtool to replace USE_AUTOTOOLS=libtool. Unlike USE_AUTOTOOLS=libtool which makes a port use libtool from devel/libtool, this just patches the copy of libtool included in the port. This allows adding it to all ports that use libtool including ports that build Fortran libraries and ports that use different compilers or binutils than the ones used to build devel/libtool. USES=libtool also changes the library naming specification similar to what USE_GNOME=ltverhack does. Given the libtool version info $current:$revision:$age and $major=$current-$age the library will be named libname.so.$major.$age.$revision instead of libname.so.$current and libname.so.$major becomes a symlink. Because $major increases less frequently than $current this reduces the number of library version bumps which means fewer rebuilds of dependent packages. To ease the conversion from USE_AUTOTOOLS=libtool this naming spec can be disabled with USES=libtool:oldver but the intention is that all libtool ports eventually use the new naming. Another change is that only libraries that are listed on the command line will be linked into executables. Normally libtool would link in the entire tree of library dependencies. This reduces the number of direct dependencies on a given library which means fewer packages need to be rebuilt on a library version bump. Approved by: portmgr (bapt) Added: head/Mk/Uses/libtool.mk (contents, props changed) Modified: head/Mk/bsd.port.mk Added: head/Mk/Uses/libtool.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/Mk/Uses/libtool.mk Tue Jan 28 18:25:52 2014 (r341646) @@ -0,0 +1,41 @@ +# $FreeBSD$ +# +# Bring libtool scripts up to date. +# +# MAINTAINER: autotools@FreeBSD.org +# +# Feature: libtool +# Usage: USES=libtool + +.if !defined(_INCLUDE_USES_LIBTOOL_MK) +_INCLUDE_USES_LIBTOOL_MK= yes +_USES_POST+= libtool +.endif + +.if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_LIBTOOL_POST_MK) +_INCLUDE_USES_LIBTOOL_POST_MK= yes + +patch-libtool: + @${FIND} ${WRKDIR} -type f -name configure | \ + ${XARGS} ${REINPLACE_CMD} \ + -e '/link_all_deplibs=/s/=unknown/=no/' \ + -e '/objformat=/s/echo aout/echo elf/' + +.if "${libtool_ARGS}" != oldver + @${FIND} ${WRKDIR} -type f -name configure | \ + ${XARGS} ${REINPLACE_CMD} \ + -e "/freebsd-elf\*)/,+1 s/library_names_spec=.*/ \ + library_names_spec='\$$libname\$$release.so\$$versuffix \ + \$$libname\$$release.so\$$major \$$libname.so' \ + soname_spec='\$$libname\$$release.so\$$major'/" + + @${FIND} ${WRKDIR} -type f -name ltmain.sh | \ + ${XARGS} ${REINPLACE_CMD} \ + -e '/case $$version_type in/,+2 \ + s/darwin|linux|/darwin|freebsd-elf|linux|/' \ + -e '/freebsd-elf)/,+2 { \ + /major=/s/=.*/=.$$(($$current - $$age))/; \ + /versuffix=/s/=.*/="$$major.$$age.$$revision"/; }' +.endif + +.endif Modified: head/Mk/bsd.port.mk ============================================================================== --- head/Mk/bsd.port.mk Tue Jan 28 17:37:41 2014 (r341645) +++ head/Mk/bsd.port.mk Tue Jan 28 18:25:52 2014 (r341646) @@ -6448,7 +6448,8 @@ _PATCH_SEQ= ask-license patch-message p _CONFIGURE_DEP= patch _CONFIGURE_SEQ= build-depends lib-depends configure-message run-autotools-fixup \ configure-autotools pre-configure pre-configure-script \ - run-autotools do-configure post-configure post-configure-script + run-autotools patch-libtool do-configure post-configure \ + post-configure-script _BUILD_DEP= configure _BUILD_SEQ= build-message pre-build pre-build-script do-build \ post-build post-build-script
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401281825.s0SIPqQF011376>