Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [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 = "libpcre2 zlib" |
| 10 | |
| 11 | SRC_URI = "git://github.com/pocoproject/poco.git;branch=master;protocol=https \ |
Patrick Williams | b9af875 | 2023-01-30 13:28:01 -0600 | [diff] [blame] | 12 | file://0001-Use-std-atomic-int-instead-of-std-atomic-bool.patch \ |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 13 | file://run-ptest \ |
| 14 | " |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 15 | SRCREV = "1211613642269b7d53bea58b02de7fcd25ece3b9" |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 16 | |
| 17 | UPSTREAM_CHECK_GITTAGREGEX = "poco-(?P<pver>\d+(\.\d+)+)" |
| 18 | |
| 19 | S = "${WORKDIR}/git" |
| 20 | |
| 21 | inherit cmake ptest |
| 22 | |
| 23 | # By default the most commonly used poco components are built |
| 24 | # Foundation is built anyway and doesn't need to be listed explicitly |
| 25 | # these don't have dependencies outside oe-core |
| 26 | PACKAGECONFIG ??= "XML JSON MongoDB PDF Util Net NetSSL Crypto JWT Data DataSQLite Zip Encodings Redis Prometheus" |
| 27 | |
| 28 | PACKAGECONFIG[XML] = "-DENABLE_XML=ON,-DENABLE_XML=OFF,expat" |
| 29 | PACKAGECONFIG[JSON] = "-DENABLE_JSON=ON,-DENABLE_JSON=OFF" |
| 30 | PACKAGECONFIG[MongoDB] = "-DENABLE_MONGODB=ON,-DENABLE_MONGODB=OFF" |
| 31 | PACKAGECONFIG[PDF] = "-DENABLE_PDF=ON,-DENABLE_PDF=OFF,zlib" |
| 32 | PACKAGECONFIG[Util] = "-DENABLE_UTIL=ON,-DENABLE_UTIL=OFF" |
| 33 | PACKAGECONFIG[Net] = "-DENABLE_NET=ON,-DENABLE_NET=OFF" |
| 34 | PACKAGECONFIG[NetSSL] = "-DENABLE_NETSSL=ON,-DENABLE_NETSSL=OFF,openssl" |
| 35 | PACKAGECONFIG[Crypto] = "-DENABLE_CRYPTO=ON,-DENABLE_CRYPTO=OFF,openssl" |
| 36 | PACKAGECONFIG[JWT] = "-DENABLE_JWT=ON,-DENABLE_JWT=OFF,openssl" |
| 37 | PACKAGECONFIG[Data] = "-DENABLE_DATA=ON,-DENABLE_DATA=OFF" |
| 38 | PACKAGECONFIG[DataSQLite] = "-DENABLE_DATA_SQLITE=ON -DSQLITE3_LIBRARY:STRING=sqlite3,-DENABLE_DATA_SQLITE=OFF,sqlite3" |
| 39 | PACKAGECONFIG[Zip] = "-DENABLE_ZIP=ON,-DENABLE_ZIP=OFF" |
| 40 | PACKAGECONFIG[Encodings] = "-DENABLE_ENCODINGS=ON,-DENABLE_ENCODINGS=OFF" |
| 41 | PACKAGECONFIG[Redis] = "-DENABLE_REDIS=ON,-DENABLE_REDIS=OFF" |
| 42 | PACKAGECONFIG[Prometheus] = "-DENABLE_PROMETHEUS=ON,-DENABLE_PROMETHEUS=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[ActiveRecord] = "-DENABLE_ACTIVERECORD=ON,-DENABLE_ACTIVERECORD=OFF" |
| 52 | PACKAGECONFIG[ActiveRecordCompiler] = "-DENABLE_ACTIVERECORD_COMPILER=ON,-DENABLE_ACTIVERECORD_COMPILER=OFF" |
| 53 | PACKAGECONFIG[PageCompiler] = "-DENABLE_PAGECOMPILER=ON,-DENABLE_PAGECOMPILER=OFF" |
| 54 | PACKAGECONFIG[PageCompilerFile2Page] = "-DENABLE_PAGECOMPILER_FILE2PAGE=ON,-DENABLE_PAGECOMPILER_FILE2PAGE=OFF" |
| 55 | PACKAGECONFIG[SevenZip] = "-DENABLE_SEVENZIP=ON,-DENABLE_SEVENZIP=OFF" |
| 56 | |
| 57 | EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=RelWithDebInfo -DPOCO_UNBUNDLED=ON \ |
| 58 | -DLIB_SUFFIX=${@d.getVar('baselib').replace('lib', '')} \ |
| 59 | ${@bb.utils.contains('PTEST_ENABLED', '1', '-DENABLE_TESTS=ON ', '', d)}" |
| 60 | |
| 61 | # For the native build we want to use the bundled version |
| 62 | EXTRA_OECMAKE:append:class-native = " -DPOCO_UNBUNDLED=OFF" |
| 63 | |
| 64 | # do not use rpath |
| 65 | EXTRA_OECMAKE:append = " -DCMAKE_SKIP_RPATH=ON" |
| 66 | |
| 67 | LDFLAGS:append:riscv32 = "${@bb.utils.contains('PACKAGECONFIG', 'Prometheus', ' -Wl,--no-as-needed -latomic -Wl,--as-needed', '', d)}" |
| 68 | LDFLAGS:append:mips = "${@bb.utils.contains('PACKAGECONFIG', 'Prometheus', ' -Wl,--no-as-needed -latomic -Wl,--as-needed', '', d)}" |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 69 | LDFLAGS:append:powerpc = "${@bb.utils.contains('PACKAGECONFIG', 'Prometheus', ' -Wl,--no-as-needed -latomic -Wl,--as-needed', '', d)}" |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 70 | |
| 71 | python populate_packages:prepend () { |
| 72 | poco_libdir = d.expand('${libdir}') |
| 73 | pn = d.getVar("PN") |
| 74 | packages = [] |
| 75 | testrunners = [] |
| 76 | |
| 77 | def hook(f, pkg, file_regex, output_pattern, modulename): |
| 78 | packages.append(pkg) |
| 79 | testrunners.append(modulename) |
| 80 | |
| 81 | do_split_packages(d, poco_libdir, r'^libPoco(.*)\.so\..*$', |
| 82 | 'poco-%s', 'Poco %s component', extra_depends='', prepend=True, hook=hook) |
| 83 | |
| 84 | d.setVar("RRECOMMENDS:%s" % pn, " ".join(packages)) |
| 85 | d.setVar("POCO_TESTRUNNERS", "\n".join(testrunners)) |
| 86 | } |
| 87 | |
| 88 | do_install_ptest () { |
| 89 | cp -rf ${B}/bin/ ${D}${PTEST_PATH} |
| 90 | cp -f ${B}/lib/libCppUnit.so* ${D}${libdir} |
| 91 | cp -rf ${B}/*/testsuite/data ${D}${PTEST_PATH}/bin/ |
| 92 | find "${D}${PTEST_PATH}" -executable -exec chrpath -d {} \; |
| 93 | echo "${POCO_TESTRUNNERS}" > "${D}${PTEST_PATH}/testrunners" |
| 94 | } |
| 95 | |
| 96 | PACKAGES_DYNAMIC = "poco-.*" |
| 97 | |
| 98 | # "poco" is a metapackage which pulls in all Poco components |
| 99 | ALLOW_EMPTY:${PN} = "1" |
| 100 | |
| 101 | # cppunit is only built if tests are enabled |
| 102 | PACKAGES =+ "${PN}-cppunit" |
| 103 | FILES:${PN}-cppunit += "${libdir}/libCppUnit.so*" |
| 104 | ALLOW_EMPTY:${PN}-cppunit = "1" |
| 105 | |
| 106 | RDEPENDS:${PN}-ptest += "${PN}-cppunit" |
| 107 | |
| 108 | BBCLASSEXTEND = "native" |