Guide to x.org update?

Matthew Seaman m.seaman at infracaninophile.co.uk
Mon Jun 28 12:26:44 PDT 2004


On Mon, Jun 28, 2004 at 02:45:08PM -0400, Jim Trigg wrote:
> On Mon, Jun 28, 2004 at 01:22:32PM -0500, Vulpes Velox wrote:
> > On Mon, 28 Jun 2004 13:17:56 -0400
> > Jim Trigg <jtrigg at spamcop.net> wrote:
> > > 
> > > AFAICT, this won't really do anything -- there does not appear to be
> > > a real way to tell the ports system that you want X ports to depend
> > > on xorg instead of xfree.  Every X port appears to have xfree
> > > hardcoded.
> > 
> > Not sure, I think some do, but everything I have hear does not seem to
> > have that problem.
> 
> OK, so how do you get cvsup to use xorg?  As best I can tell, it will
> depend on either XFree86 (XFree86 v. 3) or XFree86-4-libraries (XFree86
> v. 4), with no option to depend on xorg-libraries.

Both the XFree86-4-libraries and xorg-libraries provide the
/usr/X11R6/lib/libX11.so.6 shared library (amongst others).  It's the
same ABI independent of which port the shlib comes from.

The short answer is "just install the x11/xorg-libraries port before
you install cvsup".

In fact, cvsup works perfectly well even if you replace the XFree86
libs with the xorg ones underneath a previously installed copy of
cvsup.  Doesn't even need a recompile.  The same goes for most X based
software.

Here's how it works: when the Makefile in the cvsup port says
"USE_XLIB" that gets transformed into a LIB_DEPENDS line in
/usr/ports/Mk/bsd.ports.mk:

    LIB_DEPENDS+=   X11.6:${PORTSDIR}/x11/XFree86-4-libraries

(assuming you've not got XFREE86_VERSION == 3).

That LIB_DEPENDS line is in two parts separated by a colon.  The first
bit:

    X11.6

means that the port needs to link against libX11.so.6, and it checks
to see if a suitable shlib is installed and accessible by grep'ing in
the output of ldconfig:

    % ldconfig -r | fgrep X11.6
            116:-lX11.6 => /usr/X11R6/lib/libX11.so.6

Since last night on my system that's from:

    % pkg_info -W /usr/X11R6/lib/libX11.so.6
    /usr/X11R6/lib/libX11.so.6 was installed by package xorg-libraries-6.7.0

If make(1) can find a suitable shlib, everything is happy and the
compile continues -- all make looks for is the presence of the
library.  It doesn't check what (if any) port the library is part of.
Only if it can't find the correct shlib does the right hand side of
that LIB_DEPENDS line get considered:

    ${PORTSDIR}/x11/XFree86-4-libraries

That's simply a suggestion of a suitable port that will provide the
required shlib, and fulfil the dependency.  But there are several such
ports in the tree, any of which could be used.  Often in such
situations there will be some sort of 'WANT_FOO' or 'WITH_FOO_VER'
make variable to select which one gets used.  Unfortunately, no such
mechanism for saying "I want X.Org ports in preference to XFree86
ones" has yet been committed.

One annoyance due to the lake of make(1) infrastructure is that the
suggested port will be listed in the package dependencies of the
installed port, rather than the actual port that provided the shlib
you used to build against.  That, however, is just an administrative
detail which you can fix up with pkgdb(1), and has no real bearing on
the effectiveness of the software.

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20040628/8474a602/attachment.bin


More information about the freebsd-questions mailing list