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