libsndfile: fix pkg-config file.

* added devel packages requirements for flac, libvorbis
This commit is contained in:
Jerome Duval
2014-10-16 21:15:42 +00:00
parent 3f1cffedb7
commit 677cb6a508

View File

@@ -10,7 +10,7 @@ COPYRIGHT="
LICENSE="GNU LGPL v2.1"
SRC_URI="http://www.mega-nerd.com/libsndfile/files/libsndfile-$portVersion.tar.gz"
CHECKSUM_SHA256="59016dbd326abe7e2366ded5c344c853829bebfd1702ef26a07ef662d6aa4882"
REVISION="2"
REVISION="3"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
@@ -71,9 +71,23 @@ BUILD()
INSTALL()
{
make install
# remove libtool library files
rm $libDir/libsndfile.la
prepareInstalledDevelLibs libsndfile
fixPkgconfig
# The pkgconfig files reference other libraries using the wrong paths, which
# creates a lot of confusion. Fix them so correct paths are used.
local develPackageName="${portName}_devel-$portFullVersion"
local packageLinksDir=$(dirname $portPackageLinksDir)
local linksDir="$packageLinksDir/${develPackageName}/devel~libflac$secondaryArchSuffix/$relativeDevelopLibDir"
sed -i -e "s,^\(Libs.private.*\)-L.* \(-lFLAC.*\)$,\1-L$linksDir \2," \
$developLibDir/pkgconfig/sndfile.pc
linksDir="$packageLinksDir/${develPackageName}/devel~libvorbis$secondaryArchSuffix/$relativeDevelopLibDir"
sed -i -e "s,^\(Libs.private.* -lFLAC .*\) -L.* \(-lvorbis.*\)$,\1-L$linksDir \2," \
$developLibDir/pkgconfig/sndfile.pc
# devel package
packageEntries devel \
@@ -88,4 +102,6 @@ PROVIDES_devel="
"
REQUIRES_devel="
libsndfile$secondaryArchSuffix == $portVersion base
devel:libflac$secondaryArchSuffix
devel:libvorbis$secondaryArchSuffix
"