summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-01-14 03:28:07 +0000
committerSam James <sam@gentoo.org>2024-01-14 03:28:11 +0000
commitd24bc32440ff3efadf9f424e5a8106e820b97639 (patch)
tree162d5552a6516c61f130f71f64eae83a069af751 /sys-process/atop
parentsys-process/atop: add 2.10.0 (diff)
downloadgentoo-d24bc32440ff3efadf9f424e5a8106e820b97639.tar.gz
gentoo-d24bc32440ff3efadf9f424e5a8106e820b97639.tar.bz2
gentoo-d24bc32440ff3efadf9f424e5a8106e820b97639.zip
sys-process/atop: respect LDFLAGS, PKG_CONFIG, opt
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-process/atop')
-rw-r--r--sys-process/atop/atop-2.10.0.ebuild5
-rw-r--r--sys-process/atop/files/atop-2.10.0-ldflags.patch20
-rw-r--r--sys-process/atop/files/atop-2.10.0-respect-PKG_CONFIG.patch14
-rw-r--r--sys-process/atop/files/atop-2.10.0-respect-opt.patch12
4 files changed, 50 insertions, 1 deletions
diff --git a/sys-process/atop/atop-2.10.0.ebuild b/sys-process/atop/atop-2.10.0.ebuild
index 9bd1a191304c..01c0dfa1ff44 100644
--- a/sys-process/atop/atop-2.10.0.ebuild
+++ b/sys-process/atop/atop-2.10.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -34,6 +34,9 @@ BDEPEND="virtual/pkgconfig"
PATCHES=(
"${FILESDIR}"/${PN}-2.6.0-build.patch
+ "${FILESDIR}"/${PN}-2.10.0-ldflags.patch
+ "${FILESDIR}"/${PN}-2.10.0-respect-PKG_CONFIG.patch
+ "${FILESDIR}"/${PN}-2.10.0-respect-opt.patch
)
pkg_pretend() {
diff --git a/sys-process/atop/files/atop-2.10.0-ldflags.patch b/sys-process/atop/files/atop-2.10.0-ldflags.patch
new file mode 100644
index 000000000000..5b2924ef3864
--- /dev/null
+++ b/sys-process/atop/files/atop-2.10.0-ldflags.patch
@@ -0,0 +1,20 @@
+https://github.com/Atoptool/atop/pull/289
+
+From 8411f81a202c9c39aebcc637ef94cc3d454cbaaf Mon Sep 17 00:00:00 2001
+From: Marc 'Zugschlus' Haber <mh+github@zugschlus.de>
+Date: Sat, 6 Jan 2024 07:03:53 +0100
+Subject: [PATCH] set LDFLAGS with +=, not overwriting existing variable
+
+this allows the Debian build process to set hardening flags
+--- a/Makefile
++++ b/Makefile
+@@ -21,7 +21,7 @@ PMPATH2 = /usr/lib64/pm-utils/sleep.d
+ PMPATHD = /usr/lib/systemd/system-sleep
+
+ CFLAGS += -O2 -I. -Wall $(shell pkg-config --cflags glib-2.0) -Wno-stringop-truncation -Wmissing-prototypes -Wmissing-declarations -Wformat-security # -DNOPERFEVENT # -DHTTPSTATS
+-LDFLAGS = $(shell pkg-config --libs glib-2.0)
++LDFLAGS += $(shell pkg-config --libs glib-2.0)
+ OBJMOD0 = version.o
+ OBJMOD1 = various.o deviate.o procdbase.o
+ OBJMOD2 = acctproc.o photoproc.o photosyst.o rawlog.o ifprop.o parseable.o
+
diff --git a/sys-process/atop/files/atop-2.10.0-respect-PKG_CONFIG.patch b/sys-process/atop/files/atop-2.10.0-respect-PKG_CONFIG.patch
new file mode 100644
index 000000000000..483506043490
--- /dev/null
+++ b/sys-process/atop/files/atop-2.10.0-respect-PKG_CONFIG.patch
@@ -0,0 +1,14 @@
+--- a/Makefile
++++ b/Makefile
+@@ -20,8 +20,9 @@ PMPATH1 = /usr/lib/pm-utils/sleep.d
+ PMPATH2 = /usr/lib64/pm-utils/sleep.d
+ PMPATHD = /usr/lib/systemd/system-sleep
+
+-CFLAGS += -O2 -I. -Wall $(shell pkg-config --cflags glib-2.0) -Wno-stringop-truncation -Wmissing-prototypes -Wmissing-declarations -Wformat-security # -DNOPERFEVENT # -DHTTPSTATS
+-LDFLAGS += $(shell pkg-config --libs glib-2.0)
++PKG_CONFIG ?= pkg-config
++CFLAGS += -O2 -I. -Wall $(shell ${PKG_CONFIG} --cflags glib-2.0) -Wno-stringop-truncation -Wmissing-prototypes -Wmissing-declarations -Wformat-security # -DNOPERFEVENT # -DHTTPSTATS
++LDFLAGS += $(shell ${PKG_CONFIG} --libs glib-2.0)
+ OBJMOD0 = version.o
+ OBJMOD1 = various.o deviate.o procdbase.o
+ OBJMOD2 = acctproc.o photoproc.o photosyst.o rawlog.o ifprop.o parseable.o
diff --git a/sys-process/atop/files/atop-2.10.0-respect-opt.patch b/sys-process/atop/files/atop-2.10.0-respect-opt.patch
new file mode 100644
index 000000000000..5a55e6f2f835
--- /dev/null
+++ b/sys-process/atop/files/atop-2.10.0-respect-opt.patch
@@ -0,0 +1,12 @@
+Don't force -O2.
+--- a/Makefile
++++ b/Makefile
+@@ -21,7 +21,7 @@ PMPATH2 = /usr/lib64/pm-utils/sleep.d
+ PMPATHD = /usr/lib/systemd/system-sleep
+
+ PKG_CONFIG ?= pkg-config
+-CFLAGS += -O2 -I. -Wall $(shell ${PKG_CONFIG} --cflags glib-2.0) -Wno-stringop-truncation -Wmissing-prototypes -Wmissing-declarations -Wformat-security # -DNOPERFEVENT # -DHTTPSTATS
++CFLAGS += -I. -Wall $(shell ${PKG_CONFIG} --cflags glib-2.0) -Wno-stringop-truncation -Wmissing-prototypes -Wmissing-declarations -Wformat-security # -DNOPERFEVENT # -DHTTPSTATS
+ LDFLAGS += $(shell ${PKG_CONFIG} --libs glib-2.0)
+ OBJMOD0 = version.o
+ OBJMOD1 = various.o deviate.o procdbase.o