blob: 25563e50f19a5c74302ff0abb224ba45d0bf1d68 [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001SUMMARY = "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://0004-Add-ARC-support.patch \
15 file://Makefile.in-remove-_BUILD_STRING-and-_BUILD_TIME.patch \
16 file://nspr.pc.in \
17"
18
19CACHED_CONFIGUREVARS_append_libc-musl = " CFLAGS='${CFLAGS} -D_PR_POLL_AVAILABLE \
20 -D_PR_HAVE_OFF64_T -D_PR_INET6 -D_PR_HAVE_INET_NTOP \
21 -D_PR_HAVE_GETHOSTBYNAME2 -D_PR_HAVE_GETADDRINFO \
22 -D_PR_INET6_PROBE -DNO_DLOPEN_NULL'"
23
24UPSTREAM_CHECK_URI = "http://ftp.mozilla.org/pub/nspr/releases/"
25UPSTREAM_CHECK_REGEX = "v(?P<pver>\d+(\.\d+)+)/"
26
27SRC_URI[md5sum] = "b865586f19912a50acc3755d8a45dbaa"
28SRC_URI[sha256sum] = "15ea32c7b100217b6e3193bc03e77f485d9bf7504051443ba9ce86d1c17c6b5a"
29
30CVE_PRODUCT = "netscape_portable_runtime"
31
32S = "${WORKDIR}/nspr-${PV}/nspr"
33
34RDEPENDS_${PN}-dev += "perl"
35TARGET_CC_ARCH += "${LDFLAGS}"
36
37TESTS = " \
38 accept \
39 acceptread \
40 acceptreademu \
41 affinity \
42 alarm \
43 anonfm \
44 atomic \
45 attach \
46 bigfile \
47 cleanup \
48 cltsrv \
49 concur \
50 cvar \
51 cvar2 \
52 dlltest \
53 dtoa \
54 errcodes \
55 exit \
56 fdcach \
57 fileio \
58 foreign \
59 formattm \
60 fsync \
61 gethost \
62 getproto \
63 i2l \
64 initclk \
65 inrval \
66 instrumt \
67 intrio \
68 intrupt \
69 io_timeout \
70 ioconthr \
71 join \
72 joinkk \
73 joinku \
74 joinuk \
75 joinuu \
76 layer \
77 lazyinit \
78 libfilename \
79 lltest \
80 lock \
81 lockfile \
82 logfile \
83 logger \
84 many_cv \
85 multiwait \
86 nameshm1 \
87 nblayer \
88 nonblock \
89 ntioto \
90 ntoh \
91 op_2long \
92 op_excl \
93 op_filnf \
94 op_filok \
95 op_nofil \
96 parent \
97 parsetm \
98 peek \
99 perf \
100 pipeping \
101 pipeping2 \
102 pipeself \
103 poll_nm \
104 poll_to \
105 pollable \
106 prftest \
107 primblok \
108 provider \
109 prpollml \
110 ranfile \
111 randseed \
112 reinit \
113 rwlocktest \
114 sel_spd \
115 selct_er \
116 selct_nm \
117 selct_to \
118 selintr \
119 sema \
120 semaerr \
121 semaping \
122 sendzlf \
123 server_test \
124 servr_kk \
125 servr_uk \
126 servr_ku \
127 servr_uu \
128 short_thread \
129 sigpipe \
130 socket \
131 sockopt \
132 sockping \
133 sprintf \
134 stack \
135 stdio \
136 str2addr \
137 strod \
138 switch \
139 system \
140 testbit \
141 testfile \
142 threads \
143 timemac \
144 timetest \
145 tpd \
146 udpsrv \
147 vercheck \
148 version \
149 writev \
150 xnotify \
151 zerolen"
152
153inherit autotools multilib_script
154
155MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/nspr-config"
156
157PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
158PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
159
160do_compile_prepend() {
161 oe_runmake CROSS_COMPILE=1 CFLAGS="-DXP_UNIX ${BUILD_CFLAGS}" LDFLAGS="" CC="${BUILD_CC}" -C config export
162}
163
164do_compile_append() {
165 oe_runmake -C pr/tests
166}
167
168do_install_append() {
169 install -D ${WORKDIR}/nspr.pc.in ${D}${libdir}/pkgconfig/nspr.pc
170 sed -i \
171 -e 's:NSPRVERSION:${PV}:g' \
172 -e 's:OEPREFIX:${prefix}:g' \
173 -e 's:OELIBDIR:${libdir}:g' \
174 -e 's:OEINCDIR:${includedir}:g' \
175 -e 's:OEEXECPREFIX:${exec_prefix}:g' \
176 ${D}${libdir}/pkgconfig/nspr.pc
177
178 mkdir -p ${D}${libdir}/nspr/tests
179 install -m 0755 ${S}/pr/tests/runtests.pl ${D}${libdir}/nspr/tests
180 install -m 0755 ${S}/pr/tests/runtests.sh ${D}${libdir}/nspr/tests
181 cd ${B}/pr/tests
182 install -m 0755 ${TESTS} ${D}${libdir}/nspr/tests
183
184 # delete compile-et.pl and perr.properties from ${bindir} because these are
185 # only used to generate prerr.c and prerr.h files from prerr.et at compile
186 # time
187 rm ${D}${bindir}/compile-et.pl ${D}${bindir}/prerr.properties
188}
189
190FILES_${PN} = "${libdir}/lib*.so"
191FILES_${PN}-dev = "${bindir}/* ${libdir}/nspr/tests/* ${libdir}/pkgconfig \
192 ${includedir}/* ${datadir}/aclocal/* "
193
194BBCLASSEXTEND = "native nativesdk"