summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Bach <pascal.bach@siemens.com>2016-01-06 14:14:58 +0100
committerMartin Jansa <Martin.Jansa@gmail.com>2016-01-14 11:30:15 +0100
commit8700ba38804af3c27f3662737f679afa1bdc86da (patch)
tree25bb1fb07ce57ea1eb77128822a517819e9d5781
parent6ec1dde77e18ce32508b9e12f0cccf8ad9aca650 (diff)
downloadmeta-openembedded-8700ba38804af3c27f3662737f679afa1bdc86da.tar.gz
poco: Add recipe for POCO C++ library
Signed-off-by: Pascal Bach <pascal.bach@siemens.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--meta-oe/recipes-support/poco/poco-1.6.1/0001-Change-Foundation-library-version-back-to-SHARED_LIB.patch35
-rw-r--r--meta-oe/recipes-support/poco/poco/run-ptest9
-rw-r--r--meta-oe/recipes-support/poco/poco_1.6.1.bb108
3 files changed, 152 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/poco/poco-1.6.1/0001-Change-Foundation-library-version-back-to-SHARED_LIB.patch b/meta-oe/recipes-support/poco/poco-1.6.1/0001-Change-Foundation-library-version-back-to-SHARED_LIB.patch
new file mode 100644
index 000000000..f65bb1540
--- /dev/null
+++ b/meta-oe/recipes-support/poco/poco-1.6.1/0001-Change-Foundation-library-version-back-to-SHARED_LIB.patch
@@ -0,0 +1,35 @@
1From cec5a43151a11d8afbb5dd50caf4e22fb89c6340 Mon Sep 17 00:00:00 2001
2From: Mike Gelfand <mikedld@mikedld.com>
3Date: Sun, 20 Sep 2015 03:08:19 +0300
4Subject: [PATCH] Change Foundation library version back to
5 SHARED_LIBRARY_VERSION
6
7Foundation is the only library using PROJECT_VERSION as library version,
8the change accidentally introduced by commit b69fafb84c. This causes
9difference in library being linked to (libPocoFoundation.31.dylib on Mac)
10and library returned by $<TARGET_FILE:Poco::Foundation> for imported
11target (libPocoFoundation.1.6.1.dylib), causing inconvenience. Also, this
12differs from autoconf-based builds where only "31" (soversion) library is
13being created and not "1.6.1" (project version) one.
14
15Upstream-Status: Backport from 1.6.2
16---
17 Foundation/CMakeLists.txt | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20diff --git a/Foundation/CMakeLists.txt b/Foundation/CMakeLists.txt
21index c1dd25f..25f401c 100644
22--- a/Foundation/CMakeLists.txt
23+++ b/Foundation/CMakeLists.txt
24@@ -108,7 +108,7 @@ add_library( "${LIBNAME}" ${LIB_MODE} ${SRCS})
25 add_library( "${POCO_LIBNAME}" ALIAS "${LIBNAME}")
26 set_target_properties( "${LIBNAME}"
27 PROPERTIES
28- VERSION ${PROJECT_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
29+ VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
30 OUTPUT_NAME ${POCO_LIBNAME}
31 DEFINE_SYMBOL Foundation_EXPORTS
32 )
33--
342.1.4
35
diff --git a/meta-oe/recipes-support/poco/poco/run-ptest b/meta-oe/recipes-support/poco/poco/run-ptest
new file mode 100644
index 000000000..c479f7ac1
--- /dev/null
+++ b/meta-oe/recipes-support/poco/poco/run-ptest
@@ -0,0 +1,9 @@
1#!/bin/sh
2while read runner; do
3 pushd . >/dev/null
4 cd bin
5 echo Testing $runner
6 ./$runner-testrunner -all
7 popd >/dev/null
8done < testrunners
9
diff --git a/meta-oe/recipes-support/poco/poco_1.6.1.bb b/meta-oe/recipes-support/poco/poco_1.6.1.bb
new file mode 100644
index 000000000..9822186d2
--- /dev/null
+++ b/meta-oe/recipes-support/poco/poco_1.6.1.bb
@@ -0,0 +1,108 @@
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
15SRC_URI = " \
16 https://github.com/pocoproject/poco/archive/poco-${PV}-release.tar.gz \
17 file://0001-Change-Foundation-library-version-back-to-SHARED_LIB.patch \
18 file://run-ptest \
19 "
20
21SRC_URI[md5sum] = "208872b13d282dfb0f0580fc11df96f3"
22SRC_URI[sha256sum] = "08bc0a9bae4fb793eb694ad5ec7742c179bad48a286ae614682483021043658b"
23
24S = "${WORKDIR}/poco-poco-${PV}-release"
25
26EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=RelWithDebInfo -DPOCO_UNBUNDLED=ON \
27 ${@bb.utils.contains('PTEST_ENABLED', '1', '-DENABLE_TESTS=ON ', '', d)}"
28
29# For the native build we want to use the bundled version
30EXTRA_OECMAKE_append_class-native = " -DPOCO_UNBUNDLED=OFF"
31
32# do not use rpath
33EXTRA_OECMAKE_append = " -DCMAKE_SKIP_RPATH=ON"
34
35# By default the most commonly used poco components are built
36# Foundation is built anyway and doesn't need to be listed explicitly
37# these don't have dependencies outside oe-core
38PACKAGECONFIG ??= "XML JSON MongoDB PDF Util Net NetSSL Crypto Data DataSQLite Zip"
39
40PACKAGECONFIG[XML] = "-DENABLE_XML=ON,-DENABLE_XML=OFF,expat"
41PACKAGECONFIG[JSON] = "-DENABLE_JSON=ON,-DENABLE_JSON=OFF"
42PACKAGECONFIG[MongoDB] = "-DENABLE_MONGODB=ON,-DENABLE_MONGODB=OFF"
43PACKAGECONFIG[PDF] = "-DENABLE_PDF=ON,-DENABLE_PDF=OFF,zlib"
44PACKAGECONFIG[Util] = "-DENABLE_UTIL=ON,-DENABLE_UTIL=OFF"
45PACKAGECONFIG[Net] = "-DENABLE_NET=ON,-DENABLE_NET=OFF"
46PACKAGECONFIG[NetSSL] = "-DENABLE_NETSSL=ON,-DENABLE_NETSSL=OFF,openssl"
47PACKAGECONFIG[Crypto] = "-DENABLE_CRYPTO=ON,-DENABLE_CRYPTO=OFF,openssl"
48PACKAGECONFIG[Data] = "-DENABLE_DATA=ON,-DENABLE_DATA=OFF"
49PACKAGECONFIG[DataSQLite] = "-DENABLE_DATA_SQLITE=ON,-DENABLE_DATA_SQLITE=OFF,sqlite3"
50PACKAGECONFIG[Zip] = "-DENABLE_ZIP=ON,-DENABLE_ZIP=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,-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
63# Make a package for each library
64PACKAGES = "${PN}-dbg ${POCO_PACKAGES}"
65python __anonymous () {
66 packages = []
67 testrunners = []
68 components = d.getVar("PACKAGECONFIG", True).split()
69 components.append("Foundation")
70 for lib in components:
71 pkg = ("poco-%s" % lib.lower()).replace("_","")
72 packages.append(pkg)
73 if not d.getVar("FILES_%s" % pkg, True):
74 d.setVar("FILES_%s" % pkg, "${libdir}/libPoco%s.so.*" % lib)
75 testrunners.append("%s" % lib)
76
77 d.setVar("POCO_PACKAGES", " ".join(packages))
78 d.setVar("POCO_TESTRUNNERS", "\n".join(testrunners))
79}
80
81# "poco" is a metapackage which pulls in all Poco components
82PACKAGES += "${PN}"
83RRECOMMENDS_${PN} += "${POCO_PACKAGES}"
84RRECOMMENDS_${PN}_class-native = ""
85ALLOW_EMPTY_${PN} = "1"
86
87# -dev last to pick up the remaining stuff
88PACKAGES += "${PN}-dev ${PN}-staticdev"
89FILES_${PN}-dev = "${includedir} ${libdir}/libPoco*.so ${libdir}/cmake"
90FILES_${PN}-staticdev = "${libdir}/libPoco*.a"
91
92# ptest support
93FILES_${PN}-dbg += "${PTEST_PATH}/bin/.debug"
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
102do_install_ptest () {
103 cp -rf ${B}/bin/ ${D}${PTEST_PATH}
104 cp -f ${B}/lib/libCppUnit.so* ${D}${libdir}
105 cp -rf ${B}/*/testsuite/data ${D}${PTEST_PATH}/bin/
106 find "${D}${PTEST_PATH}" -executable -exec chrpath -d {} \;
107 echo "${POCO_TESTRUNNERS}" > "${D}${PTEST_PATH}/testrunners"
108}