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