ports database, sorta-user install
Gary Aitken
freebsd at dreamchaser.org
Sun Sep 6 16:07:33 UTC 2015
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
More information about the freebsd-questions
mailing list