diff options
21 files changed, 1178 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/nspr/nspr/0001-md-Fix-build-with-musl.patch b/meta-oe/recipes-support/nspr/nspr/0001-md-Fix-build-with-musl.patch new file mode 100644 index 0000000000..f3cd670026 --- /dev/null +++ b/meta-oe/recipes-support/nspr/nspr/0001-md-Fix-build-with-musl.patch | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | From 147f3c2acbd96d44025cec11800ded0282327764 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Mon, 18 Sep 2017 17:22:43 -0700 | ||
| 4 | Subject: [PATCH] md: Fix build with musl | ||
| 5 | |||
| 6 | The MIPS specific header <sgidefs.h> is not provided by musl | ||
| 7 | linux kernel headers provide <asm/sgidefs.h> which has same definitions | ||
| 8 | |||
| 9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 10 | --- | ||
| 11 | Upstream-Status: Pending | ||
| 12 | |||
| 13 | pr/include/md/_linux.cfg | 2 +- | ||
| 14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 15 | |||
| 16 | diff --git a/pr/include/md/_linux.cfg b/pr/include/md/_linux.cfg | ||
| 17 | index 640b19c..31296a8 100644 | ||
| 18 | --- a/pr/include/md/_linux.cfg | ||
| 19 | +++ b/pr/include/md/_linux.cfg | ||
| 20 | @@ -499,7 +499,7 @@ | ||
| 21 | #elif defined(__mips__) | ||
| 22 | |||
| 23 | /* For _ABI64 */ | ||
| 24 | -#include <sgidefs.h> | ||
| 25 | +#include <asm/sgidefs.h> | ||
| 26 | |||
| 27 | #ifdef __MIPSEB__ | ||
| 28 | #define IS_BIG_ENDIAN 1 | ||
| 29 | -- | ||
| 30 | 2.14.1 | ||
| 31 | |||
diff --git a/meta-oe/recipes-support/nspr/nspr/0002-Add-nios2-support.patch b/meta-oe/recipes-support/nspr/nspr/0002-Add-nios2-support.patch new file mode 100644 index 0000000000..3a04d426a8 --- /dev/null +++ b/meta-oe/recipes-support/nspr/nspr/0002-Add-nios2-support.patch | |||
| @@ -0,0 +1,102 @@ | |||
| 1 | From 95bda64fb4cf1825fea745e918cfe8202843f0ba Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Marek Vasut <marex@denx.de> | ||
| 3 | Date: Sat, 30 Jan 2016 07:18:02 +0100 | ||
| 4 | Subject: [PATCH] Add nios2 support | ||
| 5 | |||
| 6 | Add support for the nios2 CPU. | ||
| 7 | |||
| 8 | Signed-off-by: Marek Vasut <marex@denx.de> | ||
| 9 | Upstream-Status: Submitted [ https://bugzilla.mozilla.org/show_bug.cgi?id=1244421 ] | ||
| 10 | --- | ||
| 11 | nspr/pr/include/md/_linux.cfg | 45 +++++++++++++++++++++++++++++++++++++++++++ | ||
| 12 | nspr/pr/include/md/_linux.h | 14 ++++++++++++++ | ||
| 13 | 2 files changed, 59 insertions(+) | ||
| 14 | |||
| 15 | Index: nspr/pr/include/md/_linux.cfg | ||
| 16 | =================================================================== | ||
| 17 | --- nspr.orig/pr/include/md/_linux.cfg | ||
| 18 | +++ nspr/pr/include/md/_linux.cfg | ||
| 19 | @@ -975,6 +975,51 @@ | ||
| 20 | #define PR_BYTES_PER_WORD_LOG2 2 | ||
| 21 | #define PR_BYTES_PER_DWORD_LOG2 3 | ||
| 22 | |||
| 23 | +#elif defined(__nios2__) | ||
| 24 | + | ||
| 25 | +#define IS_LITTLE_ENDIAN 1 | ||
| 26 | +#undef IS_BIG_ENDIAN | ||
| 27 | + | ||
| 28 | +#define PR_BYTES_PER_BYTE 1 | ||
| 29 | +#define PR_BYTES_PER_SHORT 2 | ||
| 30 | +#define PR_BYTES_PER_INT 4 | ||
| 31 | +#define PR_BYTES_PER_INT64 8 | ||
| 32 | +#define PR_BYTES_PER_LONG 4 | ||
| 33 | +#define PR_BYTES_PER_FLOAT 4 | ||
| 34 | +#define PR_BYTES_PER_DOUBLE 8 | ||
| 35 | +#define PR_BYTES_PER_WORD 4 | ||
| 36 | +#define PR_BYTES_PER_DWORD 8 | ||
| 37 | + | ||
| 38 | +#define PR_BITS_PER_BYTE 8 | ||
| 39 | +#define PR_BITS_PER_SHORT 16 | ||
| 40 | +#define PR_BITS_PER_INT 32 | ||
| 41 | +#define PR_BITS_PER_INT64 64 | ||
| 42 | +#define PR_BITS_PER_LONG 32 | ||
| 43 | +#define PR_BITS_PER_FLOAT 32 | ||
| 44 | +#define PR_BITS_PER_DOUBLE 64 | ||
| 45 | +#define PR_BITS_PER_WORD 32 | ||
| 46 | + | ||
| 47 | +#define PR_BITS_PER_BYTE_LOG2 3 | ||
| 48 | +#define PR_BITS_PER_SHORT_LOG2 4 | ||
| 49 | +#define PR_BITS_PER_INT_LOG2 5 | ||
| 50 | +#define PR_BITS_PER_INT64_LOG2 6 | ||
| 51 | +#define PR_BITS_PER_LONG_LOG2 5 | ||
| 52 | +#define PR_BITS_PER_FLOAT_LOG2 5 | ||
| 53 | +#define PR_BITS_PER_DOUBLE_LOG2 6 | ||
| 54 | +#define PR_BITS_PER_WORD_LOG2 5 | ||
| 55 | + | ||
| 56 | +#define PR_ALIGN_OF_SHORT 2 | ||
| 57 | +#define PR_ALIGN_OF_INT 4 | ||
| 58 | +#define PR_ALIGN_OF_LONG 4 | ||
| 59 | +#define PR_ALIGN_OF_INT64 4 | ||
| 60 | +#define PR_ALIGN_OF_FLOAT 4 | ||
| 61 | +#define PR_ALIGN_OF_DOUBLE 4 | ||
| 62 | +#define PR_ALIGN_OF_POINTER 4 | ||
| 63 | +#define PR_ALIGN_OF_WORD 4 | ||
| 64 | + | ||
| 65 | +#define PR_BYTES_PER_WORD_LOG2 2 | ||
| 66 | +#define PR_BYTES_PER_DWORD_LOG2 3 | ||
| 67 | + | ||
| 68 | #elif defined(__or1k__) | ||
| 69 | |||
| 70 | #undef IS_LITTLE_ENDIAN | ||
| 71 | Index: nspr/pr/include/md/_linux.h | ||
| 72 | =================================================================== | ||
| 73 | --- nspr.orig/pr/include/md/_linux.h | ||
| 74 | +++ nspr/pr/include/md/_linux.h | ||
| 75 | @@ -55,6 +55,8 @@ | ||
| 76 | #define _PR_SI_ARCHITECTURE "avr32" | ||
| 77 | #elif defined(__m32r__) | ||
| 78 | #define _PR_SI_ARCHITECTURE "m32r" | ||
| 79 | +#elif defined(__nios2__) | ||
| 80 | +#define _PR_SI_ARCHITECTURE "nios2" | ||
| 81 | #elif defined(__or1k__) | ||
| 82 | #define _PR_SI_ARCHITECTURE "or1k" | ||
| 83 | #elif defined(__riscv) && (__riscv_xlen == 32) | ||
| 84 | @@ -129,6 +131,18 @@ extern PRInt32 _PR_x86_64_AtomicSet(PRIn | ||
| 85 | #define _MD_ATOMIC_SET _PR_x86_64_AtomicSet | ||
| 86 | #endif | ||
| 87 | |||
| 88 | +#if defined(__nios2__) | ||
| 89 | +#if defined(__GNUC__) | ||
| 90 | +/* Use GCC built-in functions */ | ||
| 91 | +#define _PR_HAVE_ATOMIC_OPS | ||
| 92 | +#define _MD_INIT_ATOMIC() | ||
| 93 | +#define _MD_ATOMIC_INCREMENT(ptr) __sync_add_and_fetch(ptr, 1) | ||
| 94 | +#define _MD_ATOMIC_DECREMENT(ptr) __sync_sub_and_fetch(ptr, 1) | ||
| 95 | +#define _MD_ATOMIC_ADD(ptr, i) __sync_add_and_fetch(ptr, i) | ||
| 96 | +#define _MD_ATOMIC_SET(ptr, nv) __sync_lock_test_and_set(ptr, nv) | ||
| 97 | +#endif | ||
| 98 | +#endif | ||
| 99 | + | ||
| 100 | #if defined(__or1k__) | ||
| 101 | #if defined(__GNUC__) | ||
| 102 | /* Use GCC built-in functions */ | ||
diff --git a/meta-oe/recipes-support/nspr/nspr/Makefile.in-remove-_BUILD_STRING-and-_BUILD_TIME.patch b/meta-oe/recipes-support/nspr/nspr/Makefile.in-remove-_BUILD_STRING-and-_BUILD_TIME.patch new file mode 100644 index 0000000000..90fe45f34d --- /dev/null +++ b/meta-oe/recipes-support/nspr/nspr/Makefile.in-remove-_BUILD_STRING-and-_BUILD_TIME.patch | |||
| @@ -0,0 +1,103 @@ | |||
| 1 | From 8a592e4ead4ed6befe6044da3dd2dc7523c33905 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Mingli Yu <Mingli.Yu@windriver.com> | ||
| 3 | Date: Fri, 16 Nov 2018 13:52:49 +0800 | ||
| 4 | Subject: [PATCH] Makefile.in: remove _BUILD_STRING and _BUILD_TIME | ||
| 5 | |||
| 6 | Remove _BUILD_STRING and _BUILD_TIME to avoid | ||
| 7 | adding timestamp to _pl_bld.h which can result | ||
| 8 | in adding timestamp in library file such as | ||
| 9 | libnspr4.so. | ||
| 10 | $ readelf --wide --decompress --hex-dump=.rodata libnspr4.so | ||
| 11 | [snip] | ||
| 12 | 0x00004000 32303138 2d31312d 31352030 353a3439 2018-11-15 05:49 | ||
| 13 | [snip] | ||
| 14 | |||
| 15 | Upstream-Status: Pending | ||
| 16 | |||
| 17 | Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> | ||
| 18 | --- | ||
| 19 | lib/ds/Makefile.in | 8 +------- | ||
| 20 | lib/libc/src/Makefile.in | 8 +------- | ||
| 21 | lib/prstreams/Makefile.in | 8 +------- | ||
| 22 | pr/src/Makefile.in | 8 +------- | ||
| 23 | 4 files changed, 4 insertions(+), 28 deletions(-) | ||
| 24 | |||
| 25 | diff --git a/lib/ds/Makefile.in b/lib/ds/Makefile.in | ||
| 26 | index e737791..b578476 100644 | ||
| 27 | --- a/lib/ds/Makefile.in | ||
| 28 | +++ b/lib/ds/Makefile.in | ||
| 29 | @@ -114,13 +114,7 @@ GARBAGE += $(TINC) | ||
| 30 | |||
| 31 | $(TINC): | ||
| 32 | @$(MAKE_OBJDIR) | ||
| 33 | - @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC) | ||
| 34 | - @if test ! -z "$(SH_NOW)"; then \ | ||
| 35 | - $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \ | ||
| 36 | - else \ | ||
| 37 | - true; \ | ||
| 38 | - fi | ||
| 39 | - @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC) | ||
| 40 | + @$(ECHO) '#define _PRODUCTION "$(PROD)"' > $(TINC) | ||
| 41 | |||
| 42 | |||
| 43 | $(OBJDIR)/plvrsion.$(OBJ_SUFFIX): plvrsion.c $(TINC) | ||
| 44 | diff --git a/lib/libc/src/Makefile.in b/lib/libc/src/Makefile.in | ||
| 45 | index e8a6d9f..978ed28 100644 | ||
| 46 | --- a/lib/libc/src/Makefile.in | ||
| 47 | +++ b/lib/libc/src/Makefile.in | ||
| 48 | @@ -116,13 +116,7 @@ GARBAGE += $(TINC) | ||
| 49 | |||
| 50 | $(TINC): | ||
| 51 | @$(MAKE_OBJDIR) | ||
| 52 | - @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC) | ||
| 53 | - @if test ! -z "$(SH_NOW)"; then \ | ||
| 54 | - $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \ | ||
| 55 | - else \ | ||
| 56 | - true; \ | ||
| 57 | - fi | ||
| 58 | - @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC) | ||
| 59 | + @$(ECHO) '#define _PRODUCTION "$(PROD)"' > $(TINC) | ||
| 60 | |||
| 61 | |||
| 62 | $(OBJDIR)/plvrsion.$(OBJ_SUFFIX): plvrsion.c $(TINC) | ||
| 63 | diff --git a/lib/prstreams/Makefile.in b/lib/prstreams/Makefile.in | ||
| 64 | index aeb2944..f318097 100644 | ||
| 65 | --- a/lib/prstreams/Makefile.in | ||
| 66 | +++ b/lib/prstreams/Makefile.in | ||
| 67 | @@ -116,13 +116,7 @@ endif | ||
| 68 | |||
| 69 | $(TINC): | ||
| 70 | @$(MAKE_OBJDIR) | ||
| 71 | - @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC) | ||
| 72 | - @if test ! -z "$(SH_NOW)"; then \ | ||
| 73 | - $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \ | ||
| 74 | - else \ | ||
| 75 | - true; \ | ||
| 76 | - fi | ||
| 77 | - @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC) | ||
| 78 | + @$(ECHO) '#define _PRODUCTION "$(PROD)"' > $(TINC) | ||
| 79 | |||
| 80 | |||
| 81 | $(OBJDIR)/plvrsion.$(OBJ_SUFFIX): plvrsion.c $(TINC) | ||
| 82 | diff --git a/pr/src/Makefile.in b/pr/src/Makefile.in | ||
| 83 | index 19c5a69..b4ac31c 100644 | ||
| 84 | --- a/pr/src/Makefile.in | ||
| 85 | +++ b/pr/src/Makefile.in | ||
| 86 | @@ -326,13 +326,7 @@ GARBAGE += $(TINC) | ||
| 87 | |||
| 88 | $(TINC): | ||
| 89 | @$(MAKE_OBJDIR) | ||
| 90 | - @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC) | ||
| 91 | - @if test ! -z "$(SH_NOW)"; then \ | ||
| 92 | - $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \ | ||
| 93 | - else \ | ||
| 94 | - true; \ | ||
| 95 | - fi | ||
| 96 | - @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC) | ||
| 97 | + @$(ECHO) '#define _PRODUCTION "$(PROD)"' > $(TINC) | ||
| 98 | |||
| 99 | |||
| 100 | $(OBJDIR)/prvrsion.$(OBJ_SUFFIX): prvrsion.c $(TINC) | ||
| 101 | -- | ||
| 102 | 2.7.4 | ||
| 103 | |||
diff --git a/meta-oe/recipes-support/nspr/nspr/fix-build-on-x86_64.patch b/meta-oe/recipes-support/nspr/nspr/fix-build-on-x86_64.patch new file mode 100644 index 0000000000..f12acc8548 --- /dev/null +++ b/meta-oe/recipes-support/nspr/nspr/fix-build-on-x86_64.patch | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | Fix build failure on x86_64 | ||
| 2 | |||
| 3 | When the target_cpu is x86_64, we should assume that the pkg uses 64bit, | ||
| 4 | only if USE_N32 is set, we can assume that the pkg uses 32bit. It used a | ||
| 5 | opposite logic before. | ||
| 6 | |||
| 7 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
| 8 | |||
| 9 | Upstream-Status: Pending | ||
| 10 | --- | ||
| 11 | configure.in | 12 ++++++------ | ||
| 12 | 1 files changed, 6 insertions(+), 6 deletions(-) | ||
| 13 | |||
| 14 | Index: nspr/configure.in | ||
| 15 | =================================================================== | ||
| 16 | --- nspr.orig/configure.in | ||
| 17 | +++ nspr/configure.in | ||
| 18 | @@ -1875,28 +1875,24 @@ tools are selected during the Xcode/Deve | ||
| 19 | PR_MD_ASFILES=os_Linux_ia64.s | ||
| 20 | ;; | ||
| 21 | x86_64) | ||
| 22 | - if test -n "$USE_64"; then | ||
| 23 | - PR_MD_ASFILES=os_Linux_x86_64.s | ||
| 24 | - elif test -n "$USE_X32"; then | ||
| 25 | + if test -n "$USE_X32"; then | ||
| 26 | + AC_DEFINE(i386) | ||
| 27 | PR_MD_ASFILES=os_Linux_x86_64.s | ||
| 28 | CC="$CC -mx32" | ||
| 29 | CXX="$CXX -mx32" | ||
| 30 | else | ||
| 31 | - AC_DEFINE(i386) | ||
| 32 | - PR_MD_ASFILES=os_Linux_x86.s | ||
| 33 | - CC="$CC -m32" | ||
| 34 | - CXX="$CXX -m32" | ||
| 35 | + PR_MD_ASFILES=os_Linux_x86_64.s | ||
| 36 | fi | ||
| 37 | ;; | ||
| 38 | ppc|powerpc) | ||
| 39 | PR_MD_ASFILES=os_Linux_ppc.s | ||
| 40 | ;; | ||
| 41 | powerpc64) | ||
| 42 | - if test -n "$USE_64"; then | ||
| 43 | + if test -n "$USE_N32"; then | ||
| 44 | + PR_MD_ASFILES=os_Linux_ppc.s | ||
| 45 | + else | ||
| 46 | CC="$CC -m64" | ||
| 47 | CXX="$CXX -m64" | ||
| 48 | - else | ||
| 49 | - PR_MD_ASFILES=os_Linux_ppc.s | ||
| 50 | fi | ||
| 51 | ;; | ||
| 52 | esac | ||
diff --git a/meta-oe/recipes-support/nspr/nspr/nspr.pc.in b/meta-oe/recipes-support/nspr/nspr/nspr.pc.in new file mode 100644 index 0000000000..1f15d19cfa --- /dev/null +++ b/meta-oe/recipes-support/nspr/nspr/nspr.pc.in | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | os_libs=-lpthread -ldl | ||
| 2 | prefix=OEPREFIX | ||
| 3 | exec_prefix=OEEXECPREFIX | ||
| 4 | libdir=OELIBDIR | ||
| 5 | includedir=OEINCDIR | ||
| 6 | |||
| 7 | Name: NSPR | ||
| 8 | Description: The Netscape Portable Runtime | ||
| 9 | Version: NSPRVERSION | ||
| 10 | Libs: -L${libdir} -lplds4 -lplc4 -lnspr4 -lpthread -ldl | ||
| 11 | Cflags: -I${includedir}/nspr | ||
diff --git a/meta-oe/recipes-support/nspr/nspr/remove-rpath-from-tests.patch b/meta-oe/recipes-support/nspr/nspr/remove-rpath-from-tests.patch new file mode 100644 index 0000000000..7ba59ed644 --- /dev/null +++ b/meta-oe/recipes-support/nspr/nspr/remove-rpath-from-tests.patch | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | Author: Andrei Gherzan <andrei@gherzan.ro> | ||
| 2 | Date: Thu Feb 9 00:03:38 2012 +0200 | ||
| 3 | |||
| 4 | Avoid QA warnings by removing hardcoded rpath from binaries. | ||
| 5 | |||
| 6 | [...] | ||
| 7 | WARNING: QA Issue: package nspr contains bad RPATH {builddir}/tmp/work/armv5te-poky-linux-gnueabi/nspr-4.8.9-r1/nspr-4.8.9/mozilla/nsprpub/pr/tests/../../dist/lib | ||
| 8 | in file {builddir}/tmp/work/armv5te-poky-linux-gnueabi/nspr-4.8.9-r1/packages-split/nspr/usr/lib/nspr/tests/multiwait | ||
| 9 | [...] | ||
| 10 | |||
| 11 | Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> | ||
| 12 | Upstream-Status: Pending | ||
| 13 | |||
| 14 | Index: nspr/pr/tests/Makefile.in | ||
| 15 | =================================================================== | ||
| 16 | --- nspr.orig/pr/tests/Makefile.in | ||
| 17 | +++ nspr/pr/tests/Makefile.in | ||
| 18 | @@ -316,7 +316,7 @@ ifeq ($(OS_ARCH), SunOS) | ||
| 19 | endif # SunOS | ||
| 20 | |||
| 21 | ifeq (,$(filter-out Linux GNU GNU_%,$(OS_ARCH))) | ||
| 22 | - LDOPTS += -Xlinker -rpath $(ABSOLUTE_LIB_DIR) | ||
| 23 | + LDOPTS += -Xlinker | ||
| 24 | ifeq ($(USE_PTHREADS),1) | ||
| 25 | EXTRA_LIBS = -lpthread | ||
| 26 | endif | ||
diff --git a/meta-oe/recipes-support/nspr/nspr/remove-srcdir-from-configure-in.patch b/meta-oe/recipes-support/nspr/nspr/remove-srcdir-from-configure-in.patch new file mode 100644 index 0000000000..bde715c5dc --- /dev/null +++ b/meta-oe/recipes-support/nspr/nspr/remove-srcdir-from-configure-in.patch | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | the $srcdir is not defined at the time of gnu-configurize. | ||
| 2 | |||
| 3 | Upstream-Status: Inappropriate [OE-Core specific] | ||
| 4 | |||
| 5 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
| 6 | |||
| 7 | Index: nspr/configure.in | ||
| 8 | =================================================================== | ||
| 9 | --- nspr.orig/configure.in | ||
| 10 | +++ nspr/configure.in | ||
| 11 | @@ -8,7 +8,7 @@ AC_PREREQ(2.61) | ||
| 12 | AC_INIT | ||
| 13 | AC_CONFIG_SRCDIR([pr/include/nspr.h]) | ||
| 14 | |||
| 15 | -AC_CONFIG_AUX_DIR(${srcdir}/build/autoconf) | ||
| 16 | +AC_CONFIG_AUX_DIR(build/autoconf) | ||
| 17 | AC_CANONICAL_TARGET | ||
| 18 | |||
| 19 | dnl ======================================================== | ||
diff --git a/meta-oe/recipes-support/nspr/nspr_4.25.bb b/meta-oe/recipes-support/nspr/nspr_4.25.bb new file mode 100644 index 0000000000..1de26e1eed --- /dev/null +++ b/meta-oe/recipes-support/nspr/nspr_4.25.bb | |||
| @@ -0,0 +1,197 @@ | |||
| 1 | SUMMARY = "Netscape Portable Runtime Library" | ||
| 2 | HOMEPAGE = "http://www.mozilla.org/projects/nspr/" | ||
| 3 | LICENSE = "GPL-2.0 | MPL-2.0 | LGPL-2.1" | ||
| 4 | LIC_FILES_CHKSUM = "file://configure.in;beginline=3;endline=6;md5=90c2fdee38e45d6302abcfe475c8b5c5 \ | ||
| 5 | file://Makefile.in;beginline=4;endline=38;md5=beda1dbb98a515f557d3e58ef06bca99" | ||
| 6 | SECTION = "libs/network" | ||
| 7 | |||
| 8 | SRC_URI = "http://ftp.mozilla.org/pub/nspr/releases/v${PV}/src/nspr-${PV}.tar.gz \ | ||
| 9 | file://remove-rpath-from-tests.patch \ | ||
| 10 | file://fix-build-on-x86_64.patch \ | ||
| 11 | file://remove-srcdir-from-configure-in.patch \ | ||
| 12 | file://0002-Add-nios2-support.patch \ | ||
| 13 | file://0001-md-Fix-build-with-musl.patch \ | ||
| 14 | file://Makefile.in-remove-_BUILD_STRING-and-_BUILD_TIME.patch \ | ||
| 15 | file://nspr.pc.in \ | ||
| 16 | " | ||
| 17 | |||
| 18 | CACHED_CONFIGUREVARS_append_libc-musl = " CFLAGS='${CFLAGS} -D_PR_POLL_AVAILABLE \ | ||
| 19 | -D_PR_HAVE_OFF64_T -D_PR_INET6 -D_PR_HAVE_INET_NTOP \ | ||
| 20 | -D_PR_HAVE_GETHOSTBYNAME2 -D_PR_HAVE_GETADDRINFO \ | ||
| 21 | -D_PR_INET6_PROBE -DNO_DLOPEN_NULL'" | ||
| 22 | |||
| 23 | UPSTREAM_CHECK_URI = "http://ftp.mozilla.org/pub/nspr/releases/" | ||
| 24 | UPSTREAM_CHECK_REGEX = "v(?P<pver>\d+(\.\d+)+)/" | ||
| 25 | |||
| 26 | SRC_URI[md5sum] = "4ca4d75a424f30fcdc766296bb103d17" | ||
| 27 | SRC_URI[sha256sum] = "0bc309be21f91da4474c56df90415101c7f0c7c7cab2943cd943cd7896985256" | ||
| 28 | |||
| 29 | CVE_PRODUCT = "netscape_portable_runtime" | ||
| 30 | |||
| 31 | S = "${WORKDIR}/nspr-${PV}/nspr" | ||
| 32 | |||
| 33 | RDEPENDS_${PN}-dev += "perl" | ||
| 34 | TARGET_CC_ARCH += "${LDFLAGS}" | ||
| 35 | |||
| 36 | TESTS = " \ | ||
| 37 | accept \ | ||
| 38 | acceptread \ | ||
| 39 | acceptreademu \ | ||
| 40 | affinity \ | ||
| 41 | alarm \ | ||
| 42 | anonfm \ | ||
| 43 | atomic \ | ||
| 44 | attach \ | ||
| 45 | bigfile \ | ||
| 46 | cleanup \ | ||
| 47 | cltsrv \ | ||
| 48 | concur \ | ||
| 49 | cvar \ | ||
| 50 | cvar2 \ | ||
| 51 | dlltest \ | ||
| 52 | dtoa \ | ||
| 53 | errcodes \ | ||
| 54 | exit \ | ||
| 55 | fdcach \ | ||
| 56 | fileio \ | ||
| 57 | foreign \ | ||
| 58 | formattm \ | ||
| 59 | fsync \ | ||
| 60 | gethost \ | ||
| 61 | getproto \ | ||
| 62 | i2l \ | ||
| 63 | initclk \ | ||
| 64 | inrval \ | ||
| 65 | instrumt \ | ||
| 66 | intrio \ | ||
| 67 | intrupt \ | ||
| 68 | io_timeout \ | ||
| 69 | ioconthr \ | ||
| 70 | join \ | ||
| 71 | joinkk \ | ||
| 72 | joinku \ | ||
| 73 | joinuk \ | ||
| 74 | joinuu \ | ||
| 75 | layer \ | ||
| 76 | lazyinit \ | ||
| 77 | libfilename \ | ||
| 78 | lltest \ | ||
| 79 | lock \ | ||
| 80 | lockfile \ | ||
| 81 | logfile \ | ||
| 82 | logger \ | ||
| 83 | many_cv \ | ||
| 84 | multiwait \ | ||
| 85 | nameshm1 \ | ||
| 86 | nblayer \ | ||
| 87 | nonblock \ | ||
| 88 | ntioto \ | ||
| 89 | ntoh \ | ||
| 90 | op_2long \ | ||
| 91 | op_excl \ | ||
| 92 | op_filnf \ | ||
| 93 | op_filok \ | ||
| 94 | op_nofil \ | ||
| 95 | parent \ | ||
| 96 | parsetm \ | ||
| 97 | peek \ | ||
| 98 | perf \ | ||
| 99 | pipeping \ | ||
| 100 | pipeping2 \ | ||
| 101 | pipeself \ | ||
| 102 | poll_nm \ | ||
| 103 | poll_to \ | ||
| 104 | pollable \ | ||
| 105 | prftest \ | ||
| 106 | primblok \ | ||
| 107 | provider \ | ||
| 108 | prpollml \ | ||
| 109 | ranfile \ | ||
| 110 | randseed \ | ||
| 111 | reinit \ | ||
| 112 | rwlocktest \ | ||
| 113 | sel_spd \ | ||
| 114 | selct_er \ | ||
| 115 | selct_nm \ | ||
| 116 | selct_to \ | ||
| 117 | selintr \ | ||
| 118 | sema \ | ||
| 119 | semaerr \ | ||
| 120 | semaping \ | ||
| 121 | sendzlf \ | ||
| 122 | server_test \ | ||
| 123 | servr_kk \ | ||
| 124 | servr_uk \ | ||
| 125 | servr_ku \ | ||
| 126 | servr_uu \ | ||
| 127 | short_thread \ | ||
| 128 | sigpipe \ | ||
| 129 | socket \ | ||
| 130 | sockopt \ | ||
| 131 | sockping \ | ||
| 132 | sprintf \ | ||
| 133 | stack \ | ||
| 134 | stdio \ | ||
| 135 | str2addr \ | ||
| 136 | strod \ | ||
| 137 | switch \ | ||
| 138 | system \ | ||
| 139 | testbit \ | ||
| 140 | testfile \ | ||
| 141 | threads \ | ||
| 142 | timemac \ | ||
| 143 | timetest \ | ||
| 144 | tpd \ | ||
| 145 | udpsrv \ | ||
| 146 | vercheck \ | ||
| 147 | version \ | ||
| 148 | writev \ | ||
| 149 | xnotify \ | ||
| 150 | zerolen" | ||
| 151 | |||
| 152 | inherit autotools multilib_script | ||
| 153 | |||
| 154 | MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/nspr-config" | ||
| 155 | |||
| 156 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" | ||
| 157 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," | ||
| 158 | |||
| 159 | # Do not install nspr in usr/include, but in usr/include/nspr, the | ||
| 160 | # preferred path upstream. | ||
| 161 | EXTRA_OECONF += "--includedir=${includedir}/nspr" | ||
| 162 | |||
| 163 | do_compile_prepend() { | ||
| 164 | oe_runmake CROSS_COMPILE=1 CFLAGS="-DXP_UNIX ${BUILD_CFLAGS}" LDFLAGS="" CC="${BUILD_CC}" -C config export | ||
| 165 | } | ||
| 166 | |||
| 167 | do_compile_append() { | ||
| 168 | oe_runmake -C pr/tests | ||
| 169 | } | ||
| 170 | |||
| 171 | do_install_append() { | ||
| 172 | install -D ${WORKDIR}/nspr.pc.in ${D}${libdir}/pkgconfig/nspr.pc | ||
| 173 | sed -i \ | ||
| 174 | -e 's:NSPRVERSION:${PV}:g' \ | ||
| 175 | -e 's:OEPREFIX:${prefix}:g' \ | ||
| 176 | -e 's:OELIBDIR:${libdir}:g' \ | ||
| 177 | -e 's:OEINCDIR:${includedir}:g' \ | ||
| 178 | -e 's:OEEXECPREFIX:${exec_prefix}:g' \ | ||
| 179 | ${D}${libdir}/pkgconfig/nspr.pc | ||
| 180 | |||
| 181 | mkdir -p ${D}${libdir}/nspr/tests | ||
| 182 | install -m 0755 ${S}/pr/tests/runtests.pl ${D}${libdir}/nspr/tests | ||
| 183 | install -m 0755 ${S}/pr/tests/runtests.sh ${D}${libdir}/nspr/tests | ||
| 184 | cd ${B}/pr/tests | ||
| 185 | install -m 0755 ${TESTS} ${D}${libdir}/nspr/tests | ||
| 186 | |||
| 187 | # delete compile-et.pl and perr.properties from ${bindir} because these are | ||
| 188 | # only used to generate prerr.c and prerr.h files from prerr.et at compile | ||
| 189 | # time | ||
| 190 | rm ${D}${bindir}/compile-et.pl ${D}${bindir}/prerr.properties | ||
| 191 | } | ||
| 192 | |||
| 193 | FILES_${PN} = "${libdir}/lib*.so" | ||
| 194 | FILES_${PN}-dev = "${bindir}/* ${libdir}/nspr/tests/* ${libdir}/pkgconfig \ | ||
| 195 | ${includedir}/* ${datadir}/aclocal/* " | ||
| 196 | |||
| 197 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/meta-oe/recipes-support/nss/nss/0001-freebl-add-a-configure-option-to-disable-ARM-HW-cryp.patch b/meta-oe/recipes-support/nss/nss/0001-freebl-add-a-configure-option-to-disable-ARM-HW-cryp.patch new file mode 100644 index 0000000000..c380c14491 --- /dev/null +++ b/meta-oe/recipes-support/nss/nss/0001-freebl-add-a-configure-option-to-disable-ARM-HW-cryp.patch | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | From 5595e9651aca39af945931c73eb524a0f8bd130d Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
| 3 | Date: Wed, 18 Dec 2019 12:29:50 +0100 | ||
| 4 | Subject: [PATCH] freebl: add a configure option to disable ARM HW crypto | ||
| 5 | |||
| 6 | Not all current hardware supports it, particularly anything | ||
| 7 | prior to armv8 does not. | ||
| 8 | |||
| 9 | Upstream-Status: Pending | ||
| 10 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
| 11 | --- | ||
| 12 | nss/lib/freebl/Makefile | 3 +++ | ||
| 13 | 1 file changed, 3 insertions(+) | ||
| 14 | |||
| 15 | --- a/nss/lib/freebl/Makefile | ||
| 16 | +++ b/nss/lib/freebl/Makefile | ||
| 17 | @@ -125,6 +125,9 @@ else | ||
| 18 | DEFINES += -DNSS_X86 | ||
| 19 | endif | ||
| 20 | endif | ||
| 21 | + | ||
| 22 | +ifdef NSS_USE_ARM_HW_CRYPTO | ||
| 23 | + DEFINES += -DNSS_USE_ARM_HW_CRYPTO | ||
| 24 | ifeq ($(CPU_ARCH),aarch64) | ||
| 25 | DEFINES += -DUSE_HW_AES | ||
| 26 | EXTRA_SRCS += aes-armv8.c gcm-aarch64.c | ||
| 27 | @@ -146,6 +149,7 @@ ifeq ($(CPU_ARCH),arm) | ||
| 28 | endif | ||
| 29 | endif | ||
| 30 | endif | ||
| 31 | +endif | ||
| 32 | |||
| 33 | ifeq ($(OS_TARGET),OSF1) | ||
| 34 | DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_NO_MP_WORD | ||
| 35 | --- a/nss/lib/freebl/gcm.c | ||
| 36 | +++ b/nss/lib/freebl/gcm.c | ||
| 37 | @@ -17,6 +17,7 @@ | ||
| 38 | |||
| 39 | #include <limits.h> | ||
| 40 | |||
| 41 | +#ifdef NSS_USE_ARM_HW_CRYPTO | ||
| 42 | /* old gcc doesn't support some poly64x2_t intrinsic */ | ||
| 43 | #if defined(__aarch64__) && defined(IS_LITTLE_ENDIAN) && \ | ||
| 44 | (defined(__clang__) || defined(__GNUC__) && __GNUC__ > 6) | ||
| 45 | @@ -25,6 +26,7 @@ | ||
| 46 | /* We don't test on big endian platform, so disable this on big endian. */ | ||
| 47 | #define USE_ARM_GCM | ||
| 48 | #endif | ||
| 49 | +#endif | ||
| 50 | |||
| 51 | /* Forward declarations */ | ||
| 52 | SECStatus gcm_HashInit_hw(gcmHashContext *ghash); | ||
diff --git a/meta-oe/recipes-support/nss/nss/0001-nss-fix-support-cross-compiling.patch b/meta-oe/recipes-support/nss/nss/0001-nss-fix-support-cross-compiling.patch new file mode 100644 index 0000000000..d5403397e7 --- /dev/null +++ b/meta-oe/recipes-support/nss/nss/0001-nss-fix-support-cross-compiling.patch | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | From 0cf47ee432cc26a706864fcc09b2c3adc342a679 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
| 3 | Date: Wed, 22 Feb 2017 11:36:11 +0200 | ||
| 4 | Subject: [PATCH] nss: fix support cross compiling | ||
| 5 | |||
| 6 | Let some make variables be assigned from outside makefile. | ||
| 7 | |||
| 8 | Upstream-Status: Inappropriate [configuration] | ||
| 9 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 10 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
| 11 | --- | ||
| 12 | nss/coreconf/arch.mk | 2 +- | ||
| 13 | nss/lib/freebl/Makefile | 6 ++++++ | ||
| 14 | 2 files changed, 7 insertions(+), 1 deletion(-) | ||
| 15 | |||
| 16 | diff --git a/nss/coreconf/arch.mk b/nss/coreconf/arch.mk | ||
| 17 | index 06c276f..9c1eb51 100644 | ||
| 18 | --- a/nss/coreconf/arch.mk | ||
| 19 | +++ b/nss/coreconf/arch.mk | ||
| 20 | @@ -30,7 +30,7 @@ OS_TEST := $(shell uname -m) | ||
| 21 | ifeq ($(OS_TEST),i86pc) | ||
| 22 | OS_RELEASE := $(shell uname -r)_$(OS_TEST) | ||
| 23 | else | ||
| 24 | - OS_RELEASE := $(shell uname -r) | ||
| 25 | + OS_RELEASE ?= $(shell uname -r) | ||
| 26 | endif | ||
| 27 | |||
| 28 | # | ||
| 29 | diff --git a/nss/lib/freebl/Makefile b/nss/lib/freebl/Makefile | ||
| 30 | index 0ce1425..ebeb411 100644 | ||
| 31 | --- a/nss/lib/freebl/Makefile | ||
| 32 | +++ b/nss/lib/freebl/Makefile | ||
| 33 | @@ -36,6 +36,12 @@ ifdef USE_64 | ||
| 34 | DEFINES += -DNSS_USE_64 | ||
| 35 | endif | ||
| 36 | |||
| 37 | +ifeq ($(OS_TEST),mips) | ||
| 38 | +ifndef USE_64 | ||
| 39 | + DEFINES += -DNS_PTR_LE_32 | ||
| 40 | +endif | ||
| 41 | +endif | ||
| 42 | + | ||
| 43 | ifdef USE_ABI32_FPU | ||
| 44 | DEFINES += -DNSS_USE_ABI32_FPU | ||
| 45 | endif | ||
| 46 | -- | ||
| 47 | 2.11.0 | ||
| 48 | |||
diff --git a/meta-oe/recipes-support/nss/nss/blank-cert9.db b/meta-oe/recipes-support/nss/nss/blank-cert9.db new file mode 100644 index 0000000000..7d4bcf2582 --- /dev/null +++ b/meta-oe/recipes-support/nss/nss/blank-cert9.db | |||
| Binary files differ | |||
diff --git a/meta-oe/recipes-support/nss/nss/blank-key4.db b/meta-oe/recipes-support/nss/nss/blank-key4.db new file mode 100644 index 0000000000..d47f08d04f --- /dev/null +++ b/meta-oe/recipes-support/nss/nss/blank-key4.db | |||
| Binary files differ | |||
diff --git a/meta-oe/recipes-support/nss/nss/disable-Wvarargs-with-clang.patch b/meta-oe/recipes-support/nss/nss/disable-Wvarargs-with-clang.patch new file mode 100644 index 0000000000..de812d27ba --- /dev/null +++ b/meta-oe/recipes-support/nss/nss/disable-Wvarargs-with-clang.patch | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | clang 3.9 add this warning to rightly flag undefined | ||
| 2 | behavior, we relegate this to be just a warning instead | ||
| 3 | of error and keep the behavior as it was. Right fix would | ||
| 4 | be to not pass enum to the function with variadic arguments | ||
| 5 | as last named argument | ||
| 6 | |||
| 7 | Fixes errors like | ||
| 8 | ocsp.c:2220:22: error: passing an object that undergoes default argument promotion to 'va_start' has undefined behavior [-Werror,-Wvarargs] | ||
| 9 | va_start(ap, responseType0); | ||
| 10 | ^ | ||
| 11 | ocsp.c:2200:43: note: parameter of type 'SECOidTag' is declared here | ||
| 12 | SECOidTag responseType0, ...) | ||
| 13 | |||
| 14 | see | ||
| 15 | https://www.securecoding.cert.org/confluence/display/cplusplus/EXP58-CPP.+Pass+an+object+of+the+correct+type+to+va_start | ||
| 16 | for more details | ||
| 17 | |||
| 18 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 19 | Upstream-Status: Pending | ||
| 20 | |||
| 21 | Index: nss-3.37.1/nss/coreconf/Werror.mk | ||
| 22 | =================================================================== | ||
| 23 | --- nss-3.37.1.orig/nss/coreconf/Werror.mk | ||
| 24 | +++ nss-3.37.1/nss/coreconf/Werror.mk | ||
| 25 | @@ -56,7 +56,7 @@ ifndef WARNING_CFLAGS | ||
| 26 | ifdef CC_IS_CLANG | ||
| 27 | # -Qunused-arguments : clang objects to arguments that it doesn't understand | ||
| 28 | # and fixing this would require rearchitecture | ||
| 29 | - WARNING_CFLAGS += -Qunused-arguments | ||
| 30 | + WARNING_CFLAGS += -Qunused-arguments -Wno-error=varargs | ||
| 31 | # -Wno-parentheses-equality : because clang warns about macro expansions | ||
| 32 | WARNING_CFLAGS += $(call disable_warning,parentheses-equality) | ||
| 33 | ifdef BUILD_OPT | ||
diff --git a/meta-oe/recipes-support/nss/nss/nss-fix-incorrect-shebang-of-perl.patch b/meta-oe/recipes-support/nss/nss/nss-fix-incorrect-shebang-of-perl.patch new file mode 100644 index 0000000000..547594d5b6 --- /dev/null +++ b/meta-oe/recipes-support/nss/nss/nss-fix-incorrect-shebang-of-perl.patch | |||
| @@ -0,0 +1,110 @@ | |||
| 1 | nss: fix incorrect shebang of perl | ||
| 2 | |||
| 3 | Replace incorrect shebang of perl with `#!/usr/bin/env perl'. | ||
| 4 | |||
| 5 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 6 | Upstream-Status: Pending | ||
| 7 | --- | ||
| 8 | nss/cmd/smimetools/smime | 2 +- | ||
| 9 | nss/coreconf/cpdist.pl | 2 +- | ||
| 10 | nss/coreconf/import.pl | 2 +- | ||
| 11 | nss/coreconf/jniregen.pl | 2 +- | ||
| 12 | nss/coreconf/outofdate.pl | 2 +- | ||
| 13 | nss/coreconf/release.pl | 2 +- | ||
| 14 | nss/coreconf/version.pl | 2 +- | ||
| 15 | nss/tests/clean_tbx | 2 +- | ||
| 16 | nss/tests/path_uniq | 2 +- | ||
| 17 | 9 files changed, 9 insertions(+), 9 deletions(-) | ||
| 18 | |||
| 19 | diff --git a/nss/cmd/smimetools/smime b/nss/cmd/smimetools/smime | ||
| 20 | --- a/nss/cmd/smimetools/smime | ||
| 21 | +++ b/nss/cmd/smimetools/smime | ||
| 22 | @@ -1,4 +1,4 @@ | ||
| 23 | -#!/usr/local/bin/perl | ||
| 24 | +#!/usr/bin/env perl | ||
| 25 | |||
| 26 | # This Source Code Form is subject to the terms of the Mozilla Public | ||
| 27 | # License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| 28 | diff --git a/nss/coreconf/cpdist.pl b/nss/coreconf/cpdist.pl | ||
| 29 | index 800edfb..652187f 100755 | ||
| 30 | --- a/nss/coreconf/cpdist.pl | ||
| 31 | +++ b/nss/coreconf/cpdist.pl | ||
| 32 | @@ -1,4 +1,4 @@ | ||
| 33 | -#! /usr/local/bin/perl | ||
| 34 | +#!/usr/bin/env perl | ||
| 35 | # | ||
| 36 | # This Source Code Form is subject to the terms of the Mozilla Public | ||
| 37 | # License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| 38 | diff --git a/nss/coreconf/import.pl b/nss/coreconf/import.pl | ||
| 39 | index dd2d177..428eaa5 100755 | ||
| 40 | --- a/nss/coreconf/import.pl | ||
| 41 | +++ b/nss/coreconf/import.pl | ||
| 42 | @@ -1,4 +1,4 @@ | ||
| 43 | -#! /usr/local/bin/perl | ||
| 44 | +#!/usr/bin/env perl | ||
| 45 | # | ||
| 46 | # This Source Code Form is subject to the terms of the Mozilla Public | ||
| 47 | # License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| 48 | diff --git a/nss/coreconf/jniregen.pl b/nss/coreconf/jniregen.pl | ||
| 49 | index 2039180..5f4f69c 100755 | ||
| 50 | --- a/nss/coreconf/jniregen.pl | ||
| 51 | +++ b/nss/coreconf/jniregen.pl | ||
| 52 | @@ -1,4 +1,4 @@ | ||
| 53 | -#!/usr/local/bin/perl | ||
| 54 | +#!/usr/bin/env perl | ||
| 55 | # | ||
| 56 | # This Source Code Form is subject to the terms of the Mozilla Public | ||
| 57 | # License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| 58 | diff --git a/nss/coreconf/outofdate.pl b/nss/coreconf/outofdate.pl | ||
| 59 | index 33d80bb..01fc097 100755 | ||
| 60 | --- a/nss/coreconf/outofdate.pl | ||
| 61 | +++ b/nss/coreconf/outofdate.pl | ||
| 62 | @@ -1,4 +1,4 @@ | ||
| 63 | -#!/usr/local/bin/perl | ||
| 64 | +#!/usr/bin/env perl | ||
| 65 | # | ||
| 66 | # This Source Code Form is subject to the terms of the Mozilla Public | ||
| 67 | # License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| 68 | diff --git a/nss/coreconf/release.pl b/nss/coreconf/release.pl | ||
| 69 | index 7cde19d..b5df2f6 100755 | ||
| 70 | --- a/nss/coreconf/release.pl | ||
| 71 | +++ b/nss/coreconf/release.pl | ||
| 72 | @@ -1,4 +1,4 @@ | ||
| 73 | -#! /usr/local/bin/perl | ||
| 74 | +#!/usr/bin/env perl | ||
| 75 | # | ||
| 76 | # This Source Code Form is subject to the terms of the Mozilla Public | ||
| 77 | # License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| 78 | diff --git a/nss/coreconf/version.pl b/nss/coreconf/version.pl | ||
| 79 | index d2a4942..79359fe 100644 | ||
| 80 | --- a/nss/coreconf/version.pl | ||
| 81 | +++ b/nss/coreconf/version.pl | ||
| 82 | @@ -1,4 +1,4 @@ | ||
| 83 | -#!/usr/sbin/perl | ||
| 84 | +#!/usr/bin/env perl | ||
| 85 | # | ||
| 86 | # This Source Code Form is subject to the terms of the Mozilla Public | ||
| 87 | # License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| 88 | diff --git a/nss/tests/clean_tbx b/nss/tests/clean_tbx | ||
| 89 | index 4de9555..a7def9f 100755 | ||
| 90 | --- a/nss/tests/clean_tbx | ||
| 91 | +++ b/nss/tests/clean_tbx | ||
| 92 | @@ -1,4 +1,4 @@ | ||
| 93 | -#! /bin/perl | ||
| 94 | +#!/usr/bin/env perl | ||
| 95 | |||
| 96 | ####################################################################### | ||
| 97 | # | ||
| 98 | diff --git a/nss/tests/path_uniq b/nss/tests/path_uniq | ||
| 99 | index f29f60a..08fbffa 100755 | ||
| 100 | --- a/nss/tests/path_uniq | ||
| 101 | +++ b/nss/tests/path_uniq | ||
| 102 | @@ -1,4 +1,4 @@ | ||
| 103 | -#! /bin/perl | ||
| 104 | +#!/usr/bin/env perl | ||
| 105 | |||
| 106 | ######################################################################## | ||
| 107 | # | ||
| 108 | -- | ||
| 109 | 1.8.1.2 | ||
| 110 | |||
diff --git a/meta-oe/recipes-support/nss/nss/nss-fix-nsinstall-build.patch b/meta-oe/recipes-support/nss/nss/nss-fix-nsinstall-build.patch new file mode 100644 index 0000000000..43c09d13ea --- /dev/null +++ b/meta-oe/recipes-support/nss/nss/nss-fix-nsinstall-build.patch | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | Fix nss multilib build on openSUSE 11.x 32bit | ||
| 2 | |||
| 3 | While building lib64-nss on openSUSE 11.x 32bit, the nsinstall will | ||
| 4 | fail with error: | ||
| 5 | |||
| 6 | * nsinstall.c:1:0: sorry, unimplemented: 64-bit mode not compiled | ||
| 7 | |||
| 8 | It caused by the '-m64' option which passed to host gcc. | ||
| 9 | |||
| 10 | The nsinstall was built first while nss starting to build, it only runs | ||
| 11 | on host to install built files, it doesn't need any cross-compling or | ||
| 12 | multilib build options. Just clean the ARCHFLAG and LDFLAGS to fix this | ||
| 13 | error. | ||
| 14 | |||
| 15 | Upstream-Status: Pending | ||
| 16 | |||
| 17 | Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> | ||
| 18 | =================================================== | ||
| 19 | Index: nss-3.24/nss/coreconf/nsinstall/Makefile | ||
| 20 | =================================================================== | ||
| 21 | --- nss-3.24.orig/nss/coreconf/nsinstall/Makefile | ||
| 22 | +++ nss-3.24/nss/coreconf/nsinstall/Makefile | ||
| 23 | @@ -18,6 +18,13 @@ INTERNAL_TOOLS = 1 | ||
| 24 | |||
| 25 | include $(DEPTH)/coreconf/config.mk | ||
| 26 | |||
| 27 | +# nsinstall is unfit for cross-compiling/multilib-build since it was | ||
| 28 | +# always run on local host to install built files. This change intends | ||
| 29 | +# to clean the '-m64' from ARCHFLAG and LDFLAGS. | ||
| 30 | +ARCHFLAG = | ||
| 31 | +LDFLAGS = | ||
| 32 | +# CFLAGS = | ||
| 33 | + | ||
| 34 | ifeq (,$(filter-out OS2 WIN%,$(OS_TARGET))) | ||
| 35 | PROGRAM = | ||
| 36 | else | ||
diff --git a/meta-oe/recipes-support/nss/nss/nss-no-rpath-for-cross-compiling.patch b/meta-oe/recipes-support/nss/nss/nss-no-rpath-for-cross-compiling.patch new file mode 100644 index 0000000000..7661dc93a0 --- /dev/null +++ b/meta-oe/recipes-support/nss/nss/nss-no-rpath-for-cross-compiling.patch | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | nss:no rpath for cross compiling | ||
| 2 | |||
| 3 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 4 | Upstream-Status: Inappropriate [configuration] | ||
| 5 | --- | ||
| 6 | nss/cmd/platlibs.mk | 4 ++-- | ||
| 7 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 8 | |||
| 9 | diff --git a/nss/cmd/platlibs.mk b/nss/cmd/platlibs.mk | ||
| 10 | --- a/nss/cmd/platlibs.mk | ||
| 11 | +++ b/nss/cmd/platlibs.mk | ||
| 12 | @@ -18,9 +18,9 @@ endif | ||
| 13 | |||
| 14 | ifeq ($(OS_ARCH), Linux) | ||
| 15 | ifeq ($(USE_64), 1) | ||
| 16 | -EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:/opt/sun/private/lib64:$$ORIGIN/../lib' | ||
| 17 | +#EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:/opt/sun/private/lib64:$$ORIGIN/../lib' | ||
| 18 | else | ||
| 19 | -EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib:/opt/sun/private/lib' | ||
| 20 | +#EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib:/opt/sun/private/lib' | ||
| 21 | endif | ||
| 22 | endif | ||
| 23 | |||
| 24 | -- | ||
| 25 | 1.8.1.2 | ||
| 26 | |||
diff --git a/meta-oe/recipes-support/nss/nss/nss.pc.in b/meta-oe/recipes-support/nss/nss/nss.pc.in new file mode 100644 index 0000000000..402b4ecb33 --- /dev/null +++ b/meta-oe/recipes-support/nss/nss/nss.pc.in | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | prefix=OEPREFIX | ||
| 2 | exec_prefix=OEEXECPREFIX | ||
| 3 | libdir=OELIBDIR | ||
| 4 | includedir=OEINCDIR | ||
| 5 | |||
| 6 | Name: NSS | ||
| 7 | Description: Network Security Services | ||
| 8 | Version: %NSS_VERSION% | ||
| 9 | Requires: nspr >= %NSPR_VERSION% | ||
| 10 | Libs: -L${libdir} -lssl3 -lsmime3 -lnss3 -lsoftokn3 -lnssutil3 | ||
| 11 | Cflags: -IOEINCDIR | ||
diff --git a/meta-oe/recipes-support/nss/nss/pqg.c-ULL_addend.patch b/meta-oe/recipes-support/nss/nss/pqg.c-ULL_addend.patch new file mode 100644 index 0000000000..3a817faaa6 --- /dev/null +++ b/meta-oe/recipes-support/nss/nss/pqg.c-ULL_addend.patch | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | nss does not build on mips with clang because wrong types are used? | ||
| 2 | |||
| 3 | pqg.c:339:16: error: comparison of constant 18446744073709551615 with expression of type 'unsigned long' is always true [-Werror,-Wtautological-constant-out-of-range-compare] | ||
| 4 | if (addend < MP_DIGIT_MAX) { | ||
| 5 | ~~~~~~ ^ ~~~~~~~~~~~~ | ||
| 6 | |||
| 7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 8 | Upstream-Status: Pending | ||
| 9 | Index: nss-3.37.1/nss/lib/freebl/pqg.c | ||
| 10 | =================================================================== | ||
| 11 | --- nss-3.37.1.orig/nss/lib/freebl/pqg.c | ||
| 12 | +++ nss-3.37.1/nss/lib/freebl/pqg.c | ||
| 13 | @@ -326,8 +326,8 @@ generate_h_candidate(SECItem *hit, mp_in | ||
| 14 | |||
| 15 | static SECStatus | ||
| 16 | addToSeed(const SECItem *seed, | ||
| 17 | - unsigned long addend, | ||
| 18 | - int seedlen, /* g in 186-1 */ | ||
| 19 | + unsigned long long addend, | ||
| 20 | + int seedlen, /* g in 186-1 */ | ||
| 21 | SECItem *seedout) | ||
| 22 | { | ||
| 23 | mp_int s, sum, modulus, tmp; | ||
diff --git a/meta-oe/recipes-support/nss/nss/signlibs.sh b/meta-oe/recipes-support/nss/nss/signlibs.sh new file mode 100644 index 0000000000..a74e499f8c --- /dev/null +++ b/meta-oe/recipes-support/nss/nss/signlibs.sh | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | # signlibs.sh | ||
| 4 | # | ||
| 5 | # (c)2010 Wind River Systems, Inc. | ||
| 6 | # | ||
| 7 | # regenerates the .chk files for the NSS libraries that require it | ||
| 8 | # since the ones that are built have incorrect checksums that were | ||
| 9 | # calculated on the host where they really need to be done on the | ||
| 10 | # target | ||
| 11 | |||
| 12 | CHK_FILES=`ls /lib*/*.chk /usr/lib*/*.chk 2>/dev/null` | ||
| 13 | SIGN_BINARY=`which shlibsign` | ||
| 14 | for I in $CHK_FILES | ||
| 15 | do | ||
| 16 | DN=`dirname $I` | ||
| 17 | BN=`basename $I .chk` | ||
| 18 | FN=$DN/$BN.so | ||
| 19 | $SIGN_BINARY -i $FN | ||
| 20 | done | ||
diff --git a/meta-oe/recipes-support/nss/nss/system-pkcs11.txt b/meta-oe/recipes-support/nss/nss/system-pkcs11.txt new file mode 100644 index 0000000000..1a264e9cc4 --- /dev/null +++ b/meta-oe/recipes-support/nss/nss/system-pkcs11.txt | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | library= | ||
| 2 | name=NSS Internal PKCS #11 Module | ||
| 3 | parameters=configdir='sql:/etc/pki/nssdb' certPrefix='' keyPrefix='' secmod='secmod.db' flags= updatedir='' updateCertPrefix='' updateKeyPrefix='' updateid='' updateTokenDescription='' | ||
| 4 | NSS=Flags=internal,critical trustOrder=75 cipherOrder=100 slotParams=(1={slotFlags=[ECC,RSA,DSA,DH,RC2,RC4,DES,RANDOM,SHA1,MD5,MD2,SSL,TLS,AES,Camellia,SEED,SHA256,SHA512] askpw=any timeout=30}) | ||
| 5 | |||
diff --git a/meta-oe/recipes-support/nss/nss_3.50.bb b/meta-oe/recipes-support/nss/nss_3.50.bb new file mode 100644 index 0000000000..e9855d7a7e --- /dev/null +++ b/meta-oe/recipes-support/nss/nss_3.50.bb | |||
| @@ -0,0 +1,273 @@ | |||
| 1 | SUMMARY = "Mozilla's SSL and TLS implementation" | ||
| 2 | DESCRIPTION = "Network Security Services (NSS) is a set of libraries \ | ||
| 3 | designed to support cross-platform development of \ | ||
| 4 | security-enabled client and server applications. \ | ||
| 5 | Applications built with NSS can support SSL v2 and v3, \ | ||
| 6 | TLS, PKCS 5, PKCS 7, PKCS 11, PKCS 12, S/MIME, X.509 \ | ||
| 7 | v3 certificates, and other security standards." | ||
| 8 | HOMEPAGE = "http://www.mozilla.org/projects/security/pki/nss/" | ||
| 9 | SECTION = "libs" | ||
| 10 | |||
| 11 | DEPENDS = "sqlite3 nspr zlib nss-native" | ||
| 12 | DEPENDS_class-native = "sqlite3-native nspr-native zlib-native" | ||
| 13 | |||
| 14 | LICENSE = "MPL-2.0 | (MPL-2.0 & GPL-2.0+) | (MPL-2.0 & LGPL-2.1+)" | ||
| 15 | |||
| 16 | LIC_FILES_CHKSUM = "file://nss/COPYING;md5=3b1e88e1b9c0b5a4b2881d46cce06a18 \ | ||
| 17 | file://nss/lib/freebl/mpi/doc/LICENSE;md5=491f158d09d948466afce85d6f1fe18f \ | ||
| 18 | file://nss/lib/freebl/mpi/doc/LICENSE-MPL;md5=5d425c8f3157dbf212db2ec53d9e5132" | ||
| 19 | |||
| 20 | VERSION_DIR = "${@d.getVar('BP').upper().replace('-', '_').replace('.', '_') + '_RTM'}" | ||
| 21 | |||
| 22 | SRC_URI = "http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/${VERSION_DIR}/src/${BP}.tar.gz \ | ||
| 23 | file://nss.pc.in \ | ||
| 24 | file://signlibs.sh \ | ||
| 25 | file://0001-nss-fix-support-cross-compiling.patch \ | ||
| 26 | file://nss-no-rpath-for-cross-compiling.patch \ | ||
| 27 | file://nss-fix-incorrect-shebang-of-perl.patch \ | ||
| 28 | file://disable-Wvarargs-with-clang.patch \ | ||
| 29 | file://pqg.c-ULL_addend.patch \ | ||
| 30 | file://blank-cert9.db \ | ||
| 31 | file://blank-key4.db \ | ||
| 32 | file://system-pkcs11.txt \ | ||
| 33 | file://nss-fix-nsinstall-build.patch \ | ||
| 34 | file://0001-freebl-add-a-configure-option-to-disable-ARM-HW-cryp.patch \ | ||
| 35 | " | ||
| 36 | |||
| 37 | SRC_URI[md5sum] = "e0366615e12b147cebc136c915baea37" | ||
| 38 | SRC_URI[sha256sum] = "185df319775243f5f5daa9d49b7f9cc5f2b389435be3247c3376579bee063ba7" | ||
| 39 | |||
| 40 | UPSTREAM_CHECK_URI = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_Releases" | ||
| 41 | UPSTREAM_CHECK_REGEX = "NSS_(?P<pver>.+)_release_notes" | ||
| 42 | |||
| 43 | inherit siteinfo | ||
| 44 | |||
| 45 | TD = "${S}/tentative-dist" | ||
| 46 | TDS = "${S}/tentative-dist-staging" | ||
| 47 | |||
| 48 | TARGET_CC_ARCH += "${LDFLAGS}" | ||
| 49 | |||
| 50 | do_configure_prepend_libc-musl () { | ||
| 51 | sed -i -e '/-DHAVE_SYS_CDEFS_H/d' ${S}/nss/lib/dbm/config/config.mk | ||
| 52 | } | ||
| 53 | |||
| 54 | do_compile_prepend_class-native() { | ||
| 55 | export NSPR_INCLUDE_DIR=${STAGING_INCDIR_NATIVE}/nspr | ||
| 56 | export NSPR_LIB_DIR=${STAGING_LIBDIR_NATIVE} | ||
| 57 | export NSS_ENABLE_WERROR=0 | ||
| 58 | } | ||
| 59 | |||
| 60 | do_compile_prepend_class-nativesdk() { | ||
| 61 | export LDFLAGS="" | ||
| 62 | } | ||
| 63 | |||
| 64 | do_compile_prepend_class-native() { | ||
| 65 | # Need to set RPATH so that chrpath will do its job correctly | ||
| 66 | RPATH="-Wl,-rpath-link,${STAGING_LIBDIR_NATIVE} -Wl,-rpath-link,${STAGING_BASE_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_BASE_LIBDIR_NATIVE}" | ||
| 67 | } | ||
| 68 | |||
| 69 | do_compile() { | ||
| 70 | export NSPR_INCLUDE_DIR=${STAGING_INCDIR}/nspr | ||
| 71 | |||
| 72 | export CROSS_COMPILE=1 | ||
| 73 | export NATIVE_CC="${BUILD_CC}" | ||
| 74 | # Additional defines needed on Centos 7 | ||
| 75 | export NATIVE_FLAGS="${BUILD_CFLAGS} -DLINUX -Dlinux" | ||
| 76 | export BUILD_OPT=1 | ||
| 77 | |||
| 78 | export FREEBL_NO_DEPEND=1 | ||
| 79 | export FREEBL_LOWHASH=1 | ||
| 80 | |||
| 81 | export LIBDIR=${libdir} | ||
| 82 | export MOZILLA_CLIENT=1 | ||
| 83 | export NS_USE_GCC=1 | ||
| 84 | export NSS_USE_SYSTEM_SQLITE=1 | ||
| 85 | export NSS_ENABLE_ECC=1 | ||
| 86 | |||
| 87 | ${@bb.utils.contains("TUNE_FEATURES", "crypto", "export NSS_USE_ARM_HW_CRYPTO=1", "", d)} | ||
| 88 | |||
| 89 | export OS_RELEASE=3.4 | ||
| 90 | export OS_TARGET=Linux | ||
| 91 | export OS_ARCH=Linux | ||
| 92 | |||
| 93 | if [ "${TARGET_ARCH}" = "powerpc" ]; then | ||
| 94 | OS_TEST=ppc | ||
| 95 | elif [ "${TARGET_ARCH}" = "powerpc64" ]; then | ||
| 96 | OS_TEST=ppc64 | ||
| 97 | elif [ "${TARGET_ARCH}" = "mips" -o "${TARGET_ARCH}" = "mipsel" -o "${TARGET_ARCH}" = "mips64" -o "${TARGET_ARCH}" = "mips64el" ]; then | ||
| 98 | OS_TEST=mips | ||
| 99 | elif [ "${TARGET_ARCH}" = "aarch64_be" ]; then | ||
| 100 | OS_TEST="aarch64" | ||
| 101 | else | ||
| 102 | OS_TEST="${TARGET_ARCH}" | ||
| 103 | fi | ||
| 104 | |||
| 105 | if [ "${SITEINFO_BITS}" = "64" ]; then | ||
| 106 | export USE_64=1 | ||
| 107 | elif [ "${TARGET_ARCH}" = "x86_64" -a "${SITEINFO_BITS}" = "32" ]; then | ||
| 108 | export USE_X32=1 | ||
| 109 | fi | ||
| 110 | |||
| 111 | export NSS_DISABLE_GTESTS=1 | ||
| 112 | |||
| 113 | # We can modify CC in the environment, but if we set it via an | ||
| 114 | # argument to make, nsinstall, a host program, will also build with it! | ||
| 115 | # | ||
| 116 | # nss pretty much does its own thing with CFLAGS, so we put them into CC. | ||
| 117 | # Optimization will get clobbered, but most of the stuff will survive. | ||
| 118 | # The motivation for this is to point to the correct place for debug | ||
| 119 | # source files and CFLAGS does that. Nothing uses CCC. | ||
| 120 | # | ||
| 121 | export CC="${CC} ${CFLAGS}" | ||
| 122 | make -C ./nss CCC="${CXX} -g" \ | ||
| 123 | OS_TEST=${OS_TEST} \ | ||
| 124 | RPATH="${RPATH}" | ||
| 125 | } | ||
| 126 | |||
| 127 | do_compile[vardepsexclude] += "SITEINFO_BITS" | ||
| 128 | |||
| 129 | do_install_prepend_class-nativesdk() { | ||
| 130 | export LDFLAGS="" | ||
| 131 | } | ||
| 132 | |||
| 133 | do_install() { | ||
| 134 | export CROSS_COMPILE=1 | ||
| 135 | export NATIVE_CC="${BUILD_CC}" | ||
| 136 | export BUILD_OPT=1 | ||
| 137 | |||
| 138 | export FREEBL_NO_DEPEND=1 | ||
| 139 | |||
| 140 | export LIBDIR=${libdir} | ||
| 141 | export MOZILLA_CLIENT=1 | ||
| 142 | export NS_USE_GCC=1 | ||
| 143 | export NSS_USE_SYSTEM_SQLITE=1 | ||
| 144 | export NSS_ENABLE_ECC=1 | ||
| 145 | |||
| 146 | export OS_RELEASE=3.4 | ||
| 147 | export OS_TARGET=Linux | ||
| 148 | export OS_ARCH=Linux | ||
| 149 | |||
| 150 | if [ "${TARGET_ARCH}" = "powerpc" ]; then | ||
| 151 | OS_TEST=ppc | ||
| 152 | elif [ "${TARGET_ARCH}" = "powerpc64" ]; then | ||
| 153 | OS_TEST=ppc64 | ||
| 154 | elif [ "${TARGET_ARCH}" = "mips" -o "${TARGET_ARCH}" = "mipsel" -o "${TARGET_ARCH}" = "mips64" -o "${TARGET_ARCH}" = "mips64el" ]; then | ||
| 155 | OS_TEST=mips | ||
| 156 | elif [ "${TARGET_ARCH}" = "aarch64_be" ]; then | ||
| 157 | CPU_ARCH=aarch64 | ||
| 158 | OS_TEST="aarch64" | ||
| 159 | else | ||
| 160 | OS_TEST="${TARGET_ARCH}" | ||
| 161 | fi | ||
| 162 | if [ "${SITEINFO_BITS}" = "64" ]; then | ||
| 163 | export USE_64=1 | ||
| 164 | elif [ "${TARGET_ARCH}" = "x86_64" -a "${SITEINFO_BITS}" = "32" ]; then | ||
| 165 | export USE_X32=1 | ||
| 166 | fi | ||
| 167 | |||
| 168 | export NSS_DISABLE_GTESTS=1 | ||
| 169 | |||
| 170 | make -C ./nss \ | ||
| 171 | CCC="${CXX}" \ | ||
| 172 | OS_TEST=${OS_TEST} \ | ||
| 173 | SOURCE_LIB_DIR="${TD}/${libdir}" \ | ||
| 174 | SOURCE_BIN_DIR="${TD}/${bindir}" \ | ||
| 175 | install | ||
| 176 | |||
| 177 | install -d ${D}/${libdir}/ | ||
| 178 | for file in ${S}/dist/*.OBJ/lib/*.so; do | ||
| 179 | echo "Installing `basename $file`..." | ||
| 180 | cp $file ${D}/${libdir}/ | ||
| 181 | done | ||
| 182 | |||
| 183 | for shared_lib in ${TD}/${libdir}/*.so.*; do | ||
| 184 | if [ -f $shared_lib ]; then | ||
| 185 | cp $shared_lib ${D}/${libdir} | ||
| 186 | ln -sf $(basename $shared_lib) ${D}/${libdir}/$(basename $shared_lib .1oe) | ||
| 187 | fi | ||
| 188 | done | ||
| 189 | for shared_lib in ${TD}/${libdir}/*.so; do | ||
| 190 | if [ -f $shared_lib -a ! -e ${D}/${libdir}/$shared_lib ]; then | ||
| 191 | cp $shared_lib ${D}/${libdir} | ||
| 192 | fi | ||
| 193 | done | ||
| 194 | |||
| 195 | install -d ${D}/${includedir}/nss3 | ||
| 196 | install -m 644 -t ${D}/${includedir}/nss3 dist/public/nss/* | ||
| 197 | |||
| 198 | install -d ${D}/${bindir} | ||
| 199 | for binary in ${TD}/${bindir}/*; do | ||
| 200 | install -m 755 -t ${D}/${bindir} $binary | ||
| 201 | done | ||
| 202 | } | ||
| 203 | |||
| 204 | do_install[vardepsexclude] += "SITEINFO_BITS" | ||
| 205 | |||
| 206 | do_install_append() { | ||
| 207 | # Create empty .chk files for the NSS libraries at build time. They could | ||
| 208 | # be regenerated at target's boot time. | ||
| 209 | for file in libsoftokn3.chk libfreebl3.chk libnssdbm3.chk; do | ||
| 210 | touch ${D}/${libdir}/$file | ||
| 211 | chmod 755 ${D}/${libdir}/$file | ||
| 212 | done | ||
| 213 | install -D -m 755 ${WORKDIR}/signlibs.sh ${D}/${bindir}/signlibs.sh | ||
| 214 | |||
| 215 | install -d ${D}${libdir}/pkgconfig/ | ||
| 216 | sed 's/%NSS_VERSION%/${PV}/' ${WORKDIR}/nss.pc.in | sed 's/%NSPR_VERSION%/4.9.2/' > ${D}${libdir}/pkgconfig/nss.pc | ||
| 217 | sed -i s:OEPREFIX:${prefix}:g ${D}${libdir}/pkgconfig/nss.pc | ||
| 218 | sed -i s:OEEXECPREFIX:${exec_prefix}:g ${D}${libdir}/pkgconfig/nss.pc | ||
| 219 | sed -i s:OELIBDIR:${libdir}:g ${D}${libdir}/pkgconfig/nss.pc | ||
| 220 | sed -i s:OEINCDIR:${includedir}/nss3:g ${D}${libdir}/pkgconfig/nss.pc | ||
| 221 | } | ||
| 222 | |||
| 223 | do_install_append_class-target() { | ||
| 224 | # It used to call certutil to create a blank certificate with empty password at | ||
| 225 | # build time, but the checksum of key4.db changes every time when certutil is called. | ||
| 226 | # It causes non-determinism issue, so provide databases with a blank certificate | ||
| 227 | # which are originally from output of nss in qemux86-64 build. You can get these | ||
| 228 | # databases by: | ||
| 229 | # certutil -N -d sql:/database/path/ --empty-password | ||
| 230 | install -d ${D}${sysconfdir}/pki/nssdb/ | ||
| 231 | install -m 0644 ${WORKDIR}/blank-cert9.db ${D}${sysconfdir}/pki/nssdb/cert9.db | ||
| 232 | install -m 0644 ${WORKDIR}/blank-key4.db ${D}${sysconfdir}/pki/nssdb/key4.db | ||
| 233 | install -m 0644 ${WORKDIR}/system-pkcs11.txt ${D}${sysconfdir}/pki/nssdb/pkcs11.txt | ||
| 234 | } | ||
| 235 | |||
| 236 | PACKAGE_WRITE_DEPS += "nss-native" | ||
| 237 | pkg_postinst_${PN} () { | ||
| 238 | if [ -n "$D" ]; then | ||
| 239 | for I in $D${libdir}/lib*.chk; do | ||
| 240 | DN=`dirname $I` | ||
| 241 | BN=`basename $I .chk` | ||
| 242 | FN=$DN/$BN.so | ||
| 243 | shlibsign -i $FN | ||
| 244 | if [ $? -ne 0 ]; then | ||
| 245 | exit 1 | ||
| 246 | fi | ||
| 247 | done | ||
| 248 | else | ||
| 249 | signlibs.sh | ||
| 250 | fi | ||
| 251 | } | ||
| 252 | |||
| 253 | PACKAGES =+ "${PN}-smime" | ||
| 254 | FILES_${PN}-smime = "\ | ||
| 255 | ${bindir}/smime \ | ||
| 256 | " | ||
| 257 | |||
| 258 | FILES_${PN} = "\ | ||
| 259 | ${sysconfdir} \ | ||
| 260 | ${bindir} \ | ||
| 261 | ${libdir}/lib*.chk \ | ||
| 262 | ${libdir}/lib*.so \ | ||
| 263 | " | ||
| 264 | |||
| 265 | FILES_${PN}-dev = "\ | ||
| 266 | ${libdir}/nss \ | ||
| 267 | ${libdir}/pkgconfig/* \ | ||
| 268 | ${includedir}/* \ | ||
| 269 | " | ||
| 270 | |||
| 271 | RDEPENDS_${PN}-smime = "perl" | ||
| 272 | |||
| 273 | BBCLASSEXTEND = "native nativesdk" | ||
