123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- set -e
- program=nspr
- version=4.33
- release=1
- pkgcategory=networking
- tarname=${program}-${version}.tar.gz
- fetch=https://archive.mozilla.org/pub/nspr/releases/v${version}/src/$tarname
- description="
- Netscape portable runtime functions.
- NSPR is the Netscape Portable Runtime that provides a platform-neutral
- API for system level and libc like functions.
- "
- homepage=https://www.mozilla.org/projects/nspr/about-nspr.html
- license="MPL v2.0, GPLv2+"
- docs="LICENSE"
- docsdir="${docdir}/${program}-${version}"
- build()
- {
- unpack "${tardir}/$tarname"
- cd "${srcdir}/nspr"
-
- chmod -R u+w,go-w,a+rX-s .
-
-
- sed -ri 's#^(RELEASE_BINS =).*#\1#' pr/src/misc/Makefile.in
-
-
- sed -i 's#$(LIBRARY) ##' config/rules.mk
-
- case $arch in
- amd64)
- arch_options="--enable-64bit"
- ;;
- x32)
- arch_options="--enable-64bit --enable-x32"
- ;;
- esac
- ./configure CPPFLAGS="$QICPPFLAGS" \
- CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
- $configure_args \
- --libdir=/usr/lib${libSuffix} \
- --infodir=$infodir \
- --mandir=$mandir \
- --docdir=$docsdir \
- --disable-debug \
- --with-mozilla \
- --build="$(gcc -dumpmachine)" \
- $arch_options
- unset -v arch_options
- make -j${jobs} V=1
- make -j${jobs} DESTDIR="$destdir" install
-
- if test -d "${destdir}/$infodir"
- then
- rm -f "${destdir}/${infodir}/dir"
- lzip -9 "${destdir}/${infodir}"/*
- fi
-
- if test -d "${destdir}/$mandir"
- then
- (
- cd "${destdir}/$mandir"
- find . -type f -exec lzip -9 {} +
- find . -type l | while read -r file
- do
- ln -sf "$(readlink -- "$file").lz" "${file}.lz"
- rm -- "$file"
- done
- )
- fi
-
- mkdir -p "${destdir}/$docsdir"
- cp -p $docs "${destdir}/$docsdir"
- }
|