Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-process/btop/, sys-process/btop/files/
Date: Sat, 04 Jun 2022 21:23:28
Message-Id: 1654377793.19ae56cb90fdc1dd3256189435bb8229eb4dfe13.sam@gentoo
1 commit: 19ae56cb90fdc1dd3256189435bb8229eb4dfe13
2 Author: Adrian Schollmeyer <nex+b-g-o <AT> nexadn <DOT> de>
3 AuthorDate: Sat Jun 4 19:52:53 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sat Jun 4 21:23:13 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=19ae56cb
7
8 sys-process/btop: Don't enforce g++ compiler
9
10 Backport of [0]. The current build system enforces using the g++
11 binaries it finds in $PATH.
12
13 [0] https://github.com/aristocratos/btop/pull/353
14
15 Signed-off-by: Adrian Schollmeyer <nex+b-g-o <AT> nexadn.de>
16 Closes: https://bugs.gentoo.org/839318
17 Closes: https://github.com/gentoo/gentoo/pull/25755
18 Signed-off-by: Sam James <sam <AT> gentoo.org>
19
20 sys-process/btop/btop-1.2.7-r1.ebuild | 8 ++++++--
21 .../btop/files/btop-1.2.7-respect-cxx-var-839318.patch | 17 +++++++++++++++++
22 2 files changed, 23 insertions(+), 2 deletions(-)
23
24 diff --git a/sys-process/btop/btop-1.2.7-r1.ebuild b/sys-process/btop/btop-1.2.7-r1.ebuild
25 index d1f846282f44..a3ce23678bf2 100644
26 --- a/sys-process/btop/btop-1.2.7-r1.ebuild
27 +++ b/sys-process/btop/btop-1.2.7-r1.ebuild
28 @@ -3,7 +3,7 @@
29
30 EAPI=8
31
32 -inherit xdg-utils
33 +inherit toolchain-funcs xdg-utils
34
35 DESCRIPTION="A monitor of resources"
36 HOMEPAGE="https://github.com/aristocratos/btop"
37 @@ -13,6 +13,10 @@ LICENSE="Apache-2.0"
38 SLOT="0"
39 KEYWORDS="~amd64 ~arm64 ~x86"
40
41 +PATCHES=(
42 + "${FILESDIR}/${P}-respect-cxx-var-839318.patch"
43 +)
44 +
45 src_prepare() {
46 default
47 # btop installs README.md to /usr/share/btop by default
48 @@ -21,7 +25,7 @@ src_prepare() {
49
50 src_compile() {
51 # Disable btop optimization flags, since we have our flags in CXXFLAGS
52 - emake OPTFLAGS=""
53 + emake OPTFLAGS="" CXX="$(tc-getCXX)"
54 }
55
56 src_install() {
57
58 diff --git a/sys-process/btop/files/btop-1.2.7-respect-cxx-var-839318.patch b/sys-process/btop/files/btop-1.2.7-respect-cxx-var-839318.patch
59 new file mode 100644
60 index 000000000000..5ec7dca45c1e
61 --- /dev/null
62 +++ b/sys-process/btop/files/btop-1.2.7-respect-cxx-var-839318.patch
63 @@ -0,0 +1,17 @@
64 +--- a/Makefile
65 ++++ b/Makefile
66 +@@ -55,11 +55,11 @@ endif
67 +
68 + #? Compiler and Linker
69 + ifeq ($(shell command -v g++-11 >/dev/null; echo $$?),0)
70 +- CXX := g++-11
71 ++ CXX ?= g++-11
72 + else ifeq ($(shell command -v g++11 >/dev/null; echo $$?),0)
73 +- CXX := g++11
74 ++ CXX ?= g++11
75 + else ifeq ($(shell command -v g++ >/dev/null; echo $$?),0)
76 +- CXX := g++
77 ++ CXX ?= g++
78 + endif
79 + override CXX_VERSION := $(shell $(CXX) -dumpfullversion -dumpversion || echo 0)
80 +