summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Schollmeyer <nex+b-g-o@nexadn.de>2022-10-10 12:59:09 +0200
committerSam James <sam@gentoo.org>2022-10-10 12:44:30 +0100
commitb07006fc3f1e69ec7f4605b6b2caffb985658431 (patch)
tree82da3f31bf5506e49b118f765e02fa682607b256 /sys-process/btop
parentsys-process/btop: drop 1.2.8 (diff)
downloadgentoo-b07006fc3f1e69ec7f4605b6b2caffb985658431.tar.gz
gentoo-b07006fc3f1e69ec7f4605b6b2caffb985658431.tar.bz2
gentoo-b07006fc3f1e69ec7f4605b6b2caffb985658431.zip
sys-process/btop: Make build output verbose
The build system didn't support verbose output before (i.e. it didn't show the exact commands used to build a unit). Upstream recently added such a verbose mode, which is backported to the current versions in ::gentoo by this commit. Closes: https://bugs.gentoo.org/876319 Signed-off-by: Adrian Schollmeyer <nex+b-g-o@nexadn.de> Closes: https://github.com/gentoo/gentoo/pull/27725 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-process/btop')
-rw-r--r--sys-process/btop/btop-1.2.12.ebuild6
-rw-r--r--sys-process/btop/btop-1.2.9.ebuild6
-rw-r--r--sys-process/btop/files/876319-verbose-makefile.patch54
3 files changed, 64 insertions, 2 deletions
diff --git a/sys-process/btop/btop-1.2.12.ebuild b/sys-process/btop/btop-1.2.12.ebuild
index 6bf13cbd7d95..5dbb46974fd7 100644
--- a/sys-process/btop/btop-1.2.12.ebuild
+++ b/sys-process/btop/btop-1.2.12.ebuild
@@ -17,6 +17,10 @@ BDEPEND="
>=sys-devel/gcc-8
"
+PATCHES=(
+ "${FILESDIR}/876319-verbose-makefile.patch"
+)
+
pkg_setup() {
if [[ "${MERGE_TYPE}" != "binary" ]]; then
if ! tc-is-gcc ; then
@@ -34,7 +38,7 @@ src_prepare() {
src_compile() {
# Disable btop optimization flags, since we have our flags in CXXFLAGS
- emake OPTFLAGS="" CXX="$(tc-getCXX)"
+ emake VERBOSE=true OPTFLAGS="" CXX="$(tc-getCXX)"
}
src_install() {
diff --git a/sys-process/btop/btop-1.2.9.ebuild b/sys-process/btop/btop-1.2.9.ebuild
index ee0bbdefbd6d..39aa6592146f 100644
--- a/sys-process/btop/btop-1.2.9.ebuild
+++ b/sys-process/btop/btop-1.2.9.ebuild
@@ -17,6 +17,10 @@ BDEPEND="
>=sys-devel/gcc-8
"
+PATCHES=(
+ "${FILESDIR}/876319-verbose-makefile.patch"
+)
+
pkg_setup() {
if [[ "${MERGE_TYPE}" != "binary" ]]; then
if ! tc-is-gcc ; then
@@ -34,7 +38,7 @@ src_prepare() {
src_compile() {
# Disable btop optimization flags, since we have our flags in CXXFLAGS
- emake OPTFLAGS="" CXX="$(tc-getCXX)"
+ emake VERBOSE=true OPTFLAGS="" CXX="$(tc-getCXX)"
}
src_install() {
diff --git a/sys-process/btop/files/876319-verbose-makefile.patch b/sys-process/btop/files/876319-verbose-makefile.patch
new file mode 100644
index 000000000000..ef2199d728d1
--- /dev/null
+++ b/sys-process/btop/files/876319-verbose-makefile.patch
@@ -0,0 +1,54 @@
+# Backport of upstream commit 080a47e6496f12f616b811e0d2f8f36c62d397e2
+# See https://bugs.gentoo.org/876319
+diff --git a/Makefile b/Makefile
+index d1bc95d..6a36c76 100644
+--- a/Makefile
++++ b/Makefile
+@@ -18,6 +18,9 @@ else
+ override PRE := info-quiet
+ endif
+
++OLDCXX := $(CXXFLAGS)
++OLDLD := $(LDFLAGS)
++
+ PREFIX ?= /usr/local
+
+ #? Detect PLATFORM and ARCH from uname/gcc if not set
+@@ -53,6 +56,10 @@ ifeq ($(STRIP),true)
+ override ADDFLAGS += -s
+ endif
+
++ifneq ($(VERBOSE),true)
++ override VERBOSE := false
++endif
++
+ #? Compiler and Linker
+ ifeq ($(shell command -v g++-11 >/dev/null; echo $$?),0)
+ CXX := g++-11
+@@ -167,8 +174,8 @@ info:
+ @printf "\033[1;91mWARNFLAGS \033[1;94m:| \033[0m$(WARNFLAGS)\n"
+ @printf "\033[1;94mOPTFLAGS \033[1;94m:| \033[0m$(OPTFLAGS)\n"
+ @printf "\033[1;93mLDCXXFLAGS \033[1;94m:| \033[0m$(LDCXXFLAGS)\n"
+- @printf "\033[1;95mCXXFLAGS \033[1;92m+| \033[0;37m\$$(\033[92mREQFLAGS\033[37m) \$$(\033[93mLDCXXFLAGS\033[37m) \$$(\033[94mOPTFLAGS\033[37m) \$$(\033[91mWARNFLAGS\033[37m)\n"
+- @printf "\033[1;95mLDFLAGS \033[1;92m+| \033[0;37m\$$(\033[93mLDCXXFLAGS\033[37m) \$$(\033[94mOPTFLAGS\033[37m) \$$(\033[91mWARNFLAGS\033[37m)\n"
++ @printf "\033[1;95mCXXFLAGS \033[1;92m+| \033[0;37m\$$(\033[92mREQFLAGS\033[37m) \$$(\033[93mLDCXXFLAGS\033[37m) \$$(\033[94mOPTFLAGS\033[37m) \$$(\033[91mWARNFLAGS\033[37m) $(OLDCXX)\n"
++ @printf "\033[1;95mLDFLAGS \033[1;92m+| \033[0;37m\$$(\033[93mLDCXXFLAGS\033[37m) \$$(\033[94mOPTFLAGS\033[37m) \$$(\033[91mWARNFLAGS\033[37m) $(OLDLD)\n"
+
+ info-quiet:
+ @sleep 0.1 2>/dev/null || true
+@@ -252,6 +259,7 @@ btop: $(OBJECTS)
+ @sleep 0.2 2>/dev/null || true
+ @TSTAMP=$$(date +%s 2>/dev/null || echo "0")
+ @$(QUIET) || printf "\n\033[1;92mLinking and optimizing binary\033[37m...\033[0m\n"
++ @$(VERBOSE) && printf "$(CXX) -o $(TARGETDIR)/btop $^ $(LDFLAGS)\n"
+ @$(CXX) -o $(TARGETDIR)/btop $^ $(LDFLAGS) || exit 1
+ @printf "\033[1;92m100$(P) -> \033[1;37m$(TARGETDIR)/btop \033[100D\033[38C\033[1;93m(\033[1;97m$$(du -ah $(TARGETDIR)/btop | cut -f1)iB\033[1;93m) \033[92m(\033[97m$$($(DATE_CMD) -d @$$(expr $$(date +%s 2>/dev/null || echo "0") - $${TSTAMP} 2>/dev/null) -u +%Mm:%Ss 2>/dev/null | sed 's/^00m://' || echo '')\033[92m)\033[0m\n"
+ @printf "\n\033[1;92mBuild complete in \033[92m(\033[97m$$($(DATE_CMD) -d @$$(expr $$(date +%s 2>/dev/null || echo "0") - $(TIMESTAMP) 2>/dev/null) -u +%Mm:%Ss 2>/dev/null | sed 's/^00m://' || echo "unknown")\033[92m)\033[0m\n"
+@@ -262,6 +270,7 @@ $(BUILDDIR)/%.$(OBJEXT): $(SRCDIR)/%.$(SRCEXT)
+ @sleep 0.3 2>/dev/null || true
+ @TSTAMP=$$(date +%s 2>/dev/null || echo "0")
+ @$(QUIET) || printf "\033[1;97mCompiling $<\033[0m\n"
++ @$(VERBOSE) && printf "$(CXX) $(CXXFLAGS) $(INC) -MMD -c -o $@ $<\n"
+ @$(CXX) $(CXXFLAGS) $(INC) -MMD -c -o $@ $< || exit 1
+ @printf "\033[1;92m$$($(PROGRESS))$(P)\033[10D\033[5C-> \033[1;37m$@ \033[100D\033[38C\033[1;93m(\033[1;97m$$(du -ah $@ | cut -f1)iB\033[1;93m) \033[92m(\033[97m$$($(DATE_CMD) -d @$$(expr $$($(DATE_CMD) +%s 2>/dev/null || echo "0") - $${TSTAMP} 2>/dev/null) -u +%Mm:%Ss 2>/dev/null | sed 's/^00m://' || echo '')\033[92m)\033[0m\n"
+