diff options
author | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 14:36:22 +0200 |
---|---|---|
committer | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 15:32:53 +0200 |
commit | f4cf9fe05bb3f32fabea4e54dd92d368967a80da (patch) | |
tree | 487180fa9866985ea7b28e625651765d86f515c3 /meta/recipes-support/nspr | |
download | poky-f4cf9fe05bb3f32fabea4e54dd92d368967a80da.tar.gz |
initial commit for Enea Linux 4.0
Migrated from the internal git server on the daisy-enea branch
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'meta/recipes-support/nspr')
5 files changed, 328 insertions, 0 deletions
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 new file mode 100644 index 0000000000..a6fa1ea607 --- /dev/null +++ b/meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch | |||
@@ -0,0 +1,51 @@ | |||
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 | diff --git a/configure.in b/configure.in | ||
15 | index 39c96a3..99a03ac 100644 | ||
16 | --- a/configure.in | ||
17 | +++ b/configure.in | ||
18 | @@ -1778,24 +1778,24 @@ tools are selected during the Xcode/Developer Tools installation.]) | ||
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 | - else | ||
25 | + if test -n "$USE_N32"; then | ||
26 | AC_DEFINE(i386) | ||
27 | PR_MD_ASFILES=os_Linux_x86.s | ||
28 | CC="$CC -m32" | ||
29 | CXX="$CXX -m32" | ||
30 | + else | ||
31 | + PR_MD_ASFILES=os_Linux_x86_64.s | ||
32 | fi | ||
33 | ;; | ||
34 | ppc|powerpc) | ||
35 | PR_MD_ASFILES=os_Linux_ppc.s | ||
36 | ;; | ||
37 | powerpc64) | ||
38 | - if test -n "$USE_64"; then | ||
39 | + if test -n "$USE_N32"; then | ||
40 | + PR_MD_ASFILES=os_Linux_ppc.s | ||
41 | + else | ||
42 | CC="$CC -m64" | ||
43 | CXX="$CXX -m64" | ||
44 | - else | ||
45 | - PR_MD_ASFILES=os_Linux_ppc.s | ||
46 | fi | ||
47 | ;; | ||
48 | m68k) | ||
49 | -- | ||
50 | 1.7.1 | ||
51 | |||
diff --git a/meta/recipes-support/nspr/nspr/nspr.pc.in b/meta/recipes-support/nspr/nspr/nspr.pc.in new file mode 100644 index 0000000000..c37d0bcbd7 --- /dev/null +++ b/meta/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: 4.9.5 | ||
10 | Libs: -L${libdir} -lplds4 -lplc4 -lnspr4 -lpthread -ldl | ||
11 | Cflags: | ||
diff --git a/meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch b/meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch new file mode 100644 index 0000000000..a7e7853de1 --- /dev/null +++ b/meta/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-4.8.9/mozilla/nsprpub/pr/tests/Makefile.in | ||
15 | =================================================================== | ||
16 | --- nsprpub.orig/pr/tests/Makefile.in 2012-02-11 00:01:10.476220505 +0200 | ||
17 | +++ nsprpub/pr/tests/Makefile.in 2012-02-10 23:57:40.000000000 +0200 | ||
18 | @@ -379,7 +379,7 @@ | ||
19 | endif | ||
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/trickly-fix-build-on-x86_64.patch b/meta/recipes-support/nspr/nspr/trickly-fix-build-on-x86_64.patch new file mode 100644 index 0000000000..8ca51e4d1f --- /dev/null +++ b/meta/recipes-support/nspr/nspr/trickly-fix-build-on-x86_64.patch | |||
@@ -0,0 +1,62 @@ | |||
1 | trickily fix build failure on x86_64 | ||
2 | |||
3 | It seems that we can not run the 'autoreconf -f -i' for the nspr, I met | ||
4 | several strange problems while trying to do that, and the previous | ||
5 | author seemed had noticed this, so he wrote: | ||
6 | |||
7 | do_configure() { | ||
8 | oe_runconf | ||
9 | } | ||
10 | |||
11 | to avoid running the "autoreconf". But we must modify configure.in to | ||
12 | fix the build failure on x86_64, so both modify configure and | ||
13 | configure.in, once the "autoreconf" can work correctly, we can remove | ||
14 | this patch. | ||
15 | |||
16 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
17 | |||
18 | Upstream-Status: Inappropriate [configuration] | ||
19 | --- | ||
20 | configure | 12 ++++++------ | ||
21 | 1 files changed, 6 insertions(+), 6 deletions(-) | ||
22 | |||
23 | diff --git a/configure b/configure | ||
24 | --- a/configure | ||
25 | +++ b/configure | ||
26 | @@ -4366,9 +4366,7 @@ EOF | ||
27 | PR_MD_ASFILES=os_Linux_ia64.s | ||
28 | ;; | ||
29 | x86_64) | ||
30 | - if test -n "$USE_64"; then | ||
31 | - PR_MD_ASFILES=os_Linux_x86_64.s | ||
32 | - else | ||
33 | + if test -n "$USE_N32"; then | ||
34 | cat >> confdefs.h <<\EOF | ||
35 | #define i386 1 | ||
36 | EOF | ||
37 | @@ -4376,17 +4374,19 @@ EOF | ||
38 | PR_MD_ASFILES=os_Linux_x86.s | ||
39 | CC="$CC -m32" | ||
40 | CXX="$CXX -m32" | ||
41 | + else | ||
42 | + PR_MD_ASFILES=os_Linux_x86_64.s | ||
43 | fi | ||
44 | ;; | ||
45 | ppc|powerpc) | ||
46 | PR_MD_ASFILES=os_Linux_ppc.s | ||
47 | ;; | ||
48 | powerpc64) | ||
49 | - if test -n "$USE_64"; then | ||
50 | + if test -n "$USE_N32"; then | ||
51 | + PR_MD_ASFILES=os_Linux_ppc.s | ||
52 | + else | ||
53 | CC="$CC -m64" | ||
54 | CXX="$CXX -m64" | ||
55 | - else | ||
56 | - PR_MD_ASFILES=os_Linux_ppc.s | ||
57 | fi | ||
58 | ;; | ||
59 | m68k) | ||
60 | -- | ||
61 | 1.7.1 | ||
62 | |||
diff --git a/meta/recipes-support/nspr/nspr_4.10.3.bb b/meta/recipes-support/nspr/nspr_4.10.3.bb new file mode 100644 index 0000000000..0adfe3b3a3 --- /dev/null +++ b/meta/recipes-support/nspr/nspr_4.10.3.bb | |||
@@ -0,0 +1,178 @@ | |||
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 = "ftp://ftp.mozilla.org/pub/mozilla.org/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://trickly-fix-build-on-x86_64.patch \ | ||
12 | " | ||
13 | |||
14 | SRC_URI += "file://nspr.pc.in" | ||
15 | |||
16 | SRC_URI[md5sum] = "bf298e874cf454a3c2f8fe7e671c5d2e" | ||
17 | SRC_URI[sha256sum] = "f25779b1a665dab0090b9c977dc6c29a63320f442956ed78629b66b405cb01e5" | ||
18 | |||
19 | S = "${WORKDIR}/nspr-${PV}/nspr" | ||
20 | |||
21 | RDEPENDS_${PN}-dev += "perl" | ||
22 | TARGET_CC_ARCH += "${LDFLAGS}" | ||
23 | |||
24 | TESTS = "runtests.pl \ | ||
25 | runtests.sh \ | ||
26 | accept \ | ||
27 | acceptread \ | ||
28 | acceptreademu \ | ||
29 | affinity \ | ||
30 | alarm \ | ||
31 | anonfm \ | ||
32 | atomic \ | ||
33 | attach \ | ||
34 | bigfile \ | ||
35 | cleanup \ | ||
36 | cltsrv \ | ||
37 | concur \ | ||
38 | cvar \ | ||
39 | cvar2 \ | ||
40 | dlltest \ | ||
41 | dtoa \ | ||
42 | errcodes \ | ||
43 | exit \ | ||
44 | fdcach \ | ||
45 | fileio \ | ||
46 | foreign \ | ||
47 | formattm \ | ||
48 | fsync \ | ||
49 | gethost \ | ||
50 | getproto \ | ||
51 | i2l \ | ||
52 | initclk \ | ||
53 | inrval \ | ||
54 | instrumt \ | ||
55 | intrio \ | ||
56 | intrupt \ | ||
57 | io_timeout \ | ||
58 | ioconthr \ | ||
59 | join \ | ||
60 | joinkk \ | ||
61 | joinku \ | ||
62 | joinuk \ | ||
63 | joinuu \ | ||
64 | layer \ | ||
65 | lazyinit \ | ||
66 | libfilename \ | ||
67 | lltest \ | ||
68 | lock \ | ||
69 | lockfile \ | ||
70 | logfile \ | ||
71 | logger \ | ||
72 | many_cv \ | ||
73 | multiwait \ | ||
74 | nameshm1 \ | ||
75 | nblayer \ | ||
76 | nonblock \ | ||
77 | ntioto \ | ||
78 | ntoh \ | ||
79 | op_2long \ | ||
80 | op_excl \ | ||
81 | op_filnf \ | ||
82 | op_filok \ | ||
83 | op_nofil \ | ||
84 | parent \ | ||
85 | parsetm \ | ||
86 | peek \ | ||
87 | perf \ | ||
88 | pipeping \ | ||
89 | pipeping2 \ | ||
90 | pipeself \ | ||
91 | poll_nm \ | ||
92 | poll_to \ | ||
93 | pollable \ | ||
94 | prftest \ | ||
95 | primblok \ | ||
96 | provider \ | ||
97 | prpollml \ | ||
98 | ranfile \ | ||
99 | randseed \ | ||
100 | reinit \ | ||
101 | rwlocktest \ | ||
102 | sel_spd \ | ||
103 | selct_er \ | ||
104 | selct_nm \ | ||
105 | selct_to \ | ||
106 | selintr \ | ||
107 | sema \ | ||
108 | semaerr \ | ||
109 | semaping \ | ||
110 | sendzlf \ | ||
111 | server_test \ | ||
112 | servr_kk \ | ||
113 | servr_uk \ | ||
114 | servr_ku \ | ||
115 | servr_uu \ | ||
116 | short_thread \ | ||
117 | sigpipe \ | ||
118 | socket \ | ||
119 | sockopt \ | ||
120 | sockping \ | ||
121 | sprintf \ | ||
122 | stack \ | ||
123 | stdio \ | ||
124 | str2addr \ | ||
125 | strod \ | ||
126 | switch \ | ||
127 | system \ | ||
128 | testbit \ | ||
129 | testfile \ | ||
130 | threads \ | ||
131 | timemac \ | ||
132 | timetest \ | ||
133 | tpd \ | ||
134 | udpsrv \ | ||
135 | vercheck \ | ||
136 | version \ | ||
137 | writev \ | ||
138 | xnotify \ | ||
139 | zerolen" | ||
140 | |||
141 | inherit autotools-brokensep | ||
142 | |||
143 | do_configure() { | ||
144 | gnu-configize --force | ||
145 | mv config.sub config.guess build/autoconf | ||
146 | oe_runconf | ||
147 | } | ||
148 | |||
149 | do_compile_prepend() { | ||
150 | oe_runmake CROSS_COMPILE=1 CFLAGS="-DXP_UNIX" LDFLAGS="" CC=gcc -C config export | ||
151 | } | ||
152 | |||
153 | do_compile_append() { | ||
154 | oe_runmake -C pr/tests | ||
155 | } | ||
156 | |||
157 | do_install_append() { | ||
158 | install -D ${WORKDIR}/nspr.pc.in ${D}${libdir}/pkgconfig/nspr.pc | ||
159 | sed -i s:OEPREFIX:${prefix}:g ${D}${libdir}/pkgconfig/nspr.pc | ||
160 | sed -i s:OELIBDIR:${libdir}:g ${D}${libdir}/pkgconfig/nspr.pc | ||
161 | sed -i s:OEINCDIR:${includedir}:g ${D}${libdir}/pkgconfig/nspr.pc | ||
162 | sed -i s:OEEXECPREFIX:${exec_prefix}:g ${D}${libdir}/pkgconfig/nspr.pc | ||
163 | cd ${S}/pr/tests | ||
164 | mkdir -p ${D}${libdir}/nspr/tests | ||
165 | install -m 0755 ${TESTS} ${D}${libdir}/nspr/tests | ||
166 | |||
167 | # delete compile-et.pl and perr.properties from ${bindir} because these are | ||
168 | # only used to generate prerr.c and prerr.h files from prerr.et at compile | ||
169 | # time | ||
170 | rm ${D}${bindir}/compile-et.pl ${D}${bindir}/prerr.properties | ||
171 | } | ||
172 | |||
173 | FILES_${PN} = "${libdir}/lib*.so" | ||
174 | FILES_${PN}-dev = "${bindir}/* ${libdir}/nspr/tests/* ${libdir}/pkgconfig \ | ||
175 | ${includedir}/* ${datadir}/aclocal/* " | ||
176 | FILES_${PN}-dbg += "${libdir}/nspr/tests/.debug/*" | ||
177 | |||
178 | BBCLASSEXTEND = "native nativesdk" | ||