mraa_git.bb 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. SUMMARY = "Linux Library for low speed I/O Communication"
  2. HOMEPAGE = "https://github.com/intel-iot-devkit/mraa"
  3. SECTION = "libs"
  4. LICENSE = "MIT"
  5. LIC_FILES_CHKSUM = "file://COPYING;md5=91e7de50a8d3cf01057f318d72460acd"
  6. SRCREV = "7786c7ded5c9ce7773890d0e3dc27632898fc6b1"
  7. PV = "2.2.0+git${SRCPV}"
  8. SRC_URI = "git://github.com/eclipse/${BPN}.git;protocol=http \
  9. file://0001-cmake-Use-a-regular-expression-to-match-x86-architec.patch \
  10. file://0001-include-Declare-gVERSION-global-as-extern.patch \
  11. "
  12. S = "${WORKDIR}/git"
  13. # CMakeLists.txt checks the architecture, only x86 and ARM supported for now
  14. COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*)-linux"
  15. inherit cmake distutils3-base
  16. DEPENDS += "json-c"
  17. EXTRA_OECMAKE_append = " -DINSTALLTOOLS:BOOL=ON -DFIRMATA=ON -DCMAKE_SKIP_RPATH=ON -DPYTHON2_LIBRARY=OFF \
  18. -DPYTHON3_PACKAGES_PATH:PATH=${baselib}/python${PYTHON_BASEVERSION}/site-packages \
  19. -DPYTHON_LIBRARY=${STAGING_LIBDIR}/lib${PYTHON_DIR}${PYTHON_ABI}.so \
  20. -DPYTHON_INCLUDE_DIR=${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI} \
  21. "
  22. # Prepend mraa-utils to make sure bindir ends up in there
  23. PACKAGES =+ "${PN}-utils"
  24. FILES_${PN}-doc += "${datadir}/mraa/examples/"
  25. FILES_${PN}-utils = "${bindir}/"
  26. # override this in local.conf to get needed bindings.
  27. # BINDINGS_pn-mraa="python"
  28. # will result in only the python bindings being built/packaged.
  29. # Note: 'nodejs' is disabled by default because the bindings
  30. # generation currently fails with nodejs (>v7.x).
  31. BINDINGS ??= "python"
  32. # nodejs isn't available for armv4/armv5 architectures
  33. BINDINGS_armv4 ??= "python"
  34. BINDINGS_armv5 ??= "python"
  35. PACKAGECONFIG ??= "${@bb.utils.contains('PACKAGES', 'node-${PN}', 'nodejs', '', d)} \
  36. ${@bb.utils.contains('PACKAGES', '${PYTHON_PN}-${PN}', 'python', '', d)}"
  37. PACKAGECONFIG[python] = "-DBUILDSWIGPYTHON=ON, -DBUILDSWIGPYTHON=OFF, swig-native ${PYTHON_PN},"
  38. PACKAGECONFIG[nodejs] = "-DBUILDSWIGNODE=ON, -DBUILDSWIGNODE=OFF, swig-native nodejs-native,"
  39. PACKAGECONFIG[ft4222] = "-DUSBPLAT=ON -DFTDI4222=ON, -DUSBPLAT=OFF -DFTDI4222=OFF,, libft4222"
  40. FILES_${PYTHON_PN}-${PN} = "${PYTHON_SITEPACKAGES_DIR}/"
  41. RDEPENDS_${PYTHON_PN}-${PN} += "${PYTHON_PN}"
  42. FILES_node-${PN} = "${prefix}/lib/node_modules/"
  43. RDEPENDS_node-${PN} += "nodejs"
  44. ### Include desired language bindings ###
  45. PACKAGES =+ "${@bb.utils.contains('BINDINGS', 'nodejs', 'node-${PN}', '', d)}"
  46. PACKAGES =+ "${@bb.utils.contains('BINDINGS', 'python', '${PYTHON_PN}-${PN}', '', d)}"
  47. TOOLCHAIN = "gcc"