Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 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 | |
| 8 | # These dependencies are required by Foundation |
| 9 | DEPENDS = "libpcre zlib" |
| 10 | |
| 11 | SRC_URI = " \ |
| 12 | git://github.com/pocoproject/poco.git;branch=poco-${PV} \ |
Andrew Geissler | 4b7c115 | 2020-11-30 19:55:29 -0600 | [diff] [blame] | 13 | file://0001-Add-support-of-arch-riscv32.patch \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 14 | file://run-ptest \ |
| 15 | " |
Andrew Geissler | 4b7c115 | 2020-11-30 19:55:29 -0600 | [diff] [blame] | 16 | SRCREV = "a3d827d80eb7f3329c58e73eb2906cb7ba829019" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 17 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 18 | UPSTREAM_CHECK_GITTAGREGEX = "poco-(?P<pver>\d+(\.\d+)+)" |
| 19 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 20 | S = "${WORKDIR}/git" |
| 21 | |
| 22 | inherit cmake ptest |
| 23 | |
| 24 | # By default the most commonly used poco components are built |
| 25 | # Foundation is built anyway and doesn't need to be listed explicitly |
| 26 | # these don't have dependencies outside oe-core |
Andrew Geissler | 4b7c115 | 2020-11-30 19:55:29 -0600 | [diff] [blame] | 27 | PACKAGECONFIG ??= "XML JSON MongoDB PDF Util Net NetSSL Crypto JWT Data DataSQLite Zip Encodings Redis" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 28 | |
Andrew Geissler | 4b7c115 | 2020-11-30 19:55:29 -0600 | [diff] [blame] | 29 | PACKAGECONFIG[XML] = "-DENABLE_XML=ON,-DENABLE_XML=OFF,expat" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 30 | PACKAGECONFIG[JSON] = "-DENABLE_JSON=ON,-DENABLE_JSON=OFF" |
| 31 | PACKAGECONFIG[MongoDB] = "-DENABLE_MONGODB=ON,-DENABLE_MONGODB=OFF" |
| 32 | PACKAGECONFIG[PDF] = "-DENABLE_PDF=ON,-DENABLE_PDF=OFF,zlib" |
| 33 | PACKAGECONFIG[Util] = "-DENABLE_UTIL=ON,-DENABLE_UTIL=OFF" |
| 34 | PACKAGECONFIG[Net] = "-DENABLE_NET=ON,-DENABLE_NET=OFF" |
Andrew Geissler | 4b7c115 | 2020-11-30 19:55:29 -0600 | [diff] [blame] | 35 | PACKAGECONFIG[NetSSL] = "-DENABLE_NETSSL=ON,-DENABLE_NETSSL=OFF,openssl" |
| 36 | PACKAGECONFIG[Crypto] = "-DENABLE_CRYPTO=ON,-DENABLE_CRYPTO=OFF,openssl" |
| 37 | PACKAGECONFIG[JWT] = "-DENABLE_JWT=ON,-DENABLE_JWT=OFF,openssl" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 38 | PACKAGECONFIG[Data] = "-DENABLE_DATA=ON,-DENABLE_DATA=OFF" |
| 39 | PACKAGECONFIG[DataSQLite] = "-DENABLE_DATA_SQLITE=ON -DSQLITE3_LIBRARY:STRING=sqlite3,-DENABLE_DATA_SQLITE=OFF,sqlite3" |
| 40 | PACKAGECONFIG[Zip] = "-DENABLE_ZIP=ON,-DENABLE_ZIP=OFF" |
| 41 | PACKAGECONFIG[Encodings] = "-DENABLE_ENCODINGS=ON,-DENABLE_ENCODINGS=OFF" |
| 42 | PACKAGECONFIG[Redis] = "-DENABLE_REDIS=ON,-DENABLE_REDIS=OFF" |
| 43 | |
| 44 | # Additional components not build by default, |
| 45 | # they might have dependencies not included in oe-core |
| 46 | # or they don't work on all architectures |
| 47 | PACKAGECONFIG[mod_poco] = "-DENABLE_APACHECONNECTOR=ON,-DENABLE_APACHECONNECTOR=OFF,apr apache2" |
| 48 | PACKAGECONFIG[CppParser] = "-DENABLE_CPPPARSER=ON,-DENABLE_CPPPARSER=OFF" |
| 49 | PACKAGECONFIG[DataMySQL] = "-DENABLE_DATA_MYSQL=ON -DMYSQL_LIB:STRING=mysqlclient_r,-DENABLE_DATA_MYSQL=OFF,mariadb" |
| 50 | PACKAGECONFIG[DataODBC] = "-DENABLE_DATA_ODBC=ON,-DENABLE_DATA_ODBC=OFF,libiodbc" |
| 51 | PACKAGECONFIG[PageCompiler] = "-DENABLE_PAGECOMPILER=ON,-DENABLE_PAGECOMPILER=OFF" |
| 52 | PACKAGECONFIG[PageCompilerFile2Page] = "-DENABLE_PAGECOMPILER_FILE2PAGE=ON,-DENABLE_PAGECOMPILER_FILE2PAGE=OFF" |
| 53 | PACKAGECONFIG[SevenZip] = "-DENABLE_SEVENZIP=ON,-DENABLE_SEVENZIP=OFF" |
| 54 | |
| 55 | EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=RelWithDebInfo -DPOCO_UNBUNDLED=ON \ |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 56 | -DLIB_SUFFIX=${@d.getVar('baselib').replace('lib', '')} \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 57 | ${@bb.utils.contains('PTEST_ENABLED', '1', '-DENABLE_TESTS=ON ', '', d)}" |
| 58 | |
| 59 | # For the native build we want to use the bundled version |
| 60 | EXTRA_OECMAKE_append_class-native = " -DPOCO_UNBUNDLED=OFF" |
| 61 | |
| 62 | # do not use rpath |
| 63 | EXTRA_OECMAKE_append = " -DCMAKE_SKIP_RPATH=ON" |
| 64 | |
| 65 | python populate_packages_prepend () { |
| 66 | poco_libdir = d.expand('${libdir}') |
| 67 | pn = d.getVar("PN") |
| 68 | packages = [] |
| 69 | testrunners = [] |
| 70 | |
| 71 | def hook(f, pkg, file_regex, output_pattern, modulename): |
| 72 | packages.append(pkg) |
| 73 | testrunners.append(modulename) |
| 74 | |
| 75 | do_split_packages(d, poco_libdir, '^libPoco(.*)\.so\..*$', |
| 76 | 'poco-%s', 'Poco %s component', extra_depends='', prepend=True, hook=hook) |
| 77 | |
| 78 | d.setVar("RRECOMMENDS_%s" % pn, " ".join(packages)) |
| 79 | d.setVar("POCO_TESTRUNNERS", "\n".join(testrunners)) |
| 80 | } |
| 81 | |
| 82 | do_install_ptest () { |
| 83 | cp -rf ${B}/bin/ ${D}${PTEST_PATH} |
| 84 | cp -f ${B}/lib/libCppUnit.so* ${D}${libdir} |
| 85 | cp -rf ${B}/*/testsuite/data ${D}${PTEST_PATH}/bin/ |
| 86 | find "${D}${PTEST_PATH}" -executable -exec chrpath -d {} \; |
| 87 | echo "${POCO_TESTRUNNERS}" > "${D}${PTEST_PATH}/testrunners" |
| 88 | } |
| 89 | |
| 90 | PACKAGES_DYNAMIC = "poco-.*" |
| 91 | |
| 92 | # "poco" is a metapackage which pulls in all Poco components |
| 93 | ALLOW_EMPTY_${PN} = "1" |
| 94 | |
| 95 | # cppunit is only built if tests are enabled |
| 96 | PACKAGES =+ "${PN}-cppunit" |
| 97 | FILES_${PN}-cppunit += "${libdir}/libCppUnit.so*" |
| 98 | ALLOW_EMPTY_${PN}-cppunit = "1" |
| 99 | |
| 100 | RDEPENDS_${PN}-ptest += "${PN}-cppunit" |
| 101 | |
| 102 | BBCLASSEXTEND = "native" |