### this file is sourced not run
PKGVER=4.35
PKGBUILD=1
PKGARCH=x86_64

# source: BLFS 11.3
TARBALL=nspr-$PKGVER.tar.gz
MD5SUM=5e0acf9fbdde85181bddd510f4624841
SRC_URL=http://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v$PKGVER/src/$TARBALL
BUNDLE=

SLACKREQ=''
SLACKDESC="libnspr: libnspr $PKGVER (Netscape Portable Runtime Library)  
libnspr:  
libnspr: Netscape Portable Runtime (NSPR) provides a platform-neutral API for 
libnspr: system level and libc like functions. It is similar to other 
libnspr: libraries such as Apache Portable Runtime library (apr); its purpose 
libnspr: to to provide provides platform-neutral interfaces and hide 
libnspr: platform-specific differences for commonly used functions and 
libnspr: operating system API.  
libnspr: 
libnspr: 
libnspr:
"

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	cd /tmp/nspr*

	# BLFS 11.3 disable installing two unused scripts
	cd nspr                                            &&
	sed -ri '/^RELEASE/s/^/#/' pr/src/misc/Makefile.in &&
	
	# BLFS 11.3 disable static lib
	sed -i 's#$(LIBRARY) ##'   config/rules.mk         &&

	# build
	CONFFLAGS="$CONFFLAGS \
		--with-mozilla    \
		--with-pthreads   \
		--enable-64bit    \
	" &&
	./configure $CONFFLAGS &&
	make $MAKEFLAGS && make $MAKEINSTALLFLAGS install &&
	pkg_build_slackdesc &&
	
	# multilib
	mv -v /usr/bin/nspr-config{,-64} &&
	ln -sfv multiarch_wrapper /usr/bin/nspr-config	&&
	#	ln -sf nspr.pc /usr/$LIBDIR/pkgconfig/mozilla-nspr.pc && # is this still needed?
	true
}


