blob: fcd52197598e46324a3cdab5141b07356b30dc0b [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001SUMMARY = "Modern, powerful open source cross-platform C++ class libraries"
2DESCRIPTION = "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."
3HOMEPAGE = "http://pocoproject.org/"
4SECTION = "libs"
5LICENSE = "BSL-1.0"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=4267f48fc738f50380cbeeb76f95cebc"
7
8# These dependencies are required by Foundation
9DEPENDS = "libpcre zlib"
10
11SRC_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 Bishop868407c2019-11-04 13:24:47 -050014 file://0001-riscv-Enable-double-operations-when-using-double-flo.patch \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080015 file://run-ptest \
16 "
Brad Bishop868407c2019-11-04 13:24:47 -050017SRCREV = "b95393dcc3640807838e8323b4e600e54d2e8116"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080018
Andrew Geissler82c905d2020-04-13 13:39:40 -050019UPSTREAM_CHECK_GITTAGREGEX = "poco-(?P<pver>\d+(\.\d+)+)"
20
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080021S = "${WORKDIR}/git"
22
23inherit cmake ptest
24
25# By default the most commonly used poco components are built
26# Foundation is built anyway and doesn't need to be listed explicitly
27# these don't have dependencies outside oe-core
28PACKAGECONFIG ??= "XML JSON MongoDB PDF Util Net NetSSL Crypto Data DataSQLite Zip Encodings Redis"
29
30PACKAGECONFIG[XML] = "-DENABLE_XML=ON -DEXPAT_LIBRARY:STRING=expat,-DENABLE_XML=OFF,expat"
31PACKAGECONFIG[JSON] = "-DENABLE_JSON=ON,-DENABLE_JSON=OFF"
32PACKAGECONFIG[MongoDB] = "-DENABLE_MONGODB=ON,-DENABLE_MONGODB=OFF"
33PACKAGECONFIG[PDF] = "-DENABLE_PDF=ON,-DENABLE_PDF=OFF,zlib"
34PACKAGECONFIG[Util] = "-DENABLE_UTIL=ON,-DENABLE_UTIL=OFF"
35PACKAGECONFIG[Net] = "-DENABLE_NET=ON,-DENABLE_NET=OFF"
36PACKAGECONFIG[NetSSL] = "-DENABLE_NETSSL=ON -DOPENSSL_SSL_LIBRARY:STRING=ssl -DOPENSSL_CRYPTO_LIBRARY:STRING=crypto,-DENABLE_NETSSL=OFF,openssl"
37PACKAGECONFIG[Crypto] = "-DENABLE_CRYPTO=ON -DOPENSSL_SSL_LIBRARY:STRING=ssl -DOPENSSL_CRYPTO_LIBRARY:STRING=crypto,-DENABLE_CRYPTO=OFF,openssl"
38PACKAGECONFIG[Data] = "-DENABLE_DATA=ON,-DENABLE_DATA=OFF"
39PACKAGECONFIG[DataSQLite] = "-DENABLE_DATA_SQLITE=ON -DSQLITE3_LIBRARY:STRING=sqlite3,-DENABLE_DATA_SQLITE=OFF,sqlite3"
40PACKAGECONFIG[Zip] = "-DENABLE_ZIP=ON,-DENABLE_ZIP=OFF"
41PACKAGECONFIG[Encodings] = "-DENABLE_ENCODINGS=ON,-DENABLE_ENCODINGS=OFF"
42PACKAGECONFIG[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
47PACKAGECONFIG[mod_poco] = "-DENABLE_APACHECONNECTOR=ON,-DENABLE_APACHECONNECTOR=OFF,apr apache2"
48PACKAGECONFIG[CppParser] = "-DENABLE_CPPPARSER=ON,-DENABLE_CPPPARSER=OFF"
49PACKAGECONFIG[DataMySQL] = "-DENABLE_DATA_MYSQL=ON -DMYSQL_LIB:STRING=mysqlclient_r,-DENABLE_DATA_MYSQL=OFF,mariadb"
50PACKAGECONFIG[DataODBC] = "-DENABLE_DATA_ODBC=ON,-DENABLE_DATA_ODBC=OFF,libiodbc"
51PACKAGECONFIG[PageCompiler] = "-DENABLE_PAGECOMPILER=ON,-DENABLE_PAGECOMPILER=OFF"
52PACKAGECONFIG[PageCompilerFile2Page] = "-DENABLE_PAGECOMPILER_FILE2PAGE=ON,-DENABLE_PAGECOMPILER_FILE2PAGE=OFF"
53PACKAGECONFIG[SevenZip] = "-DENABLE_SEVENZIP=ON,-DENABLE_SEVENZIP=OFF"
54
55EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=RelWithDebInfo -DPOCO_UNBUNDLED=ON \
56 -DZLIB_LIBRARY_RELEASE:STRING=z -DPCRE_LIBRARY:STRING=pcre \
Brad Bishope42b3e32020-01-15 22:08:42 -050057 -DLIB_SUFFIX=${@d.getVar('baselib').replace('lib', '')} \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080058 ${@bb.utils.contains('PTEST_ENABLED', '1', '-DENABLE_TESTS=ON ', '', d)}"
59
60# For the native build we want to use the bundled version
61EXTRA_OECMAKE_append_class-native = " -DPOCO_UNBUNDLED=OFF"
62
63# do not use rpath
64EXTRA_OECMAKE_append = " -DCMAKE_SKIP_RPATH=ON"
65
66python populate_packages_prepend () {
67 poco_libdir = d.expand('${libdir}')
68 pn = d.getVar("PN")
69 packages = []
70 testrunners = []
71
72 def hook(f, pkg, file_regex, output_pattern, modulename):
73 packages.append(pkg)
74 testrunners.append(modulename)
75
76 do_split_packages(d, poco_libdir, '^libPoco(.*)\.so\..*$',
77 'poco-%s', 'Poco %s component', extra_depends='', prepend=True, hook=hook)
78
79 d.setVar("RRECOMMENDS_%s" % pn, " ".join(packages))
80 d.setVar("POCO_TESTRUNNERS", "\n".join(testrunners))
81}
82
83do_install_ptest () {
84 cp -rf ${B}/bin/ ${D}${PTEST_PATH}
85 cp -f ${B}/lib/libCppUnit.so* ${D}${libdir}
86 cp -rf ${B}/*/testsuite/data ${D}${PTEST_PATH}/bin/
87 find "${D}${PTEST_PATH}" -executable -exec chrpath -d {} \;
88 echo "${POCO_TESTRUNNERS}" > "${D}${PTEST_PATH}/testrunners"
89}
90
91PACKAGES_DYNAMIC = "poco-.*"
92
93# "poco" is a metapackage which pulls in all Poco components
94ALLOW_EMPTY_${PN} = "1"
95
96# cppunit is only built if tests are enabled
97PACKAGES =+ "${PN}-cppunit"
98FILES_${PN}-cppunit += "${libdir}/libCppUnit.so*"
99ALLOW_EMPTY_${PN}-cppunit = "1"
100
101RDEPENDS_${PN}-ptest += "${PN}-cppunit"
102
103BBCLASSEXTEND = "native"