From owner-freebsd-questions@freebsd.org Sun Sep 6 16:07:33 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8A4B9CB758 for ; Sun, 6 Sep 2015 16:07:32 +0000 (UTC) (envelope-from freebsd@dreamchaser.org) Received: from nightmare.dreamchaser.org (ns.dreamchaser.org [66.109.141.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8BEDD01 for ; Sun, 6 Sep 2015 16:07:31 +0000 (UTC) (envelope-from freebsd@dreamchaser.org) Received: from breakaway.dreamchaser.org (breakaway.dreamchaser.org. [192.168.151.122]) by nightmare.dreamchaser.org (8.13.6/8.13.6) with ESMTP id t86G7SJa023274 for ; Sun, 6 Sep 2015 10:07:29 -0600 (MDT) (envelope-from freebsd@dreamchaser.org) To: FreeBSD Mailing List Reply-To: freebsd@dreamchaser.org From: Gary Aitken Subject: ports database, sorta-user install X-Enigmail-Draft-Status: N1110 Message-ID: <55EC64C0.3000802@dreamchaser.org> Date: Sun, 6 Sep 2015 10:07:28 -0600 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (nightmare.dreamchaser.org [192.168.151.101]); Sun, 06 Sep 2015 10:07:29 -0600 (MDT) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Sep 2015 16:07:33 -0000 I'm trying to build gimp from the latest source, while still keeping the /usr/ports version installed. This is turning out to be non-trivial (for me), and the easiest way appears to be to treat it as a port and use the ports mechanism to deal with the gnu aspects of the source. To get the ball rolling, I need to build x11/babl from the latest source. As a normal user, I set PREFIX to /home/garya/Computing/GIMP/devel used git to fetch the source and built a fbsd port with appropriate Makefile, files/patch*, pkg-descr, pkg-plist, distinfo. As a normal user, the following all work: make extract make stage make check-orphans When I attempt a make install, it prompts for root pw to allow writing the pkg database. If I give that it says an old version of babl is already installed, and to set FORCE_PKG_REGISTER if I really want to install. So I do that: FORCE_PKG_REGISTER="yes" make install >output_install.txt 2>&1 The files are installed where I want under lib and include in $PREFIX; the ports version of gimp still links to the old libs and appears to run; but the pkg db is modified to reflect the new babl: $pkg info | grep babl babl-0.1.13 Dynamic pixel format conversion library So I deinstall, reinstall the ports version as root, switch back to user and set export PKG_CONFIG_PATH=$PREFIX/usr/local/libdata/pkgconfig:/usr/local/libdata/pkgconfig and reinstall That leaves babl.pc for the old version in /usr/local/libdata/pkgconfig, and puts the new one in $PREFIX/libdata/pkgconfig: $ cat /usr/local/libdata/pkgconfig/babl.pc prefix=/usr/local exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include Name: babl Description: Dynamic, any to any, pixel format conversion library Version: 0.1.12 Cflags: -I${includedir}/babl-0.1 Libs: -L${libdir} -lbabl-0.1 -lm $ cat ~/Computing/GIMP/devel/libdata/pkgconfig/babl.pc prefix=/home/garya/Computing/GIMP/devel exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include Name: babl Description: Dynamic, any to any, pixel format conversion library Version: 0.1.13 Cflags: -I${includedir}/babl-0.1 Libs: -L${libdir} -lbabl-0.1 Libs.private: -lm -lpthread At this point I think everything is how I want it, except pkg info still reports only the new version, even from shells where PKG_CONFIG_PATH is not set. Can someone tell me what's going on? Is there some better way to do this? Essentially, I want to build a set of new ports that still link to standard libs when possible, superceeding existing ports as necessary. In this case, that means at least a new gimp (depends on new gegl) new gegl (depends on new babl) new babl Thanks, Gary