summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/poco/poco_1.9.0.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-support/poco/poco_1.9.0.bb')
-rw-r--r--meta-oe/recipes-support/poco/poco_1.9.0.bb98
1 files changed, 98 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/poco/poco_1.9.0.bb b/meta-oe/recipes-support/poco/poco_1.9.0.bb
new file mode 100644
index 0000000000..1016caef7c
--- /dev/null
+++ b/meta-oe/recipes-support/poco/poco_1.9.0.bb
@@ -0,0 +1,98 @@
1SUMMARY = "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."
3SECTION = "libs"
4HOMEPAGE = "http://pocoproject.org/"
5LICENSE = "BSL-1.0"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=4267f48fc738f50380cbeeb76f95cebc"
7
8# These dependencies are required by Foundation
9DEPENDS = "libpcre zlib"
10
11inherit cmake ptest
12
13BBCLASSEXTEND = "native"
14
15SRCREV = "94966785a8f9ad0191dffd075ebd67826e6e4b6d"
16SRC_URI = " \
17 git://github.com/pocoproject/poco.git \
18 file://run-ptest \
19 "
20
21S = "${WORKDIR}/git"
22
23EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=RelWithDebInfo -DPOCO_UNBUNDLED=ON \
24 -DZLIB_LIBRARY_RELEASE:STRING=z -DPCRE_LIBRARY:STRING=pcre \
25 ${@bb.utils.contains('PTEST_ENABLED', '1', '-DENABLE_TESTS=ON ', '', d)}"
26
27# For the native build we want to use the bundled version
28EXTRA_OECMAKE_append_class-native = " -DPOCO_UNBUNDLED=OFF"
29
30# do not use rpath
31EXTRA_OECMAKE_append = " -DCMAKE_SKIP_RPATH=ON"
32
33# By default the most commonly used poco components are built
34# Foundation is built anyway and doesn't need to be listed explicitly
35# these don't have dependencies outside oe-core
36PACKAGECONFIG ??= "XML JSON MongoDB PDF Util Net NetSSL Crypto Data DataSQLite Zip Encodings Redis"
37
38PACKAGECONFIG[XML] = "-DENABLE_XML=ON -DEXPAT_LIBRARY:STRING=expat,-DENABLE_XML=OFF,expat"
39PACKAGECONFIG[JSON] = "-DENABLE_JSON=ON,-DENABLE_JSON=OFF"
40PACKAGECONFIG[MongoDB] = "-DENABLE_MONGODB=ON,-DENABLE_MONGODB=OFF"
41PACKAGECONFIG[PDF] = "-DENABLE_PDF=ON,-DENABLE_PDF=OFF,zlib"
42PACKAGECONFIG[Util] = "-DENABLE_UTIL=ON,-DENABLE_UTIL=OFF"
43PACKAGECONFIG[Net] = "-DENABLE_NET=ON,-DENABLE_NET=OFF"
44PACKAGECONFIG[NetSSL] = "-DENABLE_NETSSL=ON -DOPENSSL_SSL_LIBRARY:STRING=ssl -DOPENSSL_CRYPTO_LIBRARY:STRING=crypto,-DENABLE_NETSSL=OFF,openssl"
45PACKAGECONFIG[Crypto] = "-DENABLE_CRYPTO=ON -DOPENSSL_SSL_LIBRARY:STRING=ssl -DOPENSSL_CRYPTO_LIBRARY:STRING=crypto,-DENABLE_CRYPTO=OFF,openssl"
46PACKAGECONFIG[Data] = "-DENABLE_DATA=ON,-DENABLE_DATA=OFF"
47PACKAGECONFIG[DataSQLite] = "-DENABLE_DATA_SQLITE=ON -DSQLITE3_LIBRARY:STRING=sqlite3,-DENABLE_DATA_SQLITE=OFF,sqlite3"
48PACKAGECONFIG[Zip] = "-DENABLE_ZIP=ON,-DENABLE_ZIP=OFF"
49PACKAGECONFIG[Encodings] = "-DENABLE_ENCODINGS=ON,-DENABLE_ENCODINGS=OFF"
50PACKAGECONFIG[Redis] = "-DENABLE_REDIS=ON,-DENABLE_REDIS=OFF"
51
52# Additional components not build by default,
53# they might have dependencies not included in oe-core
54# or they don't work on all architectures
55PACKAGECONFIG[mod_poco] = "-DENABLE_APACHECONNECTOR=ON,-DENABLE_APACHECONNECTOR=OFF,apr apache2"
56PACKAGECONFIG[CppParser] = "-DENABLE_CPPPARSER=ON,-DENABLE_CPPPARSER=OFF"
57PACKAGECONFIG[DataMySQL] = "-DENABLE_DATA_MYSQL=ON -DMYSQL_LIB:STRING=mysqlclient_r,-DENABLE_DATA_MYSQL=OFF,mariadb"
58PACKAGECONFIG[DataODBC] = "-DENABLE_DATA_ODBC=ON,-DENABLE_DATA_ODBC=OFF,libiodbc"
59PACKAGECONFIG[PageCompiler] = "-DENABLE_PAGECOMPILER=ON,-DENABLE_PAGECOMPILER=OFF"
60PACKAGECONFIG[PageCompilerFile2Page] = "-DENABLE_PAGECOMPILER_FILE2PAGE=ON,-DENABLE_PAGECOMPILER_FILE2PAGE=OFF"
61PACKAGECONFIG[SevenZip] = "-DENABLE_SEVENZIP=ON,-DENABLE_SEVENZIP=OFF"
62
63python populate_packages_prepend () {
64 poco_libdir = d.expand('${libdir}')
65 pn = d.getVar("PN")
66 packages = []
67 testrunners = []
68
69 def hook(f, pkg, file_regex, output_pattern, modulename):
70 packages.append(pkg)
71 testrunners.append(modulename)
72
73 do_split_packages(d, poco_libdir, '^libPoco(.*)\.so\..*$',
74 'poco-%s', 'Poco %s component', extra_depends='', prepend=True, hook=hook)
75
76 d.setVar("RRECOMMENDS_%s" % pn, " ".join(packages))
77 d.setVar("POCO_TESTRUNNERS", "\n".join(testrunners))
78}
79
80PACKAGES_DYNAMIC = "poco-.*"
81
82# "poco" is a metapackage which pulls in all Poco components
83ALLOW_EMPTY_${PN} = "1"
84
85# cppunit is only built if tests are enabled
86PACKAGES =+ "${PN}-cppunit"
87FILES_${PN}-cppunit += "${libdir}/libCppUnit.so*"
88ALLOW_EMPTY_${PN}-cppunit = "1"
89
90RDEPENDS_${PN}-ptest += "${PN}-cppunit"
91
92do_install_ptest () {
93 cp -rf ${B}/bin/ ${D}${PTEST_PATH}
94 cp -f ${B}/lib/libCppUnit.so* ${D}${libdir}
95 cp -rf ${B}/*/testsuite/data ${D}${PTEST_PATH}/bin/
96 find "${D}${PTEST_PATH}" -executable -exec chrpath -d {} \;
97 echo "${POCO_TESTRUNNERS}" > "${D}${PTEST_PATH}/testrunners"
98}