blob: c5f26ecb4e62cdac682e7a2a76d20abf397b989b [file] [log] [blame]
Andrew Geissler9aee5002022-03-30 16:27:02 +00001SUMMARY = "A C++11 library for serialization"
2HOMEPAGE = "https://uscilab.github.io/cereal/"
3
4SECTION = "libs"
5
6LICENSE = "BSD-3-Clause & MIT & BSL-1.0"
7LIC_FILES_CHKSUM = "\
8 file://LICENSE;md5=4921372a1fb38469e667c38b17a1c4b3 \
9 file://include/cereal/external/rapidxml/license.txt;md5=d63ab70ba21ca0544b03284958324301 \
10 file://include/cereal/external/LICENSE;md5=b07578c9df99c0b8b45eb041efd4a645 \
11 file://include/cereal/external/rapidjson/LICENSE;md5=e7abb663111d4ac17cf00323698aff08 \
12 file://include/cereal/external/rapidjson/msinttypes/LICENSE;md5=dffce65b98c773976de2e338bd130f46 \
13"
14
15DEPENDS = " ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'boost', '', d)} "
16
17PROVIDES += "${PN}-dev"
18
19PV .= "+git${SRCPV}"
20SRCREV = "ebef1e929807629befafbb2918ea1a08c7194554"
21SRC_URI = "git://github.com/USCiLab/cereal.git;branch=master;protocol=https \
Andrew Geissler87f5cff2022-09-30 13:13:31 -050022 file://0001-sandbox-Do-not-use-int8_t-in-std-uniform_int_distrib.patch \
Andrew Geisslerc5535c92023-01-27 16:10:19 -060023 file://0001-cmake-Use-idirafter-instead-of-isystem.patch \
Patrick Williams8e7b46e2023-05-01 14:19:06 -050024 file://0001-doctest-Do-not-use-unnamed-class.patch \
Andrew Geissler9aee5002022-03-30 16:27:02 +000025 file://run-ptest \
26"
27
28S = "${WORKDIR}/git"
29
30inherit cmake pkgconfig ptest
31
Patrick Williams03907ee2022-05-01 06:28:52 -050032LIBATOMIC:mips = "${@bb.utils.contains('PTEST_ENABLED', '1', '-DCEREAL_THREAD_LIBS="-latomic"', '', d)}"
33LIBATOMIC:riscv32 = "${@bb.utils.contains('PTEST_ENABLED', '1', '-DCEREAL_THREAD_LIBS="-latomic"', '', d)}"
Andrew Geissler517393d2023-01-13 08:55:19 -060034LIBATOMIC:powerpc = "${@bb.utils.contains('PTEST_ENABLED', '1', '-DCEREAL_THREAD_LIBS="-latomic"', '', d)}"
Andrew Geissler9aee5002022-03-30 16:27:02 +000035
36PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'with-tests', '', d)}"
37PACKAGECONFIG[with-tests] = "-DWITH_WERROR=OFF -DBUILD_TESTS=ON ${LIBATOMIC},,"
38EXTRA_OECMAKE = "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '', '-DJUST_INSTALL_CEREAL=ON', d)} \
39 ${@['','-DSKIP_PORTABILITY_TEST=ON'][d.getVar('SITEINFO_BITS') != '32']}"
40
41do_install_ptest() {
42 install -d ${D}${PTEST_PATH}/tests
43 cp ${B}/unittests/test_* ${D}${PTEST_PATH}/tests
44}
45
46ALLOW_EMPTY:${PN} = "1"
47
48RDEPENDS:${PN}-dev = ""
49
50BBCLASSEXTEND = "native nativesdk"
Patrick Williams58776372022-04-13 09:07:35 -050051
Andrew Geisslerd5838332022-05-27 11:33:10 -050052#it needs to work with CXXFLAGS += " -mlong-double-64" but ppc only supports 128bit long double
53COMPATIBLE_HOST:powerpc:libc-musl = "null"
54COMPATIBLE_HOST:powerpc64le:libc-musl = "null"