Bug#966819: lv2-c++-tools FTCBFS: builds for the build architecture

Helmut Grohne helmut at subdivi.de
Sun Aug 2 12:05:34 BST 2020


Source: lv2-c++-tools
Version: 1.0.5-4
Tags: patch
User: debian-cross at lists.debian.org
Usertags: ftcbfs

lv2-c++-tools fails to cross build from source, because it builds for
the build architecture. It has a ./configure script, but it doesn't
actually set up cross tools as debhelper expects. Thus when debhelper
runs make, it doesn't pass cross tools along. From a debhelper
perspective, this is more of a makefile build system than an autoconf
build system. Once we tell it, it passes cross tools.

Those are mostly picked up by the build system except for pkg-config. It
needs a little patch to honour the variables passed by dh_auto_build.

Please consider applying the attached patch.

Helmut
-------------- next part --------------
diff --minimal -Nru lv2-c++-tools-1.0.5/debian/changelog lv2-c++-tools-1.0.5/debian/changelog
--- lv2-c++-tools-1.0.5/debian/changelog	2017-09-03 23:11:37.000000000 +0200
+++ lv2-c++-tools-1.0.5/debian/changelog	2020-08-02 10:18:55.000000000 +0200
@@ -1,3 +1,12 @@
+lv2-c++-tools (1.0.5-4.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + cross.patch: Make pkg-config substitutable.
+    + Let dh_auto_build pass cross tools to make via the makefile buildsystem.
+
+ -- Helmut Grohne <helmut at subdivi.de>  Sun, 02 Aug 2020 10:18:55 +0200
+
 lv2-c++-tools (1.0.5-4) unstable; urgency=medium
 
   * Team upload.
diff --minimal -Nru lv2-c++-tools-1.0.5/debian/patches/cross.patch lv2-c++-tools-1.0.5/debian/patches/cross.patch
--- lv2-c++-tools-1.0.5/debian/patches/cross.patch	1970-01-01 01:00:00.000000000 +0100
+++ lv2-c++-tools-1.0.5/debian/patches/cross.patch	2020-08-02 10:18:46.000000000 +0200
@@ -0,0 +1,43 @@
+--- lv2-c++-tools-1.0.5.orig/Makefile
++++ lv2-c++-tools-1.0.5/Makefile
+@@ -7,6 +7,8 @@
+ PROGRAMS = lv2peg
+ DATAPACKS = lv2soname
+ 
++PKG_CONFIG ?= pkg-config
++
+ # The static plugin library with headers
+ liblv2-plugin_a_SOURCES = lv2plugin.cpp
+ liblv2-plugin_a_HEADERS = \
+@@ -30,7 +32,7 @@
+ 	lv2gui.hpp \
+ 	../../headers/lv2_ui.h \
+ 	../../headers/lv2_ui_presets.h
+-liblv2-gui_a_CFLAGS = `pkg-config --cflags gtkmm-2.4` -Iheaders
++liblv2-gui_a_CFLAGS = `$(PKG_CONFIG) --cflags gtkmm-2.4` -Iheaders
+ liblv2-gui_a_SOURCEDIR = libraries/lv2gui
+ liblv2-gui_a_INSTALLDIR = $(libdir)
+ 
+--- lv2-c++-tools-1.0.5.orig/Makefile.template
++++ lv2-c++-tools-1.0.5/Makefile.template
+@@ -432,9 +432,9 @@
+ 
+ # PKG-CONFIG DEPENDENCY CHECK
+ PKG_NAMES = $(filter-out =%,$(subst >, ,$(PKG_DEPS))) 
+-PKG_DEPDIRS = `pkg-config --cflags $(PKG_NAMES) 2> /dev/null`
++PKG_DEPDIRS = `$(PKG_CONFIG) --cflags $(PKG_NAMES) 2> /dev/null`
+ check-pkg-deps:
+-	@$(foreach pkg, $(PKG_DEPS), if pkg-config --atleast-version $(sort $(subst >=, ,$(pkg))) ; then true; else echo "*** You don't have $(pkg), which you need in order to build this software."; false; fi && ) true
++	@$(foreach pkg, $(PKG_DEPS), if $(PKG_CONFIG) --atleast-version $(sort $(subst >=, ,$(pkg))) ; then true; else echo "*** You don't have $(pkg), which you need in order to build this software."; false; fi && ) true
+ 
+ 
+ # TEST REPORT GENERATION
+@@ -479,7 +479,7 @@
+ 	@echo "c_compiler = \"$(shell $(CC) --version | head -n 1)\"" >> $(TESTREPORT)/info
+ 	@echo "cxx_compiler = \"$(shell $(CXX) --version | head -n 1)\"" >> $(TESTREPORT)/info
+ 	@echo >> $(TESTREPORT)/info
+-	@$(foreach pkgname, $(PKG_NAMES), echo "dependency.$(pkgname) = \""`pkg-config --modversion $(pkgname)`"\"" >> $(TESTREPORT)/info;)
++	@$(foreach pkgname, $(PKG_NAMES), echo "dependency.$(pkgname) = \""`$(PKG_CONFIG) --modversion $(pkgname)`"\"" >> $(TESTREPORT)/info;)
+ 	export LD_LIBRARY_PATH=$${LD_LIBRARY_PATH}$(LIBRARY_DIRS); \
+ 	for test in $(TESTS); do \
+ 	  mkdir -p $(TESTREPORT)/$$test; \
diff --minimal -Nru lv2-c++-tools-1.0.5/debian/patches/series lv2-c++-tools-1.0.5/debian/patches/series
--- lv2-c++-tools-1.0.5/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ lv2-c++-tools-1.0.5/debian/patches/series	2020-08-02 10:16:36.000000000 +0200
@@ -0,0 +1 @@
+cross.patch
diff --minimal -Nru lv2-c++-tools-1.0.5/debian/rules lv2-c++-tools-1.0.5/debian/rules
--- lv2-c++-tools-1.0.5/debian/rules	2017-09-03 23:00:59.000000000 +0200
+++ lv2-c++-tools-1.0.5/debian/rules	2020-08-02 10:18:55.000000000 +0200
@@ -5,7 +5,7 @@
 export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow
 
 %:
-	dh $@ 
+	dh $@ --buildsystem=makefile
 
 override_dh_auto_configure:
 	./configure --prefix=/usr


More information about the pkg-multimedia-maintainers mailing list