Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 124883 - media-video/ffmpeg-0.4.9_p20060302 configure --enable/--disable issues
Summary: media-video/ffmpeg-0.4.9_p20060302 configure --enable/--disable issues
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: Lowest enhancement (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-03 16:05 UTC by Philip Kovacs
Modified: 2006-03-04 19:01 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
ffmpeg-0.4.9_p20060302.ebuild (ffmpeg-0.4.9_p20060302.ebuild,6.90 KB, text/plain)
2006-03-04 13:13 UTC, Philip Kovacs
Details
ffmpeg-0.4.9_p20060302.ebuild.diff (ffmpeg-0.4.9_p20060302.ebuild.diff,6.28 KB, patch)
2006-03-04 13:13 UTC, Philip Kovacs
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philip Kovacs 2006-03-03 16:05:05 UTC
The upstream configure for ffmpeg does not support both --enable and --disable for most of its configure items.  You are only able to reverse a default.  For example, altivec is enabled by default.   This means that only --disable-altivec works.  --enable-altivec generates a configure error.   This entire section of the ebuild:

myconf="${myconf}
        $(use_enable altivec) \
        $(use_enable debug) \
        $(use_enable encode mp3lame) \
        $(use_enable a52) --disable-a52bin \
        $(use_enable oss audio-oss) \
        $(use_enable v4l) \
        $(use_enable ieee1394 dv1394) $(use_enable ieee1394 dc1394) \
        $(use_enable threads pthreads) \
        $(use_enable xvid) \
        $(use_enable ogg libogg) \
        $(use_enable vorbis) \
        $(use_enable theora) \
        $(use_enable dts) \
        $(use_enable network) \
        $(use_enable zlib) \
        $(use_enable sdl ffplay) \
        $(use_enable x264) \
        $(use_enable aac faad) $(use_enable aac faac) --disable-faadbin \
        --enable-gpl \
        --enable-pp \
        --disable-opts"

must be replaced with code of the form:

    # Enabled by default
    (! use altivec) && myconf="${myconf} --disable-altivec"
    (! use debug) && myconf="${myconf} --disable-debug"
    etc etc

    # Disabled by default
    (use encode) && myconf="${myconf} --enable-mp3lame"
    (use a52) && myconf="${myconf} --enable-a52"
    etc etc

someone will hgave to go thru each configure option, inspect its default, and determine how to code it into the ebuild.  

Here's the relevant output from emerge ffmpeg, as it relates to this bug:

>>> Compiling source in /var/tmp/portage/ffmpeg-0.4.9_p20060302/work ...
./configure --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/
usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-shared-pp --disable-shared --enable-static --enab
le-mmx --disable-altivec --disable-debug --enable-mp3lame --disable-a52 --disable-a52bin --enable-audio-oss --di
sable-v4l --disable-dv1394 --disable-dc1394 --disable-pthreads --enable-xvid --enable-libogg --enable-vorbis --d
isable-theora --disable-dts --disable-network --enable-zlib --enable-ffplay --disable-x264 --enable-faad --enabl
e-faac --disable-faadbin --enable-gpl --enable-pp --disable-opts --build=i686-pc-linux-gnu
Unknown option "--host=i686-pc-linux-gnu".
Unknown option "--infodir=/usr/share/info".
Unknown option "--datadir=/usr/share".
Unknown option "--sysconfdir=/etc".
Unknown option "--localstatedir=/var/lib".
Unknown option "--disable-shared-pp".
Unknown option "--enable-mmx".
Unknown option "--disable-a52".
Unknown option "--disable-a52bin".
Unknown option "--enable-audio-oss".
Unknown option "--disable-dc1394".
Unknown option "--disable-pthreads".
Unknown option "--disable-theora".
Unknown option "--disable-dts".
Unknown option "--enable-zlib".
Unknown option "--enable-ffplay".
Unknown option "--disable-x264".
Unknown option "--disable-faadbin".
Unknown option "--build=i686-pc-linux-gnu".

This ebuild needs a rewrite.   The upstream maintainers use a hand-written configure, not an autoconf'd one.
Comment 1 Luca Barbato gentoo-dev 2006-03-04 01:15:20 UTC
Since no harm is done I just left it as it, if someone wants to do a cleanup and provide a patch, it will be accepted for sure =)
Comment 2 Philip Kovacs 2006-03-04 13:13:19 UTC
Created attachment 81342 [details]
ffmpeg-0.4.9_p20060302.ebuild

Ok, I cleaned up the ebuild so it respects ffmpeg's configure quirkiness, i.e. only setting a configure flag when it reverses a default.  Also, econf generates many configure options unknown to this configure, so I configure manually.   Bogus configure items were removed.

I also took the liberty of adding two new USE flags: amr and v4l2.   amr adds support for the amr narrow and wide band codecs.  v4l2 is self-explanatory.

I did not do anything with the deprecated has_pic or the freebsd use flag warning, as i am not sure how best to addres those minor issues.

ebuild and diff attachments follow.
Comment 3 Philip Kovacs 2006-03-04 13:13:55 UTC
Created attachment 81343 [details, diff]
ffmpeg-0.4.9_p20060302.ebuild.diff
Comment 4 Luca Barbato gentoo-dev 2006-03-04 15:33:54 UTC
let me test it a bit and I'll commit, possibly tomorrow evening or this early morning
Comment 5 Luca Barbato gentoo-dev 2006-03-04 16:28:03 UTC
Committed with few changes
Comment 6 Philip Kovacs 2006-03-04 19:01:09 UTC
Looks good.  I posted the same 'amr' change for latest mplayer on bug 107589.   Phil