From owner-freebsd-ports@FreeBSD.ORG Mon Aug 3 21:34:07 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 54D72106566B for ; Mon, 3 Aug 2009 21:34:07 +0000 (UTC) (envelope-from mel.flynn+fbsd.ports@mailing.thruhere.net) Received: from mailhub.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id F23E48FC0C for ; Mon, 3 Aug 2009 21:34:05 +0000 (UTC) (envelope-from mel.flynn+fbsd.ports@mailing.thruhere.net) Received: from smoochies.rachie.is-a-geek.net (mailhub.rachie.is-a-geek.net [192.168.2.11]) by mailhub.rachie.is-a-geek.net (Postfix) with ESMTP id 0D1377E83F; Mon, 3 Aug 2009 13:34:05 -0800 (AKDT) From: Mel Flynn To: freebsd-ports@freebsd.org Date: Mon, 3 Aug 2009 13:34:03 -0800 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA2; KDE/4.2.4; i386; ; ) References: <20090731173636.GA76357@owl.midgard.homeip.net> <4A747C77.1040800@infracaninophile.co.uk> <20090801224323.GA65040@server.vk2pj.dyndns.org> In-Reply-To: <20090801224323.GA65040@server.vk2pj.dyndns.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200908031334.04099.mel.flynn+fbsd.ports@mailing.thruhere.net> Cc: Peter Jeremy 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: Mon, 03 Aug 2009 21:34:07 -0000 On Saturday 01 August 2009 14:43:23 Peter Jeremy wrote: > [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 > > installs and then record in /var/db/pkg/portname-1.2.3/+SHLIBS or > > equivalently in the .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. Unfortunately, qt4-* ports slice this idea. Because they don't use LIB_DEPENDS, but a version dependant RUN and BUILD depends. I've coded a "patch-recursive" target in my Mk/bsd.local.mk that can't depend just on LIB_DEPENDS for this very reason (I needed the target so I can debug crashes in kde4 programs, and have gdb's `list' command working). -- Mel _LIB_DEPEND_DIRS=${LIB_DEPENDS:C,^[^:]*:([^:]*).*$,\1,} _QT4_DEPEND_DIRS=${BUILD_DEPENDS:Mqt4-*:C,^[^:]*:([^:]*).*$,\1,} LIB-DEPENDS-LIST= \ L="${_LIB_DEPEND_DIRS} ${_QT4_DEPEND_DIRS}"; \ checked=""; \ while [ -n "$$L" ]; do \ l=""; \ for d in $$L; do \ case $$checked in \ $$d\ *|*\ $$d\ *|*\ $$d) \ continue;; \ esac; \ checked="$$checked $$d"; \ if [ ! -d $$d ]; then \ ${ECHO_MSG} "${PKGNAME}: \"$$d\" non-existent -- dependency list incomplete" >&2; \ continue; \ fi; \ ${ECHO_CMD} $$d; \ if ! children=$$(cd $$d && ${MAKE} -V _LIB_DEPEND_DIRS); then\ ${ECHO_MSG} "${PKGNAME}: \"$$d\" erroneous -- dependency list incomplete" >&2; \ continue; \ fi; \ for child in $$children; do \ case "$$checked $$l" in \ $$child\ *|*\ $$child\ *|*\ $$child) \ continue;; \ esac; \ l="$$l $$child"; \ done; \ done; \ L=$$l; \ done patch-recursive: @for dir in ${.CURDIR} $$(${LIB-DEPENDS-LIST}); do \ echo "===> $${dir}"; \ ${MAKE} -C $${dir} patch; \ done show-libdepends-recursive: @for dir in ${.CURDIR} $$(${LIB-DEPENDS-LIST}); do \ echo "===> $${dir}"; \ done