Source: leveldb Version: 1.22-2 Tags: patch User: debian-cr...@lists.debian.org Usertags: ftcbfs
leveldb fails to cross build from source, because it mixes up build vs. host in the choice of the build directory and thus skips the actual build in a non-existent directory. The attached patch fixes that. Please consider applying it. Helmut
diff --minimal -Nru leveldb-1.22/debian/changelog leveldb-1.22/debian/changelog --- leveldb-1.22/debian/changelog 2019-07-24 23:03:17.000000000 +0200 +++ leveldb-1.22/debian/changelog 2019-07-27 09:12:41.000000000 +0200 @@ -1,3 +1,10 @@ +leveldb (1.22-2.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: Fix build/host confusion. (Closes: #-1) + + -- Helmut Grohne <hel...@subdivi.de> Sat, 27 Jul 2019 09:12:41 +0200 + leveldb (1.22-2) unstable; urgency=medium * Fix library installation (closes: #932917). diff --minimal -Nru leveldb-1.22/debian/rules leveldb-1.22/debian/rules --- leveldb-1.22/debian/rules 2019-07-24 23:03:17.000000000 +0200 +++ leveldb-1.22/debian/rules 2019-07-27 09:12:41.000000000 +0200 @@ -4,8 +4,7 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) -DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +include /usr/share/dpkg/architecture.mk CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS) -fPIC CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) @@ -30,16 +29,16 @@ dh $@ override_dh_auto_configure: - dh_auto_configure -- -Bout-static - dh_auto_configure -- -DBUILD_SHARED_LIBS=ON -Bout-shared + dh_auto_configure -Bobj-$(DEB_HOST_GNU_TYPE)/out-static + dh_auto_configure -Bobj-$(DEB_HOST_GNU_TYPE)/out-shared -- -DBUILD_SHARED_LIBS=ON override_dh_auto_build: - dh_auto_build -Bobj-$(DEB_BUILD_GNU_TYPE)/out-static - dh_auto_build -Bobj-$(DEB_BUILD_GNU_TYPE)/out-shared + dh_auto_build -Bobj-$(DEB_HOST_GNU_TYPE)/out-static + dh_auto_build -Bobj-$(DEB_HOST_GNU_TYPE)/out-shared override_dh_auto_install: - dh_auto_install -Bobj-$(DEB_BUILD_GNU_TYPE)/out-static - dh_auto_install -Bobj-$(DEB_BUILD_GNU_TYPE)/out-shared + dh_auto_install -Bobj-$(DEB_HOST_GNU_TYPE)/out-static + dh_auto_install -Bobj-$(DEB_HOST_GNU_TYPE)/out-shared override_dh_installdocs: dh_installdocs @@ -50,15 +49,15 @@ done override_dh_auto_test: -ifeq ($(DEB_BUILD_ARCH),mips) +ifeq ($(DEB_HOST_ARCH),mips) @echo "======== will not abort on test(s) failure ========" - dh_auto_test --no-parallel -Bobj-$(DEB_BUILD_GNU_TYPE)/out-static \ + dh_auto_test --no-parallel -Bobj-$(DEB_HOST_GNU_TYPE)/out-static \ || true - dh_auto_test --no-parallel -Bobj-$(DEB_BUILD_GNU_TYPE)/out-shared \ + dh_auto_test --no-parallel -Bobj-$(DEB_HOST_GNU_TYPE)/out-shared \ || true else - dh_auto_test --no-parallel -Bobj-$(DEB_BUILD_GNU_TYPE)/out-static - dh_auto_test --no-parallel -Bobj-$(DEB_BUILD_GNU_TYPE)/out-shared + dh_auto_test --no-parallel -Bobj-$(DEB_HOST_GNU_TYPE)/out-static + dh_auto_test --no-parallel -Bobj-$(DEB_HOST_GNU_TYPE)/out-shared endif get-orig-source: