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