luajit_2.0.5.bb 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. SUMMARY = "Just-In-Time Compiler for Lua"
  2. LICENSE = "MIT"
  3. LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=10a96c93403affcc34765f4c2612bc22"
  4. HOMEPAGE = "http://luajit.org"
  5. PV .= "+git${SRCPV}"
  6. SRCREV = "02b521981a1ab919ff2cd4d9bcaee80baf77dce2"
  7. SRC_URI = "git://luajit.org/git/luajit-2.0.git;protocol=http \
  8. file://0001-Do-not-strip-automatically-this-leaves-the-stripping.patch \
  9. file://clang.patch \
  10. "
  11. S = "${WORKDIR}/git"
  12. inherit pkgconfig binconfig siteinfo
  13. BBCLASSEXTEND = "native"
  14. # http://luajit.org/install.html#cross
  15. # Host luajit needs to be compiled with the same pointer size
  16. # If you want to cross-compile to any 32 bit target on an x64 OS,
  17. # you need to install the multilib development package (e.g.
  18. # libc6-dev-i386 on Debian/Ubuntu) and build a 32 bit host part
  19. # (HOST_CC="gcc -m32").
  20. BUILD_CC_ARCH_append = " ${@['-m32',''][d.getVar('SITEINFO_BITS') != '32']}"
  21. # The lua makefiles expect the TARGET_SYS to be from uname -s
  22. # Values: Windows, Linux, Darwin, iOS, SunOS, PS3, GNU/kFreeBSD
  23. LUA_TARGET_OS = "Unknown"
  24. LUA_TARGET_OS_darwin = "Darwin"
  25. LUA_TARGET_OS_linux = "Linux"
  26. LUA_TARGET_OS_linux-gnueabi = "Linux"
  27. LUA_TARGET_OS_mingw32 = "Windows"
  28. # We don't want the lua buildsystem's compiler optimizations, or its
  29. # stripping, and we don't want it to pick up CFLAGS or LDFLAGS, as those apply
  30. # to both host and target compiles
  31. EXTRA_OEMAKE = "\
  32. Q= E='@:' \
  33. \
  34. CCOPT= CCOPT_x86= CFLAGS= LDFLAGS= TARGET_STRIP='@:' \
  35. \
  36. 'TARGET_SYS=${LUA_TARGET_OS}' \
  37. \
  38. 'CC=${CC}' \
  39. 'TARGET_AR=${AR} rcus' \
  40. 'TARGET_CFLAGS=${CFLAGS}' \
  41. 'TARGET_LDFLAGS=${LDFLAGS}' \
  42. 'TARGET_SHLDFLAGS=${LDFLAGS}' \
  43. 'HOST_CC=${BUILD_CC}' \
  44. 'HOST_CFLAGS=${BUILD_CFLAGS}' \
  45. \
  46. 'PREFIX=${prefix}' \
  47. 'MULTILIB=${baselib}' \
  48. 'LDCONFIG=:' \
  49. "
  50. do_compile () {
  51. oe_runmake
  52. }
  53. # There's INSTALL_LIB and INSTALL_SHARE also, but the lua binary hardcodes the
  54. # '/share' and '/' + LUA_MULTILIB paths, so we don't want to break those
  55. # expectations.
  56. EXTRA_OEMAKEINST = "\
  57. 'DESTDIR=${D}' \
  58. 'INSTALL_BIN=${D}${bindir}' \
  59. 'INSTALL_INC=${D}${includedir}/luajit-$(MAJVER).$(MINVER)' \
  60. 'INSTALL_MAN=${D}${mandir}/man1' \
  61. "
  62. do_install () {
  63. oe_runmake ${EXTRA_OEMAKEINST} install
  64. rmdir ${D}${datadir}/lua/5.* \
  65. ${D}${datadir}/lua \
  66. ${D}${libdir}/lua/5.* \
  67. ${D}${libdir}/lua
  68. }
  69. PACKAGES += 'luajit-common'
  70. # See the comment for EXTRA_OEMAKEINST. This is needed to ensure the hardcoded
  71. # paths are packaged regardless of what the libdir and datadir paths are.
  72. FILES_${PN} += "${prefix}/${baselib} ${prefix}/share"
  73. FILES_${PN} += "${libdir}/libluajit-5.1.so.2 \
  74. ${libdir}/libluajit-5.1.so.${PV} \
  75. "
  76. FILES_${PN}-dev += "${libdir}/libluajit-5.1.a \
  77. ${libdir}/libluajit-5.1.so \
  78. ${libdir}/pkgconfig/luajit.pc \
  79. "
  80. FILES_luajit-common = "${datadir}/${BPN}-${PV}"
  81. # Aarch64/mips64 is not supported in this release
  82. COMPATIBLE_HOST_aarch64 = "null"
  83. COMPATIBLE_HOST_mipsarchn32 = "null"
  84. COMPATIBLE_HOST_mipsarchn64 = "null"