Atoptool / atop

System and process monitor for Linux
GNU General Public License v2.0
792 stars 109 forks source link

patch to allow cross-building again #293

Closed Zugschlus closed 5 months ago

Zugschlus commented 6 months ago

Hi,

this is Debian Bug #1063698, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1063698, filed by Helmut Grohne.

atop (2.10.0) regressed cross building, because its upstream Makefile now hard codes a build architecture pkg-config. I'm attaching a patch to make it substitutable. Applying it restores the ability to cross build atop.

--- atop-2.10.0.orig/Makefile
+++ atop-2.10.0/Makefile
@@ -20,8 +20,9 @@
PMPATH2  = /usr/lib64/pm-utils/sleep.d
PMPATHD  = /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
Atoptool commented 5 months ago

Issue solved by implementing patch.

Zugschlus commented 2 months ago

Thank you! Will you do a new release in the next days/weeks or is it ok for me to locally apply that patch in Debian's package?

Atoptool commented 2 months ago

For v2.10 you can locally apply the patch. This month I will release v2.11.

Zugschlus commented 2 months ago

I have uploaded a patched 2.10. Looking forward to 2.11