From: "Lars Wendler" <polynomial-c@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/mozilla:master commit in: dev-libs/nss/
Date: Tue, 22 Jan 2013 04:47:29 +0000 (UTC) [thread overview]
Message-ID: <1358830024.03a39ba6bdfda3058e45998df0f20be831da98a8.polynomial-c@gentoo> (raw)
commit: 03a39ba6bdfda3058e45998df0f20be831da98a8
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 22 04:47:04 2013 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue Jan 22 04:47:04 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mozilla.git;a=commit;h=03a39ba6
Sync dev-libs/nss with the one from portage.
---
dev-libs/nss/Manifest | 2 +-
dev-libs/nss/nss-3.14.1.ebuild | 105 +++++++++++++++++++++++++++++++---------
2 files changed, 83 insertions(+), 24 deletions(-)
diff --git a/dev-libs/nss/Manifest b/dev-libs/nss/Manifest
index 0028e1f..f0bbb54 100644
--- a/dev-libs/nss/Manifest
+++ b/dev-libs/nss/Manifest
@@ -5,4 +5,4 @@ AUX nss-3.14.1-gentoo-fixups.patch 6405 SHA256 f0e6348d757fa1a0840b2fdae7ca53dbf
DIST nss-3.13.3_pem.support 191571 SHA256 cb6cf7955203514b3c1210c9b32504b0d2f1c158fa9b5d2509ef0bb34b68374c SHA512 223026adbacf2f325f808210cc050f95cb65cb0fe8c6022109a42bd991fd576e2e96beb5ec8e185dbbd649f4bd4516bc0f7fc10401f47eda806ab2d63f0c23a3 WHIRLPOOL 78345665e54fe67f57bc09311567ad525f9a8dae7d17e600a9639fac820fcf9c64e9f4bacc5df3f90b90a224e374ac44e938962c5248189fe76dad7143bf3476
DIST nss-3.14.1-add_spi+cacerts_ca_certs.patch 25018 SHA256 82ca25982828fd7153ad15fc6e81408c115476eeeb4045d3a71469380b56824b SHA512 2aafbd972b073061bfd66a66a4b50060691957f2910f716f7a69d22d655c499f186f05db2101bea5248a00949f339327ba8bfffec024c61c8ee908766201ae00 WHIRLPOOL c9fe397e316dac7983b187acf7227078ebd8f8da5df53f77f2564489e85f123c4d2afb88d56e8dc14b9ebfffe8a71ade4724b3c1ea683c5c4c487cb3a64eda43
DIST nss-3.14.1.tar.gz 5814063 SHA256 80a5d4872da13d0272636ad04e1beddcf8d4572bcc0d47dbea1d12fb592fb7e5 SHA512 f62a7ebcdade8815379f80929c63de1284c3ca3f5c87214cb5b327f6689635118d301969d4ef0e1940c7a426253b13ce54acd68a91abc23ab32626341217580e WHIRLPOOL 8b292433ec764cfe857bd7cb25c216905b785c536176ece14571c9e7017a93c7a8562502645d71eed7da9f5cc52c65564c294a8a2b75ea43bda19049d6c393bb
-EBUILD nss-3.14.1.ebuild 6931 SHA256 0ea2664740d7509fd1bbd04aff3dbf26ce152eb0fb1d2999a57ddfdbb3166778 SHA512 693082b33dc5b65cfea2cd5f69421116e544cab2a57ea8be7542777847b253d693c33b02d646058390b94629ef172a6baef73bc5b06a2585f7232eb69a2d2bee WHIRLPOOL ea136b974e4e5486730afdd1b0a05c52d0db82ae7d1f068914659cd79c9704a02b34703d2d42c2e51f190b5ee5ce94707f43c783787808e672841fe21668c759
+EBUILD nss-3.14.1.ebuild 8033 SHA256 89c058fdef433cbbd13d2a30c0d0fea6be19acbd7e0a0aefa334abafbeebd2cd SHA512 affde3740a81cbf01d0ab8ab72fc1a704eeba2cd86fc3d0c88619479690627b1fe4dc53d7176bd0f6e1af9fcbf056ca5871dd556c8b959bd1143de76c009563c WHIRLPOOL abc5b055ad6ec3e8fc5b35b42945fe45ab88732a392b731184bfc68a152640bb3d865b14b5fa0f704a0a2016f2de75fabb982c0e121d9643ed9c9a378a0b9067
diff --git a/dev-libs/nss/nss-3.14.1.ebuild b/dev-libs/nss/nss-3.14.1.ebuild
index d94d275..bdc1f66 100644
--- a/dev-libs/nss/nss-3.14.1.ebuild
+++ b/dev-libs/nss/nss-3.14.1.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/nss/nss-3.13.5.ebuild,v 1.4 2012/06/19 05:06:28 nativemad Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/nss/nss-3.14.1.ebuild,v 1.9 2013/01/21 18:39:38 vapier Exp $
EAPI=3
inherit eutils flag-o-matic multilib toolchain-funcs
@@ -14,9 +14,9 @@ SRC_URI="ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/${RTM_NAME}
http://dev.gentoo.org/~anarchy/patches/${PN}-3.14.1-add_spi+cacerts_ca_certs.patch
http://dev.gentoo.org/~anarchy/patches/${PN}-3.13.3_pem.support"
-LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
+LICENSE="|| ( MPL-2.0 GPL-2 LGPL-2.1 )"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
IUSE="utils"
DEPEND="virtual/pkgconfig
@@ -40,7 +40,7 @@ src_prepare() {
cd "${S}"/mozilla/security/coreconf || die
# hack nspr paths
- echo 'INCLUDES += -I'"${EPREFIX}"'/usr/include/nspr -I$(DIST)/include/dbm' \
+ echo 'INCLUDES += -I$(DIST)/include/dbm' \
>> headers.mk || die "failed to append include"
# modify install path
@@ -59,6 +59,13 @@ src_prepare() {
epatch "${FILESDIR}/nss-3.13.1-solaris-gcc.patch"
+ # use host shlibsign if need be #436216
+ if tc-is-cross-compiler ; then
+ sed -i \
+ -e 's:"${2}"/shlibsign:shlibsign:' \
+ "${S}"/mozilla/security/nss/cmd/shlibsign/sign.sh || die
+ fi
+
# dirty hack
cd "${S}"/mozilla/security/nss || die
sed -i -e "/CRYPTOLIB/s:\$(SOFTOKEN_LIB_DIR):../freebl/\$(OBJDIR):" \
@@ -67,34 +74,78 @@ src_prepare() {
cmd/platlibs.mk || die
}
-src_compile() {
- strip-flags
+nssarch() {
+ # Most of the arches are the same as $ARCH
+ local t=${1:-${CHOST}}
+ case ${t} in
+ hppa*) echo "parisc";;
+ i?86*) echo "i686";;
+ x86_64*) echo "x86_64";;
+ *) tc-arch ${t};;
+ esac
+}
+nssbits() {
echo > "${T}"/test.c || die
- $(tc-getCC) ${CFLAGS} -c "${T}"/test.c -o "${T}"/test.o || die
+ ${!1} ${CPPFLAGS} ${CFLAGS} -c "${T}"/test.c -o "${T}"/test.o || die
case $(file "${T}"/test.o) in
- *32-bit*x86-64*) export USE_x32=1;;
- *64-bit*|*ppc64*|*x86_64*) export USE_64=1;;
+ *32-bit*x86-64*) echo USE_x32=1;;
+ *64-bit*|*ppc64*|*x86_64*) echo USE_64=1;;
*32-bit*|*ppc*|*i386*) ;;
*) die "Failed to detect whether your arch is 64bits or 32bits, disable distcc if you're using it, please";;
esac
+}
+
+src_compile() {
+ strip-flags
+
+ tc-export AR RANLIB {BUILD_,}{CC,PKG_CONFIG}
+ local makeargs=(
+ CC="${CC}"
+ AR="${AR} rc \$@"
+ RANLIB="${RANLIB}"
+ OPTIMIZER=
+ $(nssbits CC)
+ )
+
+ # Take care of nspr settings #436216
+ append-cppflags $(${PKG_CONFIG} nspr --cflags)
+ append-ldflags $(${PKG_CONFIG} nspr --libs-only-L)
+ unset NSPR_INCLUDE_DIR
+ export NSPR_LIB_DIR=${T}/fake-dir
+
+ # Do not let `uname` be used.
+ if use kernel_linux ; then
+ makeargs+=(
+ OS_TARGET=Linux
+ OS_RELEASE=2.6
+ OS_TEST="$(nssarch)"
+ )
+ fi
- export NSPR_INCLUDE_DIR=`nspr-config --includedir`
- export NSPR_LIB_DIR=`nspr-config --libdir`
export BUILD_OPT=1
export NSS_USE_SYSTEM_SQLITE=1
export NSDISTMODE=copy
export NSS_ENABLE_ECC=1
- export XCFLAGS="${CFLAGS}"
+ export XCFLAGS="${CFLAGS} ${CPPFLAGS}"
export FREEBL_NO_DEPEND=1
export ASFLAGS=""
- cd "${S}"/mozilla/security/coreconf || die
- emake -j1 CC="$(tc-getCC)" || die "coreconf make failed"
- cd "${S}"/mozilla/security/dbm || die
- emake -j1 CC="$(tc-getCC)" || die "dbm make failed"
- cd "${S}"/mozilla/security/nss || die
- emake -j1 CC="$(tc-getCC)" || die "nss make failed"
+ local d
+
+ # Build the host tools first.
+ LDFLAGS="${BUILD_LDFLAGS}" \
+ XCFLAGS="${BUILD_CFLAGS}" \
+ emake -j1 -C mozilla/security/coreconf \
+ CC="${BUILD_CC}" \
+ $(nssbits BUILD_CC) \
+ || die
+ makeargs+=( NSINSTALL="${PWD}/$(find -type f -name nsinstall)" )
+
+ # Then build the target tools.
+ for d in dbm nss ; do
+ emake -j1 "${makeargs[@]}" -C mozilla/security/${d} || die "${d} make failed"
+ done
}
# Altering these 3 libraries breaks the CHK verification.
@@ -118,6 +169,7 @@ generate_chk() {
local libdir="$2"
einfo "Resigning core NSS libraries for FIPS validation"
shift 2
+ local i
for i in ${NSS_CHK_SIGN_LIBS} ; do
local libname=lib${i}.so
local chkname=lib${i}.chk
@@ -134,6 +186,7 @@ generate_chk() {
cleanup_chk() {
local libdir="$1"
shift 1
+ local i
for i in ${NSS_CHK_SIGN_LIBS} ; do
local libfname="${libdir}/lib${i}.so"
# If the major version has changed, then we have old chk files.
@@ -162,7 +215,7 @@ src_install () {
insinto /usr/include/nss
doins public/nss/*.h || die
cd "${ED}"/usr/$(get_libdir) || die
- local n=
+ local n file
for file in *$(get_libname); do
n=${file%$(get_libname)}$(get_libname ${MINOR_VERSION})
mv ${file} ${n} || die
@@ -172,7 +225,7 @@ src_install () {
fi
done
- local nssutils
+ local f nssutils
# Always enabled because we need it for chk generation.
nssutils="shlibsign"
if use utils; then
@@ -192,7 +245,7 @@ src_install () {
# Prelink breaks the CHK files. We don't have any reliable way to run
# shlibsign after prelink.
- declare -a libs
+ local l libs=()
for l in ${NSS_CHK_SIGN_LIBS} ; do
libs+=("${EPREFIX}/usr/$(get_libdir)/lib${l}.so")
done
@@ -204,7 +257,13 @@ src_install () {
pkg_postinst() {
# We must re-sign the libraries AFTER they are stripped.
- generate_chk "${EROOT}"/usr/bin/shlibsign "${EROOT}"/usr/$(get_libdir)
+ local shlibsign="${EROOT}/usr/bin/shlibsign"
+ # See if we can execute it (cross-compiling & such). #436216
+ "${shlibsign}" -h >&/dev/null
+ if [[ $? -gt 1 ]] ; then
+ shlibsign="shlibsign"
+ fi
+ generate_chk "${shlibsign}" "${EROOT}"/usr/$(get_libdir)
}
pkg_postrm() {
next reply other threads:[~2013-01-22 4:47 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-22 4:47 Lars Wendler [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-04-20 9:01 [gentoo-commits] proj/mozilla:master commit in: dev-libs/nss/ Lars Wendler
2020-04-20 7:49 Lars Wendler
2020-04-10 11:14 Lars Wendler
2020-03-07 15:17 Jory Pratt
2020-02-10 17:46 Jory Pratt
2020-02-08 15:17 Jory Pratt
2020-01-15 10:36 Lars Wendler
2020-01-07 20:46 Jory Pratt
2019-12-16 3:11 Jory Pratt
2019-12-06 5:44 Jory Pratt
2019-11-22 9:10 Lars Wendler
2019-10-06 11:15 Lars Wendler
2019-08-31 15:39 Jory Pratt
2019-08-23 20:23 Jory Pratt
2019-07-10 8:24 Lars Wendler
2019-06-25 8:03 Lars Wendler
2019-05-17 1:55 Jory Pratt
2019-05-13 12:03 Lars Wendler
2019-04-27 22:22 Jory Pratt
2019-04-27 22:07 Jory Pratt
2019-03-31 19:43 Jory Pratt
2018-06-06 16:03 Jory Pratt
2018-05-22 8:33 Lars Wendler
2018-03-21 7:49 Lars Wendler
2018-03-07 13:00 Lars Wendler
2018-01-20 10:06 Lars Wendler
2017-09-21 22:28 Lars Wendler
2017-09-17 18:46 Jory Pratt
2017-06-12 13:36 Jory Pratt
2017-02-08 0:34 Jory Pratt
2016-07-09 3:25 Ian Stakenvicius
2016-02-16 7:28 Lars Wendler
2015-11-15 18:58 Jory Pratt
2014-06-14 5:19 Ian Stakenvicius
2014-06-14 4:50 Ian Stakenvicius
2014-03-31 18:21 Jory Pratt
2013-12-11 14:03 Jory Pratt
2013-11-14 11:50 Lars Wendler
2013-09-27 1:16 Jory Pratt
2013-08-11 21:34 Jory Pratt
2012-09-01 13:46 Jory Pratt
2012-06-11 20:14 Jory Pratt
2012-04-09 0:36 Jory Pratt
2012-03-25 3:37 Jory Pratt
2012-02-27 15:50 Jory Pratt
2012-01-11 5:04 Jory Pratt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1358830024.03a39ba6bdfda3058e45998df0f20be831da98a8.polynomial-c@gentoo \
--to=polynomial-c@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox