diff --git a/dev-libs/nss/nss-3.73.1.recipe b/dev-libs/nss/nss-3.107.recipe similarity index 98% rename from dev-libs/nss/nss-3.73.1.recipe rename to dev-libs/nss/nss-3.107.recipe index 37f4b89f9..f2600e8dd 100644 --- a/dev-libs/nss/nss-3.73.1.recipe +++ b/dev-libs/nss/nss-3.107.recipe @@ -12,7 +12,7 @@ LICENSE="GNU GPL v2 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="c768f9fe3129e8bcc2e9679456d7edd9453a225784a8fc7dc4501806f1fe9abe" +CHECKSUM_SHA256="7f7e96473e38150771a615f5d40e8c41ba3a19385301ae0c525091f2fc9d6729" SOURCE_DIR="nss-$portVersion/nss" PATCHES="nss-$portVersion.patchset" @@ -35,6 +35,7 @@ PROVIDES=" cmd:crlutil$secondaryArchSuffix = $portVersion compat >= 3 cmd:crmftest$secondaryArchSuffix = $portVersion compat >= 3 cmd:dbtest$secondaryArchSuffix = $portVersion compat >= 3 + cmd:dbtool$secondaryArchSuffix = $portVersion compat >= 3 cmd:derdump$secondaryArchSuffix = $portVersion compat >= 3 cmd:dertimetest$secondaryArchSuffix = $portVersion compat >= 3 cmd:digest$secondaryArchSuffix = $portVersion compat >= 3 diff --git a/dev-libs/nss/patches/nss-3.107.patchset b/dev-libs/nss/patches/nss-3.107.patchset new file mode 100644 index 000000000..60017e1a8 --- /dev/null +++ b/dev-libs/nss/patches/nss-3.107.patchset @@ -0,0 +1,243 @@ +From d269d2817ae450e2863a4447007536f81777ed6a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= +Date: Mon, 25 Nov 2024 20:12:37 +0100 +Subject: Haiku support + + +diff --git a/cmd/httpserv/httpserv.c b/cmd/httpserv/httpserv.c +index 76f6ff5..1178a24 100644 +--- a/cmd/httpserv/httpserv.c ++++ b/cmd/httpserv/httpserv.c +@@ -1316,7 +1316,7 @@ main(int argc, char **argv) + FILE *tmpfile = fopen(pidFile, "w+"); + + if (tmpfile) { +- fprintf(tmpfile, "%d", getpid()); ++ fprintf(tmpfile, "%d", (int)getpid()); + fclose(tmpfile); + } + } +diff --git a/cmd/selfserv/selfserv.c b/cmd/selfserv/selfserv.c +index ee1c4da..2093e1c 100644 +--- a/cmd/selfserv/selfserv.c ++++ b/cmd/selfserv/selfserv.c +@@ -2877,7 +2877,7 @@ main(int argc, char **argv) + FILE *tmpfile = fopen(pidFile, "w+"); + + if (tmpfile) { +- fprintf(tmpfile, "%d", getpid()); ++ fprintf(tmpfile, "%d", (int)getpid()); + fclose(tmpfile); + } + } +diff --git a/cmd/shlibsign/Makefile b/cmd/shlibsign/Makefile +index 638f723..e86ec08 100644 +--- a/cmd/shlibsign/Makefile ++++ b/cmd/shlibsign/Makefile +@@ -72,7 +72,9 @@ SRCDIR = $(call core_abspath,.) + endif + + ++ifndef SKIP_SHLIBSIGN + libs: install ++endif + ifdef CHECKLOC + $(MAKE) $(CHECKLOC) + endif +diff --git a/coreconf/Haiku.mk b/coreconf/Haiku.mk +new file mode 100644 +index 0000000..bc9347d +--- /dev/null ++++ b/coreconf/Haiku.mk +@@ -0,0 +1,57 @@ ++# ++# This Source Code Form is subject to the terms of the Mozilla Public ++# License, v. 2.0. If a copy of the MPL was not distributed with this ++# file, You can obtain one at http://mozilla.org/MPL/2.0/. ++ ++DEFAULT_COMPILER = gcc ++CC ?= gcc ++CCC ?= g++ ++RANLIB ?= ranlib ++LD ?= ld ++ ++include $(CORE_DEPTH)/coreconf/UNIX.mk ++ ++USE_PTHREADS = 1 ++ ++ifeq ($(USE_PTHREADS),1) ++ IMPL_STRATEGY = _PTH ++endif ++ ++ifeq ($(OS_TEST),ppc) ++ CPU_ARCH = ppc ++endif ++ifeq ($(OS_TEST),x86_64) ++ifeq ($(USE_64),1) ++ CPU_ARCH = x86_64 ++else ++ CPU_ARCH = x86 ++endif ++endif ++ ++ifdef BUILD_OPT ++ OPTIMIZER = -O2 ++endif ++ ++ifdef USE_PTHREADS ++ DEFINES += -D_REENTRANT ++endif ++ ++DSO_CFLAGS = -fPIC ++DSO_LDOPTS = -shared $(ARCHFLAG) -Wl,--gc-sections ++ ++OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) -Wall -Wno-switch -pipe -DHAIKU ++OS_LIBS = -lbe ++ ++SKIP_SHLIBSIGN=1 ++USE_SYSTEM_ZLIB = 1 ++ZLIB_LIBS = -lz ++NSS_USE_SYSTEM_SQLITE=1 ++NSS_DISABLE_GTESTS=1 ++ ++MKSHLIB = $(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so) ++ ++ifdef MAPFILE ++ MKSHLIB += -Wl,--version-script,$(MAPFILE) ++endif ++PROCESS_MAP_FILE = grep -v ';-' $< | \ ++ sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@ +diff --git a/coreconf/config.mk b/coreconf/config.mk +index 4d57462..f67bc33 100644 +--- a/coreconf/config.mk ++++ b/coreconf/config.mk +@@ -31,7 +31,7 @@ endif + ####################################################################### + + TARGET_OSES = FreeBSD NetBSD OpenUNIX QNX Darwin OpenBSD \ +- AIX WINNT Linux Android ++ AIX WINNT Linux Android Haiku + + ifeq (,$(filter-out $(TARGET_OSES),$(OS_TARGET))) + include $(CORE_DEPTH)/coreconf/$(OS_TARGET).mk +diff --git a/coreconf/nsinstall/nsinstall.c b/coreconf/nsinstall/nsinstall.c +index e946325..3f9a745 100644 +--- a/coreconf/nsinstall/nsinstall.c ++++ b/coreconf/nsinstall/nsinstall.c +@@ -26,7 +26,7 @@ typedef unsigned int mode_t; + + #define HAVE_LCHOWN + +-#if defined(AIX) || defined(HPUX) || defined(LINUX) || defined(NTO) || defined(DARWIN) || defined(__riscos__) ++#if defined(AIX) || defined(HPUX) || defined(LINUX) || defined(NTO) || defined(DARWIN) || defined(__riscos__) || defined(__HAIKU__) + #undef HAVE_LCHOWN + #endif + +diff --git a/lib/dbm/include/mcom_db.h b/lib/dbm/include/mcom_db.h +index f3d6809..b49f1d2 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) ++#if defined(__linux) || defined(__HAIKU__) + #include + #ifndef BYTE_ORDER + #define BYTE_ORDER __BYTE_ORDER +diff --git a/lib/freebl/Makefile b/lib/freebl/Makefile +index e744314..535ac9a 100644 +--- a/lib/freebl/Makefile ++++ b/lib/freebl/Makefile +@@ -358,7 +358,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 FreeBSD Linux NetBSD OpenBSD, $(OS_TARGET))) ++ifeq (,$(filter-out FreeBSD Linux NetBSD OpenBSD Haiku, $(OS_TARGET))) + MKSHLIB += -Wl,-Bsymbolic + endif + +diff --git a/lib/freebl/stubs.c b/lib/freebl/stubs.c +index a79cf69..21eec91 100644 +--- a/lib/freebl/stubs.c ++++ b/lib/freebl/stubs.c +@@ -813,6 +813,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 + */ +diff --git a/lib/freebl/unix_rand.c b/lib/freebl/unix_rand.c +index 219a0bb..a69030b 100644 +--- a/lib/freebl/unix_rand.c ++++ b/lib/freebl/unix_rand.c +@@ -160,7 +160,7 @@ RNG_kstat(PRUint32 *fed) + + #endif + +-#if defined(FREEBSD) || defined(NETBSD) || defined(DARWIN) || defined(OPENBSD) || defined(NTO) || defined(__riscos__) || defined(__GNU__) || defined(__FreeBSD_kernel__) || defined(__NetBSD_kernel__) ++#if defined(FREEBSD) || defined(NETBSD) || defined(DARWIN) || defined(OPENBSD) || defined(NTO) || defined(__riscos__) || defined(__GNU__) || defined(__FreeBSD_kernel__) || defined(__NetBSD_kernel__) || defined(__HAIKU__) + #include + + static size_t +@@ -616,6 +616,16 @@ RNG_SystemInfoForRNG(void) + #else + extern char **environ; + #endif ++#ifdef HAIKU ++ static const char *const files[] = { ++ "/boot/var/swap", ++ "/boot/var/log/syslog", ++ "/boot/var/tmp", ++ "/boot/home/config/settings", ++ "/boot/home", ++ 0 ++ }; ++#else + static const char *const files[] = { + "/etc/passwd", + "/etc/utmp", +@@ -624,6 +634,7 @@ RNG_SystemInfoForRNG(void) + "/usr/tmp", + 0 + }; ++#endif + + GiveSystemInfo(); + +diff --git a/lib/ssl/sslmutex.c b/lib/ssl/sslmutex.c +index 1a884df..f8091e7 100644 +--- a/lib/ssl/sslmutex.c ++++ b/lib/ssl/sslmutex.c +@@ -61,7 +61,7 @@ single_process_sslMutex_Lock(sslMutex* pMutex) + } + + #if defined(LINUX) || defined(AIX) || defined(BSDI) || \ +- (defined(NETBSD) && __NetBSD_Version__ < 500000000) || defined(OPENBSD) || defined(__GLIBC__) ++ (defined(NETBSD) && __NetBSD_Version__ < 500000000) || defined(OPENBSD) || defined(__GLIBC__) || defined(__HAIKU__) + + #include + #include +diff --git a/lib/ssl/sslmutex.h b/lib/ssl/sslmutex.h +index f99b4d0..36f86f1 100644 +--- a/lib/ssl/sslmutex.h ++++ b/lib/ssl/sslmutex.h +@@ -50,7 +50,7 @@ typedef struct { + typedef int sslPID; + + #elif defined(LINUX) || defined(AIX) || defined(BSDI) || \ +- (defined(NETBSD) && __NetBSD_Version__ < 500000000) || defined(OPENBSD) || defined(__GLIBC__) ++ (defined(NETBSD) && __NetBSD_Version__ < 500000000) || defined(OPENBSD) || defined(__GLIBC__) || defined(__HAIKU__) + + #include + #include "prtypes.h" +-- +2.45.2 + diff --git a/dev-libs/nss/patches/nss-3.73.1.patchset b/dev-libs/nss/patches/nss-3.73.1.patchset deleted file mode 100644 index e124d5dfc..000000000 --- a/dev-libs/nss/patches/nss-3.73.1.patchset +++ /dev/null @@ -1,304 +0,0 @@ -From 8a4643025a314570d8ff667461aa8a88b433bd38 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 cc13ced..8035236 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 e961dd1..58a6481 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.27.0 - - -From 86324060d4790fc18325e1a19c277dd5c6d1c329 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.28.0 - - -From 28a3097e65d9cb2cef61e850ce3b7302419c0cc7 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 a119205..9e38c1c 100644 ---- a/cmd/shlibsign/Makefile -+++ b/cmd/shlibsign/Makefile -@@ -95,7 +95,9 @@ else - endif - endif - -+ifndef SKIP_SHLIBSIGN - libs: install -+endif - ifdef CHECKLOC - $(MAKE) $(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.27.0 - - -From dc372022c2e912e0676962d5f5581b18726565ec 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.27.0 - - -From 877f57c12e2633a5a7a4109f9f504d137b09255e 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.27.0 - - -From 13e9de942b492ba8f8273957d39592e53c5ff638 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 4a60041..32cfca1 100644 ---- a/lib/freebl/Makefile -+++ b/lib/freebl/Makefile -@@ -333,7 +333,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.27.0 - - -From f2e06593a78fd477b7c6aa9ee25ed9b37737b142 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.27.0 - - -From 4df03694cb13a45742418097685e3aa18cb2136e Mon Sep 17 00:00:00 2001 -From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Tue, 14 Aug 2018 09:00:06 +1000 -Subject: Fix build for x64 - - -diff --git a/coreconf/BeOS.mk b/coreconf/BeOS.mk -index d25df28..9cc8afc 100644 ---- a/coreconf/BeOS.mk -+++ b/coreconf/BeOS.mk -@@ -27,6 +27,10 @@ else - CPU_ARCH = x86 - endif - -+ifeq ($(USE_64),1) -+ CPU_ARCH = x86_64 -+endif -+ - MKSHLIB = $(CC) -shared -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so) - ifdef BUILD_OPT - OPTIMIZER = -O2 --- -2.27.0 - - -From ddcc242da5891ad734286a856a9d528285fa0b04 Mon Sep 17 00:00:00 2001 -From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Wed, 15 Aug 2018 11:12:46 +1000 -Subject: Fix build for x86 - - -diff --git a/cmd/httpserv/httpserv.c b/cmd/httpserv/httpserv.c -index c7277f3..eb806e2 100644 ---- a/cmd/httpserv/httpserv.c -+++ b/cmd/httpserv/httpserv.c -@@ -1325,7 +1325,7 @@ main(int argc, char **argv) - FILE *tmpfile = fopen(pidFile, "w+"); - - if (tmpfile) { -- fprintf(tmpfile, "%d", getpid()); -+ fprintf(tmpfile, "%d", (int)getpid()); - fclose(tmpfile); - } - } -diff --git a/cmd/selfserv/selfserv.c b/cmd/selfserv/selfserv.c -index 1584d7e..0c899b0 100644 ---- a/cmd/selfserv/selfserv.c -+++ b/cmd/selfserv/selfserv.c -@@ -2668,7 +2668,7 @@ main(int argc, char **argv) - FILE *tmpfile = fopen(pidFile, "w+"); - - if (tmpfile) { -- fprintf(tmpfile, "%d", getpid()); -+ fprintf(tmpfile, "%d", (int)getpid()); - fclose(tmpfile); - } - } --- -2.27.0 - - -From 891b22aa8e45f600bb86c36ebd241885cb0bfa18 Mon Sep 17 00:00:00 2001 -From: Jerome Duval -Date: Sun, 28 Feb 2021 18:25:30 +0100 -Subject: Mapfile for Haiku - - -diff --git a/coreconf/BeOS.mk b/coreconf/BeOS.mk -index 9cc8afc..9370890 100644 ---- a/coreconf/BeOS.mk -+++ b/coreconf/BeOS.mk -@@ -48,10 +48,17 @@ endif - ARCH = beos - - DSO_CFLAGS = -fPIC --DSO_LDOPTS = -+DSO_LDOPTS = -shared - - SKIP_SHLIBSIGN=1 - USE_SYSTEM_ZLIB = 1 - ZLIB_LIBS = -lz - NSS_USE_SYSTEM_SQLITE=1 - NSS_DISABLE_GTESTS=1 -+ -+MKSHLIB = $(CC) $(DSO_LDOPTS) -+ifdef MAPFILE -+ MKSHLIB += -Wl,--version-script,$(MAPFILE) -+endif -+PROCESS_MAP_FILE = grep -v ';-' $< | \ -+ sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@ --- -2.30.0 -