From d24bc32440ff3efadf9f424e5a8106e820b97639 Mon Sep 17 00:00:00 2001 From: Sam James Date: Sun, 14 Jan 2024 03:28:07 +0000 Subject: sys-process/atop: respect LDFLAGS, PKG_CONFIG, opt Signed-off-by: Sam James --- sys-process/atop/atop-2.10.0.ebuild | 5 ++++- sys-process/atop/files/atop-2.10.0-ldflags.patch | 20 ++++++++++++++++++++ .../atop/files/atop-2.10.0-respect-PKG_CONFIG.patch | 14 ++++++++++++++ sys-process/atop/files/atop-2.10.0-respect-opt.patch | 12 ++++++++++++ 4 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 sys-process/atop/files/atop-2.10.0-ldflags.patch create mode 100644 sys-process/atop/files/atop-2.10.0-respect-PKG_CONFIG.patch create mode 100644 sys-process/atop/files/atop-2.10.0-respect-opt.patch (limited to 'sys-process') 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 +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 -- cgit v1.2.3-65-gdbad