Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1 | SUMMARY = "Duktape embeddable Javascript engine" |
| 2 | DESCRIPTION = "Duktape is an embeddable Javascript engine, with a focus on portability and compact footprint." |
| 3 | HOMEPAGE = "https://duktape.org" |
| 4 | LICENSE = "MIT" |
| 5 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b7825df97b52f926fc71300f7880408" |
| 6 | |
Andrew Geissler | 78b7279 | 2022-06-14 06:47:25 -0500 | [diff] [blame] | 7 | SRC_URI = "https://duktape.org/duktape-${PV}.tar.xz \ |
| 8 | file://run-ptest \ |
| 9 | " |
| 10 | inherit ptest |
| 11 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 12 | SRC_URI[sha256sum] = "90f8d2fa8b5567c6899830ddef2c03f3c27960b11aca222fa17aa7ac613c2890" |
| 13 | |
| 14 | EXTRA_OEMAKE = "INSTALL_PREFIX='${prefix}' DESTDIR='${D}' LIBDIR='/${baselib}'" |
| 15 | |
| 16 | do_compile () { |
| 17 | oe_runmake -f Makefile.sharedlibrary INSTALL_PREFIX="${prefix}" DESTDIR="${D}" |
| 18 | } |
| 19 | |
Andrew Geissler | 78b7279 | 2022-06-14 06:47:25 -0500 | [diff] [blame] | 20 | do_compile_ptest() { |
| 21 | oe_runmake -f Makefile.hello INSTALL_PREFIX="${prefix}" DESTDIR="${D}" |
| 22 | oe_runmake -f Makefile.eval INSTALL_PREFIX="${prefix}" DESTDIR="${D}" |
| 23 | oe_runmake -f Makefile.eventloop INSTALL_PREFIX="${prefix}" DESTDIR="${D}" |
| 24 | } |
| 25 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 26 | do_install () { |
| 27 | oe_runmake -f Makefile.sharedlibrary INSTALL_PREFIX="${prefix}" DESTDIR="${D}" install |
| 28 | # libduktaped is identical to libduktape but has an hard-coded -g build flags, remove it |
| 29 | rm -f ${D}${libdir}/libduktaped.so* |
| 30 | } |
Andrew Geissler | 78b7279 | 2022-06-14 06:47:25 -0500 | [diff] [blame] | 31 | |
| 32 | do_install_ptest() { |
| 33 | install -m 0755 "${WORKDIR}/duktape-2.7.0/hello" "${D}${PTEST_PATH}" |
| 34 | install -m 0755 "${WORKDIR}/duktape-2.7.0/eval" "${D}${PTEST_PATH}" |
| 35 | install -m 0755 "${WORKDIR}/duktape-2.7.0/evloop" "${D}${PTEST_PATH}" |
| 36 | install -m 0755 "${WORKDIR}/duktape-2.7.0/examples/eventloop/timer-test.js" "${D}${PTEST_PATH}" |
| 37 | install -m 0755 "${WORKDIR}/duktape-2.7.0/examples/eventloop/ecma_eventloop.js" "${D}${PTEST_PATH}" |
| 38 | } |
| 39 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 40 | RDEPENDS:${PN}-ptest += "make" |