Bug 192219 - multimedia/libav pkgconfig file missing suffix
Summary: multimedia/libav pkgconfig file missing suffix
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Marcus von Appen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-28 21:21 UTC by groot
Modified: 2014-07-29 16:36 UTC (History)
0 users

See Also:


Attachments
Extra patch for configure (1.81 KB, patch)
2014-07-28 21:32 UTC, groot
no flags Details | Diff
libav.patch (2.92 KB, patch)
2014-07-29 06:55 UTC, Marcus von Appen
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description groot 2014-07-28 21:21:42 UTC
On a 9.3-STABLE system, I installed libav using binary packages from pkg.freebsd.org. This installs "suffixed" pkgconfig files, like libdata/pkgconfig/libswscale-libav.pc. This is done by files/patch-library.mak, presumably to avoid colliding with the ffmpeg files of the same name. However, the Requires.private lines *inside* the pkgconfig files are not similarly modified. Here's the installed libswscale-libav.pc:

===
exec_prefix=${prefix}
libdir=/usr/local/lib/libav
includedir=/usr/local/include/libav

Name: libswscale
Description: Libav image rescaling library
Version: 2.1.2
Requires: 
Requires.private: libavutil = 53.3.0
Conflicts:
Libs: -L${libdir} -lswscale 
Libs.private: -lm
Cflags: -I${includedir}
===

Because libavutil's pkgconfig file is also installed with a suffix, the Requires.private line (with just libavutil) demands a package that does not exist. It should be libavutil-libav as well.

This trips up some builds (e.g. with cmake using pkg_check_modules(FOO libswscale-libav)) which gather the requirements as well and then fail because libavutil (a requirement of libswscale-libav) is not installed.
Comment 1 groot 2014-07-28 21:32:03 UTC
Created attachment 145105 [details]
Extra patch for configure

This extra patch to be applied to configure munges the requires-lines by adding in the -libav suffix.
Comment 2 John Marino freebsd_committer freebsd_triage 2014-07-28 22:11:36 UTC
over to maintainer
Comment 3 Marcus von Appen freebsd_committer freebsd_triage 2014-07-29 06:55:46 UTC
Created attachment 145114 [details]
libav.patch

Thanks for spotting this.

libavfilter.pc also needs a small patch to include the correct files. I patched $lavfi_libs locally and will commit the changes later.
Comment 4 Marcus von Appen freebsd_committer freebsd_triage 2014-07-29 16:36:13 UTC
Committed, thanks!
Comment 5 commit-hook freebsd_committer freebsd_triage 2014-07-29 16:36:29 UTC
A commit references this bug:

Author: mva
Date: Tue Jul 29 16:35:31 UTC 2014
New revision: 363357
URL: http://svnweb.freebsd.org/changeset/ports/363357

Log:
  - Fix the implicit requirement lines of the pkg-config files to use libav's
    files and libraries and not ffmpeg's

  PR:		ports/192219
  Submitted by:	Adriaan de Groot <groot@kde.org>

Changes:
  head/multimedia/libav/Makefile
  head/multimedia/libav/files/patch-configure