summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2020-02-23 21:34:08 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-03-11 13:44:02 +0000
commit331216ed423b987f4beb557d6b642ee8c08fa954 (patch)
treef0fc5726e7a6461b34f708c5e0b4614111321750 /meta
parentace5ed0878caa7b4cba2c469fe157fe59ae8cc6c (diff)
downloadpoky-331216ed423b987f4beb557d6b642ee8c08fa954.tar.gz
nspr: Move to meta-oe
It was used only by nss. (From OE-Core rev: baecda5b32b66d09dadccbcbe706c5ec0a270568) Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/conf/distro/include/maintainers.inc1
-rw-r--r--meta/recipes-support/nspr/nspr/0001-md-Fix-build-with-musl.patch31
-rw-r--r--meta/recipes-support/nspr/nspr/0002-Add-nios2-support.patch102
-rw-r--r--meta/recipes-support/nspr/nspr/Makefile.in-remove-_BUILD_STRING-and-_BUILD_TIME.patch103
-rw-r--r--meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch52
-rw-r--r--meta/recipes-support/nspr/nspr/nspr.pc.in11
-rw-r--r--meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch26
-rw-r--r--meta/recipes-support/nspr/nspr/remove-srcdir-from-configure-in.patch19
-rw-r--r--meta/recipes-support/nspr/nspr_4.25.bb197
9 files changed, 0 insertions, 542 deletions
diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc
index f6a2936e7c..33f8044470 100644
--- a/meta/conf/distro/include/maintainers.inc
+++ b/meta/conf/distro/include/maintainers.inc
@@ -526,7 +526,6 @@ RECIPE_MAINTAINER_pn-nfs-export-root = "Robert Yang <liezhi.yang@windriver.com>"
526RECIPE_MAINTAINER_pn-nfs-utils = "Robert Yang <liezhi.yang@windriver.com>" 526RECIPE_MAINTAINER_pn-nfs-utils = "Robert Yang <liezhi.yang@windriver.com>"
527RECIPE_MAINTAINER_pn-ninja = "Khem Raj <raj.khem@gmail.com>" 527RECIPE_MAINTAINER_pn-ninja = "Khem Raj <raj.khem@gmail.com>"
528RECIPE_MAINTAINER_pn-npth = "Alexander Kanavin <alex.kanavin@gmail.com>" 528RECIPE_MAINTAINER_pn-npth = "Alexander Kanavin <alex.kanavin@gmail.com>"
529RECIPE_MAINTAINER_pn-nspr = "Armin Kuster <akuster808@gmail.com>"
530RECIPE_MAINTAINER_pn-nss-myhostname = "Anuj Mittal <anuj.mittal@intel.com>" 529RECIPE_MAINTAINER_pn-nss-myhostname = "Anuj Mittal <anuj.mittal@intel.com>"
531RECIPE_MAINTAINER_pn-ofono = "Ross Burton <ross.burton@intel.com>" 530RECIPE_MAINTAINER_pn-ofono = "Ross Burton <ross.burton@intel.com>"
532RECIPE_MAINTAINER_pn-opensbi = "Alistair Francis <alistair.francis@wdc.com>" 531RECIPE_MAINTAINER_pn-opensbi = "Alistair Francis <alistair.francis@wdc.com>"
diff --git a/meta/recipes-support/nspr/nspr/0001-md-Fix-build-with-musl.patch b/meta/recipes-support/nspr/nspr/0001-md-Fix-build-with-musl.patch
deleted file mode 100644
index f3cd670026..0000000000
--- a/meta/recipes-support/nspr/nspr/0001-md-Fix-build-with-musl.patch
+++ /dev/null
@@ -1,31 +0,0 @@
1From 147f3c2acbd96d44025cec11800ded0282327764 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 18 Sep 2017 17:22:43 -0700
4Subject: [PATCH] md: Fix build with musl
5
6The MIPS specific header <sgidefs.h> is not provided by musl
7linux kernel headers provide <asm/sgidefs.h> which has same definitions
8
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11Upstream-Status: Pending
12
13 pr/include/md/_linux.cfg | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/pr/include/md/_linux.cfg b/pr/include/md/_linux.cfg
17index 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--
302.14.1
31
diff --git a/meta/recipes-support/nspr/nspr/0002-Add-nios2-support.patch b/meta/recipes-support/nspr/nspr/0002-Add-nios2-support.patch
deleted file mode 100644
index 3a04d426a8..0000000000
--- a/meta/recipes-support/nspr/nspr/0002-Add-nios2-support.patch
+++ /dev/null
@@ -1,102 +0,0 @@
1From 95bda64fb4cf1825fea745e918cfe8202843f0ba Mon Sep 17 00:00:00 2001
2From: Marek Vasut <marex@denx.de>
3Date: Sat, 30 Jan 2016 07:18:02 +0100
4Subject: [PATCH] Add nios2 support
5
6Add support for the nios2 CPU.
7
8Signed-off-by: Marek Vasut <marex@denx.de>
9Upstream-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
15Index: 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
71Index: 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/recipes-support/nspr/nspr/Makefile.in-remove-_BUILD_STRING-and-_BUILD_TIME.patch b/meta/recipes-support/nspr/nspr/Makefile.in-remove-_BUILD_STRING-and-_BUILD_TIME.patch
deleted file mode 100644
index 90fe45f34d..0000000000
--- a/meta/recipes-support/nspr/nspr/Makefile.in-remove-_BUILD_STRING-and-_BUILD_TIME.patch
+++ /dev/null
@@ -1,103 +0,0 @@
1From 8a592e4ead4ed6befe6044da3dd2dc7523c33905 Mon Sep 17 00:00:00 2001
2From: Mingli Yu <Mingli.Yu@windriver.com>
3Date: Fri, 16 Nov 2018 13:52:49 +0800
4Subject: [PATCH] Makefile.in: remove _BUILD_STRING and _BUILD_TIME
5
6Remove _BUILD_STRING and _BUILD_TIME to avoid
7adding timestamp to _pl_bld.h which can result
8in adding timestamp in library file such as
9libnspr4.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
15Upstream-Status: Pending
16
17Signed-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
25diff --git a/lib/ds/Makefile.in b/lib/ds/Makefile.in
26index 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)
44diff --git a/lib/libc/src/Makefile.in b/lib/libc/src/Makefile.in
45index 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)
63diff --git a/lib/prstreams/Makefile.in b/lib/prstreams/Makefile.in
64index 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)
82diff --git a/pr/src/Makefile.in b/pr/src/Makefile.in
83index 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--
1022.7.4
103
diff --git a/meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch b/meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch
deleted file mode 100644
index f12acc8548..0000000000
--- a/meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch
+++ /dev/null
@@ -1,52 +0,0 @@
1Fix build failure on x86_64
2
3When the target_cpu is x86_64, we should assume that the pkg uses 64bit,
4only if USE_N32 is set, we can assume that the pkg uses 32bit. It used a
5opposite logic before.
6
7Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
8
9Upstream-Status: Pending
10---
11 configure.in | 12 ++++++------
12 1 files changed, 6 insertions(+), 6 deletions(-)
13
14Index: 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/recipes-support/nspr/nspr/nspr.pc.in b/meta/recipes-support/nspr/nspr/nspr.pc.in
deleted file mode 100644
index 1f15d19cfa..0000000000
--- a/meta/recipes-support/nspr/nspr/nspr.pc.in
+++ /dev/null
@@ -1,11 +0,0 @@
1os_libs=-lpthread -ldl
2prefix=OEPREFIX
3exec_prefix=OEEXECPREFIX
4libdir=OELIBDIR
5includedir=OEINCDIR
6
7Name: NSPR
8Description: The Netscape Portable Runtime
9Version: NSPRVERSION
10Libs: -L${libdir} -lplds4 -lplc4 -lnspr4 -lpthread -ldl
11Cflags: -I${includedir}/nspr
diff --git a/meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch b/meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch
deleted file mode 100644
index 7ba59ed644..0000000000
--- a/meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch
+++ /dev/null
@@ -1,26 +0,0 @@
1Author: Andrei Gherzan <andrei@gherzan.ro>
2Date: Thu Feb 9 00:03:38 2012 +0200
3
4Avoid QA warnings by removing hardcoded rpath from binaries.
5
6[...]
7WARNING: 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
8in file {builddir}/tmp/work/armv5te-poky-linux-gnueabi/nspr-4.8.9-r1/packages-split/nspr/usr/lib/nspr/tests/multiwait
9[...]
10
11Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
12Upstream-Status: Pending
13
14Index: 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/recipes-support/nspr/nspr/remove-srcdir-from-configure-in.patch b/meta/recipes-support/nspr/nspr/remove-srcdir-from-configure-in.patch
deleted file mode 100644
index bde715c5dc..0000000000
--- a/meta/recipes-support/nspr/nspr/remove-srcdir-from-configure-in.patch
+++ /dev/null
@@ -1,19 +0,0 @@
1the $srcdir is not defined at the time of gnu-configurize.
2
3Upstream-Status: Inappropriate [OE-Core specific]
4
5Signed-off-by: Saul Wold <sgw@linux.intel.com>
6
7Index: 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/recipes-support/nspr/nspr_4.25.bb b/meta/recipes-support/nspr/nspr_4.25.bb
deleted file mode 100644
index 1de26e1eed..0000000000
--- a/meta/recipes-support/nspr/nspr_4.25.bb
+++ /dev/null
@@ -1,197 +0,0 @@
1SUMMARY = "Netscape Portable Runtime Library"
2HOMEPAGE = "http://www.mozilla.org/projects/nspr/"
3LICENSE = "GPL-2.0 | MPL-2.0 | LGPL-2.1"
4LIC_FILES_CHKSUM = "file://configure.in;beginline=3;endline=6;md5=90c2fdee38e45d6302abcfe475c8b5c5 \
5 file://Makefile.in;beginline=4;endline=38;md5=beda1dbb98a515f557d3e58ef06bca99"
6SECTION = "libs/network"
7
8SRC_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
18CACHED_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
23UPSTREAM_CHECK_URI = "http://ftp.mozilla.org/pub/nspr/releases/"
24UPSTREAM_CHECK_REGEX = "v(?P<pver>\d+(\.\d+)+)/"
25
26SRC_URI[md5sum] = "4ca4d75a424f30fcdc766296bb103d17"
27SRC_URI[sha256sum] = "0bc309be21f91da4474c56df90415101c7f0c7c7cab2943cd943cd7896985256"
28
29CVE_PRODUCT = "netscape_portable_runtime"
30
31S = "${WORKDIR}/nspr-${PV}/nspr"
32
33RDEPENDS_${PN}-dev += "perl"
34TARGET_CC_ARCH += "${LDFLAGS}"
35
36TESTS = " \
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
152inherit autotools multilib_script
153
154MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/nspr-config"
155
156PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
157PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
158
159# Do not install nspr in usr/include, but in usr/include/nspr, the
160# preferred path upstream.
161EXTRA_OECONF += "--includedir=${includedir}/nspr"
162
163do_compile_prepend() {
164 oe_runmake CROSS_COMPILE=1 CFLAGS="-DXP_UNIX ${BUILD_CFLAGS}" LDFLAGS="" CC="${BUILD_CC}" -C config export
165}
166
167do_compile_append() {
168 oe_runmake -C pr/tests
169}
170
171do_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
193FILES_${PN} = "${libdir}/lib*.so"
194FILES_${PN}-dev = "${bindir}/* ${libdir}/nspr/tests/* ${libdir}/pkgconfig \
195 ${includedir}/* ${datadir}/aclocal/* "
196
197BBCLASSEXTEND = "native nativesdk"