Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/kbd/files/, sys-apps/kbd/
Date: Wed, 31 Jul 2019 16:18:21
Message-Id: 1564589890.b6f4e5bd8aeeea00704ffd77554d8c3d7291f1d4.polynomial-c@gentoo
1 commit: b6f4e5bd8aeeea00704ffd77554d8c3d7291f1d4
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jul 31 16:16:21 2019 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Wed Jul 31 16:18:10 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b6f4e5bd
7
8 sys-apps/kbd: Respect user CFLAGS
9
10 Thanks-to: Michał Górny <mgorny <AT> gentoo.org>
11 Bug: https://bugs.gentoo.org/691142
12 Package-Manager: Portage-2.3.69, Repoman-2.3.16
13 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
14
15 sys-apps/kbd/files/kbd-2.2.0-cflags.patch | 33 ++++++++++++++++++++++
16 .../kbd/{kbd-2.2.0.ebuild => kbd-2.2.0-r1.ebuild} | 10 ++++---
17 2 files changed, 39 insertions(+), 4 deletions(-)
18
19 diff --git a/sys-apps/kbd/files/kbd-2.2.0-cflags.patch b/sys-apps/kbd/files/kbd-2.2.0-cflags.patch
20 new file mode 100644
21 index 00000000000..86c0f45074a
22 --- /dev/null
23 +++ b/sys-apps/kbd/files/kbd-2.2.0-cflags.patch
24 @@ -0,0 +1,33 @@
25 +From 3b4f3ffbc9fedff83a0618f3dd3c6aafced3e72a Mon Sep 17 00:00:00 2001
26 +From: Lars Wendler <polynomial-c@g.o>
27 +Date: Wed, 31 Jul 2019 18:07:33 +0200
28 +Subject: [PATCH] configure.ac: respect user CFLAGS
29 +
30 +Do not override user CFLAGS. Do not unconditionally add -g to CFLAGS.
31 +
32 +Gentoo-bug: https://bugs.gentoo.org/691142
33 +Signed-off-by: Lars Wendler <polynomial-c@g.o>
34 +---
35 + configure.ac | 6 +++---
36 + 1 file changed, 3 insertions(+), 3 deletions(-)
37 +
38 +diff --git a/configure.ac b/configure.ac
39 +index 6bf6401..0f5ed2f 100644
40 +--- a/configure.ac
41 ++++ b/configure.ac
42 +@@ -72,9 +72,9 @@ if test "$enable_code_coverage" = yes; then
43 + fi
44 +
45 + case "$GCC,$ac_cv_prog_cc_g" in
46 +- yes,yes) CFLAGS="-g $CC_O_LEVEL $FORTIFY_SOURCE" ;;
47 +- yes,) CFLAGS="$CC_O_LEVEL $FORTIFY_SOURCE" ;;
48 +- ,yes) CFLAGS="-g" ;;
49 ++ yes,yes) CFLAGS="$CC_O_LEVEL $FORTIFY_SOURCE $CFLAGS" ;;
50 ++ yes,) CFLAGS="$CC_O_LEVEL $FORTIFY_SOURCE $CFLAGS" ;;
51 ++ ,yes) CFLAGS="$CFLAGS" ;;
52 + esac
53 +
54 + CC_CHECK_CFLAGS_APPEND([\
55 +--
56 +2.22.0
57 +
58
59 diff --git a/sys-apps/kbd/kbd-2.2.0.ebuild b/sys-apps/kbd/kbd-2.2.0-r1.ebuild
60 similarity index 93%
61 rename from sys-apps/kbd/kbd-2.2.0.ebuild
62 rename to sys-apps/kbd/kbd-2.2.0-r1.ebuild
63 index 097ab17ac29..895a4995c52 100644
64 --- a/sys-apps/kbd/kbd-2.2.0.ebuild
65 +++ b/sys-apps/kbd/kbd-2.2.0-r1.ebuild
66 @@ -3,7 +3,7 @@
67
68 EAPI=7
69
70 -inherit pam
71 +inherit autotools pam
72
73 if [[ ${PV} == "9999" ]] ; then
74 inherit autotools git-r3
75 @@ -35,6 +35,10 @@ BDEPEND="
76 test? ( dev-libs/check )
77 "
78
79 +PATCHES=(
80 + "${FILESDIR}/${PN}-2.2.0-cflags.patch" #691142
81 +)
82 +
83 src_unpack() {
84 if [[ ${PV} == "9999" ]] ; then
85 git-r3_src_unpack
86 @@ -52,9 +56,7 @@ src_unpack() {
87
88 src_prepare() {
89 default
90 - if [[ ${PV} == "9999" ]] ; then
91 - eautoreconf
92 - fi
93 + eautoreconf
94 }
95
96 src_configure() {