lua_5.3.5.bb 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. DESCRIPTION = "Lua is a powerful light-weight programming language designed \
  2. for extending applications."
  3. LICENSE = "MIT"
  4. LIC_FILES_CHKSUM = "file://doc/readme.html;beginline=318;endline=352;md5=60aa5cfdbd40086501778d9b6ebf29ee"
  5. HOMEPAGE = "http://www.lua.org/"
  6. SRC_URI = "http://www.lua.org/ftp/lua-${PV}.tar.gz;name=tarballsrc \
  7. file://lua.pc.in \
  8. file://0001-Allow-building-lua-without-readline-on-Linux.patch \
  9. file://CVE-2020-15888.patch \
  10. file://CVE-2020-15945.patch \
  11. file://0001-Fixed-bug-barriers-cannot-be-active-during-sweep.patch \
  12. "
  13. # if no test suite matches PV release of Lua exactly, download the suite for the closest Lua release.
  14. PV_testsuites = "5.3.4"
  15. SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', \
  16. 'http://www.lua.org/tests/lua-${PV_testsuites}-tests.tar.gz;name=tarballtest \
  17. file://run-ptest \
  18. ', '', d)}"
  19. SRC_URI[tarballsrc.md5sum] = "4f4b4f323fd3514a68e0ab3da8ce3455"
  20. SRC_URI[tarballsrc.sha256sum] = "0c2eed3f960446e1a3e4b9a1ca2f3ff893b6ce41942cf54d5dd59ab4b3b058ac"
  21. SRC_URI[tarballtest.md5sum] = "b14fe3748c1cb2d74e3acd1943629ba3"
  22. SRC_URI[tarballtest.sha256sum] = "b80771238271c72565e5a1183292ef31bd7166414cd0d43a8eb79845fa7f599f"
  23. inherit pkgconfig binconfig ptest
  24. PACKAGECONFIG ??= "readline"
  25. PACKAGECONFIG[readline] = ",,readline"
  26. UCLIBC_PATCHES += "file://uclibc-pthread.patch"
  27. SRC_URI_append_libc-uclibc = " ${UCLIBC_PATCHES}"
  28. TARGET_CC_ARCH += " -fPIC ${LDFLAGS}"
  29. EXTRA_OEMAKE = "'CC=${CC} -fPIC' 'MYCFLAGS=${CFLAGS} -fPIC' MYLDFLAGS='${LDFLAGS}'"
  30. do_configure_prepend() {
  31. sed -i -e s:/usr/local:${prefix}:g src/luaconf.h
  32. sed -i -e s:lib/lua/:${baselib}/lua/:g src/luaconf.h
  33. }
  34. do_compile () {
  35. oe_runmake ${@bb.utils.contains('PACKAGECONFIG', 'readline', 'linux', 'linux-no-readline', d)}
  36. }
  37. do_install () {
  38. oe_runmake \
  39. 'INSTALL_TOP=${D}${prefix}' \
  40. 'INSTALL_BIN=${D}${bindir}' \
  41. 'INSTALL_INC=${D}${includedir}/' \
  42. 'INSTALL_MAN=${D}${mandir}/man1' \
  43. 'INSTALL_SHARE=${D}${datadir}/lua' \
  44. 'INSTALL_LIB=${D}${libdir}' \
  45. 'INSTALL_CMOD=${D}${libdir}/lua/5.3' \
  46. install
  47. install -d ${D}${libdir}/pkgconfig
  48. sed -e s/@VERSION@/${PV}/ ${WORKDIR}/lua.pc.in > ${WORKDIR}/lua.pc
  49. install -m 0644 ${WORKDIR}/lua.pc ${D}${libdir}/pkgconfig/
  50. rmdir ${D}${datadir}/lua/5.3
  51. rmdir ${D}${datadir}/lua
  52. }
  53. do_install_ptest () {
  54. cp -R --no-dereference --preserve=mode,links -v ${WORKDIR}/lua-${PV_testsuites}-tests ${D}${PTEST_PATH}/test
  55. }
  56. BBCLASSEXTEND = "native nativesdk"