nspr: simplify template
This commit is contained in:
parent
124854b730
commit
5683ca0da0
|
@ -4,6 +4,7 @@ version=4.31
|
|||
revision=1
|
||||
build_wrksrc=nspr
|
||||
build_style=gnu-configure
|
||||
configure_args="--enable-optimize --enable-debug --enable-ipv6"
|
||||
makedepends="zlib-devel"
|
||||
short_desc="NetScape Portable Runtime"
|
||||
maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
|
||||
|
@ -11,28 +12,20 @@ license="MPL-2.0"
|
|||
homepage="http://www.mozilla.org/projects/nspr/"
|
||||
distfiles="${MOZILLA_SITE}/nspr/releases/v${version}/src/${pkgname}-${version}.tar.gz"
|
||||
checksum=5729da87d5fbf1584b72840751e0c6f329b5d541850cacd1b61652c95015abc8
|
||||
CFLAGS="-D_PR_POLL_AVAILABLE -D_PR_HAVE_OFF64_T -D_PR_INET6 -D_PR_HAVE_INET_NTOP -D_PR_HAVE_GETHOSTBYNAME2 -D_PR_HAVE_GETADDRINFO -D_PR_INET6_PROBE"
|
||||
|
||||
do_configure() {
|
||||
CFLAGS="$CFLAGS -D_PR_POLL_AVAILABLE -D_PR_HAVE_OFF64_T -D_PR_INET6 -D_PR_HAVE_INET_NTOP -D_PR_HAVE_GETHOSTBYNAME2 -D_PR_HAVE_GETADDRINFO -D_PR_INET6_PROBE"
|
||||
if [ "$XBPS_TARGET_WORDSIZE" = 64 ]; then
|
||||
configure_args+=" --enable-64bit"
|
||||
fi
|
||||
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
_args+=" --target=$XBPS_CROSS_TRIPLET"
|
||||
# nspr misused host in place of build
|
||||
configure_args+=" --host=$XBPS_TRIPLET --target=$XBPS_CROSS_TRIPLET"
|
||||
export HOST_CC="$CC_FOR_BUILD"
|
||||
export HOST_CFLAGS="$CFLAGS_FOR_BUILD"
|
||||
export HOST_LDFLAGS="$LDFLAGS_FOR_BUILD"
|
||||
fi
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
x86_64*|ppc64*|aarch64*) _args+=" --enable-64bit";;
|
||||
esac
|
||||
|
||||
./configure --build=${XBPS_TRIPLET} --prefix=/usr --libdir=/usr/lib \
|
||||
--includedir=/usr/include/nspr --enable-optimize \
|
||||
--enable-debug --enable-ipv6 ${_args}
|
||||
}
|
||||
do_build() {
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
make ${makejobs}
|
||||
else
|
||||
make CC=$CC CXX=$CXX ${makejobs}
|
||||
fi
|
||||
}
|
||||
post_install() {
|
||||
sed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/bin/nspr-config
|
||||
ln -s nspr.pc ${DESTDIR}/usr/lib/pkgconfig/mozilla-nspr.pc
|
||||
|
|
Loading…
Reference in New Issue