blob: cc7bf01d735a69aa6c0517d40de5be8f86d994c5 [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001SUMMARY = "Abseil is a cpp library like STL"
2DESCRIPTION = "Abseil provides pieces missing from the C++ standard. Contains \
3additional useful libraries like algorithm, container, debugging, hash, memory, \
4meta, numeric, strings, synchronization, time, types and utility"
5HOMEPAGE = "https://abseil.io/"
6SECTION = "libs"
7LICENSE = "Apache-2.0"
8LIC_FILES_CHKSUM = "file://LICENSE;md5=df52c6edb7adc22e533b2bacc3bd3915"
9
Andrew Geisslereef63862021-01-29 15:58:13 -060010PV = "20200923+git${SRCPV}"
11SRCREV = "6f9d96a1f41439ac172ee2ef7ccd8edf0e5d068c"
12BRANCH = "lts_2020_09_23"
13SRC_URI = "git://github.com/abseil/abseil-cpp;branch=${BRANCH} \
14 file://0001-absl-always-use-asm-sgidefs.h.patch \
15 file://0002-Remove-maes-option-from-cross-compilation.patch \
Andrew Geissler82c905d2020-04-13 13:39:40 -050016 "
17
18S = "${WORKDIR}/git"
19
20DEPENDS_append_libc-musl = " libexecinfo "
21
22ASNEEDED_class-native = ""
23ASNEEDED_class-nativesdk = ""
24
25inherit cmake
26
Andrew Geisslereef63862021-01-29 15:58:13 -060027EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON \
28 -DBUILD_TESTING=OFF \
29 "
30
Andrew Geissler82c905d2020-04-13 13:39:40 -050031BBCLASSEXTEND = "native nativesdk"
32ALLOW_EMPTY_${PN} = "1"
33
Andrew Geisslereef63862021-01-29 15:58:13 -060034FILES_${PN} = "${libdir}/libabsl_*.so ${libdir}/cmake"
35FILES_${PN}-dev = "${includedir}"
36
Andrew Geissler82c905d2020-04-13 13:39:40 -050037python () {
38 arch = d.getVar("TARGET_ARCH")
39
40 if arch == "aarch64":
41 tunes = d.getVar("TUNE_FEATURES")
42 if not tunes:
Andrew Geisslerbffdb3e2020-08-21 16:13:29 -050043 raise bb.parse.SkipRecipe("%s-%s Needs support for crypto on armv8" % (pkgn, pkgv))
Andrew Geissler82c905d2020-04-13 13:39:40 -050044 return
45 pkgn = d.getVar("PN")
46 pkgv = d.getVar("PV")
47 if "crypto" not in tunes:
Andrew Geisslerbffdb3e2020-08-21 16:13:29 -050048 raise bb.parse.SkipRecipe("%s-%s Needs support for crypto on armv8" % (pkgn, pkgv))
Andrew Geissler82c905d2020-04-13 13:39:40 -050049
50 if arch == "x86_64":
51 tunes = d.getVar("TUNE_FEATURES")
52 if not tunes:
Andrew Geisslerbffdb3e2020-08-21 16:13:29 -050053 raise bb.parse.SkipRecipe("%s-%s Needs support for corei7 on x86_64" % (pkgn, pkgv))
Andrew Geissler82c905d2020-04-13 13:39:40 -050054 return
55 pkgn = d.getVar("PN")
56 pkgv = d.getVar("PV")
57 if "corei7" not in tunes:
Andrew Geisslerbffdb3e2020-08-21 16:13:29 -050058 raise bb.parse.SkipRecipe("%s-%s Needs support for corei7 on x86_64" % (pkgn, pkgv))
Andrew Geissler82c905d2020-04-13 13:39:40 -050059
60}