lua-cjson_2.1.0.11.bb 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. DESCRIPTION = "Lua CJSON is a fast JSON encoding/parsing module for Lua"
  2. LICENSE = "MIT"
  3. HOMEPAGE = "https://github.com/mpx/lua-cjson"
  4. LIC_FILES_CHKSUM = "file://LICENSE;md5=b1fee3afe4f4a4b26c13016123b2d08a"
  5. DEPENDS += "luajit-native luajit-riscv"
  6. RDEPENDS:${PN} += "luajit-riscv"
  7. SRC_URI = "git://github.com/openresty/lua-cjson.git;branch=master;protocol=https \
  8. file://run-ptest \
  9. "
  10. SRCREV = "91c3363e7dc86263a379719e5508fc0979df84d3"
  11. S = "${WORKDIR}/git"
  12. LUA_VERSION = "5.1"
  13. EXTRA_OEMAKE = "LUA_V=${LUA_VERSION} PREFIX=${D}/usr LUA_INCLUDE_DIR=${STAGING_INCDIR}/luajit-2.1"
  14. do_compile() {
  15. cd ${S}
  16. oe_runmake all
  17. }
  18. do_install() {
  19. cd ${S}
  20. oe_runmake install
  21. }
  22. FILES:${PN} = " \
  23. ${datadir}/lua/${LUA_VERSION}/ \
  24. ${libdir}/lua/${LUA_VERSION}/ \
  25. "
  26. inherit ptest
  27. do_compile_ptest() {
  28. cd ${S}/tests
  29. ./genutf8.pl
  30. }
  31. do_install_ptest() {
  32. mkdir -p ${D}${PTEST_PATH}/tests
  33. install ${S}/tests/test.lua ${D}${PTEST_PATH}/tests
  34. install ${S}/tests/octets-escaped.dat ${D}${PTEST_PATH}/tests
  35. install ${S}/tests/utf8.dat ${D}${PTEST_PATH}/tests
  36. cp -r ${S}/lua/cjson ${D}${PTEST_PATH}/tests
  37. }