Date: Sat, 14 Aug 2004 22:23:51 -0700 (PDT) From: stheg olloydson <stheg_olloydson@yahoo.com> To: zero@ns.sympatico.ca Cc: questions@freebsd.org Subject: Re: The switch to X.org Message-ID: <20040815052351.9287.qmail@web61306.mail.yahoo.com>
next in thread | raw e-mail | index | archive | help
it was said: Hello, I don't personally have an answer, but from the archives comes this one from Matthew Seaman: ######################################################################## 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@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 ####################################################################### And an answer from Matthew to a follow-up question from Axel S. Gruner: ####################################################################### On Wed, Jun 30, 2004 at 12:46:37PM +0200, Axel S. Gruner wrote: > i have written a howto for people willing to switch from XFree86 to > xorg. Ok, at this time it is only available in german: > > http://www.bsdforen.de/showthread.php?p=39983#post39983 > > But i also have some questions about switching to xorg. > > (1) Will xorg be the default X in future FreeBSD Releases? Probably. It seems that most of the Linux distros have switched or are switching to it, and the Unix vendors like Sun always were behind X.Org anyway. There is has been a discussion on the x11 and docs mailing lists covering all of the whys and wherefores. A good place to start is here: http://docs.freebsd.org/cgi/mid.cgi?200406051411.04259.linimon > (2) I have xorg running, without a problem, but if i install a new > application with a XFree86 dependency i have to run "pkgdb -F" to fix > the dependency to xorg stuff (and imake-6). > If i change /usr/ports/Mk/bsd.port.mk and the entries about XFree86 and > imake-4 to xorg and imake-6, the change will not be permanent (cvsup > will overwrite the change): > > [...] > LIB_DEPENDS+= X11.6:${PORTSDIR}/x11/xorg-libraries > [...] > .if defined(USE_IMAKE) > BUILD_DEPENDS+= ${X11BASE}/lib/X11/config/date.def: > ${PORTSDIR}/devel/imake-6 > RUN_DEPENDS+= mkhtmlindex:${PORTSDIR}/devel/imake-6 > [...] > > So, is there another way to fix that permanently or a work-around? Eventually something like what you propose will be added to bsd.port.mk or whichever makefile is appropriate. Until then, you're going to have to maintain your patches in parallel to the ordinary development of the ports tree. On the whole though, you can get by without fiddling in the makefiles if you're prepared to run pkgdb(1) to fix up the dependencies after the fact. The X.Org stuff is still considered experimental at the moment. As more and more people start to use it and it gets well debugged, the ports infrastructure around it will be improved. Cheers, Matthew ####################################################################### I use X on only one machine and haven't made the change, so I haven't tried these instructions out. But considering the source, these are the ones I intend to follow. HTH, Stheg __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040815052351.9287.qmail>