summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Schollmeyer <nex+b-g-o@nexadn.de>2022-06-04 21:52:53 +0200
committerSam James <sam@gentoo.org>2022-06-04 22:23:13 +0100
commit19ae56cb90fdc1dd3256189435bb8229eb4dfe13 (patch)
tree8af6f3902f40e3e47b2adf92ef3441f5b0283cf5 /sys-process
parentx11-wm/fvwm3: revbump for fixed RDEPEND (diff)
downloadgentoo-19ae56cb90fdc1dd3256189435bb8229eb4dfe13.tar.gz
gentoo-19ae56cb90fdc1dd3256189435bb8229eb4dfe13.tar.bz2
gentoo-19ae56cb90fdc1dd3256189435bb8229eb4dfe13.zip
sys-process/btop: Don't enforce g++ compiler
Backport of [0]. The current build system enforces using the g++ binaries it finds in $PATH. [0] https://github.com/aristocratos/btop/pull/353 Signed-off-by: Adrian Schollmeyer <nex+b-g-o@nexadn.de> Closes: https://bugs.gentoo.org/839318 Closes: https://github.com/gentoo/gentoo/pull/25755 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-process')
-rw-r--r--sys-process/btop/btop-1.2.7-r1.ebuild8
-rw-r--r--sys-process/btop/files/btop-1.2.7-respect-cxx-var-839318.patch17
2 files changed, 23 insertions, 2 deletions
diff --git a/sys-process/btop/btop-1.2.7-r1.ebuild b/sys-process/btop/btop-1.2.7-r1.ebuild
index d1f846282f44..a3ce23678bf2 100644
--- a/sys-process/btop/btop-1.2.7-r1.ebuild
+++ b/sys-process/btop/btop-1.2.7-r1.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-inherit xdg-utils
+inherit toolchain-funcs xdg-utils
DESCRIPTION="A monitor of resources"
HOMEPAGE="https://github.com/aristocratos/btop"
@@ -13,6 +13,10 @@ LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~x86"
+PATCHES=(
+ "${FILESDIR}/${P}-respect-cxx-var-839318.patch"
+)
+
src_prepare() {
default
# btop installs README.md to /usr/share/btop by default
@@ -21,7 +25,7 @@ src_prepare() {
src_compile() {
# Disable btop optimization flags, since we have our flags in CXXFLAGS
- emake OPTFLAGS=""
+ emake OPTFLAGS="" CXX="$(tc-getCXX)"
}
src_install() {
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
new file mode 100644
index 000000000000..5ec7dca45c1e
--- /dev/null
+++ b/sys-process/btop/files/btop-1.2.7-respect-cxx-var-839318.patch
@@ -0,0 +1,17 @@
+--- a/Makefile
++++ b/Makefile
+@@ -55,11 +55,11 @@ endif
+
+ #? Compiler and Linker
+ ifeq ($(shell command -v g++-11 >/dev/null; echo $$?),0)
+- CXX := g++-11
++ CXX ?= g++-11
+ else ifeq ($(shell command -v g++11 >/dev/null; echo $$?),0)
+- CXX := g++11
++ CXX ?= g++11
+ else ifeq ($(shell command -v g++ >/dev/null; echo $$?),0)
+- CXX := g++
++ CXX ?= g++
+ endif
+ override CXX_VERSION := $(shell $(CXX) -dumpfullversion -dumpversion || echo 0)
+