1 # Description: Netscape Portable Runtime library
2 # URL: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/Reference/NSPR_functions
3 # Maintainer: CRUX compat-32 Team, compat-32-ports at crux dot nu
4 # Depends on: nspr
5
6 name=nspr-32
7 version=4.35
8 release=1
9 source=(https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v$version/src/${name%-*}-$version.tar.gz
10 nspr.pc.in)
11
12 build() {
13 local NSPR_LIBS NSPR_CFLAGS NSPR_VERSION
14
15 cd ${name%-*}-$version/nspr
16
17 ./configure \
18 --prefix=/usr \
19 --libdir=/usr/lib32 \
20 --includedir=/usr/include/nspr \
21 --enable-optimize="$CFLAGS" \
22 --disable-64bit \
23 --disable-debug
24
25 make
26 make DESTDIR=$PKG install
27
28 mv $PKG/usr/bin/nspr-config{,-32}
29 rm $PKG/usr/bin/{compile-et.pl,prerr.properties}
30
31 NSPR_LIBS=`./config/nspr-config --libs`
32 NSPR_CFLAGS=`./config/nspr-config --cflags`
33 NSPR_VERSION=`./config/nspr-config --version`
34
35 install -d $PKG/usr/lib32/pkgconfig
36
37 sed $SRC/nspr.pc.in \
38 -e "s,@libdir@,/usr/lib32," \
39 -e "s,@prefix@,/usr," \
40 -e "s,@exec_prefix@,/usr/bin," \
41 -e "s,@includedir@,/usr/include/nspr," \
42 -e "s,@NSPR_VERSION@,$NSPR_VERSION," \
43 -e "s,@FULL_NSPR_LIBS@,$NSPR_LIBS," \
44 -e "s,@FULL_NSPR_CFLAGS@,$NSPR_CFLAGS," > \
45 $PKG/usr/lib32/pkgconfig/nspr.pc
46
47 rm -r $PKG/usr/{include,share}
48 }
|