Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | SUMMARY = "Netscape Portable Runtime Library" |
| 2 | HOMEPAGE = "http://www.mozilla.org/projects/nspr/" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 3 | LICENSE = "GPL-2.0-only | MPL-2.0 | LGPL-2.1-only" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 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 = "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 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 18 | CACHED_CONFIGUREVARS:append:libc-musl = " CFLAGS='${CFLAGS} -D_PR_POLL_AVAILABLE \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 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 | |
| 23 | UPSTREAM_CHECK_URI = "http://ftp.mozilla.org/pub/nspr/releases/" |
| 24 | UPSTREAM_CHECK_REGEX = "v(?P<pver>\d+(\.\d+)+)/" |
| 25 | |
Andrew Geissler | bbbd5f4 | 2020-10-30 15:42:48 -0500 | [diff] [blame] | 26 | SRC_URI[md5sum] = "a546926d3c8e887be02c668c1293da92" |
| 27 | SRC_URI[sha256sum] = "22286bdb8059d74632cc7c2865c139e63953ecfb33bf4362ab58827e86e92582" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 28 | |
| 29 | CVE_PRODUCT = "netscape_portable_runtime" |
| 30 | |
| 31 | S = "${WORKDIR}/nspr-${PV}/nspr" |
| 32 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 33 | RDEPENDS:${PN}-dev += "perl" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 34 | TARGET_CC_ARCH += "${LDFLAGS}" |
| 35 | |
| 36 | TESTS = " \ |
| 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 | |
| 152 | inherit autotools multilib_script |
| 153 | |
| 154 | MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/nspr-config" |
| 155 | |
| 156 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" |
| 157 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," |
| 158 | |
| 159 | # Do not install nspr in usr/include, but in usr/include/nspr, the |
| 160 | # preferred path upstream. |
| 161 | EXTRA_OECONF += "--includedir=${includedir}/nspr" |
| 162 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 163 | EXTRA_OEMAKE:append:class-native = " EXTRA_LIBS='-lpthread -lrt -ldl'" |
| 164 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 165 | do_compile:prepend() { |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 166 | oe_runmake CROSS_COMPILE=1 CFLAGS="-DXP_UNIX ${BUILD_CFLAGS}" LDFLAGS="" CC="${BUILD_CC}" -C config export |
| 167 | } |
| 168 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 169 | do_compile:append() { |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 170 | oe_runmake -C pr/tests |
| 171 | } |
| 172 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 173 | do_install:append() { |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 174 | install -D ${WORKDIR}/nspr.pc.in ${D}${libdir}/pkgconfig/nspr.pc |
| 175 | sed -i \ |
| 176 | -e 's:NSPRVERSION:${PV}:g' \ |
| 177 | -e 's:OEPREFIX:${prefix}:g' \ |
| 178 | -e 's:OELIBDIR:${libdir}:g' \ |
| 179 | -e 's:OEINCDIR:${includedir}:g' \ |
| 180 | -e 's:OEEXECPREFIX:${exec_prefix}:g' \ |
| 181 | ${D}${libdir}/pkgconfig/nspr.pc |
| 182 | |
| 183 | mkdir -p ${D}${libdir}/nspr/tests |
| 184 | install -m 0755 ${S}/pr/tests/runtests.pl ${D}${libdir}/nspr/tests |
| 185 | install -m 0755 ${S}/pr/tests/runtests.sh ${D}${libdir}/nspr/tests |
| 186 | cd ${B}/pr/tests |
| 187 | install -m 0755 ${TESTS} ${D}${libdir}/nspr/tests |
| 188 | |
| 189 | # delete compile-et.pl and perr.properties from ${bindir} because these are |
| 190 | # only used to generate prerr.c and prerr.h files from prerr.et at compile |
| 191 | # time |
| 192 | rm ${D}${bindir}/compile-et.pl ${D}${bindir}/prerr.properties |
| 193 | } |
| 194 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 195 | FILES:${PN} = "${libdir}/lib*.so" |
| 196 | FILES:${PN}-dev = "${bindir}/* ${libdir}/nspr/tests/* ${libdir}/pkgconfig \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 197 | ${includedir}/* ${datadir}/aclocal/* " |
| 198 | |
| 199 | BBCLASSEXTEND = "native nativesdk" |