Bug#918458: ambdec FTCBFS: uses the wrong pkg-config
Source: ambdec
Version: 0.7.1-1
Tags: patch
User: helmutg@debian.org
Usertags: rebootstrap
ambdec fails to cross build from source, because it uses the build
architecture pkg-config as hard coded by debian/rules. It's nice to see
that pkg-config is already substitutable. Unfortunately, the variable
used is not commonly used. Thus dh_auto_build does not substitute it.
The attached patch changes it to use the standard variable PKG_CONFIG
and thus makes ambdec cross buildable. Please consider applying it.
Alternatively, I recommend seeding the variable from PKG_CONFIG as set
by /usr/share/dpkg/buildtools.mk.
Helmut
diff --minimal -Nru ambdec-0.7.1/debian/changelog ambdec-0.7.1/debian/changelog
--- ambdec-0.7.1/debian/changelog 2019-01-05 21:33:13.000000000 +0100
+++ ambdec-0.7.1/debian/changelog 2019-01-06 11:24:12.000000000 +0100
@@ -1,3 +1,11 @@
+ambdec (0.7.1-1.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Use standard variable PKG_CONFIG to make cross building work. (Closes:
+ #-1)
+
+ -- Helmut Grohne <helmut@subdivi.de> Sun, 06 Jan 2019 11:24:12 +0100
+
ambdec (0.7.1-1) unstable; urgency=medium
* Team upload.
diff --minimal -Nru ambdec-0.7.1/debian/patches/0002-Use-pkg-config-where-possible.patch ambdec-0.7.1/debian/patches/0002-Use-pkg-config-where-possible.patch
--- ambdec-0.7.1/debian/patches/0002-Use-pkg-config-where-possible.patch 2019-01-05 21:27:12.000000000 +0100
+++ ambdec-0.7.1/debian/patches/0002-Use-pkg-config-where-possible.patch 2019-01-06 11:24:10.000000000 +0100
@@ -6,26 +6,26 @@
source/Makefile | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/source/Makefile b/source/Makefile
index a2de6a7..9f09fae 100644
--- a/source/Makefile
+++ b/source/Makefile
@@ -22,6 +22,7 @@
PREFIX ?= /usr/local
BINDIR ?= $(PREFIX)/bin
SHARED ?= $(PREFIX)/share/ambdec
-+PKGCONF ?= pkgconf
++PKG_CONFIG ?= pkg-config
VERSION = 0.7.1
CPPFLAGS += -MMD -MP -DVERSION=\"$(VERSION)\" -DSHARED=\"$(SHARED)\"
@@ -35,8 +36,8 @@ all: ambdec ambdec_cli
AMBDEC_O = ambdec.o styles.o mainwin.o confwin.o radbut.o filewin.o \
jclient.o nffilt.o xover2.o decoder.o adconf.o sstring.o \
png2img.o meter.o
-ambdec: CPPFLAGS += $(shell pkgconf --cflags freetype2)
-ambdec: LDLIBS += -lclxclient -lclthreads -ljack -lpng -lpthread -lXft -lX11 -lrt
-+ambdec: CPPFLAGS += $(shell $(PKGCONF) --cflags xft libpng x11)
-+ambdec: LDLIBS += -lclxclient -lclthreads -ljack -lpthread $(shell $(PKGCONF) --libs xft libpng x11) -lrt
++ambdec: CPPFLAGS += $(shell $(PKG_CONFIG) --cflags xft libpng x11)
++ambdec: LDLIBS += -lclxclient -lclthreads -ljack -lpthread $(shell $(PKG_CONFIG) --libs xft libpng x11) -lrt
ambdec: $(AMBDEC_O)
$(CXX) $(LDFLAGS) -o $@ $(AMBDEC_O) $(LDLIBS)
$(AMBDEC_O):
diff --minimal -Nru ambdec-0.7.1/debian/rules ambdec-0.7.1/debian/rules
--- ambdec-0.7.1/debian/rules 2019-01-05 21:30:39.000000000 +0100
+++ ambdec-0.7.1/debian/rules 2019-01-06 11:23:52.000000000 +0100
@@ -2,8 +2,6 @@
export LDLIBS += -Wl,--as-needed
export PREFIX = /usr
-export PKGCONF = pkg-config
-
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
%:
Reply to: