diff options
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.bb | 98 |
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 @@ | |||
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 | SECTION = "libs" | ||
4 | HOMEPAGE = "http://pocoproject.org/" | ||
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 | inherit cmake ptest | ||
12 | |||
13 | BBCLASSEXTEND = "native" | ||
14 | |||
15 | SRCREV = "94966785a8f9ad0191dffd075ebd67826e6e4b6d" | ||
16 | SRC_URI = " \ | ||
17 | git://github.com/pocoproject/poco.git \ | ||
18 | file://run-ptest \ | ||
19 | " | ||
20 | |||
21 | S = "${WORKDIR}/git" | ||
22 | |||
23 | EXTRA_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 | ||
28 | EXTRA_OECMAKE_append_class-native = " -DPOCO_UNBUNDLED=OFF" | ||
29 | |||
30 | # do not use rpath | ||
31 | EXTRA_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 | ||
36 | PACKAGECONFIG ??= "XML JSON MongoDB PDF Util Net NetSSL Crypto Data DataSQLite Zip Encodings Redis" | ||
37 | |||
38 | PACKAGECONFIG[XML] = "-DENABLE_XML=ON -DEXPAT_LIBRARY:STRING=expat,-DENABLE_XML=OFF,expat" | ||
39 | PACKAGECONFIG[JSON] = "-DENABLE_JSON=ON,-DENABLE_JSON=OFF" | ||
40 | PACKAGECONFIG[MongoDB] = "-DENABLE_MONGODB=ON,-DENABLE_MONGODB=OFF" | ||
41 | PACKAGECONFIG[PDF] = "-DENABLE_PDF=ON,-DENABLE_PDF=OFF,zlib" | ||
42 | PACKAGECONFIG[Util] = "-DENABLE_UTIL=ON,-DENABLE_UTIL=OFF" | ||
43 | PACKAGECONFIG[Net] = "-DENABLE_NET=ON,-DENABLE_NET=OFF" | ||
44 | PACKAGECONFIG[NetSSL] = "-DENABLE_NETSSL=ON -DOPENSSL_SSL_LIBRARY:STRING=ssl -DOPENSSL_CRYPTO_LIBRARY:STRING=crypto,-DENABLE_NETSSL=OFF,openssl" | ||
45 | PACKAGECONFIG[Crypto] = "-DENABLE_CRYPTO=ON -DOPENSSL_SSL_LIBRARY:STRING=ssl -DOPENSSL_CRYPTO_LIBRARY:STRING=crypto,-DENABLE_CRYPTO=OFF,openssl" | ||
46 | PACKAGECONFIG[Data] = "-DENABLE_DATA=ON,-DENABLE_DATA=OFF" | ||
47 | PACKAGECONFIG[DataSQLite] = "-DENABLE_DATA_SQLITE=ON -DSQLITE3_LIBRARY:STRING=sqlite3,-DENABLE_DATA_SQLITE=OFF,sqlite3" | ||
48 | PACKAGECONFIG[Zip] = "-DENABLE_ZIP=ON,-DENABLE_ZIP=OFF" | ||
49 | PACKAGECONFIG[Encodings] = "-DENABLE_ENCODINGS=ON,-DENABLE_ENCODINGS=OFF" | ||
50 | PACKAGECONFIG[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 | ||
55 | PACKAGECONFIG[mod_poco] = "-DENABLE_APACHECONNECTOR=ON,-DENABLE_APACHECONNECTOR=OFF,apr apache2" | ||
56 | PACKAGECONFIG[CppParser] = "-DENABLE_CPPPARSER=ON,-DENABLE_CPPPARSER=OFF" | ||
57 | PACKAGECONFIG[DataMySQL] = "-DENABLE_DATA_MYSQL=ON -DMYSQL_LIB:STRING=mysqlclient_r,-DENABLE_DATA_MYSQL=OFF,mariadb" | ||
58 | PACKAGECONFIG[DataODBC] = "-DENABLE_DATA_ODBC=ON,-DENABLE_DATA_ODBC=OFF,libiodbc" | ||
59 | PACKAGECONFIG[PageCompiler] = "-DENABLE_PAGECOMPILER=ON,-DENABLE_PAGECOMPILER=OFF" | ||
60 | PACKAGECONFIG[PageCompilerFile2Page] = "-DENABLE_PAGECOMPILER_FILE2PAGE=ON,-DENABLE_PAGECOMPILER_FILE2PAGE=OFF" | ||
61 | PACKAGECONFIG[SevenZip] = "-DENABLE_SEVENZIP=ON,-DENABLE_SEVENZIP=OFF" | ||
62 | |||
63 | python 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 | |||
80 | PACKAGES_DYNAMIC = "poco-.*" | ||
81 | |||
82 | # "poco" is a metapackage which pulls in all Poco components | ||
83 | ALLOW_EMPTY_${PN} = "1" | ||
84 | |||
85 | # cppunit is only built if tests are enabled | ||
86 | PACKAGES =+ "${PN}-cppunit" | ||
87 | FILES_${PN}-cppunit += "${libdir}/libCppUnit.so*" | ||
88 | ALLOW_EMPTY_${PN}-cppunit = "1" | ||
89 | |||
90 | RDEPENDS_${PN}-ptest += "${PN}-cppunit" | ||
91 | |||
92 | do_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 | } | ||