Bug#897049: zita-resampler FTCBFS: multiple reasons
Helmut Grohne
helmut at subdivi.de
Fri Apr 27 16:04:33 BST 2018
Source: zita-resampler
Version: 1.6.0-2
Tags: patch
User: helmutg at debian.org
Usertags: rebootstrap
zita-resampler fails to cross build from source for multiple reasons:
* The upstream build system hard codes g++ as the compiler.
* The debian packaging does not always supply a cross compiler to make.
Use dh_auto_build to fix that.
* ldconfig does not work during cross compilation.
The attached patch fixes all of that. Please consider applying it.
Helmut
-------------- next part --------------
diff --minimal -Nru zita-resampler-1.6.0/debian/changelog zita-resampler-1.6.0/debian/changelog
--- zita-resampler-1.6.0/debian/changelog 2016-11-01 19:35:32.000000000 +0100
+++ zita-resampler-1.6.0/debian/changelog 2018-04-26 05:47:12.000000000 +0200
@@ -1,3 +1,13 @@
+zita-resampler (1.6.0-2.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix FTCBFS: (Closes: #-1)
+ + Make g++ substitutable.
+ + Let dh_auto_build substitute pass cross tools to make.
+ + Don't use ldconfig at build time.
+
+ -- Helmut Grohne <helmut at subdivi.de> Thu, 26 Apr 2018 05:47:12 +0200
+
zita-resampler (1.6.0-2) unstable; urgency=medium
* Team upload.
diff --minimal -Nru zita-resampler-1.6.0/debian/patches/01-makefile.patch zita-resampler-1.6.0/debian/patches/01-makefile.patch
--- zita-resampler-1.6.0/debian/patches/01-makefile.patch 2016-10-31 14:53:39.000000000 +0100
+++ zita-resampler-1.6.0/debian/patches/01-makefile.patch 2018-04-26 05:47:12.000000000 +0200
@@ -76,7 +76,7 @@
install -m 644 $(ZITA-RESAMPLER_MIN) $(DESTDIR)$(PREFIX)/$(LIBDIR)
ln -sf $(ZITA-RESAMPLER_MIN) $(DESTDIR)$(PREFIX)/$(LIBDIR)/$(ZITA-RESAMPLER_SO)
- ldconfig
-+ /sbin/ldconfig -n $(DESTDIR)$(PREFIX)/$(LIBDIR)
++ ln -sf $(ZITA-RESAMPLER_MIN) $(DESTDIR)$(PREFIX)/$(LIBDIR)/$(ZITA-RESAMPLER_MAJ)
uninstall:
/bin/rm -rf $(DESTDIR)$(PREFIX)/include/zita-resampler
diff --minimal -Nru zita-resampler-1.6.0/debian/patches/02-cross.patch zita-resampler-1.6.0/debian/patches/02-cross.patch
--- zita-resampler-1.6.0/debian/patches/02-cross.patch 1970-01-01 01:00:00.000000000 +0100
+++ zita-resampler-1.6.0/debian/patches/02-cross.patch 2018-04-26 05:47:12.000000000 +0200
@@ -0,0 +1,31 @@
+--- zita-resampler-1.6.0.orig/apps/Makefile
++++ zita-resampler-1.6.0/apps/Makefile
+@@ -36,7 +36,7 @@
+ ZRESAMPLE_O = zresample.o audiofile.o dither.o
+ zresample: LDLIBS += -lzita-resampler -lsndfile -lrt
+ zresample: $(ZRESAMPLE_O)
+- g++ $(LDFLAGS) -o $@ $(ZRESAMPLE_O) $(LDLIBS)
++ $(CXX) $(LDFLAGS) -o $@ $(ZRESAMPLE_O) $(LDLIBS)
+ $(ZRESAMPLE_O):
+ -include $(ZRESAMPLE_O:%.o=%.d)
+
+@@ -44,7 +44,7 @@
+ ZRETUNE_O = zretune.o audiofile.o dither.o
+ zretune: LDLIBS += -lzita-resampler -lsndfile -lrt
+ zretune: $(ZRETUNE_O)
+- g++ $(LDFLAGS) -o $@ $(ZRETUNE_O) $(LDLIBS)
++ $(CXX) $(LDFLAGS) -o $@ $(ZRETUNE_O) $(LDLIBS)
+ $(ZRETUNE_O):
+ -include $(ZRETUNE_O:%.o=%.d)
+
+--- zita-resampler-1.6.0.orig/libs/Makefile
++++ zita-resampler-1.6.0/libs/Makefile
+@@ -46,7 +46,7 @@
+
+
+ $(ZITA-RESAMPLER_MIN): $(ZITA-RESAMPLER_O)
+- g++ -shared $(LDFLAGS) -Wl,-soname,$(ZITA-RESAMPLER_MAJ) -o $(ZITA-RESAMPLER_MIN) $(ZITA-RESAMPLER_O) $(ZITA-RESAMPLER_DEP)
++ $(CXX) -shared $(LDFLAGS) -Wl,-soname,$(ZITA-RESAMPLER_MAJ) -o $(ZITA-RESAMPLER_MIN) $(ZITA-RESAMPLER_O) $(ZITA-RESAMPLER_DEP)
+
+ $(ZITA-RESAMPLER_O): $(ZITA-RESAMPLER_H)
+
diff --minimal -Nru zita-resampler-1.6.0/debian/patches/series zita-resampler-1.6.0/debian/patches/series
--- zita-resampler-1.6.0/debian/patches/series 2016-10-31 14:53:39.000000000 +0100
+++ zita-resampler-1.6.0/debian/patches/series 2018-04-26 05:47:12.000000000 +0200
@@ -1 +1,2 @@
01-makefile.patch
+02-cross.patch
diff --minimal -Nru zita-resampler-1.6.0/debian/rules zita-resampler-1.6.0/debian/rules
--- zita-resampler-1.6.0/debian/rules 2016-10-31 14:53:39.000000000 +0100
+++ zita-resampler-1.6.0/debian/rules 2018-04-26 05:47:12.000000000 +0200
@@ -15,7 +15,7 @@
override_dh_auto_install:
dh_auto_install
- $(MAKE) -C apps/ DESTDIR=$(CURDIR)/debian/tmp
+ dh_auto_build -Dapps -- DESTDIR=$(CURDIR)/debian/tmp
$(MAKE) -C apps/ DESTDIR=$(CURDIR)/debian/tmp install
override_dh_installchangelogs:
More information about the pkg-multimedia-maintainers
mailing list