Files
haikuports/dev-libs/nss/patches/nss-3.40.patchset
2018-10-24 16:00:17 +00:00

270 lines
6.3 KiB
Plaintext

From 2aa45a2c3b2355964078592f252bba2342f1753f Mon Sep 17 00:00:00 2001
From: Kacper Kasper <kacperkasper@gmail.com>
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 <sys/byteorder.h>
#endif
-#if defined(__linux) || defined(__BEOS__)
+#if defined(__linux) || defined(BEOS)
#include <endian.h>
#ifndef BYTE_ORDER
#define BYTE_ORDER __BYTE_ORDER
--
2.16.4
From 798fee81e524f85cc1e23d4dfb06f6f13533bfa0 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
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 19f3c7996f3db98f4c509720b5676f80a8af556e Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
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 38e58c10c25b364718c07f366994ab45b46b49a8 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
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 32a3408ba89edfa790921ba44b7134b98e5a5104 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
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 18f1448d42e9c2fa5e72f45bb06ce4833e17daa9 Mon Sep 17 00:00:00 2001
From: Kacper Kasper <kacperkasper@gmail.com>
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 fe86fbc25c46015bb63c6f92ede9c002a3a9cbb2 Mon Sep 17 00:00:00 2001
From: Kacper Kasper <kacperkasper@gmail.com>
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
From 92156286b7b584f7be1deed33605a56f5039bdf0 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.16.4
From 8e7856e475659ff8d5ccada94fff9ea8ec4ad703 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 71e2ab8..d138b1f 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 1784c9e..538a15b 100644
--- a/cmd/selfserv/selfserv.c
+++ b/cmd/selfserv/selfserv.c
@@ -2532,7 +2532,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.16.4