# Maintainer: Natanael Copa pkgname=nspr pkgver=4.20 pkgrel=0 pkgdesc="Netscape Portable Runtime" url="http://www.mozilla.org/projects/nspr/" arch="all" license="MPL-1.1 GPL-2.0 LGPL-2.1" options="!check" # No test suite. depends= # -dev package does not ship any symlinks so dependency cannot be autodetected depends_dev="nspr linux-headers" makedepends="autoconf automake linux-headers" subpackages="$pkgname-dev" source="https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v$pkgver/src/nspr-$pkgver.tar.gz fix-getproto.patch fix-sgidefs-usage.patch " prepare() { cd "$builddir" mkdir build inst default_prepare } build() { local conf= if [ "$CARCH" = "x86_64" ];then conf="--enable-64bit" fi cd "$builddir"/build # ./nspr/pr/include/md/_linux.h tests only __GLIBC__ version # to detect c-library features, list musl features here for now. 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" \ ../nspr/configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --disable-debug \ --enable-optimize \ --enable-ipv6 \ $conf make CC="${CC:-gcc}" CXX="${CXX:-g++}" } package() { local file= cd "$builddir"/build make DESTDIR="$pkgdir" install cd "$pkgdir"/usr/lib rm -f *.a cd "$builddir"/build/config install -Dm755 nspr-config "$pkgdir"/usr/bin/nspr-config install -Dm644 nspr.pc "$pkgdir"/usr/lib/pkgconfig/nspr.pc rm -rf "$pkgdir"/usr/bin/prerr.properties \ "$pkgdir"/usr/bin/compile-et.pl \ "$pkgdir"/usr/share/aclocal/nspr.m4 \ "$pkgdir"/usr/include/nspr/md } sha512sums="22fdf7627f450b0594ebccaee170098e1a8cd0f429fd44816f1322756002ced3d69cf686c3f69f7cb30b8132d3605a9fce5457ab99d0002e6af11a3408a5c949 nspr-4.20.tar.gz ee654f609a90b9a95c1901ad1d56cdef7cce8bca9efc092198607944f142f8fec924b13219ca6663facd0f0d59b671b8b3de58ab3449c4c863d42e2937f02184 fix-getproto.patch 69e804907d1a8867912511818d9827e4d7fd36ff44253cb21f4a5527610076874ddf5aada87717ef6454162c21248c9f7c3395376c585129134950c12f90ac0f fix-sgidefs-usage.patch"