gpgme: Fix paths in libtool files

TODO: also fix the gpgme-config script
which hardcodes paths and -lpthread.
This commit is contained in:
François Revol
2014-12-04 17:27:43 +01:00
parent ff1b3d0fe5
commit de8d7d67f4

View File

@@ -22,6 +22,8 @@ COPYRIGHT="
ARCHITECTURES="x86_gcc2 x86 ?x86 ?x86_64"
SECONDARY_ARCHITECTURES="x86"
#TODO: fix gpgme-config (-lpthread)
#TODO: fix gpgme-config hardcoded package paths
PROVIDES="
gpgme${secondaryArchSuffix} = $portVersion compat >= 1.5
cmd:gpgme_tool${secondaryArchSuffix} = $portVersion compat >= 1.5
@@ -76,6 +78,21 @@ INSTALL()
prepareInstalledDevelLibs libgpgme libgpgme-pthread
# The libtool 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)
for l in libgpgme libgpgme-pthread; do
local linksDir="$packageLinksDir/${develPackageName}/devel~libassuan$secondaryArchSuffix/$relativeDevelopLibDir"
sed -i -e "s,\(-L/packages/libassuan[^ ]*\),-L$linksDir," \
-e "s,[^ ]*/libassuan\.la,$linksDir/libassuan.la,g" \
$developLibDir/$l.la
local linksDir="$packageLinksDir/${develPackageName}/devel~libgpg_error$secondaryArchSuffix/$relativeDevelopLibDir"
sed -i -e "s,\(-L/packages/libgpg_error[^ ]*\),-L$linksDir," \
-e "s,[^ ]*/libgpg-error\.la,$linksDir/libgpg-error.la,g" \
$developLibDir/$l.la
done
packageEntries devel \
$developDir $binDir/gpgme-config
}