[FFmpeg-devel] [PATCH] fix $(PREFIX) references in pkgconfig files

Diego Biurrun diego
Thu May 29 02:00:23 CEST 2008

On Sun, May 18, 2008 at 03:08:43PM +0300, Anssi Hannula wrote:
> M?ns Rullg?rd wrote:
> > Stefano Sabatini <stefano.sabatini-lala at poste.it> writes:
> >> On date Tuesday 2008-05-06 08:46:58 +0300, Anssi Hannula encoded:
> >>> By default $libdir and $incdir reference $(PREFIX), which in .pc files
> >>> should be ${prefix}.
> >>>
> >>> I'm not sure of the best way to handle this, but attached is a simple
> >>> patch sed'ing the .pc files.
> [...]
> >>>  EOF
> >>> +apply $name.pc sed s,\$\(PREFIX\),\${prefix},
> >>>  cat <<EOF >$name-uninstalled.pc
> >>>  prefix=
> >>>  exec_prefix=
> >> Hi, please could you fix it, this breaks commandlines/Makefiles using
> >> pkg-config and libav.
> > 
> > I am strongly tempted to remove all direct pkg-config support in
> > FFmpeg, and let those who want such files create them for themselves.
> Until you do that, I'd suggest to apply or comment on the attached patches:
> pkgconfig-static-only-builds.patch:
> The patch from the other thread, i.e. define private libraries as
> 'Libs:' when only static libraries are built,so that they work correctly
> even without pkgconfig's --static option. The users of libav* should not
> have to care whether libav* is static or shared.

Applied.  I must admit I lost track of the issues at some point, but
pkg-config is your territory.  If this fulfills your needs, you shall
have it your way.

> pkgconfig-reformat-prefix.patch:
> The patch of this thread, rediffed so that it applies after the above
> two. Our default $libdir and $incdir reference $(PREFIX), which should
> be ${prefix} in .pc files.

Rejected, see the patch I posted earlier for a more complete solution
and/or hope for Mans to come up with something more elegant.

> pkgconfig-private-requires.patch:
> When the shared libraries are built, make the requires Requires.private,
> as the libav* user does not need to link against those (i.e. the same we
> did for Libs earlier).


> --- ffmpeg.orig/configure
> +++ ffmpeg/configure
> @@ -2148,7 +2148,7 @@ includedir=$incdir
>  Name: $name
>  Description: $comment
>  Version: $version
> -Requires: $requires
> +Requires$(enabled shared && echo ".private"): $requires

No, this is too ugly.  Instead you could add a Requires.private line and
add $requires where appropriate.


More information about the ffmpeg-devel mailing list