You are not logged in.

#1 2010-06-24 20:27:52

kyndig
Member
Registered: 2010-06-24
Posts: 1

From USE flags to default configure options

Hello, I'm considering switching from Gentoo to ArchLinux and I've read through all the documentation on ABS,AUR and pacman, but I still have one question.  Before Gentoo I used OpenBSD; so I've never really thought about how precompiled distros determine which config options are used when compiling the official binary packages.  For instance, I can't imagine that all options are used; that would be crazy with a large modular app like Apache.  Is it just some "reasonable" combination of  configure flags chosen, such as mod_perl for Apache?  I would guess it would have to be a fairly large number of options compiled in, otherwise everyone would have to create their own custom PKGBUILD files to satisfy certain dependencies and enable desired features. 

In general, I would appreciate any comments as to how a lack of USE flags, to use Gentoo lingo, usually plays out in ArchLinux...  Thanks, ahead of time.

Offline

#2 2010-06-25 03:57:41

pigiron
Member
From: USA
Registered: 2009-07-14
Posts: 150

Re: From USE flags to default configure options

Is it just some "reasonable" combination of  configure flags chosen, such as mod_perl for Apache?

Pretty much... but in some cases it's possible to be a little more flexible.

The equivalent to the ebuild file in Arch is PKGBUILD. You can find more about it's syntax here:

http://www.archlinux.org/pacman/PKGBUILD.5.html

Notice the "optdepends" keyword. It's use means that if it's possible for some external packages to be optional, the user will be notified during the install, but they won't be a required dependency.

An example is worth a thousand words:

The developer that created the Audacious Plugins (extra/audacious-plugins) PKGBUILD file, compiles the package with the following configure flags (USE flags in the Gentoo world):

if [[ $CARCH = "i686" ]]; then
  ./configure --prefix=/usr --disable-esd --disable-pulse \
    --enable-amidiplug --disable-adplug --enable-chardet \
    --disable-sse2 || return 1
elif [[ $CARCH = "x86_64" ]]; then
  ./configure --prefix=/usr --disable-esd --disable-pulse \
    --enable-amidiplug --disable-adplug --enable-chardet || return 1
fi

But instead of forcing all users to have a ton of dependency packages installed before the audacious-plugins package will install, he uses the following in the PKGBUILD file:

optdepends=('jack: JACK output plugin'
            'libsamplerate: for JACK output'
            'lame: FileWriter output plugin'
            'fluidsynth: FluidSynth backend for AMIDI-Plug input plugin'
            'libcdio: CD Audio input plugin'
            'libsidplay: SID input plugin'
            'wavpack: WavPack input plugin'
            'libmpcdec: Musepack input plugin'
            'taglib: Musepack input plugin'
            'lirc-utils: LIRC plugin'
            'curl: Audioscrobbler plugin'
            'libmtp: MTP upload plugin'
            'sdl: Paranormal and projectM visualization plugins'
            'projectm: projectM visualization plugin'
            'imlib2: RootVis visualization plugin'
            'neon: HTTP transport plugin'
            'libmms: MMS transport plugin'
            'ffmpeg: for MPEG 4 Audio AAC')

So the audacious-plugins package can installed without requiring all of the above packages. The user will be notified during the install that they may want to also install any of those packages in order to have more functionality.

That means that when you later fire up Audacious, some error messages may be sent to stdout if it doesn't find some of those libraries/packages, but hey, it still works fine!

Hope that makes sense.

Offline

Board footer

Powered by FluxBB