blob: 0035b7420218bd3730c030ca60ad3946d3f2c75c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=nspr
pkgver=4.25
pkgrel=0
pkgdesc="Netscape Portable Runtime"
url="https://www.mozilla.org/projects/nspr/"
arch="all"
license="GPL-3.0-only AND LGPL-2.1-only AND LGPL-3.0-only AND MPL-2.0"
options="!check" # No test suite.
# -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() {
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="b9aa576e0da37e8729088fe559d94030cf18f277c1f7a30104d3088a804913343ed884645c0adb62144da475e20934b359f897bf3ae9a6ebb5f9daf283d5a562 nspr-4.25.tar.gz
7062cc03e38541282226781e67c886c78ca693f7ee96df96509c9429470d294ca6b87ebe05ea809920b9ef78eaa0a0d21ae575a1ac438f148d0c1dc915424613 fix-getproto.patch
69e804907d1a8867912511818d9827e4d7fd36ff44253cb21f4a5527610076874ddf5aada87717ef6454162c21248c9f7c3395376c585129134950c12f90ac0f fix-sgidefs-usage.patch"
|