Source: compton Version: 0.1~beta2+20150922-1 Tags: patch upstream User: helm...@debian.org Usertags: rebootstrap
compton fails to cross build from source, because its Makefile hard codes the build architecture pkg-config. After making pkg-config substitutable (and automatically getting substituted by dh_auto_build), compton cross builds successfully. Please consider applying the attached patch. Helmut
Index: compton-0.1~beta2+20150922/Makefile =================================================================== --- compton-0.1~beta2+20150922.orig/Makefile +++ compton-0.1~beta2+20150922/Makefile @@ -2,6 +2,7 @@ # GNU make may get unhappy. CC ?= gcc +PKG_CONFIG ?= pkg-config PREFIX ?= /usr BINDIR ?= $(PREFIX)/bin @@ -33,7 +34,7 @@ # libconfig-1.3* does not define LIBCONFIG_VER* macros, so we use # pkg-config to determine its version here - CFG += $(shell pkg-config --atleast-version=1.4 libconfig || echo '-DCONFIG_LIBCONFIG_LEGACY') + CFG += $(shell $(PKG_CONFIG) --atleast-version=1.4 libconfig || echo '-DCONFIG_LIBCONFIG_LEGACY') endif # ==== PCRE regular expression ==== @@ -51,7 +52,7 @@ # ==== DRM VSync ==== # Enables support for "drm" VSync method ifeq "$(NO_VSYNC_DRM)" "" - INCS += $(shell pkg-config --cflags libdrm) + INCS += $(shell $(PKG_CONFIG) --cflags libdrm) CFG += -DCONFIG_VSYNC_DRM endif @@ -121,8 +122,8 @@ # CFLAGS += -Weverything -Wno-disabled-macro-expansion -Wno-padded -Wno-gnu endif -LIBS += $(shell pkg-config --libs $(PACKAGES)) -INCS += $(shell pkg-config --cflags $(PACKAGES)) +LIBS += $(shell $(PKG_CONFIG) --libs $(PACKAGES)) +INCS += $(shell $(PKG_CONFIG) --cflags $(PACKAGES)) CFLAGS += -Wall