From b187490e691d6abdbfdf847b2e9a0d48b9f1b711 Mon Sep 17 00:00:00 2001 From: Kacper Kasper Date: Sat, 11 Aug 2018 01:25:06 +0200 Subject: [PATCH] nss: bump version --- dev-libs/nss/nss-3.38.recipe | 186 ++++++++++++++++++++++ dev-libs/nss/patches/nss-3.38.patchset | 208 +++++++++++++++++++++++++ 2 files changed, 394 insertions(+) create mode 100644 dev-libs/nss/nss-3.38.recipe create mode 100644 dev-libs/nss/patches/nss-3.38.patchset diff --git a/dev-libs/nss/nss-3.38.recipe b/dev-libs/nss/nss-3.38.recipe new file mode 100644 index 000000000..a8292162d --- /dev/null +++ b/dev-libs/nss/nss-3.38.recipe @@ -0,0 +1,186 @@ +SUMMARY="Mozilla's library that implements PKI support" +DESCRIPTION="Network Security Services (NSS) is a set of libraries designed \ +to support cross-platform development of security-enabled client and server \ +applications. Applications built with NSS can support SSL v2 and v3, TLS, \ +PKCS #5, PKCS #7, PKCS #11, PKCS #12, S/MIME, X.509 v3 certificates, and \ +other security standards." +HOMEPAGE="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS" +COPYRIGHT="Mozilla Foundation" +LICENSE=" + GNU GPL v2 + GNU LGPL v2.1 + MPL v2.0 + " +REVISION="1" +NSS_VERSION=`echo $portVersion | sed 's/\./_/g'` +SOURCE_URI="https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_${NSS_VERSION}_RTM/src/nss-$portVersion.tar.gz" +CHECKSUM_SHA256="2c643d3c08d6935f4d325f40743719b6990aa25a79ec2f8f712c99d086672f62" +SOURCE_DIR="nss-$portVersion/nss" +PATCHES="nss-$portVersion.patchset" + +ARCHITECTURES="!x86_gcc2 x86 x86_64" +SECONDARY_ARCHITECTURES="x86" + +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 + lib:libnspr4${secondaryArchSuffix} >= 4.12 + lib:libsqlite3$secondaryArchSuffix + lib:libz${secondaryArchSuffix} + " + +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 + devel:libnspr4${secondaryArchSuffix} + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libnspr4${secondaryArchSuffix} >= 4.12 + devel:libsqlite3$secondaryArchSuffix + devel:libz${secondaryArchSuffix} + " +BUILD_PREREQUIRES=" + cmd:autoconf + cmd:gcc$secondaryArchSuffix + cmd:ld$secondaryArchSuffix + cmd:make + cmd:awk + cmd:pkg_config$secondaryArchSuffix + " + +BUILD() +{ + # 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 NSDISTMODE=copy + 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}" + make -j1 -C ${d} + done +} + +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 + + mkdir -p $developLibDir/pkgconfig + cat > $developLibDir/pkgconfig/nss.pc << EOF +prefix=${prefix} +exec_prefix=${prefix} +libdir=${libDir} +includedir=${includeDir} + +Name: NSS +Description: Network Security Services +Version: $portVersion +Requires: nspr +Libs: -L${developLibDir} -lssl3 -lsmime3 -lnss3 -lnssutil3 +Cflags: -I${includeDir}/nss +EOF + + # devel package + packageEntries devel \ + $developDir + + rm $libDir/*.a +} + +TEST() +{ + echo TODO + # TODO +} diff --git a/dev-libs/nss/patches/nss-3.38.patchset b/dev-libs/nss/patches/nss-3.38.patchset new file mode 100644 index 000000000..175124a17 --- /dev/null +++ b/dev-libs/nss/patches/nss-3.38.patchset @@ -0,0 +1,208 @@ +From 0bcab86e8052741075e7784b16365d858c4cef26 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/coreconf/BeOS.mk b/coreconf/BeOS.mk +index 750696d..b53cfea 100644 +--- 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) + +-USE_PTHREADS = ++USE_PTHREADS = 1 + + ifeq ($(USE_PTHREADS),1) + IMPL_STRATEGY = _PTH +@@ -27,7 +27,7 @@ else + CPU_ARCH = x86 + endif + +-MKSHLIB = $(CC) -nostart -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so) ++MKSHLIB = $(CC) -shared -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so) + ifdef BUILD_OPT + OPTIMIZER = -O2 + endif +diff --git a/coreconf/arch.mk b/coreconf/arch.mk +index 79e56d5..0c9ccd3 100644 +--- a/coreconf/arch.mk ++++ b/coreconf/arch.mk +@@ -33,6 +33,14 @@ else + OS_RELEASE := $(shell uname -r) + endif + ++# ++# Force the Haiku machines to use BeOS. ++# ++ ++ifeq ($(OS_ARCH),Haiku) ++ OS_ARCH = BeOS ++endif ++ + # + # Force the IRIX64 machines to use IRIX. + # +diff --git a/lib/dbm/include/mcom_db.h b/lib/dbm/include/mcom_db.h +index 0a4f6dc..09a6061 100644 +--- a/lib/dbm/include/mcom_db.h ++++ b/lib/dbm/include/mcom_db.h +@@ -60,7 +60,7 @@ typedef PRUint32 uint32; + #include + #endif + +-#if defined(__linux) || defined(__BEOS__) ++#if defined(__linux) || defined(BEOS) + #include + #ifndef BYTE_ORDER + #define BYTE_ORDER __BYTE_ORDER +-- +2.16.4 + + +From 20db9826bcbab8c25dbc144b26baef45c2e0a38a 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 c42f694..edee40a 100644 +--- a/lib/freebl/stubs.c ++++ b/lib/freebl/stubs.c +@@ -718,6 +718,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 + */ +-- +2.16.4 + + +From 40ae2f60e37810645e7333854fd3de2bc1e559fc 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 +-- +2.16.4 + + +From c69a04ef7c7cc2c26164ed9093b39fdd97053dce 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 +-- +2.16.4 + + +From 3043ae22ed9abd78879e04210254d776577f4566 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Tue, 24 Nov 2015 19:12:08 +0000 +Subject: avoid some tests. + + +diff --git a/coreconf/BeOS.mk b/coreconf/BeOS.mk +index fe54580..3bc0ce3 100644 +--- a/coreconf/BeOS.mk ++++ b/coreconf/BeOS.mk +@@ -50,3 +50,4 @@ SKIP_SHLIBSIGN=1 + USE_SYSTEM_ZLIB = 1 + ZLIB_LIBS = -lz + NSS_USE_SYSTEM_SQLITE=1 ++NSS_DISABLE_GTESTS=1 +-- +2.16.4 + + +From c9c72fae93c067ab69f40dc4d4c268ae16ce75ef Mon Sep 17 00:00:00 2001 +From: Kacper Kasper +Date: Fri, 27 Apr 2018 21:38:56 +0200 +Subject: Enable -Bsymbolic for BeOS target + +* Fixes infinite loop in RNG_RNGInit. + +diff --git a/lib/freebl/Makefile b/lib/freebl/Makefile +index bff11c7..0c4272f 100644 +--- a/lib/freebl/Makefile ++++ b/lib/freebl/Makefile +@@ -298,7 +298,7 @@ endif + # to bind the blapi function references in FREEBLVector vector + # (ldvector.c) to the blapi functions defined in the freebl + # shared libraries. +-ifeq (,$(filter-out BSD_OS FreeBSD Linux NetBSD OpenBSD, $(OS_TARGET))) ++ifeq (,$(filter-out BSD_OS FreeBSD Linux NetBSD OpenBSD BeOS, $(OS_TARGET))) + MKSHLIB += -Wl,-Bsymbolic + endif + +-- +2.16.4 + + +From def6789653860642ac817f0d86b0a96f152b58b2 Mon Sep 17 00:00:00 2001 +From: Kacper Kasper +Date: Sat, 11 Aug 2018 00:46:36 +0200 +Subject: Define XP_HAIKU + +* Fixes build error caused by BeOS defines in NSPR header. + +diff --git a/coreconf/BeOS.mk b/coreconf/BeOS.mk +index 3bc0ce3..d25df28 100644 +--- a/coreconf/BeOS.mk ++++ b/coreconf/BeOS.mk +@@ -5,7 +5,7 @@ + + include $(CORE_DEPTH)/coreconf/UNIX.mk + +-XP_DEFINE := $(XP_DEFINE:-DXP_UNIX=-DXP_BEOS) ++XP_DEFINE := $(XP_DEFINE:-DXP_UNIX=-DXP_BEOS -DXP_HAIKU) + + USE_PTHREADS = 1 + +-- +2.16.4 +