• Bug#1063698: atop FTBFS: hard codes the build architecture pkg-config

    From Helmut Grohne@21:1/5 to All on Sun Feb 11 10:10:02 2024
    Source: atop
    Version: 2.10.0-1
    Tags: patch upstream
    User: debian-cross@lists.debian.org
    Usertags: ftcbfs

    atop 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.

    Helmut

    --- 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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)