blob: b3a50ae7bd0b217e45da7c0ae3eaea3e09c84afb (
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
65
66
67
68
69
70
71
72
73
74
75
76
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=nspr
pkgver=4.13.1
pkgrel=0
pkgdesc="Netscape Portable Runtime"
url="http://www.mozilla.org/projects/nspr/"
arch="all"
license="MPL-1.1 GPL2 LGPL-2.1"
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
"
_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
cd "$_builddir"
mkdir build inst
for i in $source; do
case $i in
*.patch)
msg "Applying $i"
patch -p1 -i "$srcdir"/$i || return 1
;;
esac
done
}
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 \
|| return 1
make CC="${CC:-gcc}" CXX="${CXX:-g++}" || return 1
}
package() {
local file=
cd "$_builddir"/build
make DESTDIR="$pkgdir" install || return 1
cd "$pkgdir"/usr/lib
rm -f *.a
cd "$_builddir"/build/config
install -Dm755 nspr-config "$pkgdir"/usr/bin/nspr-config || return 1
install -Dm644 nspr.pc "$pkgdir"/usr/lib/pkgconfig/nspr.pc || return 1
rm -rf "$pkgdir"/usr/bin/prerr.properties \
"$pkgdir"/usr/bin/compile-et.pl \
"$pkgdir"/usr/share/aclocal/nspr.m4 \
"$pkgdir"/usr/include/nspr/md
}
md5sums="9c44298a6fc478b3c0a4e98f4f9981ed nspr-4.13.1.tar.gz
6911c977d89df5203b16c275311f2afe fix-getproto.patch"
sha256sums="5e4c1751339a76e7c772c0c04747488d7f8c98980b434dc846977e43117833ab nspr-4.13.1.tar.gz
d9e9e80b31559ffd2a28857e455076e2b874b81c1557bc3a80f1984bcc0bc719 fix-getproto.patch"
sha512sums="4755dce1a0fddbf4991f46328bdd15b6b07162792370953e16481be56952d4c02d11a83001b3600c80a919b1c45e99d6150ef2c24d407c86f430f9376fe6a694 nspr-4.13.1.tar.gz
ee654f609a90b9a95c1901ad1d56cdef7cce8bca9efc092198607944f142f8fec924b13219ca6663facd0f0d59b671b8b3de58ab3449c4c863d42e2937f02184 fix-getproto.patch"
|