diff options
Diffstat (limited to 'meta-oe/recipes-support/poco/poco_1.13.3.bb')
-rw-r--r-- | meta-oe/recipes-support/poco/poco_1.13.3.bb | 118 |
1 files changed, 118 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/poco/poco_1.13.3.bb b/meta-oe/recipes-support/poco/poco_1.13.3.bb new file mode 100644 index 0000000000..e0f6c4169e --- /dev/null +++ b/meta-oe/recipes-support/poco/poco_1.13.3.bb | |||
@@ -0,0 +1,118 @@ | |||
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 = "libpcre2 zlib" | ||
10 | |||
11 | SRC_URI = "git://github.com/pocoproject/poco.git;branch=poco-1.13.3;protocol=https \ | ||
12 | file://0001-cppignore.lnx-Ignore-PKCS12-and-testLaunch-test.patch \ | ||
13 | file://run-ptest \ | ||
14 | file://0001-SimpleRowFormatter.h-fix-the-build-on-gcc-15-unsatis.patch \ | ||
15 | file://0002-fix-Foundation-Build-error-with-GCC-15-class-Poco-Pr.patch \ | ||
16 | " | ||
17 | SRCREV = "7f848d25aa0461d3beeff1189dc61b48ffe8e2f4" | ||
18 | |||
19 | UPSTREAM_CHECK_GITTAGREGEX = "poco-(?P<pver>\d+(\.\d+)+)" | ||
20 | |||
21 | |||
22 | inherit cmake ptest | ||
23 | |||
24 | # By default the most commonly used poco components are built | ||
25 | # Foundation is built anyway and doesn't need to be listed explicitly | ||
26 | # these don't have dependencies outside oe-core | ||
27 | PACKAGECONFIG ??= "XML JSON PDF Util Net NetSSL Crypto JWT Data DataSQLite Zip Encodings Redis Prometheus" | ||
28 | # MongoDB does not build for all architectures yet keep in sync with COMPATIBLE_HOST list in mongodb recipe | ||
29 | # and mongodb needs meta-python enabled as well | ||
30 | PACKAGECONFIG:remove:riscv32 = "MongoDB" | ||
31 | PACKAGECONFIG:remove:riscv64 = "MongoDB" | ||
32 | PACKAGECONFIG:remove:mipsarch = "MongoDB" | ||
33 | PACKAGECONFIG:remove:powerpc = "MongoDB" | ||
34 | |||
35 | PACKAGECONFIG[XML] = "-DENABLE_XML=ON,-DENABLE_XML=OFF,expat" | ||
36 | PACKAGECONFIG[JSON] = "-DENABLE_JSON=ON,-DENABLE_JSON=OFF" | ||
37 | PACKAGECONFIG[MongoDB] = "-DENABLE_MONGODB=ON,-DENABLE_MONGODB=OFF" | ||
38 | PACKAGECONFIG[PDF] = "-DENABLE_PDF=ON,-DENABLE_PDF=OFF,zlib" | ||
39 | PACKAGECONFIG[Util] = "-DENABLE_UTIL=ON,-DENABLE_UTIL=OFF" | ||
40 | PACKAGECONFIG[Net] = "-DENABLE_NET=ON,-DENABLE_NET=OFF" | ||
41 | PACKAGECONFIG[NetSSL] = "-DENABLE_NETSSL=ON,-DENABLE_NETSSL=OFF,openssl" | ||
42 | PACKAGECONFIG[Crypto] = "-DENABLE_CRYPTO=ON,-DENABLE_CRYPTO=OFF,openssl" | ||
43 | PACKAGECONFIG[JWT] = "-DENABLE_JWT=ON,-DENABLE_JWT=OFF,openssl" | ||
44 | PACKAGECONFIG[Data] = "-DENABLE_DATA=ON,-DENABLE_DATA=OFF" | ||
45 | PACKAGECONFIG[DataSQLite] = "-DENABLE_DATA_SQLITE=ON -DSQLITE3_LIBRARY:STRING=sqlite3,-DENABLE_DATA_SQLITE=OFF,sqlite3" | ||
46 | PACKAGECONFIG[Zip] = "-DENABLE_ZIP=ON,-DENABLE_ZIP=OFF" | ||
47 | PACKAGECONFIG[Encodings] = "-DENABLE_ENCODINGS=ON,-DENABLE_ENCODINGS=OFF" | ||
48 | PACKAGECONFIG[Redis] = "-DENABLE_REDIS=ON,-DENABLE_REDIS=OFF" | ||
49 | PACKAGECONFIG[Prometheus] = "-DENABLE_PROMETHEUS=ON,-DENABLE_PROMETHEUS=OFF" | ||
50 | |||
51 | # Additional components not build by default, | ||
52 | # they might have dependencies not included in oe-core | ||
53 | # or they don't work on all architectures | ||
54 | PACKAGECONFIG[mod_poco] = "-DENABLE_APACHECONNECTOR=ON,-DENABLE_APACHECONNECTOR=OFF,apr apache2" | ||
55 | PACKAGECONFIG[CppParser] = "-DENABLE_CPPPARSER=ON,-DENABLE_CPPPARSER=OFF" | ||
56 | PACKAGECONFIG[DataMySQL] = "-DENABLE_DATA_MYSQL=ON -DMYSQL_LIB:STRING=mysqlclient_r,-DENABLE_DATA_MYSQL=OFF,mariadb" | ||
57 | PACKAGECONFIG[DataODBC] = "-DENABLE_DATA_ODBC=ON,-DENABLE_DATA_ODBC=OFF,libiodbc" | ||
58 | PACKAGECONFIG[ActiveRecord] = "-DENABLE_ACTIVERECORD=ON,-DENABLE_ACTIVERECORD=OFF" | ||
59 | PACKAGECONFIG[ActiveRecordCompiler] = "-DENABLE_ACTIVERECORD_COMPILER=ON,-DENABLE_ACTIVERECORD_COMPILER=OFF" | ||
60 | PACKAGECONFIG[PageCompiler] = "-DENABLE_PAGECOMPILER=ON,-DENABLE_PAGECOMPILER=OFF" | ||
61 | PACKAGECONFIG[PageCompilerFile2Page] = "-DENABLE_PAGECOMPILER_FILE2PAGE=ON,-DENABLE_PAGECOMPILER_FILE2PAGE=OFF" | ||
62 | PACKAGECONFIG[SevenZip] = "-DENABLE_SEVENZIP=ON,-DENABLE_SEVENZIP=OFF" | ||
63 | |||
64 | EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=RelWithDebInfo -DPOCO_UNBUNDLED=ON \ | ||
65 | -DLIB_SUFFIX=${@d.getVar('baselib').replace('lib', '')} \ | ||
66 | ${@bb.utils.contains('PTEST_ENABLED', '1', '-DENABLE_TESTS=ON ', '', d)}" | ||
67 | |||
68 | # For the native build we want to use the bundled version | ||
69 | EXTRA_OECMAKE:append:class-native = " -DPOCO_UNBUNDLED=OFF" | ||
70 | |||
71 | # do not use rpath | ||
72 | EXTRA_OECMAKE:append = " -DCMAKE_SKIP_RPATH=ON" | ||
73 | |||
74 | LDFLAGS:append:riscv32 = "${@bb.utils.contains('PACKAGECONFIG', 'Prometheus', ' -Wl,--no-as-needed -latomic -Wl,--as-needed', '', d)}" | ||
75 | LDFLAGS:append:mips = "${@bb.utils.contains('PACKAGECONFIG', 'Prometheus', ' -Wl,--no-as-needed -latomic -Wl,--as-needed', '', d)}" | ||
76 | LDFLAGS:append:powerpc = "${@bb.utils.contains('PACKAGECONFIG', 'Prometheus', ' -Wl,--no-as-needed -latomic -Wl,--as-needed', '', d)}" | ||
77 | |||
78 | python populate_packages:prepend () { | ||
79 | poco_libdir = d.expand('${libdir}') | ||
80 | pn = d.getVar("PN") | ||
81 | packages = [] | ||
82 | |||
83 | def hook(f, pkg, file_regex, output_pattern, modulename): | ||
84 | packages.append(pkg) | ||
85 | |||
86 | do_split_packages(d, poco_libdir, r'^libPoco(.*)\.so\..*$', | ||
87 | 'poco-%s', 'Poco %s component', extra_depends='', prepend=True, hook=hook) | ||
88 | |||
89 | d.setVar("RRECOMMENDS:%s" % pn, " ".join(packages)) | ||
90 | } | ||
91 | |||
92 | do_install_ptest () { | ||
93 | cp -rf ${B}/bin/ ${D}${PTEST_PATH} | ||
94 | cp -f ${B}/lib/libCppUnit.so* ${D}${libdir} | ||
95 | cp -rf ${B}/*/testsuite/data ${D}${PTEST_PATH}/bin/ | ||
96 | find "${D}${PTEST_PATH}" -executable -exec chrpath -d {} \; | ||
97 | rm -f ${D}${PTEST_PATH}/testrunners | ||
98 | for f in ${D}${PTEST_PATH}/bin/*-testrunner; do | ||
99 | echo `basename $f` >> ${D}${PTEST_PATH}/testrunners | ||
100 | done | ||
101 | install -Dm 0644 ${S}/cppignore.lnx ${D}${PTEST_PATH}/cppignore.lnx | ||
102 | } | ||
103 | |||
104 | PACKAGES_DYNAMIC = "poco-.*" | ||
105 | |||
106 | # "poco" is a metapackage which pulls in all Poco components | ||
107 | ALLOW_EMPTY:${PN} = "1" | ||
108 | |||
109 | # cppunit is only built if tests are enabled | ||
110 | PACKAGES =+ "${PN}-cppunit" | ||
111 | FILES:${PN}-cppunit += "${libdir}/libCppUnit.so*" | ||
112 | ALLOW_EMPTY:${PN}-cppunit = "1" | ||
113 | |||
114 | RDEPENDS:${PN}-ptest += "${PN}-cppunit" | ||
115 | RDEPENDS:${PN}-ptest += "${@bb.utils.contains('PACKAGECONFIG', 'MongoDB', 'mongodb', '', d)}" | ||
116 | RDEPENDS:${PN}-ptest += "${@bb.utils.contains('PACKAGECONFIG', 'Redis', 'redis', '', d)}" | ||
117 | |||
118 | BBCLASSEXTEND = "native" | ||