Source: yaml-cpp Version: 0.6.3-5 Tags: patch User: debian-cr...@lists.debian.org Usertags: ftcbfs
yaml-cpp fails to cross build from source again, because it ships an embedded gtest library and builds it using the build architecture via a cmake ExternalProject_Add. It turns out, that we don't actually need it unless running tests, which we don't do during cross compilation. Therefore please skip building tests when DEB_BUILD_OPTIONS=nocheck is set. I'm attaching a patch for your convenience. It also cleans up debian/rules a little and fixes a little build/host confusion. I hope that's ok for you. Helmut
diff --minimal -Nru yaml-cpp-0.6.3/debian/changelog yaml-cpp-0.6.3/debian/changelog --- yaml-cpp-0.6.3/debian/changelog 2020-05-09 17:34:48.000000000 +0200 +++ yaml-cpp-0.6.3/debian/changelog 2020-05-10 07:37:31.000000000 +0200 @@ -1,3 +1,10 @@ +yaml-cpp (0.6.3-5.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: Don't build tests for DEB_BUILD_OPTIONS=nocheck. (Closes: #-1) + + -- Helmut Grohne <hel...@subdivi.de> Sun, 10 May 2020 07:37:31 +0200 + yaml-cpp (0.6.3-5) unstable; urgency=medium * Team upload. diff --minimal -Nru yaml-cpp-0.6.3/debian/rules yaml-cpp-0.6.3/debian/rules --- yaml-cpp-0.6.3/debian/rules 2020-05-09 17:34:13.000000000 +0200 +++ yaml-cpp-0.6.3/debian/rules 2020-05-10 07:37:31.000000000 +0200 @@ -6,7 +6,7 @@ # This has to be exported to make some magic below work. export DH_OPTIONS -DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) +include /usr/share/dpkg/architecture.mk CPPFLAGS :=$(shell dpkg-buildflags --get CPPFLAGS) ifneq (,$(filter $(DEB_BUILD_ARCH),mipsel)) @@ -20,23 +20,18 @@ export DEB_HOST_MULTIARCH CPPFLAGS CFLAGS CXXFLAGS LDFLAGS -ifeq (,$(filter $(DEB_BUILD_ARCH),kfreebsd-amd64 kfreebsd-i386 hurd-i386)) - DISABLE_PTHREADS=OFF -else - DISABLE_PTHREADS=ON -endif +COMMON_CMAKE_FLAGS = \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIB_INSTALL_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) \ + -DYAML_CPP_BUILD_TOOLS=ON \ + -DYAML_CPP_BUILD_TESTS=$(if $(filter nocheck,$(DEB_BUILD_OPTIONS)),OFF,ON) \ + -Dgtest_disable_pthreads=$(if $(filter $(DEB_HOST_ARCH_OS),kfreebsd hurd),ON,OFF) override_dh_auto_configure: dh_testdir - 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) - dh_auto_configure --builddirectory=build-shared -- -DCMAKE_INSTALL_PREFIX=/usr \ - -DLIB_INSTALL_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) \ - -DYAML_BUILD_SHARED_LIBS=ON \ - -DYAML_CPP_BUILD_TOOLS=ON \ - -Dgtest_disable_pthreads=$(DISABLE_PTHREADS) + dh_auto_configure --builddirectory=build-static -- $(COMMON_CMAKE_FLAGS) + dh_auto_configure --builddirectory=build-shared -- $(COMMON_CMAKE_FLAGS) \ + -DYAML_BUILD_SHARED_LIBS=ON override_dh_auto_build: dh_testdir