Commit 3e42151a authored by Jeff Huang's avatar Jeff Huang 😕

[skip-ci] lib32-nss: update to 3.41

parent 1dfbb283
Pipeline #2006 skipped
_pkgbasename=nss
pkgname=lib32-${_pkgbasename}
pkgver=3.40.1
# Contributions from Arch:
# Maintainer: Daniel Wallace <danielwallace at gtmanfred dot com>
# Contributor: kfgz <kfgz at interia pl>
# Contributor: Ionut Biru <ibiru at archlinux dot org>
pkgname=lib32-nss
pkgver=3.41
pkgrel=1
pkgdesc="Mozilla Network Security Services (32-bit)"
arch=('x86_64')
url="http://www.mozilla.org/projects/security/pki/nss/"
license=('MPL' 'GPL')
pkgdesc="Network Security Services (32-bit)"
url="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS"
arch=(x86_64)
license=(MPL GPL)
_nsprver=4.20
depends=("lib32-nspr>=${_nsprver}" 'lib32-sqlite' 'lib32-zlib' 'lib32-p11-kit' $_pkgbasename=$pkgver)
makedepends=('perl' 'lib32-gcc-libs')
options=('!strip' '!makeflags' staticlibs)
source=(https://ftp.mozilla.org/pub/security/nss/releases/NSS_${pkgver//./_}_RTM/src/${_pkgbasename}-${pkgver}.tar.gz
nss.pc.in)
sha256sums=('5e0e6bae2a79c86e506684955d736bfe875ec5a8e95ed3e4ba0852d1aec2c8f1'
'b9f1428ca2305bf30b109507ff335fa00bce5a7ce0434b50acd26ad7c47dd5bd')
depends=("lib32-nspr>=${_nsprver}" lib32-sqlite lib32-zlib lib32-p11-kit nss)
makedepends=(perl python2 gyp)
source=("https://ftp.mozilla.org/pub/security/nss/releases/NSS_${pkgver//./_}_RTM/src/nss-${pkgver}.tar.gz"
no-plt.diff)
sha256sums=('ab2e18f5d0dd0079c0005396f9beb9a41e9a1bbc7e6c1d0a99affcef0471712d'
'ea8e1b871c0f1dd29cdea1b1a2e7f47bf4713e2ae7b947ec832dba7dfcc67daa')
prepare() {
cd "${srcdir}"/${_pkgbasename}-${pkgver}/
mkdir path
# Respect LDFLAGS
sed -e 's/\$(MKSHLIB) -o/\$(MKSHLIB) \$(LDFLAGS) -o/' \
-i nss/coreconf/rules.mk
}
ln -s /usr/bin/python2 path/python
build(){
cd "${srcdir}"/${_pkgbasename}-${pkgver}/$_pkgbasename
cd nss-$pkgver
# https://bugzilla.mozilla.org/show_bug.cgi?id=1382942
patch -Np2 -i ../no-plt.diff
}
build() {
export PKG_CONFIG_PATH=/usr/lib32/pkgconfig
export BUILD_OPT=1
export NSS_USE_SYSTEM_SQLITE=1
export NSS_ENABLE_ECC=1
export NSPR_INCLUDE_DIR="`nspr-config --includedir`"
export NSPR_LIB_DIR="`nspr-config --libdir`"
export XCFLAGS="${CFLAGS}"
make -C coreconf
make -C lib/dbm
make
cd nss-$pkgver/nss
PATH="$srcdir/path:$PATH" bash -x ./build.sh -v \
--m32 --opt --system-sqlite --system-nspr --enable-libpkix --disable-tests
}
package() {
cd "${srcdir}"/${_pkgbasename}-${pkgver}/$_pkgbasename
install -d "$pkgdir"/usr/lib32/pkgconfig
NSS_VMAJOR=$(grep '#define.*NSS_VMAJOR' lib/nss/nss.h | awk '{print $3}')
NSS_VMINOR=$(grep '#define.*NSS_VMINOR' lib/nss/nss.h | awk '{print $3}')
NSS_VPATCH=$(grep '#define.*NSS_VPATCH' lib/nss/nss.h | awk '{print $3}')
sed $srcdir/nss.pc.in \
cd nss-$pkgver
sed nss/pkg/pkg-config/nss.pc.in \
-e "s,%libdir%,/usr/lib32,g" \
-e "s,%prefix%,/usr,g" \
-e "s,%exec_prefix%,/usr/bin,g" \
-e "s,%includedir%,/usr/include/nss,g" \
-e "s,%NSPR_VERSION%,${_nsprver},g" \
-e "s,%NSS_VERSION%,${pkgver},g" \
> "$pkgdir/usr/lib32/pkgconfig/nss.pc"
-e "s,%NSPR_VERSION%,$_nsprver,g" \
-e "s,%NSS_VERSION%,$pkgver,g" |
install -Dm644 /dev/stdin "$pkgdir/usr/lib32/pkgconfig/nss.pc"
ln -s nss.pc "$pkgdir/usr/lib32/pkgconfig/mozilla-nss.pc"
cd "${srcdir}"/${_pkgbasename}-${pkgver}/dist/*.OBJ/lib
install -t "$pkgdir/usr/lib32" *.so
install -t "$pkgdir/usr/lib32" -m644 libcrmf.a *.chk
rm "$pkgdir/usr/lib32/libnssckbi.so"
ln -s pkcs11/p11-kit-trust.so "$pkgdir/usr/lib32/libnssckbi.so"
cd dist/Release/lib
install -Dt "$pkgdir/usr/lib32" *.so
install -Dt "$pkgdir/usr/lib32" -m644 *.chk
# Replace built-in trust with p11-kit connection
ln -sf libnssckbi-p11-kit.so "$pkgdir/usr/lib32/libnssckbi.so"
}
diff --git i/security/nss/lib/freebl/mpi/mpi_x86.s w/security/nss/lib/freebl/mpi/mpi_x86.s
index 8f7e2130c3264754..b3ca1ce5b41b3771 100644
--- i/security/nss/lib/freebl/mpi/mpi_x86.s
+++ w/security/nss/lib/freebl/mpi/mpi_x86.s
@@ -22,22 +22,41 @@ is_sse: .long -1
#
.ifndef NO_PIC
.macro GET var,reg
- movl \var@GOTOFF(%ebx),\reg
+ call thunk.ax
+ addl $_GLOBAL_OFFSET_TABLE_, %eax
+ movl \var@GOTOFF(%eax),\reg
.endm
.macro PUT reg,var
- movl \reg,\var@GOTOFF(%ebx)
+ call thunk.dx
+ addl $_GLOBAL_OFFSET_TABLE_, %edx
+ movl \reg,\var@GOTOFF(%edx)
.endm
.else
.macro GET var,reg
movl \var,\reg
.endm
.macro PUT reg,var
movl \reg,\var
.endm
.endif
.text
+.ifndef NO_PIC
+.globl thunk.ax
+.hidden thunk.ax
+.type thunk.ax, @function
+thunk.ax:
+ movl (%esp),%eax
+ ret
+
+.globl thunk.dx
+.hidden thunk.dx
+.type thunk.dx, @function
+thunk.dx:
+ movl (%esp),%edx
+ ret
+.endif
# ebp - 36: caller's esi
# ebp - 32: caller's edi
prefix=%prefix%
exec_prefix=%exec_prefix%
libdir=%libdir%
includedir=%includedir%
Name: NSS
Description: Network Security Services
Version: %NSS_VERSION%
Requires: nspr >= %NSPR_VERSION%
Libs: -lssl3 -lsmime3 -lnss3 -lnssutil3
Cflags: -I${includedir}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment