Source: abgate
Version: 1.1.9-1
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

abgate fails to cross build from source for multiple reasons:

 * The upstream Makefile hard codes build architecture tools such as g++
   or pkg-config.
 * The upstream Makefile directly runs qmake, which lacks cross flags as
   well.

The attached patch fixes that. In part, the Makefile is fixed. For qt,
it is simply sidestepped. After doing so, abgate cross builds
successfully. Please consider applying it.

Helmut
diff --minimal -Nru abgate-1.1.9/debian/changelog abgate-1.1.9/debian/changelog
--- abgate-1.1.9/debian/changelog       2017-11-01 12:38:10.000000000 +0100
+++ abgate-1.1.9/debian/changelog       2018-10-29 06:15:39.000000000 +0100
@@ -1,3 +1,12 @@
+abgate (1.1.9-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Build abGateQt directly via dh_auto_* before the Makefile can do it.
+    + cross.patch: Honour cross tools.
+
+ -- Helmut Grohne <hel...@subdivi.de>  Mon, 29 Oct 2018 06:15:39 +0100
+
 abgate (1.1.9-1) unstable; urgency=medium
 
   * New upstream version 1.1.9
diff --minimal -Nru abgate-1.1.9/debian/patches/cross.patch 
abgate-1.1.9/debian/patches/cross.patch
--- abgate-1.1.9/debian/patches/cross.patch     1970-01-01 01:00:00.000000000 
+0100
+++ abgate-1.1.9/debian/patches/cross.patch     2018-10-29 06:15:35.000000000 
+0100
@@ -0,0 +1,23 @@
+--- abgate-1.1.9.orig/Makefile
++++ abgate-1.1.9/Makefile
+@@ -3,6 +3,7 @@
+ BUNDLE = abGate.lv2
+ PREFIX = /usr
+ INSTALL_DIR = $(DESTDIR)$(PREFIX)/lib/lv2
++PKG_CONFIG ?= pkg-config
+ 
+ $(BUNDLE): manifest.ttl gate.ttl gate.so gate_gui.so bypass_on.png 
bypass_off.png knob.png background.png abGateQt/libabGateQt.so
+       rm -rf $(BUNDLE)
+@@ -13,10 +14,10 @@
+       cd abGateQt; qmake; make
+ 
+ gate.so: gate.cpp
+-      g++ $(LDFLAGS) $(CPPFLAGS) $(CFLAGS) -g -O3 -shared -fPIC -DPIC 
-Wl,--as-needed gate.cpp `pkg-config --cflags --libs lv2` -o gate.so
++      $(CXX) $(LDFLAGS) $(CPPFLAGS) $(CFLAGS) -g -O3 -shared -fPIC -DPIC 
-Wl,--as-needed gate.cpp `$(PKG_CONFIG) --cflags --libs lv2` -o gate.so
+ 
+ gate_gui.so: gate_gui.cpp main_window.cpp main_window.h knob.cpp knob.h 
toggle.cpp toggle.h preset_widget.cpp preset_widget.h presets.cpp presets.h 
preset.cpp preset.h gate_const.h plugin_configuration.h
+-      g++ $(LDFLAGS) $(CPPFLAGS) $(CFLAGS) -g -O3 -shared -fPIC -DPIC 
-Wl,--as-needed gate_gui.cpp main_window.cpp knob.cpp toggle.cpp 
preset_widget.cpp presets.cpp preset.cpp `pkg-config --cflags gtkmm-2.4 --libs 
lv2 gthread-2.0` -o gate_gui.so
++      $(CXX) $(LDFLAGS) $(CPPFLAGS) $(CFLAGS) -g -O3 -shared -fPIC -DPIC 
-Wl,--as-needed gate_gui.cpp main_window.cpp knob.cpp toggle.cpp 
preset_widget.cpp presets.cpp preset.cpp `$(PKG_CONFIG) --cflags gtkmm-2.4 
--libs lv2 gthread-2.0` -o gate_gui.so
+ 
+ all: $(BUNDLE)
+ 
diff --minimal -Nru abgate-1.1.9/debian/patches/series 
abgate-1.1.9/debian/patches/series
--- abgate-1.1.9/debian/patches/series  2017-10-11 16:19:02.000000000 +0200
+++ abgate-1.1.9/debian/patches/series  2018-10-29 06:14:55.000000000 +0100
@@ -1 +1,2 @@
 0002-flags.patch
+cross.patch
diff --minimal -Nru abgate-1.1.9/debian/rules abgate-1.1.9/debian/rules
--- abgate-1.1.9/debian/rules   2017-11-01 12:25:19.000000000 +0100
+++ abgate-1.1.9/debian/rules   2018-10-29 06:15:39.000000000 +0100
@@ -8,3 +8,10 @@
 
 %:
        dh $@
+
+override_dh_auto_configure:
+       dh_auto_configure --sourcedirectory=abGateQt
+
+override_dh_auto_build:
+       dh_auto_build --sourcedirectory=abGateQt
+       dh_auto_build

Reply via email to