PKGBUILDs/core/nspr/PKGBUILD

71 lines
2.1 KiB
Bash
Raw Normal View History

2020-07-29 14:50:19 +00:00
# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>
2015-07-05 22:51:50 +00:00
# Contributor: Alexander Baldeck <alexander@archlinux.org>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - --enable-64bit for AArch64
pkgname=nspr
2024-10-23 23:40:20 +00:00
pkgver=4.36
pkgrel=1
2015-07-05 22:51:50 +00:00
pkgdesc="Netscape Portable Runtime"
2017-04-24 19:13:30 +00:00
url="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR"
2018-01-22 01:32:43 +00:00
arch=(x86_64)
2023-12-14 16:35:10 +00:00
license=(MPL-2.0)
depends=(
glibc
sh
)
makedepends=(
mercurial
zip
)
source=(
2024-06-09 01:18:33 +00:00
"hg+https://hg.mozilla.org/projects/nspr#tag=NSPR_${pkgver//./_}_RTM"
2023-12-14 16:35:10 +00:00
0001-linux-prefer-GCC-provided-atomics-to-asssembly-imple.patch
0002-configure.in-Remove-assembly-files-from-build.patch
)
2024-10-23 23:40:20 +00:00
b2sums=('6ea7e245860fbdbb8bd550cad9c5ee4c9681c3c94ff36b106622cf0aec9aa1e7932de7801a8e49b309d395ccee4d29199e6142f5f292f65c5ea08f344855248d'
2023-12-14 16:35:10 +00:00
'fe81bbb23478958438e385ec5563842cdaf7400021def0d2f2184c0c38389e75f28ed7a4f3b52cada4d76c6318c104dda661f1d4efaa224bc832a989729ef852'
2024-10-23 23:40:20 +00:00
'36417d30e22a8f56c1a2fb70ec35bfd489d93d0514afdaaef3f84b121861998444999d66a44e59f8816705853524666efc38e8a6bc86f6a1d10c7c4740f0cf1b')
2021-12-19 05:21:25 +00:00
2017-08-09 19:41:27 +00:00
prepare() {
2021-12-19 05:21:25 +00:00
cd nspr
2023-12-14 16:35:10 +00:00
# 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
2017-08-09 19:41:27 +00:00
}
2015-07-05 22:51:50 +00:00
build() {
2023-12-14 16:35:10 +00:00
local configure_options=(
--prefix=/usr
--libdir=/usr/lib
--includedir=/usr/include/nspr
--enable-optimize
2017-04-24 19:13:30 +00:00
--disable-debug \
2023-12-14 16:35:10 +00:00
$([[ $CARCH == aarch64 ]] && echo --enable-64bit)
)
cd nspr
./configure "${configure_options[@]}"
2019-08-25 19:20:24 +00:00
make ${SOURCE_DATE_EPOCH:+
SH_NOW="${SOURCE_DATE_EPOCH}000000"
SH_DATE="$(date --utc --date="@$SOURCE_DATE_EPOCH" '+%Y-%m-%d %T')"
2019-10-21 12:29:22 +00:00
}
2015-07-05 22:51:50 +00:00
}
package() {
2021-12-19 05:21:25 +00:00
cd nspr
2015-07-05 22:51:50 +00:00
make DESTDIR="$pkgdir" install
ln -s nspr.pc "$pkgdir/usr/lib/pkgconfig/mozilla-nspr.pc"
2021-12-19 05:21:25 +00:00
rm -r "$pkgdir"/usr/include/nspr/md
rm "$pkgdir"/usr/bin/{compile-et.pl,prerr.properties}
2015-07-05 22:51:50 +00:00
}
2021-12-19 05:21:25 +00:00
2023-12-14 16:35:10 +00:00
# vim:set sw=2 sts=-1 et: