Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-cpp/abseil-cpp/, dev-cpp/abseil-cpp/files/
Date: Thu, 29 Apr 2021 04:05:06
Message-Id: 1619669074.6459947b9a21796aa2980fce0e16f25a9bb37294.sam@gentoo
1 commit: 6459947b9a21796aa2980fce0e16f25a9bb37294
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Thu Apr 29 03:02:48 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Thu Apr 29 04:04:34 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6459947b
7
8 dev-cpp/abseil-cpp: backport fix for arm64 CPUs without crypto extensions
9
10 * Backport fix for arm64 CPUs without crypto extensions
11 (needed for a keywording bug).
12
13 * Add information in patch / background on the problem
14 (including mentioning the need for an ebuild change,
15 in case e.g. another distro tries to pick it up,
16 and to remind us to try upstream it.)
17
18 * Add explicit flag-o-matic inherits accordingly.
19
20 See: 619cfe3daec298493d31030008efc12e5ebbf7ec
21 Bug: https://bugs.gentoo.org/778926
22 Bug: https://bugs.gentoo.org/766411
23 Signed-off-by: Sam James <sam <AT> gentoo.org>
24
25 dev-cpp/abseil-cpp/abseil-cpp-20200225.2-r1.ebuild | 13 ++++++++++++-
26 dev-cpp/abseil-cpp/abseil-cpp-20200923.2-r1.ebuild | 3 ++-
27 dev-cpp/abseil-cpp/abseil-cpp-20210324.1.ebuild | 3 ++-
28 .../files/abseil-cpp-20200923-arm_no_crypto.patch | 7 +++++++
29 4 files changed, 23 insertions(+), 3 deletions(-)
30
31 diff --git a/dev-cpp/abseil-cpp/abseil-cpp-20200225.2-r1.ebuild b/dev-cpp/abseil-cpp/abseil-cpp-20200225.2-r1.ebuild
32 index 344942f1eca..a4ec361d4c0 100644
33 --- a/dev-cpp/abseil-cpp/abseil-cpp-20200225.2-r1.ebuild
34 +++ b/dev-cpp/abseil-cpp/abseil-cpp-20200225.2-r1.ebuild
35 @@ -5,7 +5,7 @@ EAPI=7
36
37 PYTHON_COMPAT=( python3_{7,8,9} )
38
39 -inherit cmake python-any-r1
40 +inherit cmake flag-o-matic python-any-r1
41
42 DESCRIPTION="Abseil Common Libraries (C++), LTS Branch"
43 HOMEPAGE="https://abseil.io"
44 @@ -23,6 +23,10 @@ BDEPEND="${PYTHON_DEPS}"
45 # requires source of gtest and other libs
46 RESTRICT=test
47
48 +PATCHES=(
49 + "${FILESDIR}/${PN}-20200923-arm_no_crypto.patch"
50 +)
51 +
52 src_prepare() {
53 cmake_src_prepare
54
55 @@ -40,6 +44,13 @@ src_prepare() {
56 }
57
58 src_configure() {
59 + if use arm || use arm64; then
60 + # bug #778926
61 + if [[ $($(tc-getCXX) ${CXXFLAGS} -E -P - <<<$'#if defined(__ARM_FEATURE_CRYPTO)\nHAVE_ARM_FEATURE_CRYPTO\n#endif') != *HAVE_ARM_FEATURE_CRYPTO* ]]; then
62 + append-cxxflags -DABSL_ARCH_ARM_NO_CRYPTO
63 + fi
64 + fi
65 +
66 local mycmakeargs=(
67 -DABSL_ENABLE_INSTALL=TRUE
68 )
69
70 diff --git a/dev-cpp/abseil-cpp/abseil-cpp-20200923.2-r1.ebuild b/dev-cpp/abseil-cpp/abseil-cpp-20200923.2-r1.ebuild
71 index a5ffd719aa2..d15b9e966d8 100644
72 --- a/dev-cpp/abseil-cpp/abseil-cpp-20200923.2-r1.ebuild
73 +++ b/dev-cpp/abseil-cpp/abseil-cpp-20200923.2-r1.ebuild
74 @@ -5,7 +5,7 @@ EAPI=7
75
76 PYTHON_COMPAT=( python3_{7,8,9} )
77
78 -inherit cmake python-any-r1 toolchain-funcs
79 +inherit cmake flag-o-matic python-any-r1 toolchain-funcs
80
81 # yes, it needs SOURCE, not just installed one
82 GTEST_COMMIT="aee0f9d9b5b87796ee8a0ab26b7587ec30e8858e"
83 @@ -59,6 +59,7 @@ src_prepare() {
84
85 src_configure() {
86 if use arm || use arm64; then
87 + # bug #778926
88 if [[ $($(tc-getCXX) ${CXXFLAGS} -E -P - <<<$'#if defined(__ARM_FEATURE_CRYPTO)\nHAVE_ARM_FEATURE_CRYPTO\n#endif') != *HAVE_ARM_FEATURE_CRYPTO* ]]; then
89 append-cxxflags -DABSL_ARCH_ARM_NO_CRYPTO
90 fi
91
92 diff --git a/dev-cpp/abseil-cpp/abseil-cpp-20210324.1.ebuild b/dev-cpp/abseil-cpp/abseil-cpp-20210324.1.ebuild
93 index 136d41f23b4..12ecd89301f 100644
94 --- a/dev-cpp/abseil-cpp/abseil-cpp-20210324.1.ebuild
95 +++ b/dev-cpp/abseil-cpp/abseil-cpp-20210324.1.ebuild
96 @@ -5,7 +5,7 @@ EAPI=7
97
98 PYTHON_COMPAT=( python3_{7,8,9} )
99
100 -inherit cmake python-any-r1 toolchain-funcs
101 +inherit cmake flag-o-matic python-any-r1 toolchain-funcs
102
103 # yes, it needs SOURCE, not just installed one
104 GTEST_COMMIT="aee0f9d9b5b87796ee8a0ab26b7587ec30e8858e"
105 @@ -61,6 +61,7 @@ src_prepare() {
106
107 src_configure() {
108 if use arm || use arm64; then
109 + # bug #778926
110 if [[ $($(tc-getCXX) ${CXXFLAGS} -E -P - <<<$'#if defined(__ARM_FEATURE_CRYPTO)\nHAVE_ARM_FEATURE_CRYPTO\n#endif') != *HAVE_ARM_FEATURE_CRYPTO* ]]; then
111 append-cxxflags -DABSL_ARCH_ARM_NO_CRYPTO
112 fi
113
114 diff --git a/dev-cpp/abseil-cpp/files/abseil-cpp-20200923-arm_no_crypto.patch b/dev-cpp/abseil-cpp/files/abseil-cpp-20200923-arm_no_crypto.patch
115 index b74a6c70e90..762476a1018 100644
116 --- a/dev-cpp/abseil-cpp/files/abseil-cpp-20200923-arm_no_crypto.patch
117 +++ b/dev-cpp/abseil-cpp/files/abseil-cpp-20200923-arm_no_crypto.patch
118 @@ -1,3 +1,10 @@
119 +Don't assume all ARM CPUs have crypto extensions.
120 +
121 +Requires an accompanying change in the ebuild to disable crypto
122 +extensions (by passing -DABSL_ARCH_ARM_NO_CRYPTO). This could
123 +be done by the build system instead in future.
124 +
125 +https://bugs.gentoo.org/778926
126 --- /absl/random/internal/randen_hwaes.cc
127 +++ /absl/random/internal/randen_hwaes.cc
128 @@ -50,8 +50,11 @@