diff options
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 0000000000..f65bb15406 --- /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 @@ | |||
| 1 | From cec5a43151a11d8afbb5dd50caf4e22fb89c6340 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Mike Gelfand <mikedld@mikedld.com> | ||
| 3 | Date: Sun, 20 Sep 2015 03:08:19 +0300 | ||
| 4 | Subject: [PATCH] Change Foundation library version back to | ||
| 5 | SHARED_LIBRARY_VERSION | ||
| 6 | |||
| 7 | Foundation is the only library using PROJECT_VERSION as library version, | ||
| 8 | the change accidentally introduced by commit b69fafb84c. This causes | ||
| 9 | difference in library being linked to (libPocoFoundation.31.dylib on Mac) | ||
| 10 | and library returned by $<TARGET_FILE:Poco::Foundation> for imported | ||
| 11 | target (libPocoFoundation.1.6.1.dylib), causing inconvenience. Also, this | ||
| 12 | differs from autoconf-based builds where only "31" (soversion) library is | ||
| 13 | being created and not "1.6.1" (project version) one. | ||
| 14 | |||
| 15 | Upstream-Status: Backport from 1.6.2 | ||
| 16 | --- | ||
| 17 | Foundation/CMakeLists.txt | 2 +- | ||
| 18 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 19 | |||
| 20 | diff --git a/Foundation/CMakeLists.txt b/Foundation/CMakeLists.txt | ||
| 21 | index 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 | -- | ||
| 34 | 2.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 0000000000..c479f7ac10 --- /dev/null +++ b/meta-oe/recipes-support/poco/poco/run-ptest | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | while read runner; do | ||
| 3 | pushd . >/dev/null | ||
| 4 | cd bin | ||
| 5 | echo Testing $runner | ||
| 6 | ./$runner-testrunner -all | ||
| 7 | popd >/dev/null | ||
| 8 | done < 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 0000000000..9822186d24 --- /dev/null +++ b/meta-oe/recipes-support/poco/poco_1.6.1.bb | |||
| @@ -0,0 +1,108 @@ | |||
| 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 | SRC_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 | |||
| 21 | SRC_URI[md5sum] = "208872b13d282dfb0f0580fc11df96f3" | ||
| 22 | SRC_URI[sha256sum] = "08bc0a9bae4fb793eb694ad5ec7742c179bad48a286ae614682483021043658b" | ||
| 23 | |||
| 24 | S = "${WORKDIR}/poco-poco-${PV}-release" | ||
| 25 | |||
| 26 | EXTRA_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 | ||
| 30 | EXTRA_OECMAKE_append_class-native = " -DPOCO_UNBUNDLED=OFF" | ||
| 31 | |||
| 32 | # do not use rpath | ||
| 33 | EXTRA_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 | ||
| 38 | PACKAGECONFIG ??= "XML JSON MongoDB PDF Util Net NetSSL Crypto Data DataSQLite Zip" | ||
| 39 | |||
| 40 | PACKAGECONFIG[XML] = "-DENABLE_XML=ON,-DENABLE_XML=OFF,expat" | ||
| 41 | PACKAGECONFIG[JSON] = "-DENABLE_JSON=ON,-DENABLE_JSON=OFF" | ||
| 42 | PACKAGECONFIG[MongoDB] = "-DENABLE_MONGODB=ON,-DENABLE_MONGODB=OFF" | ||
| 43 | PACKAGECONFIG[PDF] = "-DENABLE_PDF=ON,-DENABLE_PDF=OFF,zlib" | ||
| 44 | PACKAGECONFIG[Util] = "-DENABLE_UTIL=ON,-DENABLE_UTIL=OFF" | ||
| 45 | PACKAGECONFIG[Net] = "-DENABLE_NET=ON,-DENABLE_NET=OFF" | ||
| 46 | PACKAGECONFIG[NetSSL] = "-DENABLE_NETSSL=ON,-DENABLE_NETSSL=OFF,openssl" | ||
| 47 | PACKAGECONFIG[Crypto] = "-DENABLE_CRYPTO=ON,-DENABLE_CRYPTO=OFF,openssl" | ||
| 48 | PACKAGECONFIG[Data] = "-DENABLE_DATA=ON,-DENABLE_DATA=OFF" | ||
| 49 | PACKAGECONFIG[DataSQLite] = "-DENABLE_DATA_SQLITE=ON,-DENABLE_DATA_SQLITE=OFF,sqlite3" | ||
| 50 | PACKAGECONFIG[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 | ||
| 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,-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 | # Make a package for each library | ||
| 64 | PACKAGES = "${PN}-dbg ${POCO_PACKAGES}" | ||
| 65 | python __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 | ||
| 82 | PACKAGES += "${PN}" | ||
| 83 | RRECOMMENDS_${PN} += "${POCO_PACKAGES}" | ||
| 84 | RRECOMMENDS_${PN}_class-native = "" | ||
| 85 | ALLOW_EMPTY_${PN} = "1" | ||
| 86 | |||
| 87 | # -dev last to pick up the remaining stuff | ||
| 88 | PACKAGES += "${PN}-dev ${PN}-staticdev" | ||
| 89 | FILES_${PN}-dev = "${includedir} ${libdir}/libPoco*.so ${libdir}/cmake" | ||
| 90 | FILES_${PN}-staticdev = "${libdir}/libPoco*.a" | ||
| 91 | |||
| 92 | # ptest support | ||
| 93 | FILES_${PN}-dbg += "${PTEST_PATH}/bin/.debug" | ||
| 94 | |||
| 95 | # cppunit is only built if tests are enabled | ||
| 96 | PACKAGES += "${PN}-cppunit" | ||
| 97 | FILES_${PN}-cppunit += "${libdir}/libCppUnit.so*" | ||
| 98 | ALLOW_EMPTY_${PN}-cppunit = "1" | ||
| 99 | |||
| 100 | RDEPENDS_${PN}-ptest += "${PN}-cppunit" | ||
| 101 | |||
| 102 | do_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 | } | ||
