aboutsummaryrefslogtreecommitdiffstats
path: root/main/nspr/APKBUILD
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-05-29 16:30:20 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-05-29 16:30:20 +0000
commitda02122bd4099394d80812b536071bf619e997b7 (patch)
tree5dc90cfefbb02c61faee53747c128b85db1d7a39 /main/nspr/APKBUILD
parentfd0cf32e80cc193c56fabc8639e91bf022bc8b06 (diff)
downloadaports-da02122bd4099394d80812b536071bf619e997b7.tar.bz2
aports-da02122bd4099394d80812b536071bf619e997b7.tar.xz
main/nspr: moved from testing
Diffstat (limited to 'main/nspr/APKBUILD')
-rw-r--r--main/nspr/APKBUILD64
1 files changed, 64 insertions, 0 deletions
diff --git a/main/nspr/APKBUILD b/main/nspr/APKBUILD
new file mode 100644
index 0000000000..38f9d9c4d1
--- /dev/null
+++ b/main/nspr/APKBUILD
@@ -0,0 +1,64 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=nspr
+pkgver=4.8.4
+pkgrel=0
+pkgdesc="Netscape Portable Runtime"
+url="http://www.mozilla.org/projects/nspr/"
+license="MPL-1.1 GPL-2 LGPL-2.1"
+depends=
+subpackages="$pkgname-dev"
+source="ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v$pkgver/src/nspr-$pkgver.tar.gz
+ nspr-4.6.1-config-1.patch
+ nspr-4.7.0-prtime.patch
+ nspr-4.8-config.patch
+ nspr-4.8-pkgconfig-gentoo-3.patch
+ "
+
+_builddir="$srcdir"/$pkgname-$pkgver
+prepare() {
+ cd "$_builddir"
+ mkdir build inst
+ for i in "$srcdir"/*.patch; do
+ msg "Applying $i"
+ patch -p1 -i "$i" || return 1
+ done
+ # respect LDFLAGS
+ sed -i -e 's/\$(MKSHLIB) \$(OBJS)/\$(MKSHLIB) \$(LDFLAGS) \$(OBJS)/g' \
+ mozilla/nsprpub/config/rules.mk
+}
+
+build() {
+ cd "$_builddir"/build
+ ../mozilla/nsprpub/configure --prefix=/usr \
+ || return 1
+ make CC="${CC:-gcc}" CXX="${CXX:-g++}" || return 1
+}
+
+package() {
+ local file= minor_version=${pkgver#*.}
+ minor_version=${minor_version%.*}
+
+ cd "$_builddir"/build
+ make DESTDIR="$pkgdir" install || die "emake install failed"
+
+ cd "$pkgdir"/usr/lib
+ rm -f *.a
+ for file in *.so; do
+ mv ${file} ${file}.${minor_version} || return 1
+ ln -s ${file}.${minor_version} ${file} || return 1
+ done
+
+ 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="a85bdbe1eb646aa32c785a37d8e3a2f5 nspr-4.8.4.tar.gz
+d204a641dd7cbf6751d14dc6b98835f1 nspr-4.6.1-config-1.patch
+c48e1f47799c1cff7e3bf46dc0e653f1 nspr-4.7.0-prtime.patch
+c790c638a7c9fd1d731272f464f065c6 nspr-4.8-config.patch
+5b67b4339be94d0dbc4337a55eabe73a nspr-4.8-pkgconfig-gentoo-3.patch"