diff -Nru ocaml-4.08.1/debian/changelog ocaml-4.08.1/debian/changelog --- ocaml-4.08.1/debian/changelog 2019-11-08 10:43:37.000000000 +0000 +++ ocaml-4.08.1/debian/changelog 2019-11-25 01:15:30.000000000 +0000 @@ -1,3 +1,14 @@ +ocaml (4.08.1-4+rpi1) bullseye-staging; urgency=medium + + [changes brought forward from 4.01.0-5+rpi1 by Peter Michael Green at Sat, 24 Jan 2015 10:29:46 +0000] + * 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 * ocaml-base-nox Breaks/Replaces also ocaml-nox (Closes: #944126) diff -Nru ocaml-4.08.1/debian/.gitattributes ocaml-4.08.1/debian/.gitattributes --- ocaml-4.08.1/debian/.gitattributes 2019-11-08 10:43:37.000000000 +0000 +++ ocaml-4.08.1/debian/.gitattributes 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -changelog merge=dpkg-mergechangelogs diff -Nru ocaml-4.08.1/debian/patches/auto-4.08.1-4+rpi1-d4ee53f4051d7be783e37d2b5109b87169db4194-1574728847 ocaml-4.08.1/debian/patches/auto-4.08.1-4+rpi1-d4ee53f4051d7be783e37d2b5109b87169db4194-1574728847 --- ocaml-4.08.1/debian/patches/auto-4.08.1-4+rpi1-d4ee53f4051d7be783e37d2b5109b87169db4194-1574728847 1970-01-01 00:00:00.000000000 +0000 +++ ocaml-4.08.1/debian/patches/auto-4.08.1-4+rpi1-d4ee53f4051d7be783e37d2b5109b87169db4194-1574728847 2019-11-25 01:15:30.000000000 +0000 @@ -0,0 +1,259 @@ +From: Peter Michael Green +Subject: Automatically generated patch (4.08.1-4+rpi1) + +Last (up to) 3 git changes, FYI: + +commit d4ee53f4051d7be783e37d2b5109b87169db4194 +Merge: c8e5e064 74a02eb7 +Author: Peter Michael Green +Date: Mon Nov 25 01:16:28 2019 +0000 + + Manual merge of version 4.05.0-12+rpi1 and 4.08.1-4 to produce 4.08.1-4+rpi1 + +commit 74a02eb762abc86cd3ab7c4a4639b7ab7b6f584b +Merge: 559278ce bf32c9c1 +Author: Stéphane Glondu +Date: Fri Nov 8 11:43:37 2019 +0100 + + Make fast forward from 4.08.1-3 + + [dgit --quilt=gbp] + +commit 559278ce5332689561bea7cf8bcabc05d646d9a2 +Author: Stephane Glondu +Date: Sun Aug 18 08:04:51 2019 +0200 + + Reimplement -custom without hacks + + Origin: https://github.com/ocaml/ocaml/pull/8872 + + Gbp-Pq: Name 0008-Reimplement-custom-without-hacks.patch +--- + +--- ocaml-4.08.1.orig/tools/ci/appveyor/appveyor_build.cmd ++++ ocaml-4.08.1/tools/ci/appveyor/appveyor_build.cmd +@@ -1,112 +1,112 @@ +-@rem *********************************************************************** +-@rem * * +-@rem * OCaml * +-@rem * * +-@rem * David Allsopp, OCaml Labs, Cambridge. * +-@rem * * +-@rem * Copyright 2017 MetaStack Solutions Ltd. * +-@rem * * +-@rem * All rights reserved. This file is distributed under the terms of * +-@rem * the GNU Lesser General Public License version 2.1, with the * +-@rem * special exception on linking described in the file LICENSE. * +-@rem * * +-@rem *********************************************************************** +- +-@rem BE CAREFUL ALTERING THIS FILE TO ENSURE THAT ERRORS PROPAGATE +-@rem IF A COMMAND SHOULD FAIL IT PROBABLY NEEDS TO END WITH +-@rem || exit /b 1 +-@rem BASICALLY, DO THE TESTING IN BASH... +- +-@rem Do not call setlocal! +-@echo off +- +-goto %1 +- +-goto :EOF +- +-:CheckPackage +-"%CYG_ROOT%\bin\bash.exe" -lc "cygcheck -dc %1" | findstr %1 > nul +-if %ERRORLEVEL% equ 1 ( +- echo Cygwin package %1 will be installed +- set CYGWIN_INSTALL_PACKAGES=%CYGWIN_INSTALL_PACKAGES%,%1 +-) +-goto :EOF +- +-:UpgradeCygwin +-if "%CYGWIN_INSTALL_PACKAGES%" neq "" "%CYG_ROOT%\setup-x86_64.exe" --quiet-mode --no-shortcuts --no-startmenu --no-desktop --only-site --root "%CYG_ROOT%" --site "%CYG_MIRROR%" --local-package-dir "%CYG_CACHE%" --packages %CYGWIN_INSTALL_PACKAGES:~1% > nul +-for %%P in (%CYGWIN_COMMANDS%) do "%CYG_ROOT%\bin\%%P.exe" --version > nul || set CYGWIN_UPGRADE_REQUIRED=1 +-"%CYG_ROOT%\bin\bash.exe" -lc "cygcheck -dc %CYGWIN_PACKAGES%" +-if %CYGWIN_UPGRADE_REQUIRED% equ 1 ( +- echo Cygwin package upgrade required - please go and drink coffee +- "%CYG_ROOT%\setup-x86_64.exe" --quiet-mode --no-shortcuts --no-startmenu --no-desktop --only-site --root "%CYG_ROOT%" --site "%CYG_MIRROR%" --local-package-dir "%CYG_CACHE%" --upgrade-also > nul +- "%CYG_ROOT%\bin\bash.exe" -lc "cygcheck -dc %CYGWIN_PACKAGES%" +-) +-goto :EOF +- +-:install +-chcp 65001 > nul +-rem This must be kept in sync with appveyor_build.sh +-set BUILD_PREFIX=🐫реализация +-git worktree add "..\%BUILD_PREFIX%-%PORT%" -b appveyor-build-%PORT% +-if "%PORT%" equ "msvc64" ( +- git worktree add "..\%BUILD_PREFIX%-msvc32" -b appveyor-build-%PORT%32 +-) +- +-cd "..\%BUILD_PREFIX%-%PORT%" +-if "%PORT%" equ "mingw32" ( +- git submodule update --init flexdll +-) +- +-cd "%APPVEYOR_BUILD_FOLDER%" +-appveyor DownloadFile "https://github.com/alainfrisch/flexdll/archive/0.37.tar.gz" -FileName "flexdll.tar.gz" || exit /b 1 +-appveyor DownloadFile "https://github.com/alainfrisch/flexdll/releases/download/0.37/flexdll-bin-0.37.zip" -FileName "flexdll.zip" || exit /b 1 +-rem flexdll.zip is processed here, rather than in appveyor_build.sh because the +-rem unzip command comes from MSYS2 (via Git for Windows) and it has to be +-rem invoked via cmd /c in a bash script which is weird(er). +-mkdir "%APPVEYOR_BUILD_FOLDER%\..\flexdll" +-move flexdll.zip "%APPVEYOR_BUILD_FOLDER%\..\flexdll" +-cd "%APPVEYOR_BUILD_FOLDER%\..\flexdll" && unzip -q flexdll.zip +- +-rem CYGWIN_PACKAGES is the list of required Cygwin packages (cygwin is included +-rem in the list just so that the Cygwin version is always displayed on the log). +-rem CYGWIN_COMMANDS is a corresponding command to run with --version to test +-rem whether the package works. This is used to verify whether the installation +-rem needs upgrading. +-set CYGWIN_PACKAGES=cygwin make diffutils +-set CYGWIN_COMMANDS=cygcheck make diff +-if "%PORT%" equ "mingw32" ( +- set CYGWIN_PACKAGES=%CYGWIN_PACKAGES% mingw64-i686-gcc-core +- set CYGWIN_COMMANDS=%CYGWIN_COMMANDS% i686-w64-mingw32-gcc +-) +- +-set CYGWIN_INSTALL_PACKAGES= +-set CYGWIN_UPGRADE_REQUIRED=0 +- +-for %%P in (%CYGWIN_PACKAGES%) do call :CheckPackage %%P +-call :UpgradeCygwin +- +-"%CYG_ROOT%\bin\bash.exe" -lec "$APPVEYOR_BUILD_FOLDER/tools/ci/appveyor/appveyor_build.sh install" || exit /b 1 +- +-goto :EOF +- +-:build +-if "%PORT%" equ "msvc64" ( +- setlocal +- call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat" +-) +-rem Do the main build (either msvc64 or mingw32) +-"%CYG_ROOT%\bin\bash.exe" -lec "$APPVEYOR_BUILD_FOLDER/tools/ci/appveyor/appveyor_build.sh" || exit /b 1 +- +-if "%PORT%" neq "msvc64" goto :EOF +- +-rem Reconfigure the environment and run the msvc32 partial build +-endlocal +-call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x86 +-"%CYG_ROOT%\bin\bash.exe" -lec "$APPVEYOR_BUILD_FOLDER/tools/ci/appveyor/appveyor_build.sh msvc32-only" || exit /b 1 +-goto :EOF +- +-:test +-rem Reconfigure the environment for the msvc64 build +-call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat" +-"%CYG_ROOT%\bin\bash.exe" -lec "$APPVEYOR_BUILD_FOLDER/tools/ci/appveyor/appveyor_build.sh test" || exit /b 1 +-goto :EOF ++@rem *********************************************************************** ++@rem * * ++@rem * OCaml * ++@rem * * ++@rem * David Allsopp, OCaml Labs, Cambridge. * ++@rem * * ++@rem * Copyright 2017 MetaStack Solutions Ltd. * ++@rem * * ++@rem * All rights reserved. This file is distributed under the terms of * ++@rem * the GNU Lesser General Public License version 2.1, with the * ++@rem * special exception on linking described in the file LICENSE. * ++@rem * * ++@rem *********************************************************************** ++ ++@rem BE CAREFUL ALTERING THIS FILE TO ENSURE THAT ERRORS PROPAGATE ++@rem IF A COMMAND SHOULD FAIL IT PROBABLY NEEDS TO END WITH ++@rem || exit /b 1 ++@rem BASICALLY, DO THE TESTING IN BASH... ++ ++@rem Do not call setlocal! ++@echo off ++ ++goto %1 ++ ++goto :EOF ++ ++:CheckPackage ++"%CYG_ROOT%\bin\bash.exe" -lc "cygcheck -dc %1" | findstr %1 > nul ++if %ERRORLEVEL% equ 1 ( ++ echo Cygwin package %1 will be installed ++ set CYGWIN_INSTALL_PACKAGES=%CYGWIN_INSTALL_PACKAGES%,%1 ++) ++goto :EOF ++ ++:UpgradeCygwin ++if "%CYGWIN_INSTALL_PACKAGES%" neq "" "%CYG_ROOT%\setup-x86_64.exe" --quiet-mode --no-shortcuts --no-startmenu --no-desktop --only-site --root "%CYG_ROOT%" --site "%CYG_MIRROR%" --local-package-dir "%CYG_CACHE%" --packages %CYGWIN_INSTALL_PACKAGES:~1% > nul ++for %%P in (%CYGWIN_COMMANDS%) do "%CYG_ROOT%\bin\%%P.exe" --version > nul || set CYGWIN_UPGRADE_REQUIRED=1 ++"%CYG_ROOT%\bin\bash.exe" -lc "cygcheck -dc %CYGWIN_PACKAGES%" ++if %CYGWIN_UPGRADE_REQUIRED% equ 1 ( ++ echo Cygwin package upgrade required - please go and drink coffee ++ "%CYG_ROOT%\setup-x86_64.exe" --quiet-mode --no-shortcuts --no-startmenu --no-desktop --only-site --root "%CYG_ROOT%" --site "%CYG_MIRROR%" --local-package-dir "%CYG_CACHE%" --upgrade-also > nul ++ "%CYG_ROOT%\bin\bash.exe" -lc "cygcheck -dc %CYGWIN_PACKAGES%" ++) ++goto :EOF ++ ++:install ++chcp 65001 > nul ++rem This must be kept in sync with appveyor_build.sh ++set BUILD_PREFIX=🐫реализация ++git worktree add "..\%BUILD_PREFIX%-%PORT%" -b appveyor-build-%PORT% ++if "%PORT%" equ "msvc64" ( ++ git worktree add "..\%BUILD_PREFIX%-msvc32" -b appveyor-build-%PORT%32 ++) ++ ++cd "..\%BUILD_PREFIX%-%PORT%" ++if "%PORT%" equ "mingw32" ( ++ git submodule update --init flexdll ++) ++ ++cd "%APPVEYOR_BUILD_FOLDER%" ++appveyor DownloadFile "https://github.com/alainfrisch/flexdll/archive/0.37.tar.gz" -FileName "flexdll.tar.gz" || exit /b 1 ++appveyor DownloadFile "https://github.com/alainfrisch/flexdll/releases/download/0.37/flexdll-bin-0.37.zip" -FileName "flexdll.zip" || exit /b 1 ++rem flexdll.zip is processed here, rather than in appveyor_build.sh because the ++rem unzip command comes from MSYS2 (via Git for Windows) and it has to be ++rem invoked via cmd /c in a bash script which is weird(er). ++mkdir "%APPVEYOR_BUILD_FOLDER%\..\flexdll" ++move flexdll.zip "%APPVEYOR_BUILD_FOLDER%\..\flexdll" ++cd "%APPVEYOR_BUILD_FOLDER%\..\flexdll" && unzip -q flexdll.zip ++ ++rem CYGWIN_PACKAGES is the list of required Cygwin packages (cygwin is included ++rem in the list just so that the Cygwin version is always displayed on the log). ++rem CYGWIN_COMMANDS is a corresponding command to run with --version to test ++rem whether the package works. This is used to verify whether the installation ++rem needs upgrading. ++set CYGWIN_PACKAGES=cygwin make diffutils ++set CYGWIN_COMMANDS=cygcheck make diff ++if "%PORT%" equ "mingw32" ( ++ set CYGWIN_PACKAGES=%CYGWIN_PACKAGES% mingw64-i686-gcc-core ++ set CYGWIN_COMMANDS=%CYGWIN_COMMANDS% i686-w64-mingw32-gcc ++) ++ ++set CYGWIN_INSTALL_PACKAGES= ++set CYGWIN_UPGRADE_REQUIRED=0 ++ ++for %%P in (%CYGWIN_PACKAGES%) do call :CheckPackage %%P ++call :UpgradeCygwin ++ ++"%CYG_ROOT%\bin\bash.exe" -lec "$APPVEYOR_BUILD_FOLDER/tools/ci/appveyor/appveyor_build.sh install" || exit /b 1 ++ ++goto :EOF ++ ++:build ++if "%PORT%" equ "msvc64" ( ++ setlocal ++ call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat" ++) ++rem Do the main build (either msvc64 or mingw32) ++"%CYG_ROOT%\bin\bash.exe" -lec "$APPVEYOR_BUILD_FOLDER/tools/ci/appveyor/appveyor_build.sh" || exit /b 1 ++ ++if "%PORT%" neq "msvc64" goto :EOF ++ ++rem Reconfigure the environment and run the msvc32 partial build ++endlocal ++call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x86 ++"%CYG_ROOT%\bin\bash.exe" -lec "$APPVEYOR_BUILD_FOLDER/tools/ci/appveyor/appveyor_build.sh msvc32-only" || exit /b 1 ++goto :EOF ++ ++:test ++rem Reconfigure the environment for the msvc64 build ++call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat" ++"%CYG_ROOT%\bin\bash.exe" -lec "$APPVEYOR_BUILD_FOLDER/tools/ci/appveyor/appveyor_build.sh test" || exit /b 1 ++goto :EOF diff -Nru ocaml-4.08.1/debian/patches/series ocaml-4.08.1/debian/patches/series --- ocaml-4.08.1/debian/patches/series 2019-11-08 10:43:37.000000000 +0000 +++ ocaml-4.08.1/debian/patches/series 2019-11-25 01:15:30.000000000 +0000 @@ -3,3 +3,4 @@ 0013-Use-CCLINKFLAGS-for-linking-all-executables-and-shar.patch 0005-Check-for-definition-of-AT_SECURE-before-using-it.patch 0008-Reimplement-custom-without-hacks.patch +auto-4.08.1-4+rpi1-d4ee53f4051d7be783e37d2b5109b87169db4194-1574728847 diff -Nru ocaml-4.08.1/debian/rules ocaml-4.08.1/debian/rules --- ocaml-4.08.1/debian/rules 2019-11-08 10:43:37.000000000 +0000 +++ ocaml-4.08.1/debian/rules 2019-11-25 01:15:30.000000000 +0000 @@ -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) @@ -53,8 +55,19 @@ export DEB_BUILD_MAINT_OPTIONS=hardening=+bindnow export CCLINKFLAGS=$(shell dpkg-buildflags --get LDFLAGS) -CONFIGURE_OPTS := \ - --host $(DEB_BUILD_GNU_TYPE)\ +ifeq ($(DEB_BUILD_ARCH),armhf) + IS_RASPBIAN := $(shell dpkg-vendor --derives-from Raspbian && echo yes || echo no) +else + IS_RASPBIAN := no +endif + +ifeq ($(IS_RASPBIAN),yes) + CONFIGURE_OPTS := --host armv6-unknown-linux-gnueabihf +else + CONFIGURE_OPTS := --host $(DEB_BUILD_GNU_TYPE) +endif + +CONFIGURE_OPTS += \ -prefix $(DEB_TEST_BUILD_PREFIX)/usr \ -libdir $(DEB_TEST_BUILD_PREFIX)$(OCAML_STDLIB_DIR) \ --with-x \ @@ -88,6 +101,10 @@ 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 ] && \ @@ -178,6 +195,7 @@ 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