# Maintainer: Natanael Copa pkgname=nspr pkgver=4.10 pkgrel=0 pkgdesc="Netscape Portable Runtime" url="http://www.mozilla.org/projects/nspr/" arch="all" license="MPL-1.1 GPL-2 LGPL-2.1" depends= makedepends="autoconf automake sed" subpackages="$pkgname-dev" source="ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v$pkgver/src/nspr-$pkgver.tar.gz " _builddir="$srcdir"/$pkgname-$pkgver prepare() { cd "$_builddir" update_config_sub || return 1 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/configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --disable-debug \ --enable-optimize \ $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="f5466def95726b3c900d8a0227bdd034 nspr-4.10.tar.gz" sha256sums="0cfbe561676b92e5af3ddc7ac77452014e3da8885da66baec811e7354138cc16 nspr-4.10.tar.gz" sha512sums="80d511e3bdce9a1efc577acc1671f507bef3d6ca933705f67a7aba567ff7b981e9cde70c2da6fbde82852938b779baa0058c82f937d4ac3e672f6d8e7bdefe8b nspr-4.10.tar.gz"