From e526c56dc43f141312b0c219dc7cc8d6fac90a6e Mon Sep 17 00:00:00 2001 From: Peter Michael Green Date: Tue, 26 Nov 2019 02:00:41 +0000 Subject: [PATCH] Add symlinks so upstream build system can find the compiler on raspbian. --- debian/changelog | 3 +++ debian/rules | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/debian/changelog b/debian/changelog index 1384848a..a1544eab 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,9 @@ ocaml (4.08.1-4+rpi1) bullseye-staging; urgency=medium * Add logic in debian/rules to detect raspbian and give the upstream configure script the correct instructions. + [changes introduced in 4.08.1-4+rpi1 by Peter Michael Green] + * Add symlinks so upstream build system can find the compilers when using the correct triplet for raspbian. + -- Peter Michael Green Mon, 25 Nov 2019 01:15:30 +0000 ocaml (4.08.1-4) unstable; urgency=medium diff --git a/debian/rules b/debian/rules index dac5761e..f012c81d 100755 --- a/debian/rules +++ b/debian/rules @@ -3,6 +3,8 @@ include /usr/share/dpkg/pkg-info.mk include /usr/share/dpkg/buildflags.mk +export PATH :=$(PATH):$(CURDIR)/compilersymlinks + PACKAGE := ocaml ALL_PACKAGES := $(shell dh_listpackages) @@ -99,6 +101,10 @@ debian/control: sed -e 's/@OCamlNativeArchs@/$(OCAML_NATIVE_ARCHS)/g' debian/control.in > $@ pre-config-stamp: $(TARBALL_TARGET) + mkdir -p compilersymlinks + ln -s /usr/bin/arm-linux-gnueabihf-gcc compilersymlinks/armv6-unknown-linux-gnueabihf-gcc + ln -s /usr/bin/arm-linux-gnueabihf-g++ compilersymlinks/armv6-unknown-linux-gnueabihf-g++ + ln -s /usr/bin/arm-linux-gnueabihf-as compilersymlinks/armv6-unknown-linux-gnueabihf-as # Backup upstream config.{sub,guess}, and use most up-to-date ones set -e; for ext in sub guess; do \ if [ -f /usr/share/misc/config.$$ext ] && \ @@ -189,6 +195,7 @@ endif done # Remaining stuff -rm -Rf debian/$(SRCTARBALL) $(TESTDIR) + rm -rf compilersymlinks .PHONY: override_dh_auto_install-arch override_dh_auto_install-indep override_dh_auto_install-arch: install-stamp-arch -- 2.30.2