diff options
Diffstat (limited to 'meta-oe/recipes-support/poco/poco_1.8.0.1.bb')
-rw-r--r-- | meta-oe/recipes-support/poco/poco_1.8.0.1.bb | 106 |
1 files changed, 106 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/poco/poco_1.8.0.1.bb b/meta-oe/recipes-support/poco/poco_1.8.0.1.bb new file mode 100644 index 000000000..160b4d391 --- /dev/null +++ b/meta-oe/recipes-support/poco/poco_1.8.0.1.bb | |||
@@ -0,0 +1,106 @@ | |||
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 = "af527ab21fca5ab2659285408aec9920ed7c7b17" | ||
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" | ||
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 | |||
50 | # Additional components not build by default, | ||
51 | # they might have dependencies not included in oe-core | ||
52 | # or they don't work on all architectures | ||
53 | PACKAGECONFIG[mod_poco] = "-DENABLE_APACHECONNECTOR=ON,-DENABLE_APACHECONNECTOR=OFF,apr apache2" | ||
54 | PACKAGECONFIG[CppParser] = "-DENABLE_CPPPARSER=ON,-DENABLE_CPPPARSER=OFF" | ||
55 | PACKAGECONFIG[DataMySQL] = "-DENABLE_DATA_MYSQL=ON -DMYSQL_LIB:STRING=mysqlclient_r,-DENABLE_DATA_MYSQL=OFF,mariadb" | ||
56 | PACKAGECONFIG[DataODBC] = "-DENABLE_DATA_ODBC=ON,-DENABLE_DATA_ODBC=OFF,libiodbc" | ||
57 | PACKAGECONFIG[PageCompiler] = "-DENABLE_PAGECOMPILER=ON,-DENABLE_PAGECOMPILER=OFF" | ||
58 | PACKAGECONFIG[PageCompilerFile2Page] = "-DENABLE_PAGECOMPILER_FILE2PAGE=ON,-DENABLE_PAGECOMPILER_FILE2PAGE=OFF" | ||
59 | PACKAGECONFIG[SevenZip] = "-DENABLE_SEVENZIP=ON,-DENABLE_SEVENZIP=OFF" | ||
60 | |||
61 | # Make a package for each library | ||
62 | PACKAGES = "${PN}-dbg ${POCO_PACKAGES}" | ||
63 | python __anonymous () { | ||
64 | packages = [] | ||
65 | testrunners = [] | ||
66 | components = d.getVar("PACKAGECONFIG").split() | ||
67 | components.append("Foundation") | ||
68 | for lib in components: | ||
69 | pkg = ("poco-%s" % lib.lower()).replace("_","") | ||
70 | packages.append(pkg) | ||
71 | if not d.getVar("FILES_%s" % pkg): | ||
72 | d.setVar("FILES_%s" % pkg, "${libdir}/libPoco%s.so.*" % lib) | ||
73 | testrunners.append("%s" % lib) | ||
74 | |||
75 | d.setVar("POCO_PACKAGES", " ".join(packages)) | ||
76 | d.setVar("POCO_TESTRUNNERS", "\n".join(testrunners)) | ||
77 | } | ||
78 | |||
79 | # "poco" is a metapackage which pulls in all Poco components | ||
80 | PACKAGES += "${PN}" | ||
81 | RRECOMMENDS_${PN} += "${POCO_PACKAGES}" | ||
82 | RRECOMMENDS_${PN}_class-native = "" | ||
83 | ALLOW_EMPTY_${PN} = "1" | ||
84 | |||
85 | # -dev last to pick up the remaining stuff | ||
86 | PACKAGES += "${PN}-dev ${PN}-staticdev" | ||
87 | FILES_${PN}-dev = "${includedir} ${libdir}/libPoco*.so ${libdir}/cmake" | ||
88 | FILES_${PN}-staticdev = "${libdir}/libPoco*.a" | ||
89 | |||
90 | # ptest support | ||
91 | FILES_${PN}-dbg += "${PTEST_PATH}/bin/.debug" | ||
92 | |||
93 | # cppunit is only built if tests are enabled | ||
94 | PACKAGES += "${PN}-cppunit" | ||
95 | FILES_${PN}-cppunit += "${libdir}/libCppUnit.so*" | ||
96 | ALLOW_EMPTY_${PN}-cppunit = "1" | ||
97 | |||
98 | RDEPENDS_${PN}-ptest += "${PN}-cppunit" | ||
99 | |||
100 | do_install_ptest () { | ||
101 | cp -rf ${B}/bin/ ${D}${PTEST_PATH} | ||
102 | cp -f ${B}/lib/libCppUnit.so* ${D}${libdir} | ||
103 | cp -rf ${B}/*/testsuite/data ${D}${PTEST_PATH}/bin/ | ||
104 | find "${D}${PTEST_PATH}" -executable -exec chrpath -d {} \; | ||
105 | echo "${POCO_TESTRUNNERS}" > "${D}${PTEST_PATH}/testrunners" | ||
106 | } | ||