diff --git a/dev-libs/nss/nss-3.16.3.recipe b/dev-libs/nss/nss-3.16.3.recipe index 5866b4cd5..a23f6e12f 100644 --- a/dev-libs/nss/nss-3.16.3.recipe +++ b/dev-libs/nss/nss-3.16.3.recipe @@ -13,30 +13,102 @@ MPL v2.0 " COPYRIGHT="Mozilla Foundation" HOMEPAGE="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS" -SRC_URI="ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_16_3_RTM/src/nss-$portVersion.tar.gz" +NSS_VERSION=`echo $portVersion | sed 's/\./_/g'` +SRC_URI="https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_${NSS_VERSION}_RTM/src/nss-$portVersion.tar.gz" CHECKSUM_SHA256="657711ff7a4058043b69019a66f44101d0234eae2b6b80ab900439dbf02add60" REVISION="1" -ARCHITECTURES="!x86_gcc2 !x86 !x86_64" -SECONDARY_ARCHITECTURES="!x86 !x86_gcc2" -#SOURCE_DIR="nss-$portVersion/nss" +ARCHITECTURES="x86 x86_64" +if [ $effectiveTargetArchitecture != x86_gcc2 ]; then + # x86_gcc2 is fine as primary target architecture as long as we're building + # for a different secondary architecture. + ARCHITECTURES="$ARCHITECTURES x86_gcc2" +fi +SECONDARY_ARCHITECTURES="x86" +SOURCE_DIR="nss-$portVersion/nss" PROVIDES=" nss$secondaryArchSuffix = $portVersion compat >= 3 + cmd:addbuiltin$secondaryArchSuffix = $portVersion compat >= 3 + cmd:atob$secondaryArchSuffix = $portVersion compat >= 3 + cmd:baddbdir$secondaryArchSuffix = $portVersion compat >= 3 + cmd:bltest$secondaryArchSuffix = $portVersion compat >= 3 + cmd:btoa$secondaryArchSuffix = $portVersion compat >= 3 + cmd:certcgi$secondaryArchSuffix = $portVersion compat >= 3 + cmd:certutil$secondaryArchSuffix = $portVersion compat >= 3 + cmd:checkcert$secondaryArchSuffix = $portVersion compat >= 3 + cmd:chktest$secondaryArchSuffix = $portVersion compat >= 3 + cmd:cmsutil$secondaryArchSuffix = $portVersion compat >= 3 + cmd:conflict$secondaryArchSuffix = $portVersion compat >= 3 + cmd:crlutil$secondaryArchSuffix = $portVersion compat >= 3 + cmd:crmftest$secondaryArchSuffix = $portVersion compat >= 3 + cmd:dbtest$secondaryArchSuffix = $portVersion compat >= 3 + cmd:derdump$secondaryArchSuffix = $portVersion compat >= 3 + cmd:dertimetest$secondaryArchSuffix = $portVersion compat >= 3 + cmd:digest$secondaryArchSuffix = $portVersion compat >= 3 + cmd:encodeinttest$secondaryArchSuffix = $portVersion compat >= 3 + cmd:fipstest$secondaryArchSuffix = $portVersion compat >= 3 + cmd:httpserv$secondaryArchSuffix = $portVersion compat >= 3 + cmd:listsuites$secondaryArchSuffix = $portVersion compat >= 3 + cmd:makepqg$secondaryArchSuffix = $portVersion compat >= 3 + cmd:mangle$secondaryArchSuffix = $portVersion compat >= 3 + cmd:modutil$secondaryArchSuffix = $portVersion compat >= 3 + cmd:multinit$secondaryArchSuffix = $portVersion compat >= 3 + cmd:nonspr10$secondaryArchSuffix = $portVersion compat >= 3 + cmd:ocspclnt$secondaryArchSuffix = $portVersion compat >= 3 + cmd:ocspresp$secondaryArchSuffix = $portVersion compat >= 3 + cmd:oidcalc$secondaryArchSuffix = $portVersion compat >= 3 + cmd:p7content$secondaryArchSuffix = $portVersion compat >= 3 + cmd:p7env$secondaryArchSuffix = $portVersion compat >= 3 + cmd:p7sign$secondaryArchSuffix = $portVersion compat >= 3 + cmd:p7verify$secondaryArchSuffix = $portVersion compat >= 3 + cmd:pk11gcmtest$secondaryArchSuffix = $portVersion compat >= 3 + cmd:pk11mode$secondaryArchSuffix = $portVersion compat >= 3 + cmd:pk12util$secondaryArchSuffix = $portVersion compat >= 3 + cmd:pk1sign$secondaryArchSuffix = $portVersion compat >= 3 + cmd:pkix_errcodes$secondaryArchSuffix = $portVersion compat >= 3 + cmd:pp$secondaryArchSuffix = $portVersion compat >= 3 + cmd:pwdecrypt$secondaryArchSuffix = $portVersion compat >= 3 + cmd:remtest$secondaryArchSuffix = $portVersion compat >= 3 + cmd:rsaperf$secondaryArchSuffix = $portVersion compat >= 3 + cmd:sdrtest$secondaryArchSuffix = $portVersion compat >= 3 + cmd:secmodtest$secondaryArchSuffix = $portVersion compat >= 3 + cmd:selfserv$secondaryArchSuffix = $portVersion compat >= 3 + cmd:shlibsign$secondaryArchSuffix = $portVersion compat >= 3 + cmd:signtool$secondaryArchSuffix = $portVersion compat >= 3 + cmd:signver$secondaryArchSuffix = $portVersion compat >= 3 + cmd:ssltap$secondaryArchSuffix = $portVersion compat >= 3 + cmd:strsclnt$secondaryArchSuffix = $portVersion compat >= 3 + cmd:symkeyutil$secondaryArchSuffix = $portVersion compat >= 3 + cmd:tstclnt$secondaryArchSuffix = $portVersion compat >= 3 + cmd:vfychain$secondaryArchSuffix = $portVersion compat >= 3 + cmd:vfyserv$secondaryArchSuffix = $portVersion compat >= 3 + lib:libfreebl3${secondaryArchSuffix} = $portVersion compat >= 3 + lib:libnss3${secondaryArchSuffix} = $portVersion compat >= 3 + lib:libnssckbi${secondaryArchSuffix} = $portVersion compat >= 3 + lib:libnssdbm3${secondaryArchSuffix} = $portVersion compat >= 3 + lib:libnssutil3${secondaryArchSuffix} = $portVersion compat >= 3 + lib:libsmime3${secondaryArchSuffix} = $portVersion compat >= 3 + lib:libsoftokn3${secondaryArchSuffix} = $portVersion compat >= 3 + lib:libssl3${secondaryArchSuffix} = $portVersion compat >= 3 " REQUIRES=" haiku$secondaryArchSuffix >= $haikuVersion + lib:libnspr4${secondaryArchSuffix} >= 4 + lib:libsqlite3$secondaryArchSuffix + lib:libz${secondaryArchSuffix} " BUILD_REQUIRES=" - nspr${secondaryArchSuffix}_devel >= 4 + haiku${secondaryArchSuffix}_devel >= $haikuVersion + devel:libnspr4${secondaryArchSuffix} >= 4 + devel:libsqlite3$secondaryArchSuffix + devel:libz${secondaryArchSuffix} " BUILD_PREREQUIRES=" - haiku${secondaryArchSuffix}_devel >= $haikuVersion cmd:autoconf cmd:gcc$secondaryArchSuffix cmd:ld$secondaryArchSuffix cmd:make cmd:awk - cmd:perl cmd:pkg_config$secondaryArchSuffix " @@ -44,19 +116,17 @@ PATCHES="nss-$portVersion.patchset" BUILD() { - # FIXME: SOURCE_DIR="nss-$portVersion/nss" doesn't work - cd nss - # FIXME: $secondaryArchSuffix is wrong here (_arch). What should be used? myCPPFLAGS="${CPPFLAGS} `pkg-config nspr --cflags`" myLDFLAGS="${LDFLAGS} `pkg-config nspr --libs-only-L`" export BUILD_OPT=1 - #export NSS_USE_SYSTEM_SQLITE=1 export NSDISTMODE=copy - #export FREEBL_NO_DEPEND=1 + export FREEBL_NO_DEPEND=1 export ASFLAGS="" - + if [ $effectiveTargetArchitecture == 'x86_64' ]; then + export USE_64=1 + fi for d in . lib/dbm ; do CPPFLAGS="${myCPPFLAGS}" LDFLAGS="${myLDFLAGS}" @@ -66,13 +136,28 @@ BUILD() INSTALL() { - cd nss - make install + # files are in /sources/dist + mkdir -p $includeDir $binDir + mkdir -p $(dirname $libDir) + mv ../dist/*/bin/* $binDir + mv ../dist/*/lib $libDir + mv ../dist/public/nss $includeDir + + # set up the develop directory correctly + prepareInstalledDevelLibs libnss3 libfreebl3 libnssckbi libnssdbm3 \ + libnssutil3 libsmime3 libsoftokn3 libssl3 + fixPkgconfig + + # devel package + packageEntries devel \ + $developDir + + rm $libDir/*.a } TEST() { - cd nss + echo TODO # TODO } @@ -80,6 +165,14 @@ TEST() PROVIDES_devel=" nss${secondaryArchSuffix}_devel = $portVersion compat >= 3 + devel:libfreebl3${secondaryArchSuffix} = $portVersion compat >= 3 + devel:libnss3${secondaryArchSuffix} = $portVersion compat >= 3 + devel:libnssckbi${secondaryArchSuffix} = $portVersion compat >= 3 + devel:libnssdbm3${secondaryArchSuffix} = $portVersion compat >= 3 + devel:libnssutil3${secondaryArchSuffix} = $portVersion compat >= 3 + devel:libsmime3${secondaryArchSuffix} = $portVersion compat >= 3 + devel:libsoftokn3${secondaryArchSuffix} = $portVersion compat >= 3 + devel:libssl3${secondaryArchSuffix} = $portVersion compat >= 3 " REQUIRES_devel=" nss${secondaryArchSuffix} == $portVersion base diff --git a/dev-libs/nss/patches/nss-3.16.3.patchset b/dev-libs/nss/patches/nss-3.16.3.patchset index b793f8e9c..d99cd24fe 100644 --- a/dev-libs/nss/patches/nss-3.16.3.patchset +++ b/dev-libs/nss/patches/nss-3.16.3.patchset @@ -1,13 +1,13 @@ -From 4d386b384810ea29ed942212085181dc7d188026 Mon Sep 17 00:00:00 2001 +From be5d83aa3c8725caa18a940fcb5f72bc6ca20bcd Mon Sep 17 00:00:00 2001 From: Kacper Kasper Date: Sat, 5 Jul 2014 02:12:23 +0200 Subject: Haiku support -diff --git a/nss/coreconf/BeOS.mk b/nss/coreconf/BeOS.mk +diff --git a/coreconf/BeOS.mk b/coreconf/BeOS.mk index 750696d..b53cfea 100644 ---- a/nss/coreconf/BeOS.mk -+++ b/nss/coreconf/BeOS.mk +--- a/coreconf/BeOS.mk ++++ b/coreconf/BeOS.mk @@ -7,7 +7,7 @@ include $(CORE_DEPTH)/coreconf/UNIX.mk XP_DEFINE := $(XP_DEFINE:-DXP_UNIX=-DXP_BEOS) @@ -26,10 +26,10 @@ index 750696d..b53cfea 100644 ifdef BUILD_OPT OPTIMIZER = -O2 endif -diff --git a/nss/coreconf/arch.mk b/nss/coreconf/arch.mk +diff --git a/coreconf/arch.mk b/coreconf/arch.mk index 782e6c0..669e52a 100644 ---- a/nss/coreconf/arch.mk -+++ b/nss/coreconf/arch.mk +--- a/coreconf/arch.mk ++++ b/coreconf/arch.mk @@ -41,6 +41,14 @@ else endif @@ -45,10 +45,10 @@ index 782e6c0..669e52a 100644 # Force the IRIX64 machines to use IRIX. # -diff --git a/nss/lib/dbm/include/mcom_db.h b/nss/lib/dbm/include/mcom_db.h +diff --git a/lib/dbm/include/mcom_db.h b/lib/dbm/include/mcom_db.h index f204484..5cb10ee 100644 ---- a/nss/lib/dbm/include/mcom_db.h -+++ b/nss/lib/dbm/include/mcom_db.h +--- a/lib/dbm/include/mcom_db.h ++++ b/lib/dbm/include/mcom_db.h @@ -66,7 +66,7 @@ typedef PRUint32 uint32; #include #endif @@ -61,3 +61,81 @@ index f204484..5cb10ee 100644 -- 1.8.3.4 + +From a90f08ec358c67555eced1750db584e1dfcc9381 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Thu, 25 Sep 2014 13:09:35 +0000 +Subject: define RTLD_NOLOAD + + +diff --git a/lib/freebl/stubs.c b/lib/freebl/stubs.c +index 1de9b49..08d7753 100644 +--- a/lib/freebl/stubs.c ++++ b/lib/freebl/stubs.c +@@ -594,6 +594,10 @@ freebl_InitNSSUtil(void *lib) + return SECSuccess; + } + ++#ifndef RTLD_NOLOAD ++ #define RTLD_NOLOAD 0 ++#endif ++ + /* + * fetch the library if it's loaded. For NSS it should already be loaded + */ +-- +1.8.3.4 + + +From 654a6b2ba7aabe42120b1477138bc357ddf9c98a Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Thu, 25 Sep 2014 13:40:13 +0000 +Subject: skip optionally the signing part + + +diff --git a/cmd/shlibsign/Makefile b/cmd/shlibsign/Makefile +index 83f90fa..8934439 100644 +--- a/cmd/shlibsign/Makefile ++++ b/cmd/shlibsign/Makefile +@@ -95,5 +95,7 @@ else + endif + endif + ++ifndef SKIP_SHLIBSIGN + libs install :: $(CHECKLOC) ++endif + +diff --git a/coreconf/BeOS.mk b/coreconf/BeOS.mk +index b53cfea..51fe162 100644 +--- a/coreconf/BeOS.mk ++++ b/coreconf/BeOS.mk +@@ -45,3 +45,5 @@ ARCH = beos + + DSO_CFLAGS = -fPIC + DSO_LDOPTS = ++ ++SKIP_SHLIBSIGN=1 +-- +1.8.3.4 + + +From 6ed942559c69cdfaa34a8dfe427b080e87512055 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Thu, 25 Sep 2014 14:14:26 +0000 +Subject: use system libs + + +diff --git a/coreconf/BeOS.mk b/coreconf/BeOS.mk +index 51fe162..fe54580 100644 +--- a/coreconf/BeOS.mk ++++ b/coreconf/BeOS.mk +@@ -47,3 +47,6 @@ DSO_CFLAGS = -fPIC + DSO_LDOPTS = + + SKIP_SHLIBSIGN=1 ++USE_SYSTEM_ZLIB = 1 ++ZLIB_LIBS = -lz ++NSS_USE_SYSTEM_SQLITE=1 +-- +1.8.3.4 +