Source: ccbuild Version: 2.0.7+git20160227.c1179286-1 Tags: patch User: debian-cr...@lists.debian.org Usertags: ftcbfs
ccbuild fails to cross build from source, because debian/rules overrides CXX with plain g++ and runs cmake without and cross flags. It doesn't do this for fun, but because apparently the project is ignoring CXXFLAGS. A look at CMakeLists.txt reveals why: The C++ language is not enabled. Unfortunately, CMakeLists.txt looks like it is a generated file. We must modify the bootstrap file and run it to change CMakeLists.txt. So once you add "LANGUAGES CXX" to the project invocation and run bootstrap, it all magically just works. That includes cross compilation. Please consider applying the attached patch. Helmut
diff --minimal -Nru ccbuild-2.0.7+git20160227.c1179286/debian/changelog ccbuild-2.0.7+git20160227.c1179286/debian/changelog --- ccbuild-2.0.7+git20160227.c1179286/debian/changelog 2016-08-19 14:27:46.000000000 +0200 +++ ccbuild-2.0.7+git20160227.c1179286/debian/changelog 2020-01-29 05:57:03.000000000 +0100 @@ -1,3 +1,10 @@ +ccbuild (2.0.7+git20160227.c1179286-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: Use dh_auto_configure. (Closes: #-1) + + -- Helmut Grohne <hel...@subdivi.de> Wed, 29 Jan 2020 05:57:03 +0100 + ccbuild (2.0.7+git20160227.c1179286-1) unstable; urgency=medium * Use an upstream version number that is actually greater than 2.0.7. diff --minimal -Nru ccbuild-2.0.7+git20160227.c1179286/debian/clean ccbuild-2.0.7+git20160227.c1179286/debian/clean --- ccbuild-2.0.7+git20160227.c1179286/debian/clean 1970-01-01 01:00:00.000000000 +0100 +++ ccbuild-2.0.7+git20160227.c1179286/debian/clean 2020-01-29 05:57:03.000000000 +0100 @@ -0,0 +1 @@ +CMakeLists.txt diff --minimal -Nru ccbuild-2.0.7+git20160227.c1179286/debian/patches/cross.patch ccbuild-2.0.7+git20160227.c1179286/debian/patches/cross.patch --- ccbuild-2.0.7+git20160227.c1179286/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100 +++ ccbuild-2.0.7+git20160227.c1179286/debian/patches/cross.patch 2020-01-29 05:57:03.000000000 +0100 @@ -0,0 +1,11 @@ +--- ccbuild-2.0.7+git20160227.c1179286.orig/bootstrap ++++ ccbuild-2.0.7+git20160227.c1179286/bootstrap +@@ -34,7 +34,7 @@ + #Write CMakeLists.txt + cat > CMakeLists.txt <<EOF + cmake_minimum_required (VERSION 2.6) +-project (ccbuild) ++project (ccbuild LANGUAGES CXX) + add_definitions(-DVERSION="${VERSION}") + link_libraries(gomp bobcat gnutls) + add_definitions(-fopenmp) diff --minimal -Nru ccbuild-2.0.7+git20160227.c1179286/debian/patches/series ccbuild-2.0.7+git20160227.c1179286/debian/patches/series --- ccbuild-2.0.7+git20160227.c1179286/debian/patches/series 2016-08-19 14:27:46.000000000 +0200 +++ ccbuild-2.0.7+git20160227.c1179286/debian/patches/series 2020-01-29 05:57:03.000000000 +0100 @@ -0,0 +1 @@ +cross.patch diff --minimal -Nru ccbuild-2.0.7+git20160227.c1179286/debian/rules ccbuild-2.0.7+git20160227.c1179286/debian/rules --- ccbuild-2.0.7+git20160227.c1179286/debian/rules 2016-08-19 14:27:46.000000000 +0200 +++ ccbuild-2.0.7+git20160227.c1179286/debian/rules 2020-01-29 05:57:03.000000000 +0100 @@ -6,11 +6,9 @@ export DEB_CXXFLAGS_MAINT_APPEND = -Wall -pedantic export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed -override_dh_auto_build: - # For some reason, the only way to pass flags is in CXX - @echo "# environment: CXX $(CXX) CFLAGS $(CFLAGS) CXXFLAGS $(CXXFLAGS)" - cmake . - $(MAKE) CXX="g++ $(CXXFLAGS)" DESTDIR=$(CURDIR)/debian/ccbuild install +override_dh_auto_configure: + ./bootstrap + dh_auto_configure override_dh_installchangelogs: dh_installchangelogs ChangeLog