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