Source: ir.lv2 Version: 1.3.3~dfsg0-1 Tags: patch User: helm...@debian.org Usertags: rebootstrap
ir.lv2 fails to cross build from source, because it uses build architecture build tools. The attached patch makes ir.lv2 cross buildable. It fixes both the upstream build system to make build tools substitutable as well as teaching debian/rules to pass the required tools. Please consider applying it. Helmut
diff --minimal -Nru ir.lv2-1.3.3~dfsg0/debian/changelog ir.lv2-1.3.3~dfsg0/debian/changelog --- ir.lv2-1.3.3~dfsg0/debian/changelog 2016-12-18 16:27:46.000000000 +0100 +++ ir.lv2-1.3.3~dfsg0/debian/changelog 2018-06-06 12:40:41.000000000 +0200 @@ -1,3 +1,13 @@ +ir.lv2 (1.3.3~dfsg0-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) + + cross.patch: Make build tools substitutable. + + Let dh_auto_build pass cross tools to make. + + Also pass PKG_CONFIG to make clean. + + -- Helmut Grohne <hel...@subdivi.de> Wed, 06 Jun 2018 12:40:41 +0200 + ir.lv2 (1.3.3~dfsg0-1) unstable; urgency=medium * Update watch file. diff --minimal -Nru ir.lv2-1.3.3~dfsg0/debian/patches/cross.patch ir.lv2-1.3.3~dfsg0/debian/patches/cross.patch --- ir.lv2-1.3.3~dfsg0/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100 +++ ir.lv2-1.3.3~dfsg0/debian/patches/cross.patch 2018-06-06 12:40:41.000000000 +0200 @@ -0,0 +1,67 @@ +--- ir.lv2-1.3.3~dfsg0.orig/Makefile ++++ ir.lv2-1.3.3~dfsg0/Makefile +@@ -10,48 +10,49 @@ + INST_FILES = ir.so ir_gui.so ir.ttl manifest.ttl + + # change "-O2 -ffast-math" to "-g -O0" below if you want to debug the plugin +-CPPFLAGS += -Wall -I. -I/usr/include `pkg-config --cflags gtk+-2.0` `pkg-config --cflags gthread-2.0` -D__STDC_FORMAT_MACROS -g -O2 -ffast-math +-LIBS += -lc -lm -lzita-convolver -lsamplerate -lsndfile `pkg-config --libs gthread-2.0` `pkg-config --libs gtk+-2.0` ++PKG_CONFIG ?= pkg-config ++CPPFLAGS += -Wall -I. -I/usr/include `$(PKG_CONFIG) --cflags gtk+-2.0` `$(PKG_CONFIG) --cflags gthread-2.0` -D__STDC_FORMAT_MACROS -g -O2 -ffast-math ++LIBS += -lc -lm -lzita-convolver -lsamplerate -lsndfile `$(PKG_CONFIG) --libs gthread-2.0` `$(PKG_CONFIG) --libs gtk+-2.0` + +-ifeq ($(shell pkg-config --atleast-version='2.16' gtk+-2.0; echo $$?), 1) ++ifeq ($(shell $(PKG_CONFIG) --atleast-version='2.16' gtk+-2.0; echo $$?), 1) + $(error "At least GTK+ version 2.16 is needed to build IR.") + endif + +-ifeq ($(shell pkg-config --atleast-version='2.20' gtk+-2.0; echo $$?), 0) ++ifeq ($(shell $(PKG_CONFIG) --atleast-version='2.20' gtk+-2.0; echo $$?), 0) + CPPFLAGS += -D_HAVE_GTK_ATLEAST_2_20 + endif + +-C4CFLAGS = -Wall -I. -I/usr/include `pkg-config --cflags gthread-2.0` -O2 -ffast-math +-C4LIBS = -lsndfile `pkg-config --libs gthread-2.0` ++C4CFLAGS = -Wall -I. -I/usr/include `$(PKG_CONFIG) --cflags gthread-2.0` -O2 -ffast-math ++C4LIBS = -lsndfile `$(PKG_CONFIG) --libs gthread-2.0` + + all: ir.so ir_gui.so + + ir.o: ir.cc ir.h ir_utils.h +- g++ ir.cc $(CPPFLAGS) -c -fPIC -o ir.o ++ $(CXX) ir.cc $(CPPFLAGS) -c -fPIC -o ir.o + + ir_gui.o: ir_gui.cc ir.h ir_utils.h ir_wavedisplay.h +- g++ ir_gui.cc $(CPPFLAGS) -c -fPIC -o ir_gui.o ++ $(CXX) ir_gui.cc $(CPPFLAGS) -c -fPIC -o ir_gui.o + + ir_utils.o: ir_utils.cc ir_utils.h ir.h +- g++ ir_utils.cc $(CPPFLAGS) -c -fPIC -o ir_utils.o ++ $(CXX) ir_utils.cc $(CPPFLAGS) -c -fPIC -o ir_utils.o + + ir_meter.o: ir_meter.cc ir_meter.h ir.h ir_utils.h +- g++ ir_meter.cc $(CPPFLAGS) -c -fPIC -o ir_meter.o ++ $(CXX) ir_meter.cc $(CPPFLAGS) -c -fPIC -o ir_meter.o + + ir_modeind.o: ir_modeind.cc ir_modeind.h ir.h ir_utils.h +- g++ ir_modeind.cc $(CPPFLAGS) -c -fPIC -o ir_modeind.o ++ $(CXX) ir_modeind.cc $(CPPFLAGS) -c -fPIC -o ir_modeind.o + + ir_wavedisplay.o: ir_wavedisplay.cc ir_wavedisplay.h ir.h ir_utils.h +- g++ ir_wavedisplay.cc $(CPPFLAGS) -c -fPIC -o ir_wavedisplay.o ++ $(CXX) ir_wavedisplay.cc $(CPPFLAGS) -c -fPIC -o ir_wavedisplay.o + + ir.so: ir.o ir_utils.o +- g++ $(LDFLAGS) ir.o ir_utils.o $(LIBS) -shared -o ir.so ++ $(CXX) $(LDFLAGS) ir.o ir_utils.o $(LIBS) -shared -o ir.so + + ir_gui.so: ir_gui.o ir_utils.o ir_meter.o ir_modeind.o ir_wavedisplay.o +- g++ $(LDFLAGS) ir_gui.o ir_utils.o ir_meter.o ir_modeind.o ir_wavedisplay.o $(LIBS) -shared -z nodelete -o ir_gui.so ++ $(CXX) $(LDFLAGS) ir_gui.o ir_utils.o ir_meter.o ir_modeind.o ir_wavedisplay.o $(LIBS) -shared -z nodelete -o ir_gui.so + + convert4chan: convert4chan.c +- gcc $(C4CFLAGS) $(CPPFLAGS) $(LDFLAGS) convert4chan.c $(C4LIBS) -o convert4chan ++ $(CC) $(C4CFLAGS) $(CPPFLAGS) $(LDFLAGS) convert4chan.c $(C4LIBS) -o convert4chan + + install: all + mkdir -p $(INSTDIR) diff --minimal -Nru ir.lv2-1.3.3~dfsg0/debian/patches/series ir.lv2-1.3.3~dfsg0/debian/patches/series --- ir.lv2-1.3.3~dfsg0/debian/patches/series 2016-12-18 16:27:46.000000000 +0100 +++ ir.lv2-1.3.3~dfsg0/debian/patches/series 2018-06-06 12:39:26.000000000 +0200 @@ -1 +1,2 @@ 04-allow_debbug.patch +cross.patch diff --minimal -Nru ir.lv2-1.3.3~dfsg0/debian/rules ir.lv2-1.3.3~dfsg0/debian/rules --- ir.lv2-1.3.3~dfsg0/debian/rules 2016-12-18 16:27:46.000000000 +0100 +++ ir.lv2-1.3.3~dfsg0/debian/rules 2018-06-06 12:40:41.000000000 +0200 @@ -1,6 +1,9 @@ #!/usr/bin/make -f # -*- makefile -*- +-include /usr/share/dpkg/buildtools.mk +export PKG_CONFIG ?= pkg-config + LDFLAGS+=-Wl,--as-needed export REPACK_SH=$(CURDIR)/debian/repack.sh @@ -11,7 +14,7 @@ override_dh_auto_build: dh_auto_build - make convert4chan + dh_auto_build -- convert4chan override_dh_auto_install: dh_auto_install