summaryrefslogtreecommitdiff
path: root/system/nspr
diff options
context:
space:
mode:
Diffstat (limited to 'system/nspr')
-rw-r--r--system/nspr/APKBUILD64
-rw-r--r--system/nspr/fix-getproto.patch13
2 files changed, 77 insertions, 0 deletions
diff --git a/system/nspr/APKBUILD b/system/nspr/APKBUILD
new file mode 100644
index 000000000..46284cae3
--- /dev/null
+++ b/system/nspr/APKBUILD
@@ -0,0 +1,64 @@
+# Maintainer: A. Wilcox <awilfox@adelielinux.org>
+pkgname=nspr
+pkgver=4.19
+pkgrel=0
+pkgdesc="Netscape Portable Runtime"
+url="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR"
+arch="all"
+options="!check" # No test suite.
+license="MPL-1.1 AND GPL-2.0-only AND LGPL-2.1-only"
+depends=
+# -dev package does not ship any symlinks so dependency cannot be autodetected
+depends_dev="nspr"
+makedepends="autoconf automake"
+subpackages="$pkgname-dev"
+source="http://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v$pkgver/src/nspr-$pkgver.tar.gz
+ fix-getproto.patch
+ "
+
+prepare() {
+ cd "$builddir"
+ mkdir build inst
+ default_prepare
+}
+
+build() {
+ local conf=
+ case "$CARCH" in
+ *64* | s390x) conf="--enable-64bit";;
+ esac
+ 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="45a48111d0f89db0649a5e1356719868ff81881f9cf48c22c1d13b0831978b103f19e9840d6a5359fcdc90d763c0a60f0a29f7840d756a5efbd53ce1afd36844 nspr-4.19.tar.gz
+ee654f609a90b9a95c1901ad1d56cdef7cce8bca9efc092198607944f142f8fec924b13219ca6663facd0f0d59b671b8b3de58ab3449c4c863d42e2937f02184 fix-getproto.patch"
diff --git a/system/nspr/fix-getproto.patch b/system/nspr/fix-getproto.patch
new file mode 100644
index 000000000..a96d14730
--- /dev/null
+++ b/system/nspr/fix-getproto.patch
@@ -0,0 +1,13 @@
+--- ./nspr/pr/src/misc/prnetdb.c.orig
++++ ./nspr/pr/src/misc/prnetdb.c
+@@ -61,9 +61,7 @@
+ #define _PR_HAVE_GETPROTO_R_POINTER
+ #endif
+
+-#if defined(SOLARIS) || (defined(BSDI) && defined(_REENTRANT)) \
+- || (defined(LINUX) && defined(_REENTRANT) \
+- && defined(__GLIBC__) && __GLIBC__ < 2)
++#if defined(SOLARIS) || (defined(BSDI) && defined(_REENTRANT))
+ #define _PR_HAVE_GETPROTO_R
+ #define _PR_HAVE_GETPROTO_R_POINTER
+ #endif