aps-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[aps-devel] Portage's USE system


From: Lalo Martins
Subject: [aps-devel] Portage's USE system
Date: Tue, 31 Dec 2002 17:19:30 -0200
User-agent: Mutt/1.4i

On Tue, Dec 31, 2002 at 06:53:32PM +0100, Wolfgang Jaehrling wrote:
> > > It strikes me that building official GNU software is straightforward due 
> > > to
> > > the Coding Standards; we have a more or less hard guarantee that "cd foo;
> > > ./configure; make; make install prefix=/tmp_fs_something" does the trick.
> > > However I would like to have a facility similar to portage's USE switches,
> > > if possible hooked right into configure's --with/--enable.
> 
> I am not familiar with USE switches, though I have an idea of what
> they might do.  Could you quickly explain them or provide a link to a
> description?

Both.  Mine (below) is shorter, but if you want more detail go to
http://www.gentoo.org/doc/en/use-howto.xml

<explanation>

Since I already mentioned it, let's have libsdl be our example.  It can be
built in many flavours (which usually correspond to --with/--enable flags in
the configure script).  For example, it can support many sound APIs - ALSA,
ARTS, OSS, ESD and others - and many display targets - X11 with and without
acceleration, linux fbdev, DirectFB, SVGAlib PicoGUI and others.

Portage gives a name for each of these options.  Then, there is a variable
named USE, defined in a config file, which contains your preferences about
how to build stuff.  My USE variable is currently:

USE="afs alsa avi berkdb cjk crypt cups dga directfb doc dvd esd evo fbcom
flash gd gdbm gnome gif gtk2 imap ipv6 jpeg leim libg++ libwww maildir mbox
mmx mozilla mpeg mule mas ncurses nls oggvorbis opengl oss pam pdflib png
python quicktime readline samba scanner sasl sdl slang slp spell ssl tcpd
tiff truetype X xml2 xv zeo zlib x86 -3dnow -apm -arts -encode -gpm -gtk
-imlib -java -kde -mikmod -motif -qt -qtmt -svga -xmms"

This means in my machine SDL is compiled with alsa, dga (X11 accel),
directfb, esd, oss, X11, and without arts and SVGAlib.  Also means other
apps that have have SDL support, when built, will have it on.

This also interacts with the packaging system; if I ask potage to get SDL
but I don't yet have ALSA, then it will install ALSA first.  This is a
"conditional dependency", a feature I don't think I ever seen elsewhere.

Note also that not all "flags" correspond directly to packages.  As I'm
trying to find some time to learn Chinese, I asked Portage to build cjk
support in any packages that have it.  The dvd flag affects media players,
but is not a package.  The dga flag affects XFree itself, and any packages
that can work both with and without dga - as is the case of SDL.  A similar
case is the apm (power management) flag.

</explanation>
<discussion>

That said, I would agree the implementation of the good idea is less than
perfect ;-) Gentoo is, IMO, a system for techies, and I would hardly expect
my sister to understand how to tweak USE.

Personally I think this should tie in more with the packaging system.  It
is a bit silly to have a gtk2 package and a gtk2 USE flag that are more or
less mutually independent.  A package state "desired", or a package
attribute could do the trick.  I know I may want something before I install
it, but is there an use case for having something installed and not wanting
other packages to use it?  Perhaps if I have something that is not very
stable installed for testing only... I'm a PicoGUI developer, but I don't
think I want my SDL and my SDL apps linked against it just yet.

Tying it to the packaging system would require dummy packages for stuff that
is not package-related (like cjk, dvd, dga, apm above).  I don't think this
is a problem, there is already a case for virtual packages anyway.  As long
as these dummies are clearly marked as such - for example, if we have a
section tree like Debian and Gentoo, i'd give them their own section.

</discussion>

[]s,
                                               |alo
                                               +----
--
            Those who trade freedom for security
               lose both and deserve neither.
--
http://www.laranja.org/                mailto:address@hidden
         pgp key: http://www.laranja.org/pessoal/pgp

Eu jogo RPG! (I play RPG)         http://www.eujogorpg.com.br/
GNU: never give up freedom                 http://www.gnu.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]