1 |
commit: 5c0ee68d09f9f5845220c12d764b38cd352ad8ea |
2 |
Author: Patrick McLean <patrick.mclean <AT> sony <DOT> com> |
3 |
AuthorDate: Thu Oct 29 16:56:23 2020 +0000 |
4 |
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Oct 29 16:57:21 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5c0ee68d |
7 |
|
8 |
dev-libs/libpy-0.2.5-r1: Fix CFLAGS (bug #751658), typo (bug #751655) |
9 |
|
10 |
Closes: https://bugs.gentoo.org/751658 |
11 |
Closes: https://bugs.gentoo.org/751655 |
12 |
Copyright: Sony Interactive Entertainment Inc. |
13 |
Package-Manager: Portage-3.0.8, Repoman-3.0.2 |
14 |
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org> |
15 |
|
16 |
dev-libs/libpy/files/libpy-0.2.5-cflags.patch | 24 ++++++++++++++++++++++ |
17 |
.../{libpy-0.2.5.ebuild => libpy-0.2.5-r1.ebuild} | 9 ++++++-- |
18 |
2 files changed, 31 insertions(+), 2 deletions(-) |
19 |
|
20 |
diff --git a/dev-libs/libpy/files/libpy-0.2.5-cflags.patch b/dev-libs/libpy/files/libpy-0.2.5-cflags.patch |
21 |
new file mode 100644 |
22 |
index 00000000000..be8dd1f2172 |
23 |
--- /dev/null |
24 |
+++ b/dev-libs/libpy/files/libpy-0.2.5-cflags.patch |
25 |
@@ -0,0 +1,24 @@ |
26 |
+diff --git a/Makefile b/Makefile |
27 |
+index 09e6e39..9addb5d 100644 |
28 |
+--- a/Makefile |
29 |
++++ b/Makefile |
30 |
+@@ -46,9 +46,8 @@ CLANG_WARNINGS := \ |
31 |
+ -Wno-self-assign-overloaded |
32 |
+ WARNINGS := $(BASE_WARNINGS) $($(COMPILER)_WARNINGS) |
33 |
+ |
34 |
+-BASE_CXXFLAGS = -std=gnu++17 -g -O$(OPTLEVEL) \ |
35 |
++BASE_CXXFLAGS = -std=gnu++17 -g \ |
36 |
+ -fwrapv -fno-strict-aliasing -pipe \ |
37 |
+- -march=x86-64 -mtune=generic \ |
38 |
+ -fvisibility=hidden \ |
39 |
+ $(WARNINGS) \ |
40 |
+ -DPY_MAJOR_VERSION=$(PY_MAJOR_VERSION) \ |
41 |
+@@ -58,7 +57,7 @@ BASE_CXXFLAGS = -std=gnu++17 -g -O$(OPTLEVEL) \ |
42 |
+ -DLIBPY_MICRO_VERSION=$(MICRO_VERSION) |
43 |
+ GCC_FLAGS = -fmax-errors=$(MAX_ERRORS) |
44 |
+ CLANG_FLAGS = -ferror-limit=$(MAX_ERRORS) |
45 |
+-CXXFLAGS = $(BASE_CXXFLAGS) $($(COMPILER)_FLAGS) |
46 |
++CXXFLAGS += $(BASE_CXXFLAGS) $($(COMPILER)_FLAGS) |
47 |
+ |
48 |
+ # https://github.com/quantopian/libpy/pull/86/files#r309288697 |
49 |
+ INCLUDE_DIRS := include/ \ |
50 |
|
51 |
diff --git a/dev-libs/libpy/libpy-0.2.5.ebuild b/dev-libs/libpy/libpy-0.2.5-r1.ebuild |
52 |
similarity index 87% |
53 |
rename from dev-libs/libpy/libpy-0.2.5.ebuild |
54 |
rename to dev-libs/libpy/libpy-0.2.5-r1.ebuild |
55 |
index 567bbd05d59..a0d5be7d1dc 100644 |
56 |
--- a/dev-libs/libpy/libpy-0.2.5.ebuild |
57 |
+++ b/dev-libs/libpy/libpy-0.2.5-r1.ebuild |
58 |
@@ -5,7 +5,7 @@ EAPI=7 |
59 |
|
60 |
PYTHON_COMPAT=( python3_{6..9} ) |
61 |
|
62 |
-inherit distutils-r1 |
63 |
+inherit flag-o-matic distutils-r1 |
64 |
|
65 |
GTEST_VER="23b2a3b1cf803999fb38175f6e9e038a4495c8a5" |
66 |
|
67 |
@@ -35,13 +35,18 @@ BDEPEND="${COMMON_DEPEND} |
68 |
" |
69 |
|
70 |
RESTRICT="!test? ( test )" |
71 |
-REQUIRES_USE="test? ( sparsehash )" |
72 |
+REQUIRED_USE="test? ( sparsehash )" |
73 |
|
74 |
PATCHES=( |
75 |
"${FILESDIR}/libpy-0.2.5-no-werror.patch" |
76 |
"${FILESDIR}/libpy-0.2.5-permissions.patch" |
77 |
+ "${FILESDIR}/libpy-0.2.5-cflags.patch" |
78 |
) |
79 |
|
80 |
python_test() { |
81 |
emake GTEST_ROOT="${WORKDIR}/googletest-${GTEST_VER}" test || die "Tests failed with ${EPYTHON}" |
82 |
} |
83 |
+ |
84 |
+python_configure() { |
85 |
+ replace-flags '-O*' '-O3' |
86 |
+} |