From owner-svn-ports-head@FreeBSD.ORG Tue Jan 28 18:25:53 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 408458FE; Tue, 28 Jan 2014 18:25:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 206F9196F; Tue, 28 Jan 2014 18:25:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0SIPqnI011378; Tue, 28 Jan 2014 18:25:53 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0SIPqQF011376; Tue, 28 Jan 2014 18:25:52 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201401281825.s0SIPqQF011376@svn.freebsd.org> From: Tijl Coosemans Date: Tue, 28 Jan 2014 18:25:52 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r341646 - in head/Mk: . Uses X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jan 2014 18:25:53 -0000 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