mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
76 lines
2.1 KiB
Bash
76 lines
2.1 KiB
Bash
# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
|
|
# Contributor: Jan de Groot <jgc@archlinux.org>
|
|
# Contributor: Alexander Baldeck <alexander@archlinux.org>
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
# - --enable-64bit for AArch64
|
|
|
|
pkgname=nspr
|
|
pkgver=4.35
|
|
pkgrel=2
|
|
pkgdesc="Netscape Portable Runtime"
|
|
url="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR"
|
|
arch=(x86_64)
|
|
license=(MPL-2.0)
|
|
depends=(
|
|
glibc
|
|
sh
|
|
)
|
|
makedepends=(
|
|
mercurial
|
|
zip
|
|
)
|
|
_revision=b563bfc16c887c48b038b7b441fcc4e40a126d3b
|
|
source=(
|
|
"hg+https://hg.mozilla.org/projects/nspr#revision=$_revision"
|
|
0001-linux-prefer-GCC-provided-atomics-to-asssembly-imple.patch
|
|
0002-configure.in-Remove-assembly-files-from-build.patch
|
|
)
|
|
b2sums=('SKIP'
|
|
'fe81bbb23478958438e385ec5563842cdaf7400021def0d2f2184c0c38389e75f28ed7a4f3b52cada4d76c6318c104dda661f1d4efaa224bc832a989729ef852'
|
|
'1fd6e9b1f3111a29a052b6034f796e4e9577a3dbb2d0e96798ce1f47b74f515c882c9f595198fa1646648611525b48857b33ed62e713991e2f28850690e99060')
|
|
|
|
pkgver() {
|
|
cd nspr
|
|
hg id -t -r. | sed 's/^NSPR_//;s/_RTM$//;s/_/./g'
|
|
}
|
|
|
|
prepare() {
|
|
cd nspr
|
|
|
|
# https://bugzilla.mozilla.org/show_bug.cgi?id=1496426
|
|
# https://gitlab.archlinux.org/archlinux/packaging/packages/nspr/-/merge_requests/1
|
|
patch -Np1 -i ../0001-linux-prefer-GCC-provided-atomics-to-asssembly-imple.patch
|
|
patch -Np1 -i ../0002-configure.in-Remove-assembly-files-from-build.patch
|
|
|
|
autoreconf -fvi
|
|
}
|
|
|
|
build() {
|
|
local configure_options=(
|
|
--prefix=/usr
|
|
--libdir=/usr/lib
|
|
--includedir=/usr/include/nspr
|
|
--enable-optimize
|
|
--disable-debug \
|
|
$([[ $CARCH == aarch64 ]] && echo --enable-64bit)
|
|
)
|
|
|
|
cd nspr
|
|
./configure "${configure_options[@]}"
|
|
make ${SOURCE_DATE_EPOCH:+
|
|
SH_NOW="${SOURCE_DATE_EPOCH}000000"
|
|
SH_DATE="$(date --utc --date="@$SOURCE_DATE_EPOCH" '+%Y-%m-%d %T')"
|
|
}
|
|
}
|
|
|
|
package() {
|
|
cd nspr
|
|
make DESTDIR="$pkgdir" install
|
|
ln -s nspr.pc "$pkgdir/usr/lib/pkgconfig/mozilla-nspr.pc"
|
|
|
|
rm -r "$pkgdir"/usr/include/nspr/md
|
|
rm "$pkgdir"/usr/bin/{compile-et.pl,prerr.properties}
|
|
}
|
|
|
|
# vim:set sw=2 sts=-1 et:
|