Source: yaml-cpp Version: 0.5.2-4 Tags: patch User: helm...@debian.org Usertags: rebootstrap
yaml-cpp fails to cross build from source, because it uses the build architecture compiler. It also also runs tests even when DEB_BUILD_OPTIONS contains nocheck. The attached patch fixes both problems and makes the cross build succeed. dh_auto_configure knows how to tell cmake about cross compilers, so I am opting for that indirection. Please consider applying the attached patch. Helmut
diff --minimal -Nru yaml-cpp-0.5.2/debian/changelog yaml-cpp-0.5.2/debian/changelog --- yaml-cpp-0.5.2/debian/changelog 2016-10-13 01:48:11.000000000 +0200 +++ yaml-cpp-0.5.2/debian/changelog 2016-11-10 17:55:54.000000000 +0100 @@ -1,3 +1,12 @@ +yaml-cpp (0.5.2-4.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS (Closes: #-1) + + Let dh_auto_configure pass cross flags + + Honour DEB_BUILD_OPTIONS=nocheck + + -- Helmut Grohne <hel...@subdivi.de> Thu, 10 Nov 2016 17:55:54 +0100 + yaml-cpp (0.5.2-4) unstable; urgency=medium * Make the build reproducible (Closes: #808714) diff --minimal -Nru yaml-cpp-0.5.2/debian/rules yaml-cpp-0.5.2/debian/rules --- yaml-cpp-0.5.2/debian/rules 2016-10-13 01:48:11.000000000 +0200 +++ yaml-cpp-0.5.2/debian/rules 2016-11-10 17:15:59.000000000 +0100 @@ -23,13 +23,11 @@ override_dh_auto_configure: dh_testdir - mkdir build-static; cd build-static; \ - cmake .. -DCMAKE_INSTALL_PREFIX=/usr \ + dh_auto_configure --builddirectory=build-static -- -DCMAKE_INSTALL_PREFIX=/usr \ -DLIB_INSTALL_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) \ -DYAML_CPP_BUILD_TOOLS=ON \ -Dgtest_disable_pthreads=$(DISABLE_PTHREADS) - mkdir build-shared; cd build-shared; \ - cmake .. -DCMAKE_INSTALL_PREFIX=/usr \ + dh_auto_configure --builddirectory=build-shared -- -DCMAKE_INSTALL_PREFIX=/usr \ -DLIB_INSTALL_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) \ -DBUILD_SHARED_LIBS=ON \ -DYAML_CPP_BUILD_TOOLS=ON \ @@ -48,9 +46,11 @@ $(MAKE) -C build-static install DESTDIR=$(CURDIR)/debian/tmp $(MAKE) -C build-shared install DESTDIR=$(CURDIR)/debian/tmp +ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),) override_dh_auto_test: $(MAKE) -C build-static test $(MAKE) -C build-shared test +endif clean: dh_testdir