Bug#912139: cbflib FTCBFS: multiple reasons
Helmut Grohne
helmut at subdivi.de
Sun Oct 28 13:32:13 GMT 2018
Source: cbflib
Version: 0.9.5.18+dfsg1-1
Tags: patch
User: helmutg at debian.org
Usertags: rebootstrap
cbflib fails to cross build from source. There are actually three
distinct causes:
* The default make target of the Makefile is called "default" and does
nothing but print a message. Rather the packaging builds the package
during dh_auto_install. However, debhelper does not pass cross tools
to make for dh_auto_install.
* The upstream Makefile calls the C++ compiler "C++" while the rest of
the world (including debhelper) calls ist CXX. Thus it uses the build
architecture compiler rather than debhelper's substitution.
* The upstream Makefile hard codes the build architecture pkg-config.
The attached patch fixes all of that and makes cbflib cross buildable.
Please consider applying it.
Helmut
-------------- next part --------------
diff --minimal -Nru cbflib-0.9.5.18+dfsg1/debian/changelog cbflib-0.9.5.18+dfsg1/debian/changelog
--- cbflib-0.9.5.18+dfsg1/debian/changelog 2018-10-15 19:58:57.000000000 +0200
+++ cbflib-0.9.5.18+dfsg1/debian/changelog 2018-10-28 09:19:37.000000000 +0100
@@ -1,3 +1,13 @@
+cbflib (0.9.5.18+dfsg1-1.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix FTCBFS: (Closes: #-1)
+ + Build during dh_auto_build rather than dh_auto_install.
+ + Pass C++ compiler as variabl C++.
+ + Make pkg-config substitutable.
+
+ -- Helmut Grohne <helmut at subdivi.de> Sun, 28 Oct 2018 09:19:37 +0100
+
cbflib (0.9.5.18+dfsg1-1) unstable; urgency=medium
* New upstream version 0.9.5.18+dfsg1
diff --minimal -Nru cbflib-0.9.5.18+dfsg1/debian/patches/cross.patch cbflib-0.9.5.18+dfsg1/debian/patches/cross.patch
--- cbflib-0.9.5.18+dfsg1/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100
+++ cbflib-0.9.5.18+dfsg1/debian/patches/cross.patch 2018-10-28 09:19:34.000000000 +0100
@@ -0,0 +1,25 @@
+--- cbflib-0.9.5.18+dfsg1.orig/Makefile
++++ cbflib-0.9.5.18+dfsg1/Makefile
+@@ -279,6 +279,7 @@
+ DATADIRS = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only
+ CBF_PREFIX ?= $(DESTDIR)/usr
+ INSTALL_LIB ?= lib
++PKG_CONFIG ?= pkg-config
+
+ #
+ # Comment out the next line if scratch test files should be retained
+@@ -336,11 +337,11 @@
+ HDF5_INSTALL =
+ HDF5LIBS_LOCAL =
+ #HDF5LIBS_SYSTEM = -L$(HDF5_PREFIX)/lib -lhdf5 -lz -ldl
+-HDF5LIBS_SYSTEM = $(shell pkg-config --libs hdf5-serial)
++HDF5LIBS_SYSTEM = $(shell $(PKG_CONFIG) --libs hdf5-serial)
+ HDF5SOLIBS_LOCAL =
+ #HDF5SOLIBS_SYSTEM = -L$(HDF5_PREFIX)/lib -lhdf5 -lz
+-HDF5SOLIBS_SYSTEM = $(shell pkg-config --libs hdf5-serial)
+-HDF5_CFLAGS = $(shell pkg-config --cflags hdf5-serial)
++HDF5SOLIBS_SYSTEM = $(shell $(PKG_CONFIG) --libs hdf5-serial)
++HDF5_CFLAGS = $(shell $(PKG_CONFIG) --cflags hdf5-serial)
+ HDF5REGISTER ?= --register manual
+ endif
+ H5DUMP = $(HDF5_PREFIX)/bin/h5dump
diff --minimal -Nru cbflib-0.9.5.18+dfsg1/debian/patches/series cbflib-0.9.5.18+dfsg1/debian/patches/series
--- cbflib-0.9.5.18+dfsg1/debian/patches/series 2018-10-15 19:58:57.000000000 +0200
+++ cbflib-0.9.5.18+dfsg1/debian/patches/series 2018-10-28 09:18:26.000000000 +0100
@@ -13,3 +13,4 @@
0013-makefile-deb-Use-DESTDIR-usr-as-CBF_PREFIX.patch
0014-makefile-deb-Do-not-build-tiff2cbf.patch
0015-Makefile-deb-Use-dynamic-linking-to-cbflib-in-progra.patch
+cross.patch
diff --minimal -Nru cbflib-0.9.5.18+dfsg1/debian/rules cbflib-0.9.5.18+dfsg1/debian/rules
--- cbflib-0.9.5.18+dfsg1/debian/rules 2018-10-15 19:58:57.000000000 +0200
+++ cbflib-0.9.5.18+dfsg1/debian/rules 2018-10-28 09:19:37.000000000 +0100
@@ -22,6 +22,9 @@
%:
dh $@ --no-parallel
+override_dh_auto_build:
+ dh_auto_build -- 'C++:=$$(CXX)' all
+
override_dh_install:
# Exclude duplicates (lintian check duplicate-files)
dh_install -Xcif_img_1.3.2_22Jun05.html -Xcif_img_1.3.1.html
More information about the debian-science-maintainers
mailing list