blob: 48b31dd3f3babd7877873905329bb6b707adb0e8 [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} \
Andrew Geissler4b7c1152020-11-30 19:55:29 -060013 file://0001-Add-support-of-arch-riscv32.patch \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080014 file://run-ptest \
15 "
Andrew Geissler4b7c1152020-11-30 19:55:29 -060016SRCREV = "a3d827d80eb7f3329c58e73eb2906cb7ba829019"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080017
Andrew Geissler82c905d2020-04-13 13:39:40 -050018UPSTREAM_CHECK_GITTAGREGEX = "poco-(?P<pver>\d+(\.\d+)+)"
19
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080020S = "${WORKDIR}/git"
21
22inherit 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 Geissler4b7c1152020-11-30 19:55:29 -060027PACKAGECONFIG ??= "XML JSON MongoDB PDF Util Net NetSSL Crypto JWT Data DataSQLite Zip Encodings Redis"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080028
Andrew Geissler4b7c1152020-11-30 19:55:29 -060029PACKAGECONFIG[XML] = "-DENABLE_XML=ON,-DENABLE_XML=OFF,expat"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080030PACKAGECONFIG[JSON] = "-DENABLE_JSON=ON,-DENABLE_JSON=OFF"
31PACKAGECONFIG[MongoDB] = "-DENABLE_MONGODB=ON,-DENABLE_MONGODB=OFF"
32PACKAGECONFIG[PDF] = "-DENABLE_PDF=ON,-DENABLE_PDF=OFF,zlib"
33PACKAGECONFIG[Util] = "-DENABLE_UTIL=ON,-DENABLE_UTIL=OFF"
34PACKAGECONFIG[Net] = "-DENABLE_NET=ON,-DENABLE_NET=OFF"
Andrew Geissler4b7c1152020-11-30 19:55:29 -060035PACKAGECONFIG[NetSSL] = "-DENABLE_NETSSL=ON,-DENABLE_NETSSL=OFF,openssl"
36PACKAGECONFIG[Crypto] = "-DENABLE_CRYPTO=ON,-DENABLE_CRYPTO=OFF,openssl"
37PACKAGECONFIG[JWT] = "-DENABLE_JWT=ON,-DENABLE_JWT=OFF,openssl"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080038PACKAGECONFIG[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 \
Brad Bishope42b3e32020-01-15 22:08:42 -050056 -DLIB_SUFFIX=${@d.getVar('baselib').replace('lib', '')} \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080057 ${@bb.utils.contains('PTEST_ENABLED', '1', '-DENABLE_TESTS=ON ', '', d)}"
58
59# For the native build we want to use the bundled version
60EXTRA_OECMAKE_append_class-native = " -DPOCO_UNBUNDLED=OFF"
61
62# do not use rpath
63EXTRA_OECMAKE_append = " -DCMAKE_SKIP_RPATH=ON"
64
65python 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
82do_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
90PACKAGES_DYNAMIC = "poco-.*"
91
92# "poco" is a metapackage which pulls in all Poco components
93ALLOW_EMPTY_${PN} = "1"
94
95# cppunit is only built if tests are enabled
96PACKAGES =+ "${PN}-cppunit"
97FILES_${PN}-cppunit += "${libdir}/libCppUnit.so*"
98ALLOW_EMPTY_${PN}-cppunit = "1"
99
100RDEPENDS_${PN}-ptest += "${PN}-cppunit"
101
102BBCLASSEXTEND = "native"