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