0
0
Fork 0
haikuports/dev-libs/nspr/nspr-4.30.recipe

98 lines
2.4 KiB
Bash

SUMMARY="A platform abstraction library"
DESCRIPTION="Netscape Portable Runtime (NSPR) provides a platform-neutral \
API for system level and libc-like functions. The API is used in the \
Mozilla clients, many of Red Hat's and Sun's server applications, and \
other software offerings."
HOMEPAGE="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR"
COPYRIGHT="Mozilla Foundation"
LICENSE="GNU GPL v2
GNU LGPL v2.1
MPL v2.0
"
REVISION="1"
SOURCE_URI="https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v$portVersion/src/nspr-$portVersion.tar.gz"
CHECKSUM_SHA256="8d4cd8f8409484dc4c3d31e180354bfc506573eccf86cd691106a1ef7edc913b"
SOURCE_DIR="nspr-$portVersion/nspr"
PATCHES="nspr-$portVersion.patchset"
if [ $effectiveTargetArchitecture == 'x86' ]; then
PATCHES="$PATCHES
nspr_x86-$portVersion.patchset"
fi
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
nspr$secondaryArchSuffix = $portVersion
lib:libnspr4$secondaryArchSuffix = $portVersion compat >= 4
lib:libplc4$secondaryArchSuffix = $portVersion compat >= 4
lib:libplds4$secondaryArchSuffix = $portVersion compat >= 4
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
nspr${secondaryArchSuffix}_devel = $portVersion compat >= 4
cmd:nspr_config$secondaryArchSuffix = $portVersion compat >= 4
devel:libnspr4$secondaryArchSuffix = $portVersion compat >= 4
devel:libplc4$secondaryArchSuffix = $portVersion compat >= 4
devel:libplds4$secondaryArchSuffix = $portVersion compat >= 4
"
REQUIRES_devel="
nspr${secondaryArchSuffix} == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:awk
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:perl
"
BUILD()
{
if [ "$effectiveTargetArchitecture" = x86_64 ]; then
use64Bits="--enable-64bit"
fi
autoreconf -fi
runConfigure ./configure --disable-debug --enable-optimize $use64Bits
make $jobArgs
}
INSTALL()
{
make install
# set up the develop directory correctly
prepareInstalledDevelLibs libnspr4 libplc4 libplds4
fixPkgconfig
rm $binDir/compile-et.pl
rm $binDir/prerr.properties
# devel package
packageEntries devel \
$developDir \
$dataDir/aclocal \
$binDir/nspr-config
}
TEST()
{
if [ "$effectiveTargetArchitecture" = x86_64 ]; then
use64Bits="--enable-64bit"
fi
autoconf
runConfigure ./configure $use64Bits
cd pr/tests
make $jobArgs
make runtests
}