summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/nspr/nspr_4.24.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support/nspr/nspr_4.24.bb')
-rw-r--r--meta/recipes-support/nspr/nspr_4.24.bb193
1 files changed, 193 insertions, 0 deletions
diff --git a/meta/recipes-support/nspr/nspr_4.24.bb b/meta/recipes-support/nspr/nspr_4.24.bb
new file mode 100644
index 0000000000..5f823f8941
--- /dev/null
+++ b/meta/recipes-support/nspr/nspr_4.24.bb
@@ -0,0 +1,193 @@
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] = "d630c2111e1db6d2ec2069aad22b4121"
27SRC_URI[sha256sum] = "90a59a0df6a11528749647fe18401cc7e03881e3e63c309f8c520ce06dd413d0"
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
159do_compile_prepend() {
160 oe_runmake CROSS_COMPILE=1 CFLAGS="-DXP_UNIX ${BUILD_CFLAGS}" LDFLAGS="" CC="${BUILD_CC}" -C config export
161}
162
163do_compile_append() {
164 oe_runmake -C pr/tests
165}
166
167do_install_append() {
168 install -D ${WORKDIR}/nspr.pc.in ${D}${libdir}/pkgconfig/nspr.pc
169 sed -i \
170 -e 's:NSPRVERSION:${PV}:g' \
171 -e 's:OEPREFIX:${prefix}:g' \
172 -e 's:OELIBDIR:${libdir}:g' \
173 -e 's:OEINCDIR:${includedir}:g' \
174 -e 's:OEEXECPREFIX:${exec_prefix}:g' \
175 ${D}${libdir}/pkgconfig/nspr.pc
176
177 mkdir -p ${D}${libdir}/nspr/tests
178 install -m 0755 ${S}/pr/tests/runtests.pl ${D}${libdir}/nspr/tests
179 install -m 0755 ${S}/pr/tests/runtests.sh ${D}${libdir}/nspr/tests
180 cd ${B}/pr/tests
181 install -m 0755 ${TESTS} ${D}${libdir}/nspr/tests
182
183 # delete compile-et.pl and perr.properties from ${bindir} because these are
184 # only used to generate prerr.c and prerr.h files from prerr.et at compile
185 # time
186 rm ${D}${bindir}/compile-et.pl ${D}${bindir}/prerr.properties
187}
188
189FILES_${PN} = "${libdir}/lib*.so"
190FILES_${PN}-dev = "${bindir}/* ${libdir}/nspr/tests/* ${libdir}/pkgconfig \
191 ${includedir}/* ${datadir}/aclocal/* "
192
193BBCLASSEXTEND = "native nativesdk"