From 0feed5e516c778445e4423767e4fe64d09f7609d Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Fri, 4 Nov 2022 11:18:05 +0100 Subject: Fix FTCBFS: Use a triplet-prefixed compiler. Closes: #1023487 --- debian/patches/cross.patch | 25 +++++++++++++++++++++++++ debian/patches/series | 1 + debian/rules | 3 +++ 3 files changed, 29 insertions(+) create mode 100644 debian/patches/cross.patch diff --git a/debian/patches/cross.patch b/debian/patches/cross.patch new file mode 100644 index 0000000..7aa4882 --- /dev/null +++ b/debian/patches/cross.patch @@ -0,0 +1,25 @@ +Description: FTCBFS: hard codes the build architecture C++ compiler + libsgml-parser-opensp-perl fails to cross build from source, because the + Makefile.PL hard codes the build architecture C++ compiler. I'm attaching a + patch for your convenience to make it use the host one and thus make + libsgml-parser-opensp-perl cross buildable. +Origin: vendor +Bug: https://bugs.debian.org/1023487 +Forwarded: no +Author: Helmut Grohne +Reviewed-by: gregor herrmann +Last-Update: 2022-11-23 + +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -13,8 +13,8 @@ + else + { + # assume some compatible Linux +- $options{LD} = "g++"; +- $options{CC} = "g++"; ++ $options{CC} = $ENV{CXX} || "g++"; ++ $options{LD} = $options{CC}; + $options{LIBS} = "-lstdc++ -losp"; + } + diff --git a/debian/patches/series b/debian/patches/series index d95546f..85c58d3 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ doc_misspelling.patch binnmu_rebuild_fix.patch +cross.patch diff --git a/debian/rules b/debian/rules index 8b4cb26..dfe3823 100755 --- a/debian/rules +++ b/debian/rules @@ -1,5 +1,8 @@ #!/usr/bin/make -f +DPKG_EXPORT_BUILDTOOLS=1 +include /usr/share/dpkg/buildtools.mk + PACKAGE = $(shell dh_listpackages) TMP = $(CURDIR)/debian/$(PACKAGE) -- cgit v1.2.3