blob: f1dabcd01267d200920f6f17069bfde8189a9415 [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
19S = "${WORKDIR}/git"
20
21inherit 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
26PACKAGECONFIG ??= "XML JSON MongoDB PDF Util Net NetSSL Crypto Data DataSQLite Zip Encodings Redis"
27
28PACKAGECONFIG[XML] = "-DENABLE_XML=ON -DEXPAT_LIBRARY:STRING=expat,-DENABLE_XML=OFF,expat"
29PACKAGECONFIG[JSON] = "-DENABLE_JSON=ON,-DENABLE_JSON=OFF"
30PACKAGECONFIG[MongoDB] = "-DENABLE_MONGODB=ON,-DENABLE_MONGODB=OFF"
31PACKAGECONFIG[PDF] = "-DENABLE_PDF=ON,-DENABLE_PDF=OFF,zlib"
32PACKAGECONFIG[Util] = "-DENABLE_UTIL=ON,-DENABLE_UTIL=OFF"
33PACKAGECONFIG[Net] = "-DENABLE_NET=ON,-DENABLE_NET=OFF"
34PACKAGECONFIG[NetSSL] = "-DENABLE_NETSSL=ON -DOPENSSL_SSL_LIBRARY:STRING=ssl -DOPENSSL_CRYPTO_LIBRARY:STRING=crypto,-DENABLE_NETSSL=OFF,openssl"
35PACKAGECONFIG[Crypto] = "-DENABLE_CRYPTO=ON -DOPENSSL_SSL_LIBRARY:STRING=ssl -DOPENSSL_CRYPTO_LIBRARY:STRING=crypto,-DENABLE_CRYPTO=OFF,openssl"
36PACKAGECONFIG[Data] = "-DENABLE_DATA=ON,-DENABLE_DATA=OFF"
37PACKAGECONFIG[DataSQLite] = "-DENABLE_DATA_SQLITE=ON -DSQLITE3_LIBRARY:STRING=sqlite3,-DENABLE_DATA_SQLITE=OFF,sqlite3"
38PACKAGECONFIG[Zip] = "-DENABLE_ZIP=ON,-DENABLE_ZIP=OFF"
39PACKAGECONFIG[Encodings] = "-DENABLE_ENCODINGS=ON,-DENABLE_ENCODINGS=OFF"
40PACKAGECONFIG[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
45PACKAGECONFIG[mod_poco] = "-DENABLE_APACHECONNECTOR=ON,-DENABLE_APACHECONNECTOR=OFF,apr apache2"
46PACKAGECONFIG[CppParser] = "-DENABLE_CPPPARSER=ON,-DENABLE_CPPPARSER=OFF"
47PACKAGECONFIG[DataMySQL] = "-DENABLE_DATA_MYSQL=ON -DMYSQL_LIB:STRING=mysqlclient_r,-DENABLE_DATA_MYSQL=OFF,mariadb"
48PACKAGECONFIG[DataODBC] = "-DENABLE_DATA_ODBC=ON,-DENABLE_DATA_ODBC=OFF,libiodbc"
49PACKAGECONFIG[PageCompiler] = "-DENABLE_PAGECOMPILER=ON,-DENABLE_PAGECOMPILER=OFF"
50PACKAGECONFIG[PageCompilerFile2Page] = "-DENABLE_PAGECOMPILER_FILE2PAGE=ON,-DENABLE_PAGECOMPILER_FILE2PAGE=OFF"
51PACKAGECONFIG[SevenZip] = "-DENABLE_SEVENZIP=ON,-DENABLE_SEVENZIP=OFF"
52
53EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=RelWithDebInfo -DPOCO_UNBUNDLED=ON \
54 -DZLIB_LIBRARY_RELEASE:STRING=z -DPCRE_LIBRARY:STRING=pcre \
Brad Bishope42b3e32020-01-15 22:08:42 -050055 -DLIB_SUFFIX=${@d.getVar('baselib').replace('lib', '')} \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080056 ${@bb.utils.contains('PTEST_ENABLED', '1', '-DENABLE_TESTS=ON ', '', d)}"
57
58# For the native build we want to use the bundled version
59EXTRA_OECMAKE_append_class-native = " -DPOCO_UNBUNDLED=OFF"
60
61# do not use rpath
62EXTRA_OECMAKE_append = " -DCMAKE_SKIP_RPATH=ON"
63
64python 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
81do_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
89PACKAGES_DYNAMIC = "poco-.*"
90
91# "poco" is a metapackage which pulls in all Poco components
92ALLOW_EMPTY_${PN} = "1"
93
94# cppunit is only built if tests are enabled
95PACKAGES =+ "${PN}-cppunit"
96FILES_${PN}-cppunit += "${libdir}/libCppUnit.so*"
97ALLOW_EMPTY_${PN}-cppunit = "1"
98
99RDEPENDS_${PN}-ptest += "${PN}-cppunit"
100
101BBCLASSEXTEND = "native"