From owner-freebsd-ports@FreeBSD.ORG Sat Aug 1 22:43:30 2009 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AB54106566C for ; Sat, 1 Aug 2009 22:43:30 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail14.syd.optusnet.com.au (mail14.syd.optusnet.com.au [211.29.132.195]) by mx1.freebsd.org (Postfix) with ESMTP id BA86B8FC19 for ; Sat, 1 Aug 2009 22:43:29 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from server.vk2pj.dyndns.org (c122-106-201-175.belrs3.nsw.optusnet.com.au [122.106.201.175]) by mail14.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n71MhQkW031275 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 2 Aug 2009 08:43:27 +1000 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.3/8.14.3) with ESMTP id n71MhPYn066074; Sun, 2 Aug 2009 08:43:25 +1000 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.3/8.14.3/Submit) id n71MhNYx066073; Sun, 2 Aug 2009 08:43:23 +1000 (EST) (envelope-from peter) Date: Sun, 2 Aug 2009 08:43:23 +1000 From: Peter Jeremy To: Matthew Seaman Message-ID: <20090801224323.GA65040@server.vk2pj.dyndns.org> References: <20090731173636.GA76357@owl.midgard.homeip.net> <20090731121249.538ea7e7.jasonh@DataIX.net> <20090731173636.GA76357@owl.midgard.homeip.net> <4A740679.1020608@infracaninophile.co.uk> <4A747C77.1040800@infracaninophile.co.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="h31gzZEtNLTqOjlF" Content-Disposition: inline In-Reply-To: <4A747C77.1040800@infracaninophile.co.uk> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.19 (2009-01-05) Cc: freebsd-ports@freebsd.org Subject: Re: ports/*/jpeg "Thanks a lot guys" X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Aug 2009 22:43:30 -0000 --h31gzZEtNLTqOjlF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable [I was also dismayed when I saw the bump]. On 2009-Aug-01 18:33:43 +0100, Matthew Seaman wrote: >You could, for instance, run ldd(1) against each of the files a port insta= lls >and then record in /var/db/pkg/portname-1.2.3/+SHLIBS or equivalently in t= he >.tbz package tarball a sorted and uniq'd list of all the shared libraries >linked against. Unfortunately, this isn't sufficient because a non-trivial number of ports dlopen() libraries rather than directly linking against them. (The Xorg server is probably the most widely used culprit here). > Or you could resolve the shlib filenames back to the ports >that supply them, and create a 'SHLIB_PORTS_NEEDED' variable in the port >Makefiles. A third approach is to more carefully recurse through the dependency tree: Given A depends on B depends on C, B only needs bumping if it LIB_DEPENDS on A and C only needs bumping if it LIB_DEPENDS on B and B was bumped. In this specific case, p5-RT-* depends on www/rt38 depends on graphics/p5-GD depends on graphics/gd depends on graphics/jpeg. When jpeg is bumped, gd needs to be bumped because it LIB_DEPENDS on jpeg. p5-GD then needs to be bumped because it LIB_DEPENDS on gd. rt38 does not need to be bumped because it has no LIB_DEPENDS on p5-GD. p5-RT-* does not need to be bumped because rt38 is not bumped. This is slighly more complex than cd /usr/ports && \ for i in */*; do [ -d "$i" ] && cd "$i" && make all-depends-list ; done |= \ grep jpeg because you need to actually follow the dependency tree, but is not impractical. The only issues I can see with this approach are: 1) Mapping the shared library reported by 'make lib-depends' back to the port than installs it. 2) You are relying on LIB_DEPENDS being correct: In my general example above, if A is missing a LIB_DEPENDS on C, this may not be detected in the build process because of the implicit dependency on C via B. No sample script because I'm not sure of the correct approach to 1) off the top of my head. --=20 Peter Jeremy --h31gzZEtNLTqOjlF Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (FreeBSD) iEYEARECAAYFAkp0xQsACgkQ/opHv/APuIfRvgCffa+wrSmYUIUpIJ6arISGDDDE OvoAnRaJjnvHeoetpYN8MeNTlxxRwx2h =g8k2 -----END PGP SIGNATURE----- --h31gzZEtNLTqOjlF--