serf: fix secondary arch build.

This commit is contained in:
Jerome Duval
2016-11-11 21:47:35 +00:00
parent f6ce6a514f
commit d1f9e76538

View File

@@ -6,7 +6,7 @@ transformations are kept to a minimum to provide high performance operation."
HOMEPAGE="https://serf.apache.org/"
COPYRIGHT="2002-2013 Justin Erenkrantz and Greg Stein"
LICENSE="Apache v2"
REVISION="1"
REVISION="2"
SOURCE_URI="https://archive.apache.org/dist/serf/serf-$portVersion.tar.bz2"
CHECKSUM_SHA256="549c2d21c577a8a9c0450facb5cca809f26591f048e466552240947bdf7a87cc"
PATCHES="serf-$portVersion.patchset"
@@ -56,23 +56,42 @@ BUILD_PREREQUIRES="
#cmd:make
cmd:scons
cmd:apr_1_config$secondaryArchSuffix
cmd:apu_1_config$secondaryArchSuffix
"
BUILD()
{
archDir=
if [ -n "$secondaryArchSuffix" ]; then
archDir=/$effectiveTargetArchitecture
fi
apr=$portPackageLinksDir/cmd~apr_1_config$secondaryArchSuffix/bin$archDir/apr-1-config
apu=$portPackageLinksDir/cmd~apu_1_config$secondaryArchSuffix/bin$archDir/apu-1-config
gcc=$portPackageLinksDir/cmd~gcc$secondaryArchSuffix/bin$archDir/gcc
scons $jobArgs OPENSSL=$portPackageLinksDir/devel~libssl$secondaryArchSuffix \
ZLIB=/system APR=/bin/apr-1-config APU=/bin/apu-1-config PREFIX=$prefix
ZLIB=/system APR=$apr APU=$apu PREFIX=$prefix CC=$gcc
}
INSTALL()
{
configDir=
if [ -n "$secondaryArchSuffix" ]; then
configDir=/$effectiveTargetArchitecture
fi
apr=$portPackageLinksDir/cmd~apr_1_config$secondaryArchSuffix/bin$configDir/apr-1-config
apu=$portPackageLinksDir/cmd~apu_1_config$secondaryArchSuffix/bin$configDir/apu-1-config
scons install OPENSSL=$portPackageLinksDir/devel~libssl$secondaryArchSuffix \
ZLIB=/system APR=/bin/apr-1-config APU=/bin/apu-1-config PREFIX=$prefix
ZLIB=/system APR=$apr APU=$apu PREFIX=$prefix
mkdir -p $includeDir $developLibDir
mv $prefix/include/serf-1/* $includeDir/
rm -rf $prefix/include
if [ -n "$secondaryArchSuffix" ]; then
mkdir -p $libDir
mv $prefix/lib/libserf* $prefix/lib/pkgconfig $libDir/
fi
# prepare development lib links
prepareInstalledDevelLib libserf-1