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} \ |
| 13 | file://0001-Don-t-try-to-install-non-existing-Encodings-testsuit.patch \ |
Brad Bishop | 868407c | 2019-11-04 13:24:47 -0500 | [diff] [blame] | 14 | file://0001-riscv-Enable-double-operations-when-using-double-flo.patch \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 15 | file://run-ptest \ |
| 16 | " |
Brad Bishop | 868407c | 2019-11-04 13:24:47 -0500 | [diff] [blame] | 17 | SRCREV = "b95393dcc3640807838e8323b4e600e54d2e8116" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 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 Data DataSQLite Zip Encodings Redis" |
| 27 | |
| 28 | PACKAGECONFIG[XML] = "-DENABLE_XML=ON -DEXPAT_LIBRARY:STRING=expat,-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 -DOPENSSL_SSL_LIBRARY:STRING=ssl -DOPENSSL_CRYPTO_LIBRARY:STRING=crypto,-DENABLE_NETSSL=OFF,openssl" |
| 35 | PACKAGECONFIG[Crypto] = "-DENABLE_CRYPTO=ON -DOPENSSL_SSL_LIBRARY:STRING=ssl -DOPENSSL_CRYPTO_LIBRARY:STRING=crypto,-DENABLE_CRYPTO=OFF,openssl" |
| 36 | PACKAGECONFIG[Data] = "-DENABLE_DATA=ON,-DENABLE_DATA=OFF" |
| 37 | PACKAGECONFIG[DataSQLite] = "-DENABLE_DATA_SQLITE=ON -DSQLITE3_LIBRARY:STRING=sqlite3,-DENABLE_DATA_SQLITE=OFF,sqlite3" |
| 38 | PACKAGECONFIG[Zip] = "-DENABLE_ZIP=ON,-DENABLE_ZIP=OFF" |
| 39 | PACKAGECONFIG[Encodings] = "-DENABLE_ENCODINGS=ON,-DENABLE_ENCODINGS=OFF" |
| 40 | PACKAGECONFIG[Redis] = "-DENABLE_REDIS=ON,-DENABLE_REDIS=OFF" |
| 41 | |
| 42 | # Additional components not build by default, |
| 43 | # they might have dependencies not included in oe-core |
| 44 | # or they don't work on all architectures |
| 45 | PACKAGECONFIG[mod_poco] = "-DENABLE_APACHECONNECTOR=ON,-DENABLE_APACHECONNECTOR=OFF,apr apache2" |
| 46 | PACKAGECONFIG[CppParser] = "-DENABLE_CPPPARSER=ON,-DENABLE_CPPPARSER=OFF" |
| 47 | PACKAGECONFIG[DataMySQL] = "-DENABLE_DATA_MYSQL=ON -DMYSQL_LIB:STRING=mysqlclient_r,-DENABLE_DATA_MYSQL=OFF,mariadb" |
| 48 | PACKAGECONFIG[DataODBC] = "-DENABLE_DATA_ODBC=ON,-DENABLE_DATA_ODBC=OFF,libiodbc" |
| 49 | PACKAGECONFIG[PageCompiler] = "-DENABLE_PAGECOMPILER=ON,-DENABLE_PAGECOMPILER=OFF" |
| 50 | PACKAGECONFIG[PageCompilerFile2Page] = "-DENABLE_PAGECOMPILER_FILE2PAGE=ON,-DENABLE_PAGECOMPILER_FILE2PAGE=OFF" |
| 51 | PACKAGECONFIG[SevenZip] = "-DENABLE_SEVENZIP=ON,-DENABLE_SEVENZIP=OFF" |
| 52 | |
| 53 | EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=RelWithDebInfo -DPOCO_UNBUNDLED=ON \ |
| 54 | -DZLIB_LIBRARY_RELEASE:STRING=z -DPCRE_LIBRARY:STRING=pcre \ |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame^] | 55 | -DLIB_SUFFIX=${@d.getVar('baselib').replace('lib', '')} \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 56 | ${@bb.utils.contains('PTEST_ENABLED', '1', '-DENABLE_TESTS=ON ', '', d)}" |
| 57 | |
| 58 | # For the native build we want to use the bundled version |
| 59 | EXTRA_OECMAKE_append_class-native = " -DPOCO_UNBUNDLED=OFF" |
| 60 | |
| 61 | # do not use rpath |
| 62 | EXTRA_OECMAKE_append = " -DCMAKE_SKIP_RPATH=ON" |
| 63 | |
| 64 | python populate_packages_prepend () { |
| 65 | poco_libdir = d.expand('${libdir}') |
| 66 | pn = d.getVar("PN") |
| 67 | packages = [] |
| 68 | testrunners = [] |
| 69 | |
| 70 | def hook(f, pkg, file_regex, output_pattern, modulename): |
| 71 | packages.append(pkg) |
| 72 | testrunners.append(modulename) |
| 73 | |
| 74 | do_split_packages(d, poco_libdir, '^libPoco(.*)\.so\..*$', |
| 75 | 'poco-%s', 'Poco %s component', extra_depends='', prepend=True, hook=hook) |
| 76 | |
| 77 | d.setVar("RRECOMMENDS_%s" % pn, " ".join(packages)) |
| 78 | d.setVar("POCO_TESTRUNNERS", "\n".join(testrunners)) |
| 79 | } |
| 80 | |
| 81 | do_install_ptest () { |
| 82 | cp -rf ${B}/bin/ ${D}${PTEST_PATH} |
| 83 | cp -f ${B}/lib/libCppUnit.so* ${D}${libdir} |
| 84 | cp -rf ${B}/*/testsuite/data ${D}${PTEST_PATH}/bin/ |
| 85 | find "${D}${PTEST_PATH}" -executable -exec chrpath -d {} \; |
| 86 | echo "${POCO_TESTRUNNERS}" > "${D}${PTEST_PATH}/testrunners" |
| 87 | } |
| 88 | |
| 89 | PACKAGES_DYNAMIC = "poco-.*" |
| 90 | |
| 91 | # "poco" is a metapackage which pulls in all Poco components |
| 92 | ALLOW_EMPTY_${PN} = "1" |
| 93 | |
| 94 | # cppunit is only built if tests are enabled |
| 95 | PACKAGES =+ "${PN}-cppunit" |
| 96 | FILES_${PN}-cppunit += "${libdir}/libCppUnit.so*" |
| 97 | ALLOW_EMPTY_${PN}-cppunit = "1" |
| 98 | |
| 99 | RDEPENDS_${PN}-ptest += "${PN}-cppunit" |
| 100 | |
| 101 | BBCLASSEXTEND = "native" |