poco_1.10.1.bb 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. SUMMARY = "Modern, powerful open source cross-platform C++ class libraries"
  2. DESCRIPTION = "Modern, powerful open source C++ class libraries and frameworks for building network- and internet-based applications that run on desktop, server, mobile and embedded systems."
  3. HOMEPAGE = "http://pocoproject.org/"
  4. SECTION = "libs"
  5. LICENSE = "BSL-1.0"
  6. LIC_FILES_CHKSUM = "file://LICENSE;md5=4267f48fc738f50380cbeeb76f95cebc"
  7. # These dependencies are required by Foundation
  8. DEPENDS = "libpcre zlib"
  9. SRC_URI = " \
  10. git://github.com/pocoproject/poco.git;branch=poco-${PV} \
  11. file://0001-Add-support-of-arch-riscv32.patch \
  12. file://run-ptest \
  13. "
  14. SRCREV = "a3d827d80eb7f3329c58e73eb2906cb7ba829019"
  15. UPSTREAM_CHECK_GITTAGREGEX = "poco-(?P<pver>\d+(\.\d+)+)"
  16. S = "${WORKDIR}/git"
  17. inherit cmake ptest
  18. # By default the most commonly used poco components are built
  19. # Foundation is built anyway and doesn't need to be listed explicitly
  20. # these don't have dependencies outside oe-core
  21. PACKAGECONFIG ??= "XML JSON MongoDB PDF Util Net NetSSL Crypto JWT Data DataSQLite Zip Encodings Redis"
  22. PACKAGECONFIG[XML] = "-DENABLE_XML=ON,-DENABLE_XML=OFF,expat"
  23. PACKAGECONFIG[JSON] = "-DENABLE_JSON=ON,-DENABLE_JSON=OFF"
  24. PACKAGECONFIG[MongoDB] = "-DENABLE_MONGODB=ON,-DENABLE_MONGODB=OFF"
  25. PACKAGECONFIG[PDF] = "-DENABLE_PDF=ON,-DENABLE_PDF=OFF,zlib"
  26. PACKAGECONFIG[Util] = "-DENABLE_UTIL=ON,-DENABLE_UTIL=OFF"
  27. PACKAGECONFIG[Net] = "-DENABLE_NET=ON,-DENABLE_NET=OFF"
  28. PACKAGECONFIG[NetSSL] = "-DENABLE_NETSSL=ON,-DENABLE_NETSSL=OFF,openssl"
  29. PACKAGECONFIG[Crypto] = "-DENABLE_CRYPTO=ON,-DENABLE_CRYPTO=OFF,openssl"
  30. PACKAGECONFIG[JWT] = "-DENABLE_JWT=ON,-DENABLE_JWT=OFF,openssl"
  31. PACKAGECONFIG[Data] = "-DENABLE_DATA=ON,-DENABLE_DATA=OFF"
  32. PACKAGECONFIG[DataSQLite] = "-DENABLE_DATA_SQLITE=ON -DSQLITE3_LIBRARY:STRING=sqlite3,-DENABLE_DATA_SQLITE=OFF,sqlite3"
  33. PACKAGECONFIG[Zip] = "-DENABLE_ZIP=ON,-DENABLE_ZIP=OFF"
  34. PACKAGECONFIG[Encodings] = "-DENABLE_ENCODINGS=ON,-DENABLE_ENCODINGS=OFF"
  35. PACKAGECONFIG[Redis] = "-DENABLE_REDIS=ON,-DENABLE_REDIS=OFF"
  36. # Additional components not build by default,
  37. # they might have dependencies not included in oe-core
  38. # or they don't work on all architectures
  39. PACKAGECONFIG[mod_poco] = "-DENABLE_APACHECONNECTOR=ON,-DENABLE_APACHECONNECTOR=OFF,apr apache2"
  40. PACKAGECONFIG[CppParser] = "-DENABLE_CPPPARSER=ON,-DENABLE_CPPPARSER=OFF"
  41. PACKAGECONFIG[DataMySQL] = "-DENABLE_DATA_MYSQL=ON -DMYSQL_LIB:STRING=mysqlclient_r,-DENABLE_DATA_MYSQL=OFF,mariadb"
  42. PACKAGECONFIG[DataODBC] = "-DENABLE_DATA_ODBC=ON,-DENABLE_DATA_ODBC=OFF,libiodbc"
  43. PACKAGECONFIG[PageCompiler] = "-DENABLE_PAGECOMPILER=ON,-DENABLE_PAGECOMPILER=OFF"
  44. PACKAGECONFIG[PageCompilerFile2Page] = "-DENABLE_PAGECOMPILER_FILE2PAGE=ON,-DENABLE_PAGECOMPILER_FILE2PAGE=OFF"
  45. PACKAGECONFIG[SevenZip] = "-DENABLE_SEVENZIP=ON,-DENABLE_SEVENZIP=OFF"
  46. EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=RelWithDebInfo -DPOCO_UNBUNDLED=ON \
  47. -DLIB_SUFFIX=${@d.getVar('baselib').replace('lib', '')} \
  48. ${@bb.utils.contains('PTEST_ENABLED', '1', '-DENABLE_TESTS=ON ', '', d)}"
  49. # For the native build we want to use the bundled version
  50. EXTRA_OECMAKE_append_class-native = " -DPOCO_UNBUNDLED=OFF"
  51. # do not use rpath
  52. EXTRA_OECMAKE_append = " -DCMAKE_SKIP_RPATH=ON"
  53. python populate_packages_prepend () {
  54. poco_libdir = d.expand('${libdir}')
  55. pn = d.getVar("PN")
  56. packages = []
  57. testrunners = []
  58. def hook(f, pkg, file_regex, output_pattern, modulename):
  59. packages.append(pkg)
  60. testrunners.append(modulename)
  61. do_split_packages(d, poco_libdir, '^libPoco(.*)\.so\..*$',
  62. 'poco-%s', 'Poco %s component', extra_depends='', prepend=True, hook=hook)
  63. d.setVar("RRECOMMENDS_%s" % pn, " ".join(packages))
  64. d.setVar("POCO_TESTRUNNERS", "\n".join(testrunners))
  65. }
  66. do_install_ptest () {
  67. cp -rf ${B}/bin/ ${D}${PTEST_PATH}
  68. cp -f ${B}/lib/libCppUnit.so* ${D}${libdir}
  69. cp -rf ${B}/*/testsuite/data ${D}${PTEST_PATH}/bin/
  70. find "${D}${PTEST_PATH}" -executable -exec chrpath -d {} \;
  71. echo "${POCO_TESTRUNNERS}" > "${D}${PTEST_PATH}/testrunners"
  72. }
  73. PACKAGES_DYNAMIC = "poco-.*"
  74. # "poco" is a metapackage which pulls in all Poco components
  75. ALLOW_EMPTY_${PN} = "1"
  76. # cppunit is only built if tests are enabled
  77. PACKAGES =+ "${PN}-cppunit"
  78. FILES_${PN}-cppunit += "${libdir}/libCppUnit.so*"
  79. ALLOW_EMPTY_${PN}-cppunit = "1"
  80. RDEPENDS_${PN}-ptest += "${PN}-cppunit"
  81. BBCLASSEXTEND = "native"