diff options
Diffstat (limited to 'meta-oe/recipes-support/poco/poco_1.7.5.bb')
| -rw-r--r-- | meta-oe/recipes-support/poco/poco_1.7.5.bb | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/poco/poco_1.7.5.bb b/meta-oe/recipes-support/poco/poco_1.7.5.bb new file mode 100644 index 0000000000..0fc50e1549 --- /dev/null +++ b/meta-oe/recipes-support/poco/poco_1.7.5.bb | |||
| @@ -0,0 +1,105 @@ | |||
| 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 = "7dfdcfb70d75ccdaaf2b43fa0b23f82599aebec3" | ||
| 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 | ${@bb.utils.contains('PTEST_ENABLED', '1', '-DENABLE_TESTS=ON ', '', d)}" | ||
| 25 | |||
| 26 | # For the native build we want to use the bundled version | ||
| 27 | EXTRA_OECMAKE_append_class-native = " -DPOCO_UNBUNDLED=OFF" | ||
| 28 | |||
| 29 | # do not use rpath | ||
| 30 | EXTRA_OECMAKE_append = " -DCMAKE_SKIP_RPATH=ON" | ||
| 31 | |||
| 32 | # By default the most commonly used poco components are built | ||
| 33 | # Foundation is built anyway and doesn't need to be listed explicitly | ||
| 34 | # these don't have dependencies outside oe-core | ||
| 35 | PACKAGECONFIG ??= "XML JSON MongoDB PDF Util Net NetSSL Crypto Data DataSQLite Zip" | ||
| 36 | |||
| 37 | PACKAGECONFIG[XML] = "-DENABLE_XML=ON,-DENABLE_XML=OFF,expat" | ||
| 38 | PACKAGECONFIG[JSON] = "-DENABLE_JSON=ON,-DENABLE_JSON=OFF" | ||
| 39 | PACKAGECONFIG[MongoDB] = "-DENABLE_MONGODB=ON,-DENABLE_MONGODB=OFF" | ||
| 40 | PACKAGECONFIG[PDF] = "-DENABLE_PDF=ON,-DENABLE_PDF=OFF,zlib" | ||
| 41 | PACKAGECONFIG[Util] = "-DENABLE_UTIL=ON,-DENABLE_UTIL=OFF" | ||
| 42 | PACKAGECONFIG[Net] = "-DENABLE_NET=ON,-DENABLE_NET=OFF" | ||
| 43 | PACKAGECONFIG[NetSSL] = "-DENABLE_NETSSL=ON,-DENABLE_NETSSL=OFF,openssl" | ||
| 44 | PACKAGECONFIG[Crypto] = "-DENABLE_CRYPTO=ON,-DENABLE_CRYPTO=OFF,openssl" | ||
| 45 | PACKAGECONFIG[Data] = "-DENABLE_DATA=ON,-DENABLE_DATA=OFF" | ||
| 46 | PACKAGECONFIG[DataSQLite] = "-DENABLE_DATA_SQLITE=ON,-DENABLE_DATA_SQLITE=OFF,sqlite3" | ||
| 47 | PACKAGECONFIG[Zip] = "-DENABLE_ZIP=ON,-DENABLE_ZIP=OFF" | ||
| 48 | |||
| 49 | # Additional components not build by default, | ||
| 50 | # they might have dependencies not included in oe-core | ||
| 51 | # or they don't work on all architectures | ||
| 52 | PACKAGECONFIG[mod_poco] = "-DENABLE_APACHECONNECTOR=ON,-DENABLE_APACHECONNECTOR=OFF,apr apache2" | ||
| 53 | PACKAGECONFIG[CppParser] = "-DENABLE_CPPPARSER=ON,-DENABLE_CPPPARSER=OFF" | ||
| 54 | PACKAGECONFIG[DataMySQL] = "-DENABLE_DATA_MYSQL=ON,-DENABLE_DATA_MYSQL=OFF,mariadb" | ||
| 55 | PACKAGECONFIG[DataODBC] = "-DENABLE_DATA_ODBC=ON,-DENABLE_DATA_ODBC=OFF,libiodbc" | ||
| 56 | PACKAGECONFIG[PageCompiler] = "-DENABLE_PAGECOMPILER=ON,-DENABLE_PAGECOMPILER=OFF" | ||
| 57 | PACKAGECONFIG[PageCompilerFile2Page] = "-DENABLE_PAGECOMPILER_FILE2PAGE=ON,-DENABLE_PAGECOMPILER_FILE2PAGE=OFF" | ||
| 58 | PACKAGECONFIG[SevenZip] = "-DENABLE_SEVENZIP=ON,-DENABLE_SEVENZIP=OFF" | ||
| 59 | |||
| 60 | # Make a package for each library | ||
| 61 | PACKAGES = "${PN}-dbg ${POCO_PACKAGES}" | ||
| 62 | python __anonymous () { | ||
| 63 | packages = [] | ||
| 64 | testrunners = [] | ||
| 65 | components = d.getVar("PACKAGECONFIG", True).split() | ||
| 66 | components.append("Foundation") | ||
| 67 | for lib in components: | ||
| 68 | pkg = ("poco-%s" % lib.lower()).replace("_","") | ||
| 69 | packages.append(pkg) | ||
| 70 | if not d.getVar("FILES_%s" % pkg, True): | ||
| 71 | d.setVar("FILES_%s" % pkg, "${libdir}/libPoco%s.so.*" % lib) | ||
| 72 | testrunners.append("%s" % lib) | ||
| 73 | |||
| 74 | d.setVar("POCO_PACKAGES", " ".join(packages)) | ||
| 75 | d.setVar("POCO_TESTRUNNERS", "\n".join(testrunners)) | ||
| 76 | } | ||
| 77 | |||
| 78 | # "poco" is a metapackage which pulls in all Poco components | ||
| 79 | PACKAGES += "${PN}" | ||
| 80 | RRECOMMENDS_${PN} += "${POCO_PACKAGES}" | ||
| 81 | RRECOMMENDS_${PN}_class-native = "" | ||
| 82 | ALLOW_EMPTY_${PN} = "1" | ||
| 83 | |||
| 84 | # -dev last to pick up the remaining stuff | ||
| 85 | PACKAGES += "${PN}-dev ${PN}-staticdev" | ||
| 86 | FILES_${PN}-dev = "${includedir} ${libdir}/libPoco*.so ${libdir}/cmake" | ||
| 87 | FILES_${PN}-staticdev = "${libdir}/libPoco*.a" | ||
| 88 | |||
| 89 | # ptest support | ||
| 90 | FILES_${PN}-dbg += "${PTEST_PATH}/bin/.debug" | ||
| 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 | do_install_ptest () { | ||
| 100 | cp -rf ${B}/bin/ ${D}${PTEST_PATH} | ||
| 101 | cp -f ${B}/lib/libCppUnit.so* ${D}${libdir} | ||
| 102 | cp -rf ${B}/*/testsuite/data ${D}${PTEST_PATH}/bin/ | ||
| 103 | find "${D}${PTEST_PATH}" -executable -exec chrpath -d {} \; | ||
| 104 | echo "${POCO_TESTRUNNERS}" > "${D}${PTEST_PATH}/testrunners" | ||
| 105 | } | ||
