GNOME Bugzilla – Bug 581809
gimp-gap configure fails to pass --prefix configure option to ffmpeg configure
Last modified: 2009-05-12 05:17:12 UTC
Please describe the problem: MacPorts intentionally installs all of its software in a unique install path to avoid conflicts between MacPorts built ports and system installed software. By default this is /opt/local but can be any prefix specified at MacPorts installation. When building port gimp-gap MacPorts passes this path using the standard --prefix argument to configure. For ffmpeg to build successfully this flag as well as appropriate --extra-cflags and --extra-ldflags needs to be passed to ffmpeg's configure. Steps to reproduce: Attempt to configure and build gimp-gap by calling configure --prefix=${prefix} --extra-cflags=-I${prefix}/include --extra-ldflags=-L${prefix}/lib where ${prefix} is replaced with the MacPorts install prefix (typically /opt/local). Actual results: The embedded ffmpeg fails to configure and build because the above configure arguments are not passed to ffmpeg's configure. Instead a fixed set of arguments contained in extern_libs/configure_options_ffmpeg.txt is used. Expected results: gimp-gaps build script should pass any arguments passed to its configure script to ffmpeg's configure script. Does this happen every time? yes Other information: MacPorts deals with this by editing extern_libs/configure_options_ffmpeg.txt on the fly before configuration of gimp-gap using the following code in its (tcl) Portfile. pre-configure { reinplace "s|--enable-shared|--prefix=${prefix} --extra-cflags=-I${prefix}/include --extra-ldflags=-L${prefix}/lib --enable-shared|" \ ${worksrcpath}/extern_libs/configure_options_ffmpeg.txt } here ${prefix} is replaced with the MacPorts install prefix for this specific instance of MacPorts ${worksrcpath} is replaced with the path to the top level of the gimp-gap distributions's build directory. For the default installation prefix --enable-shared is replaced with --prefix=/opt/local --extra-cflags=-I$/opt/local/include --extra-ldflags=-L$/opt/local/lib --enable-shared
The configure.in script now supports passing prefix, cflags and ldflags to ffmpeg's configure script. See GIT repository 2009-05-10 14:18:43 (GMT) http://git.gnome.org/cgit/gimp-gap/commit/?id=073457de56c2c07ec0e2c698cac773bf7093de9e Please try to build gimp-gap on Mac OS X environment with the options --prefix=/opt/local --with-ff-extra-cflags=-I/opt/local/include --with-ff-extra-ldflags=-L$/opt/local/lib if this works, the pre-configure step to patch the extern_libs/configure_options_ffmpeg.txt file is no longer necessary.
Tested OK on MacPorts with previous pre-configure patch removed. ffmpeg builds successfully. Thanks.
closing this bug, thanks for your feedback.