From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 6911D1385E4 for ; Tue, 22 Jan 2013 04:47:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CA733E05BE; Tue, 22 Jan 2013 04:47:33 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 45373E05BE for ; Tue, 22 Jan 2013 04:47:33 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B30AE33D3D5 for ; Tue, 22 Jan 2013 04:47:31 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 343B5E4073 for ; Tue, 22 Jan 2013 04:47:29 +0000 (UTC) From: "Lars Wendler" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Lars Wendler" Message-ID: <1358830024.03a39ba6bdfda3058e45998df0f20be831da98a8.polynomial-c@gentoo> Subject: [gentoo-commits] proj/mozilla:master commit in: dev-libs/nss/ X-VCS-Repository: proj/mozilla X-VCS-Files: dev-libs/nss/Manifest dev-libs/nss/nss-3.14.1.ebuild X-VCS-Directories: dev-libs/nss/ X-VCS-Committer: polynomial-c X-VCS-Committer-Name: Lars Wendler X-VCS-Revision: 03a39ba6bdfda3058e45998df0f20be831da98a8 X-VCS-Branch: master Date: Tue, 22 Jan 2013 04:47:29 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 4f528b0f-3bf2-4b37-9ae4-7e208ef9d8f0 X-Archives-Hash: 8bc28805f6089e5ece9767f4ee85c7c0 commit: 03a39ba6bdfda3058e45998df0f20be831da98a8 Author: Lars Wendler gentoo org> AuthorDate: Tue Jan 22 04:47:04 2013 +0000 Commit: Lars Wendler gentoo 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() {