2018-11-08 01:51:56 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2020-04-24 17:34:25 +00:00
|
|
|
set -e
|
|
|
|
|
2018-11-08 01:51:56 +00:00
|
|
|
usage()
|
|
|
|
{
|
Update dependencies from https://github.com/dotnet/arcade build 20220422.4
Microsoft.DotNet.CMake.Sdk , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Arcade.Sdk
From Version 7.0.0-beta.22215.2 -> To Version 7.0.0-beta.22222.4
Dependency coherency updates
Microsoft.NETCore.App.Ref,VS.Redist.Common.NetCore.TargetingPack.x64.7.0,Microsoft.NETCore.App.Runtime.win-x64,Microsoft.NETCore.App.Host.win-x64,Microsoft.NETCore.DotNetHostResolver,Microsoft.NETCore.Platforms,Microsoft.Net.Compilers.Toolset,VS.Redist.Common.NetCore.SharedFramework.x64.7.0,Microsoft.SourceLink.GitHub,Microsoft.DotNet.XliffTasks
From Version 7.0.0-preview.4.22217.5 -> To Version 7.0.0-preview.4.22216.4 (parent: Microsoft.NET.Sdk
2022-04-23 12:31:11 +00:00
|
|
|
echo "Usage: $0 [BuildArch] [CodeName] [lldbx.y] [llvmx[.y]] [--skipunmount] --rootfsdir <directory>]"
|
2022-07-29 12:36:00 +00:00
|
|
|
echo "BuildArch can be: arm(default), arm64, armel, armv6, ppc64le, riscv64, s390x, x64, x86"
|
2023-02-21 21:42:30 +00:00
|
|
|
echo "CodeName - optional, Code name for Linux, can be: xenial(default), zesty, bionic, alpine"
|
|
|
|
echo " for alpine can be specified with version: alpineX.YY or alpineedge"
|
|
|
|
echo " for FreeBSD can be: freebsd12, freebsd13"
|
|
|
|
echo " for illumos can be: illumos"
|
|
|
|
echo " for Haiku can be: haiku."
|
2021-08-06 20:18:02 +00:00
|
|
|
echo "lldbx.y - optional, LLDB version, can be: lldb3.9(default), lldb4.0, lldb5.0, lldb6.0 no-lldb. Ignored for alpine and FreeBSD"
|
Update dependencies from https://github.com/dotnet/arcade build 20220422.4
Microsoft.DotNet.CMake.Sdk , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Arcade.Sdk
From Version 7.0.0-beta.22215.2 -> To Version 7.0.0-beta.22222.4
Dependency coherency updates
Microsoft.NETCore.App.Ref,VS.Redist.Common.NetCore.TargetingPack.x64.7.0,Microsoft.NETCore.App.Runtime.win-x64,Microsoft.NETCore.App.Host.win-x64,Microsoft.NETCore.DotNetHostResolver,Microsoft.NETCore.Platforms,Microsoft.Net.Compilers.Toolset,VS.Redist.Common.NetCore.SharedFramework.x64.7.0,Microsoft.SourceLink.GitHub,Microsoft.DotNet.XliffTasks
From Version 7.0.0-preview.4.22217.5 -> To Version 7.0.0-preview.4.22216.4 (parent: Microsoft.NET.Sdk
2022-04-23 12:31:11 +00:00
|
|
|
echo "llvmx[.y] - optional, LLVM version for LLVM related packages."
|
2018-11-08 01:51:56 +00:00
|
|
|
echo "--skipunmount - optional, will skip the unmount of rootfs folder."
|
2023-03-24 17:13:12 +00:00
|
|
|
echo "--skipsigcheck - optional, will skip package signature checks (allowing untrusted packages)."
|
2020-06-11 17:47:07 +00:00
|
|
|
echo "--use-mirror - optional, use mirror URL to fetch resources, when available."
|
2022-08-11 12:40:33 +00:00
|
|
|
echo "--jobs N - optional, restrict to N jobs."
|
2018-11-08 01:51:56 +00:00
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
2020-03-31 13:04:58 +00:00
|
|
|
__CodeName=xenial
|
2018-11-08 01:51:56 +00:00
|
|
|
__CrossDir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
|
|
|
__BuildArch=arm
|
2020-04-24 17:34:25 +00:00
|
|
|
__AlpineArch=armv7
|
2022-07-15 18:56:08 +00:00
|
|
|
__FreeBSDArch=arm
|
|
|
|
__FreeBSDMachineArch=armv7
|
|
|
|
__IllumosArch=arm7
|
2023-05-12 16:01:32 +00:00
|
|
|
__HaikuArch=arm
|
2020-04-24 17:34:25 +00:00
|
|
|
__QEMUArch=arm
|
2018-11-08 01:51:56 +00:00
|
|
|
__UbuntuArch=armhf
|
|
|
|
__UbuntuRepo="http://ports.ubuntu.com/"
|
2019-05-08 12:25:49 +00:00
|
|
|
__LLDB_Package="liblldb-3.9-dev"
|
2018-11-08 01:51:56 +00:00
|
|
|
__SkipUnmount=0
|
|
|
|
|
|
|
|
# base development support
|
|
|
|
__UbuntuPackages="build-essential"
|
|
|
|
|
|
|
|
__AlpinePackages="alpine-base"
|
|
|
|
__AlpinePackages+=" build-base"
|
|
|
|
__AlpinePackages+=" linux-headers"
|
2021-09-14 13:05:57 +00:00
|
|
|
__AlpinePackages+=" lldb-dev"
|
|
|
|
__AlpinePackages+=" python3"
|
|
|
|
__AlpinePackages+=" libedit"
|
2018-11-08 01:51:56 +00:00
|
|
|
|
|
|
|
# symlinks fixer
|
|
|
|
__UbuntuPackages+=" symlinks"
|
|
|
|
|
2022-07-28 12:36:53 +00:00
|
|
|
# runtime dependencies
|
2018-11-08 01:51:56 +00:00
|
|
|
__UbuntuPackages+=" libicu-dev"
|
|
|
|
__UbuntuPackages+=" liblttng-ust-dev"
|
|
|
|
__UbuntuPackages+=" libunwind8-dev"
|
2023-01-18 10:18:03 +00:00
|
|
|
__UbuntuPackages+=" libnuma-dev"
|
2018-11-08 01:51:56 +00:00
|
|
|
|
|
|
|
__AlpinePackages+=" gettext-dev"
|
|
|
|
__AlpinePackages+=" icu-dev"
|
|
|
|
__AlpinePackages+=" libunwind-dev"
|
|
|
|
__AlpinePackages+=" lttng-ust-dev"
|
2023-03-02 13:20:38 +00:00
|
|
|
__AlpinePackages+=" compiler-rt"
|
2023-01-18 10:18:03 +00:00
|
|
|
__AlpinePackages+=" numactl-dev"
|
2018-11-08 01:51:56 +00:00
|
|
|
|
2022-07-28 12:36:53 +00:00
|
|
|
# runtime libraries' dependencies
|
2018-11-08 01:51:56 +00:00
|
|
|
__UbuntuPackages+=" libcurl4-openssl-dev"
|
|
|
|
__UbuntuPackages+=" libkrb5-dev"
|
|
|
|
__UbuntuPackages+=" libssl-dev"
|
|
|
|
__UbuntuPackages+=" zlib1g-dev"
|
|
|
|
|
|
|
|
__AlpinePackages+=" curl-dev"
|
|
|
|
__AlpinePackages+=" krb5-dev"
|
|
|
|
__AlpinePackages+=" openssl-dev"
|
|
|
|
__AlpinePackages+=" zlib-dev"
|
|
|
|
|
2023-04-22 12:13:31 +00:00
|
|
|
__FreeBSDBase="12.4-RELEASE"
|
2022-01-26 18:30:11 +00:00
|
|
|
__FreeBSDPkg="1.17.0"
|
2021-08-06 20:18:02 +00:00
|
|
|
__FreeBSDABI="12"
|
2020-03-31 13:04:58 +00:00
|
|
|
__FreeBSDPackages="libunwind"
|
|
|
|
__FreeBSDPackages+=" icu"
|
|
|
|
__FreeBSDPackages+=" libinotify"
|
2022-01-26 18:30:11 +00:00
|
|
|
__FreeBSDPackages+=" openssl"
|
2020-03-31 13:04:58 +00:00
|
|
|
__FreeBSDPackages+=" krb5"
|
2021-08-06 20:18:02 +00:00
|
|
|
__FreeBSDPackages+=" terminfo-db"
|
2020-03-31 13:04:58 +00:00
|
|
|
|
2022-08-17 12:42:25 +00:00
|
|
|
__IllumosPackages="icu"
|
|
|
|
__IllumosPackages+=" mit-krb5"
|
|
|
|
__IllumosPackages+=" openssl"
|
|
|
|
__IllumosPackages+=" zlib"
|
2020-06-11 17:47:07 +00:00
|
|
|
|
2023-05-12 16:01:32 +00:00
|
|
|
__HaikuPackages="gcc_syslibs"
|
|
|
|
__HaikuPackages+=" gcc_syslibs_devel"
|
|
|
|
__HaikuPackages+=" gmp"
|
2022-08-11 12:40:33 +00:00
|
|
|
__HaikuPackages+=" gmp_devel"
|
2023-05-12 16:01:32 +00:00
|
|
|
__HaikuPackages+=" icu66"
|
|
|
|
__HaikuPackages+=" icu66_devel"
|
2022-08-11 12:40:33 +00:00
|
|
|
__HaikuPackages+=" krb5"
|
|
|
|
__HaikuPackages+=" krb5_devel"
|
|
|
|
__HaikuPackages+=" libiconv"
|
|
|
|
__HaikuPackages+=" libiconv_devel"
|
|
|
|
__HaikuPackages+=" llvm12_libunwind"
|
|
|
|
__HaikuPackages+=" llvm12_libunwind_devel"
|
|
|
|
__HaikuPackages+=" mpfr"
|
|
|
|
__HaikuPackages+=" mpfr_devel"
|
2023-05-12 16:01:32 +00:00
|
|
|
__HaikuPackages+=" openssl"
|
|
|
|
__HaikuPackages+=" openssl_devel"
|
|
|
|
__HaikuPackages+=" zlib"
|
|
|
|
__HaikuPackages+=" zlib_devel"
|
2022-08-11 12:40:33 +00:00
|
|
|
|
2021-05-05 13:06:29 +00:00
|
|
|
# ML.NET dependencies
|
|
|
|
__UbuntuPackages+=" libomp5"
|
|
|
|
__UbuntuPackages+=" libomp-dev"
|
|
|
|
|
2023-03-24 17:13:12 +00:00
|
|
|
# Taken from https://github.com/alpinelinux/alpine-chroot-install/blob/6d08f12a8a70dd9b9dc7d997c88aa7789cc03c42/alpine-chroot-install#L85-L133
|
|
|
|
__AlpineKeys='
|
|
|
|
4a6a0840:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1yHJxQgsHQREclQu4Ohe\nqxTxd1tHcNnvnQTu/UrTky8wWvgXT+jpveroeWWnzmsYlDI93eLI2ORakxb3gA2O\nQ0Ry4ws8vhaxLQGC74uQR5+/yYrLuTKydFzuPaS1dK19qJPXB8GMdmFOijnXX4SA\njixuHLe1WW7kZVtjL7nufvpXkWBGjsfrvskdNA/5MfxAeBbqPgaq0QMEfxMAn6/R\nL5kNepi/Vr4S39Xvf2DzWkTLEK8pcnjNkt9/aafhWqFVW7m3HCAII6h/qlQNQKSo\nGuH34Q8GsFG30izUENV9avY7hSLq7nggsvknlNBZtFUcmGoQrtx3FmyYsIC8/R+B\nywIDAQAB
|
|
|
|
5243ef4b:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvNijDxJ8kloskKQpJdx+\nmTMVFFUGDoDCbulnhZMJoKNkSuZOzBoFC94omYPtxnIcBdWBGnrm6ncbKRlR+6o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xhkfe8H5n1Et4VAorkpEAXdsfN8KSVv\nLSMazVlLp9GYq5SUpqYX3KnxdWBgN7BJoZ4sltsTpHQ/34SXWfu3UmyUveWj7wp0\nx9hwsPirVI00EEea9AbP7NM2rAyu6ukcm4m6ATd2DZJIViq2es6m60AE6SMCmrQF\nwmk4H/kdQgeAELVfGOm2VyJ3z69fQuywz7xu27S6zTKi05Qlnohxol4wVb6OB7qG\nLPRtK9ObgzRo/OPumyXqlzAi/Yvyd1ZQk8labZps3e16bQp8+pVPiumWioMFJDWV\nGZjCmyMSU8V6MB6njbgLHoyg2LCukCAeSjbPGGGYhnKLm1AKSoJh3IpZuqcKCk5C\n8CM1S15HxV78s9dFntEqIokCAwEAAQ==
|
|
|
|
'
|
2022-07-28 12:36:53 +00:00
|
|
|
__Keyring=
|
2023-03-24 17:13:12 +00:00
|
|
|
__SkipSigCheck=0
|
2020-06-11 17:47:07 +00:00
|
|
|
__UseMirror=0
|
|
|
|
|
2018-11-08 01:51:56 +00:00
|
|
|
__UnprocessedBuildArgs=
|
2019-05-08 12:25:49 +00:00
|
|
|
while :; do
|
2022-07-28 12:36:53 +00:00
|
|
|
if [[ "$#" -le 0 ]]; then
|
2019-05-08 12:25:49 +00:00
|
|
|
break
|
|
|
|
fi
|
|
|
|
|
2022-07-28 12:36:53 +00:00
|
|
|
lowerI="$(echo "$1" | tr "[:upper:]" "[:lower:]")"
|
2018-11-08 01:51:56 +00:00
|
|
|
case $lowerI in
|
2022-07-28 12:36:53 +00:00
|
|
|
-\?|-h|--help)
|
2018-11-08 01:51:56 +00:00
|
|
|
usage
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
arm)
|
|
|
|
__BuildArch=arm
|
|
|
|
__UbuntuArch=armhf
|
2020-04-24 17:34:25 +00:00
|
|
|
__AlpineArch=armv7
|
2018-11-08 01:51:56 +00:00
|
|
|
__QEMUArch=arm
|
|
|
|
;;
|
|
|
|
arm64)
|
|
|
|
__BuildArch=arm64
|
|
|
|
__UbuntuArch=arm64
|
|
|
|
__AlpineArch=aarch64
|
|
|
|
__QEMUArch=aarch64
|
2022-07-15 18:56:08 +00:00
|
|
|
__FreeBSDArch=arm64
|
|
|
|
__FreeBSDMachineArch=aarch64
|
2018-11-08 01:51:56 +00:00
|
|
|
;;
|
|
|
|
armel)
|
|
|
|
__BuildArch=armel
|
|
|
|
__UbuntuArch=armel
|
|
|
|
__UbuntuRepo="http://ftp.debian.org/debian/"
|
2020-03-31 13:04:58 +00:00
|
|
|
__CodeName=jessie
|
2018-11-08 01:51:56 +00:00
|
|
|
;;
|
2022-07-29 12:36:00 +00:00
|
|
|
armv6)
|
|
|
|
__BuildArch=armv6
|
|
|
|
__UbuntuArch=armhf
|
|
|
|
__QEMUArch=arm
|
|
|
|
__UbuntuRepo="http://raspbian.raspberrypi.org/raspbian/"
|
|
|
|
__CodeName=buster
|
|
|
|
__LLDB_Package="liblldb-6.0-dev"
|
|
|
|
|
|
|
|
if [[ -e "/usr/share/keyrings/raspbian-archive-keyring.gpg" ]]; then
|
|
|
|
__Keyring="--keyring /usr/share/keyrings/raspbian-archive-keyring.gpg"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
riscv64)
|
|
|
|
__BuildArch=riscv64
|
2023-02-21 21:42:30 +00:00
|
|
|
__AlpineArch=riscv64
|
|
|
|
__AlpinePackages="${__AlpinePackages// lldb-dev/}"
|
|
|
|
__QEMUArch=riscv64
|
2022-07-29 12:36:00 +00:00
|
|
|
__UbuntuArch=riscv64
|
2024-01-10 16:23:12 +00:00
|
|
|
__UbuntuRepo="http://deb.debian.org/debian"
|
2023-01-18 10:18:03 +00:00
|
|
|
__UbuntuPackages="${__UbuntuPackages// libunwind8-dev/}"
|
2022-07-29 12:36:00 +00:00
|
|
|
unset __LLDB_Package
|
|
|
|
|
2024-01-10 16:23:12 +00:00
|
|
|
if [[ -e "/usr/share/keyrings/debian-archive-keyring.gpg" ]]; then
|
|
|
|
__Keyring="--keyring /usr/share/keyrings/debian-archive-keyring.gpg --include=debian-archive-keyring"
|
2022-07-29 12:36:00 +00:00
|
|
|
fi
|
2023-02-21 21:42:30 +00:00
|
|
|
;;
|
|
|
|
ppc64le)
|
|
|
|
__BuildArch=ppc64le
|
|
|
|
__AlpineArch=ppc64le
|
|
|
|
__QEMUArch=ppc64le
|
|
|
|
__UbuntuArch=ppc64el
|
|
|
|
__UbuntuRepo="http://ports.ubuntu.com/ubuntu-ports/"
|
|
|
|
__UbuntuPackages="${__UbuntuPackages// libunwind8-dev/}"
|
|
|
|
__UbuntuPackages="${__UbuntuPackages// libomp-dev/}"
|
|
|
|
__UbuntuPackages="${__UbuntuPackages// libomp5/}"
|
|
|
|
unset __LLDB_Package
|
2022-07-29 12:36:00 +00:00
|
|
|
;;
|
2020-10-29 12:58:51 +00:00
|
|
|
s390x)
|
|
|
|
__BuildArch=s390x
|
2023-02-21 21:42:30 +00:00
|
|
|
__AlpineArch=s390x
|
|
|
|
__QEMUArch=s390x
|
2020-10-29 12:58:51 +00:00
|
|
|
__UbuntuArch=s390x
|
|
|
|
__UbuntuRepo="http://ports.ubuntu.com/ubuntu-ports/"
|
2023-01-18 10:18:03 +00:00
|
|
|
__UbuntuPackages="${__UbuntuPackages// libunwind8-dev/}"
|
|
|
|
__UbuntuPackages="${__UbuntuPackages// libomp-dev/}"
|
|
|
|
__UbuntuPackages="${__UbuntuPackages// libomp5/}"
|
2020-10-29 12:58:51 +00:00
|
|
|
unset __LLDB_Package
|
|
|
|
;;
|
2022-07-15 18:56:08 +00:00
|
|
|
x64)
|
|
|
|
__BuildArch=x64
|
2023-03-24 17:13:12 +00:00
|
|
|
__AlpineArch=x86_64
|
2022-07-15 18:56:08 +00:00
|
|
|
__UbuntuArch=amd64
|
|
|
|
__FreeBSDArch=amd64
|
|
|
|
__FreeBSDMachineArch=amd64
|
|
|
|
__illumosArch=x86_64
|
2023-05-12 16:01:32 +00:00
|
|
|
__HaikuArch=x86_64
|
2023-03-24 17:13:12 +00:00
|
|
|
__UbuntuRepo="http://archive.ubuntu.com/ubuntu/"
|
2022-07-15 18:56:08 +00:00
|
|
|
;;
|
2018-11-08 01:51:56 +00:00
|
|
|
x86)
|
|
|
|
__BuildArch=x86
|
|
|
|
__UbuntuArch=i386
|
2023-03-02 13:20:38 +00:00
|
|
|
__AlpineArch=x86
|
2018-11-08 01:51:56 +00:00
|
|
|
__UbuntuRepo="http://archive.ubuntu.com/ubuntu/"
|
|
|
|
;;
|
2022-08-29 12:23:29 +00:00
|
|
|
lldb*)
|
|
|
|
version="${lowerI/lldb/}"
|
|
|
|
parts=(${version//./ })
|
|
|
|
|
|
|
|
# for versions > 6.0, lldb has dropped the minor version
|
|
|
|
if [[ "${parts[0]}" -gt 6 ]]; then
|
|
|
|
version="${parts[0]}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
__LLDB_Package="liblldb-${version}-dev"
|
2019-05-08 12:25:49 +00:00
|
|
|
;;
|
2018-11-08 01:51:56 +00:00
|
|
|
no-lldb)
|
|
|
|
unset __LLDB_Package
|
|
|
|
;;
|
Update dependencies from https://github.com/dotnet/arcade build 20220422.4
Microsoft.DotNet.CMake.Sdk , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Arcade.Sdk
From Version 7.0.0-beta.22215.2 -> To Version 7.0.0-beta.22222.4
Dependency coherency updates
Microsoft.NETCore.App.Ref,VS.Redist.Common.NetCore.TargetingPack.x64.7.0,Microsoft.NETCore.App.Runtime.win-x64,Microsoft.NETCore.App.Host.win-x64,Microsoft.NETCore.DotNetHostResolver,Microsoft.NETCore.Platforms,Microsoft.Net.Compilers.Toolset,VS.Redist.Common.NetCore.SharedFramework.x64.7.0,Microsoft.SourceLink.GitHub,Microsoft.DotNet.XliffTasks
From Version 7.0.0-preview.4.22217.5 -> To Version 7.0.0-preview.4.22216.4 (parent: Microsoft.NET.Sdk
2022-04-23 12:31:11 +00:00
|
|
|
llvm*)
|
2022-08-29 12:23:29 +00:00
|
|
|
version="${lowerI/llvm/}"
|
Update dependencies from https://github.com/dotnet/arcade build 20220422.4
Microsoft.DotNet.CMake.Sdk , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Arcade.Sdk
From Version 7.0.0-beta.22215.2 -> To Version 7.0.0-beta.22222.4
Dependency coherency updates
Microsoft.NETCore.App.Ref,VS.Redist.Common.NetCore.TargetingPack.x64.7.0,Microsoft.NETCore.App.Runtime.win-x64,Microsoft.NETCore.App.Host.win-x64,Microsoft.NETCore.DotNetHostResolver,Microsoft.NETCore.Platforms,Microsoft.Net.Compilers.Toolset,VS.Redist.Common.NetCore.SharedFramework.x64.7.0,Microsoft.SourceLink.GitHub,Microsoft.DotNet.XliffTasks
From Version 7.0.0-preview.4.22217.5 -> To Version 7.0.0-preview.4.22216.4 (parent: Microsoft.NET.Sdk
2022-04-23 12:31:11 +00:00
|
|
|
parts=(${version//./ })
|
|
|
|
__LLVM_MajorVersion="${parts[0]}"
|
|
|
|
__LLVM_MinorVersion="${parts[1]}"
|
2022-08-29 12:23:29 +00:00
|
|
|
|
|
|
|
# for versions > 6.0, llvm has dropped the minor version
|
Update dependencies from https://github.com/dotnet/arcade build 20220422.4
Microsoft.DotNet.CMake.Sdk , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Arcade.Sdk
From Version 7.0.0-beta.22215.2 -> To Version 7.0.0-beta.22222.4
Dependency coherency updates
Microsoft.NETCore.App.Ref,VS.Redist.Common.NetCore.TargetingPack.x64.7.0,Microsoft.NETCore.App.Runtime.win-x64,Microsoft.NETCore.App.Host.win-x64,Microsoft.NETCore.DotNetHostResolver,Microsoft.NETCore.Platforms,Microsoft.Net.Compilers.Toolset,VS.Redist.Common.NetCore.SharedFramework.x64.7.0,Microsoft.SourceLink.GitHub,Microsoft.DotNet.XliffTasks
From Version 7.0.0-preview.4.22217.5 -> To Version 7.0.0-preview.4.22216.4 (parent: Microsoft.NET.Sdk
2022-04-23 12:31:11 +00:00
|
|
|
if [[ -z "$__LLVM_MinorVersion" && "$__LLVM_MajorVersion" -le 6 ]]; then
|
|
|
|
__LLVM_MinorVersion=0;
|
|
|
|
fi
|
|
|
|
;;
|
2019-05-15 12:11:39 +00:00
|
|
|
xenial) # Ubuntu 16.04
|
2022-07-28 12:36:53 +00:00
|
|
|
if [[ "$__CodeName" != "jessie" ]]; then
|
2020-03-31 13:04:58 +00:00
|
|
|
__CodeName=xenial
|
2018-11-08 01:51:56 +00:00
|
|
|
fi
|
|
|
|
;;
|
2019-05-15 12:11:39 +00:00
|
|
|
zesty) # Ubuntu 17.04
|
2022-07-28 12:36:53 +00:00
|
|
|
if [[ "$__CodeName" != "jessie" ]]; then
|
2020-03-31 13:04:58 +00:00
|
|
|
__CodeName=zesty
|
2018-11-08 01:51:56 +00:00
|
|
|
fi
|
|
|
|
;;
|
2019-05-08 12:25:49 +00:00
|
|
|
bionic) # Ubuntu 18.04
|
2022-07-28 12:36:53 +00:00
|
|
|
if [[ "$__CodeName" != "jessie" ]]; then
|
2020-03-31 13:04:58 +00:00
|
|
|
__CodeName=bionic
|
2018-11-08 01:51:56 +00:00
|
|
|
fi
|
|
|
|
;;
|
2022-08-29 12:23:29 +00:00
|
|
|
focal) # Ubuntu 20.04
|
|
|
|
if [[ "$__CodeName" != "jessie" ]]; then
|
|
|
|
__CodeName=focal
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
jammy) # Ubuntu 22.04
|
|
|
|
if [[ "$__CodeName" != "jessie" ]]; then
|
|
|
|
__CodeName=jammy
|
|
|
|
fi
|
|
|
|
;;
|
2019-05-08 12:25:49 +00:00
|
|
|
jessie) # Debian 8
|
2020-03-31 13:04:58 +00:00
|
|
|
__CodeName=jessie
|
2023-02-24 13:19:13 +00:00
|
|
|
|
|
|
|
if [[ -z "$__UbuntuRepo" ]]; then
|
|
|
|
__UbuntuRepo="http://ftp.debian.org/debian/"
|
|
|
|
fi
|
2018-11-08 01:51:56 +00:00
|
|
|
;;
|
2019-05-15 12:11:39 +00:00
|
|
|
stretch) # Debian 9
|
2020-03-31 13:04:58 +00:00
|
|
|
__CodeName=stretch
|
2019-05-15 12:11:39 +00:00
|
|
|
__LLDB_Package="liblldb-6.0-dev"
|
2023-02-24 13:19:13 +00:00
|
|
|
|
|
|
|
if [[ -z "$__UbuntuRepo" ]]; then
|
|
|
|
__UbuntuRepo="http://ftp.debian.org/debian/"
|
|
|
|
fi
|
2019-05-15 12:11:39 +00:00
|
|
|
;;
|
|
|
|
buster) # Debian 10
|
2020-03-31 13:04:58 +00:00
|
|
|
__CodeName=buster
|
2019-05-15 12:11:39 +00:00
|
|
|
__LLDB_Package="liblldb-6.0-dev"
|
2023-02-24 13:19:13 +00:00
|
|
|
|
|
|
|
if [[ -z "$__UbuntuRepo" ]]; then
|
|
|
|
__UbuntuRepo="http://ftp.debian.org/debian/"
|
|
|
|
fi
|
2019-05-15 12:11:39 +00:00
|
|
|
;;
|
2023-02-21 21:42:30 +00:00
|
|
|
bullseye) # Debian 11
|
|
|
|
__CodeName=bullseye
|
2023-02-24 13:19:13 +00:00
|
|
|
|
|
|
|
if [[ -z "$__UbuntuRepo" ]]; then
|
|
|
|
__UbuntuRepo="http://ftp.debian.org/debian/"
|
|
|
|
fi
|
2023-02-21 21:42:30 +00:00
|
|
|
;;
|
|
|
|
sid) # Debian sid
|
|
|
|
__CodeName=sid
|
2023-02-24 13:19:13 +00:00
|
|
|
|
|
|
|
if [[ -z "$__UbuntuRepo" ]]; then
|
|
|
|
__UbuntuRepo="http://ftp.debian.org/debian/"
|
|
|
|
fi
|
2023-02-21 21:42:30 +00:00
|
|
|
;;
|
2018-11-08 01:51:56 +00:00
|
|
|
tizen)
|
2020-03-31 13:04:58 +00:00
|
|
|
__CodeName=
|
2018-11-08 01:51:56 +00:00
|
|
|
__UbuntuRepo=
|
|
|
|
__Tizen=tizen
|
|
|
|
;;
|
2023-02-21 21:42:30 +00:00
|
|
|
alpine*)
|
2020-03-31 13:04:58 +00:00
|
|
|
__CodeName=alpine
|
2018-11-08 01:51:56 +00:00
|
|
|
__UbuntuRepo=
|
2023-02-21 21:42:30 +00:00
|
|
|
version="${lowerI/alpine/}"
|
|
|
|
|
|
|
|
if [[ "$version" == "edge" ]]; then
|
|
|
|
__AlpineVersion=edge
|
|
|
|
else
|
|
|
|
parts=(${version//./ })
|
|
|
|
__AlpineMajorVersion="${parts[0]}"
|
|
|
|
__AlpineMinoVersion="${parts[1]}"
|
2023-03-02 13:20:38 +00:00
|
|
|
__AlpineVersion="$__AlpineMajorVersion.$__AlpineMinoVersion"
|
2023-02-21 21:42:30 +00:00
|
|
|
fi
|
2018-11-08 01:51:56 +00:00
|
|
|
;;
|
2020-03-31 13:04:58 +00:00
|
|
|
freebsd12)
|
|
|
|
__CodeName=freebsd
|
|
|
|
__SkipUnmount=1
|
|
|
|
;;
|
2021-08-06 20:18:02 +00:00
|
|
|
freebsd13)
|
|
|
|
__CodeName=freebsd
|
2023-04-27 14:35:39 +00:00
|
|
|
__FreeBSDBase="13.2-RELEASE"
|
2021-08-06 20:18:02 +00:00
|
|
|
__FreeBSDABI="13"
|
|
|
|
__SkipUnmount=1
|
2021-08-07 13:00:09 +00:00
|
|
|
;;
|
2020-06-11 17:47:07 +00:00
|
|
|
illumos)
|
|
|
|
__CodeName=illumos
|
|
|
|
__SkipUnmount=1
|
|
|
|
;;
|
2022-08-11 12:40:33 +00:00
|
|
|
haiku)
|
|
|
|
__CodeName=haiku
|
|
|
|
__SkipUnmount=1
|
|
|
|
;;
|
2018-11-08 01:51:56 +00:00
|
|
|
--skipunmount)
|
|
|
|
__SkipUnmount=1
|
|
|
|
;;
|
2023-03-24 17:13:12 +00:00
|
|
|
--skipsigcheck)
|
|
|
|
__SkipSigCheck=1
|
|
|
|
;;
|
2019-05-08 12:25:49 +00:00
|
|
|
--rootfsdir|-rootfsdir)
|
|
|
|
shift
|
2022-07-28 12:36:53 +00:00
|
|
|
__RootfsDir="$1"
|
2019-05-08 12:25:49 +00:00
|
|
|
;;
|
2020-06-11 17:47:07 +00:00
|
|
|
--use-mirror)
|
|
|
|
__UseMirror=1
|
|
|
|
;;
|
2022-08-11 12:40:33 +00:00
|
|
|
--use-jobs)
|
|
|
|
shift
|
|
|
|
MAXJOBS=$1
|
|
|
|
;;
|
2018-11-08 01:51:56 +00:00
|
|
|
*)
|
2019-05-08 12:25:49 +00:00
|
|
|
__UnprocessedBuildArgs="$__UnprocessedBuildArgs $1"
|
2018-11-08 01:51:56 +00:00
|
|
|
;;
|
|
|
|
esac
|
2019-05-08 12:25:49 +00:00
|
|
|
|
|
|
|
shift
|
2018-11-08 01:51:56 +00:00
|
|
|
done
|
|
|
|
|
2023-03-02 13:20:38 +00:00
|
|
|
case "$__AlpineVersion" in
|
|
|
|
3.14) __AlpinePackages+=" llvm11-libs" ;;
|
|
|
|
3.15) __AlpinePackages+=" llvm12-libs" ;;
|
|
|
|
3.16) __AlpinePackages+=" llvm13-libs" ;;
|
|
|
|
3.17) __AlpinePackages+=" llvm15-libs" ;;
|
|
|
|
edge) __AlpineLlvmLibsLookup=1 ;;
|
|
|
|
*)
|
|
|
|
if [[ "$__AlpineArch" =~ s390x|ppc64le ]]; then
|
|
|
|
__AlpineVersion=3.15 # minimum version that supports lldb-dev
|
|
|
|
__AlpinePackages+=" llvm12-libs"
|
|
|
|
elif [[ "$__AlpineArch" == "x86" ]]; then
|
|
|
|
__AlpineVersion=3.17 # minimum version that supports lldb-dev
|
|
|
|
__AlpinePackages+=" llvm15-libs"
|
|
|
|
elif [[ "$__AlpineArch" == "riscv64" ]]; then
|
|
|
|
__AlpineLlvmLibsLookup=1
|
|
|
|
__AlpineVersion=edge # minimum version with APKINDEX.tar.gz (packages archive)
|
|
|
|
else
|
|
|
|
__AlpineVersion=3.13 # 3.13 to maximize compatibility
|
|
|
|
__AlpinePackages+=" llvm10-libs"
|
|
|
|
|
|
|
|
if [[ "$__AlpineArch" == "armv7" ]]; then
|
|
|
|
__AlpinePackages="${__AlpinePackages//numactl-dev/}"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
esac
|
|
|
|
|
|
|
|
if [[ "$__AlpineVersion" =~ 3\.1[345] ]]; then
|
|
|
|
# compiler-rt--static was merged in compiler-rt package in alpine 3.16
|
|
|
|
# for older versions, we need compiler-rt--static, so replace the name
|
|
|
|
__AlpinePackages="${__AlpinePackages/compiler-rt/compiler-rt-static}"
|
|
|
|
fi
|
|
|
|
|
2022-07-28 12:36:53 +00:00
|
|
|
if [[ "$__BuildArch" == "armel" ]]; then
|
2018-11-08 01:51:56 +00:00
|
|
|
__LLDB_Package="lldb-3.5-dev"
|
|
|
|
fi
|
2022-07-28 12:36:53 +00:00
|
|
|
|
2023-03-24 17:13:12 +00:00
|
|
|
if [[ "$__CodeName" == "xenial" && "$__UbuntuArch" == "armhf" ]]; then
|
|
|
|
# libnuma-dev is not available on armhf for xenial
|
|
|
|
__UbuntuPackages="${__UbuntuPackages//libnuma-dev/}"
|
|
|
|
fi
|
|
|
|
|
2018-11-08 01:51:56 +00:00
|
|
|
__UbuntuPackages+=" ${__LLDB_Package:-}"
|
|
|
|
|
2022-07-28 12:36:53 +00:00
|
|
|
if [[ -n "$__LLVM_MajorVersion" ]]; then
|
Update dependencies from https://github.com/dotnet/arcade build 20220422.4
Microsoft.DotNet.CMake.Sdk , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Arcade.Sdk
From Version 7.0.0-beta.22215.2 -> To Version 7.0.0-beta.22222.4
Dependency coherency updates
Microsoft.NETCore.App.Ref,VS.Redist.Common.NetCore.TargetingPack.x64.7.0,Microsoft.NETCore.App.Runtime.win-x64,Microsoft.NETCore.App.Host.win-x64,Microsoft.NETCore.DotNetHostResolver,Microsoft.NETCore.Platforms,Microsoft.Net.Compilers.Toolset,VS.Redist.Common.NetCore.SharedFramework.x64.7.0,Microsoft.SourceLink.GitHub,Microsoft.DotNet.XliffTasks
From Version 7.0.0-preview.4.22217.5 -> To Version 7.0.0-preview.4.22216.4 (parent: Microsoft.NET.Sdk
2022-04-23 12:31:11 +00:00
|
|
|
__UbuntuPackages+=" libclang-common-${__LLVM_MajorVersion}${__LLVM_MinorVersion:+.$__LLVM_MinorVersion}-dev"
|
|
|
|
fi
|
|
|
|
|
2022-07-28 12:36:53 +00:00
|
|
|
if [[ -z "$__RootfsDir" && -n "$ROOTFS_DIR" ]]; then
|
|
|
|
__RootfsDir="$ROOTFS_DIR"
|
2018-11-08 01:51:56 +00:00
|
|
|
fi
|
|
|
|
|
2022-07-28 12:36:53 +00:00
|
|
|
if [[ -z "$__RootfsDir" ]]; then
|
2019-06-05 12:10:31 +00:00
|
|
|
__RootfsDir="$__CrossDir/../../../.tools/rootfs/$__BuildArch"
|
2019-05-08 12:25:49 +00:00
|
|
|
fi
|
|
|
|
|
2022-07-28 12:36:53 +00:00
|
|
|
if [[ -d "$__RootfsDir" ]]; then
|
|
|
|
if [[ "$__SkipUnmount" == "0" ]]; then
|
|
|
|
umount "$__RootfsDir"/* || true
|
2018-11-08 01:51:56 +00:00
|
|
|
fi
|
2022-07-28 12:36:53 +00:00
|
|
|
rm -rf "$__RootfsDir"
|
2018-11-08 01:51:56 +00:00
|
|
|
fi
|
|
|
|
|
2022-07-28 12:36:53 +00:00
|
|
|
mkdir -p "$__RootfsDir"
|
2020-06-11 17:47:07 +00:00
|
|
|
__RootfsDir="$( cd "$__RootfsDir" && pwd )"
|
|
|
|
|
2020-03-31 13:04:58 +00:00
|
|
|
if [[ "$__CodeName" == "alpine" ]]; then
|
2023-02-21 21:42:30 +00:00
|
|
|
__ApkToolsVersion=2.12.11
|
2023-03-24 17:13:12 +00:00
|
|
|
__ApkToolsSHA512SUM=53e57b49230da07ef44ee0765b9592580308c407a8d4da7125550957bb72cb59638e04f8892a18b584451c8d841d1c7cb0f0ab680cc323a3015776affaa3be33
|
2022-07-28 12:36:53 +00:00
|
|
|
__ApkToolsDir="$(mktemp -d)"
|
2023-03-24 17:13:12 +00:00
|
|
|
__ApkKeysDir="$(mktemp -d)"
|
2023-02-21 21:42:30 +00:00
|
|
|
|
|
|
|
wget "https://gitlab.alpinelinux.org/api/v4/projects/5/packages/generic//v$__ApkToolsVersion/x86_64/apk.static" -P "$__ApkToolsDir"
|
2023-03-24 17:13:12 +00:00
|
|
|
echo "$__ApkToolsSHA512SUM $__ApkToolsDir/apk.static" | sha512sum -c
|
2023-02-21 21:42:30 +00:00
|
|
|
chmod +x "$__ApkToolsDir/apk.static"
|
|
|
|
|
2023-03-24 17:13:12 +00:00
|
|
|
if [[ -f "/usr/bin/qemu-$__QEMUArch-static" ]]; then
|
|
|
|
mkdir -p "$__RootfsDir"/usr/bin
|
|
|
|
cp -v "/usr/bin/qemu-$__QEMUArch-static" "$__RootfsDir/usr/bin"
|
|
|
|
fi
|
2020-01-22 13:31:03 +00:00
|
|
|
|
2023-02-21 21:42:30 +00:00
|
|
|
if [[ "$__AlpineVersion" == "edge" ]]; then
|
|
|
|
version=edge
|
|
|
|
else
|
|
|
|
version="v$__AlpineVersion"
|
|
|
|
fi
|
|
|
|
|
2023-03-24 17:13:12 +00:00
|
|
|
for line in $__AlpineKeys; do
|
|
|
|
id="${line%%:*}"
|
|
|
|
content="${line#*:}"
|
|
|
|
|
|
|
|
echo -e "-----BEGIN PUBLIC KEY-----\n$content\n-----END PUBLIC KEY-----" > "$__ApkKeysDir/alpine-devel@lists.alpinelinux.org-$id.rsa.pub"
|
|
|
|
done
|
|
|
|
|
|
|
|
if [[ "$__SkipSigCheck" == "1" ]]; then
|
|
|
|
__ApkSignatureArg="--allow-untrusted"
|
|
|
|
else
|
|
|
|
__ApkSignatureArg="--keys-dir $__ApkKeysDir"
|
|
|
|
fi
|
|
|
|
|
2023-03-02 13:20:38 +00:00
|
|
|
# initialize DB
|
2023-02-21 21:42:30 +00:00
|
|
|
"$__ApkToolsDir/apk.static" \
|
|
|
|
-X "http://dl-cdn.alpinelinux.org/alpine/$version/main" \
|
|
|
|
-X "http://dl-cdn.alpinelinux.org/alpine/$version/community" \
|
2023-03-24 17:13:12 +00:00
|
|
|
-U $__ApkSignatureArg --root "$__RootfsDir" --arch "$__AlpineArch" --initdb add
|
2023-02-21 21:42:30 +00:00
|
|
|
|
|
|
|
if [[ "$__AlpineLlvmLibsLookup" == 1 ]]; then
|
2023-03-02 13:20:38 +00:00
|
|
|
__AlpinePackages+=" $("$__ApkToolsDir/apk.static" \
|
2023-02-21 21:42:30 +00:00
|
|
|
-X "http://dl-cdn.alpinelinux.org/alpine/$version/main" \
|
|
|
|
-X "http://dl-cdn.alpinelinux.org/alpine/$version/community" \
|
2023-03-24 17:13:12 +00:00
|
|
|
-U $__ApkSignatureArg --root "$__RootfsDir" --arch "$__AlpineArch" \
|
2023-10-19 20:12:15 +00:00
|
|
|
search 'llvm*-libs' | grep -E '^llvm' | sort | tail -1 | sed 's/-[^-]*//2g')"
|
2023-02-21 21:42:30 +00:00
|
|
|
fi
|
2020-01-22 13:31:03 +00:00
|
|
|
|
2023-03-02 13:20:38 +00:00
|
|
|
# install all packages in one go
|
|
|
|
"$__ApkToolsDir/apk.static" \
|
|
|
|
-X "http://dl-cdn.alpinelinux.org/alpine/$version/main" \
|
|
|
|
-X "http://dl-cdn.alpinelinux.org/alpine/$version/community" \
|
2023-03-24 17:13:12 +00:00
|
|
|
-U $__ApkSignatureArg --root "$__RootfsDir" --arch "$__AlpineArch" \
|
2023-03-02 13:20:38 +00:00
|
|
|
add $__AlpinePackages
|
|
|
|
|
2022-07-28 12:36:53 +00:00
|
|
|
rm -r "$__ApkToolsDir"
|
2020-03-31 13:04:58 +00:00
|
|
|
elif [[ "$__CodeName" == "freebsd" ]]; then
|
2022-07-28 12:36:53 +00:00
|
|
|
mkdir -p "$__RootfsDir"/usr/local/etc
|
2022-08-11 12:40:33 +00:00
|
|
|
JOBS=${MAXJOBS:="$(getconf _NPROCESSORS_ONLN)"}
|
2022-07-28 12:36:53 +00:00
|
|
|
wget -O - "https://download.freebsd.org/ftp/releases/${__FreeBSDArch}/${__FreeBSDMachineArch}/${__FreeBSDBase}/base.txz" | tar -C "$__RootfsDir" -Jxf - ./lib ./usr/lib ./usr/libdata ./usr/include ./usr/share/keys ./etc ./bin/freebsd-version
|
|
|
|
echo "ABI = \"FreeBSD:${__FreeBSDABI}:${__FreeBSDMachineArch}\"; FINGERPRINTS = \"${__RootfsDir}/usr/share/keys\"; REPOS_DIR = [\"${__RootfsDir}/etc/pkg\"]; REPO_AUTOUPDATE = NO; RUN_SCRIPTS = NO;" > "${__RootfsDir}"/usr/local/etc/pkg.conf
|
|
|
|
echo "FreeBSD: { url: \"pkg+http://pkg.FreeBSD.org/\${ABI}/quarterly\", mirror_type: \"srv\", signature_type: \"fingerprints\", fingerprints: \"${__RootfsDir}/usr/share/keys/pkg\", enabled: yes }" > "${__RootfsDir}"/etc/pkg/FreeBSD.conf
|
|
|
|
mkdir -p "$__RootfsDir"/tmp
|
2020-03-31 13:04:58 +00:00
|
|
|
# get and build package manager
|
2022-07-28 12:36:53 +00:00
|
|
|
wget -O - "https://github.com/freebsd/pkg/archive/${__FreeBSDPkg}.tar.gz" | tar -C "$__RootfsDir"/tmp -zxf -
|
|
|
|
cd "$__RootfsDir/tmp/pkg-${__FreeBSDPkg}"
|
2020-04-24 17:34:25 +00:00
|
|
|
# needed for install to succeed
|
2022-07-28 12:36:53 +00:00
|
|
|
mkdir -p "$__RootfsDir"/host/etc
|
|
|
|
./autogen.sh && ./configure --prefix="$__RootfsDir"/host && make -j "$JOBS" && make install
|
|
|
|
rm -rf "$__RootfsDir/tmp/pkg-${__FreeBSDPkg}"
|
2020-03-31 13:04:58 +00:00
|
|
|
# install packages we need.
|
2022-07-28 12:36:53 +00:00
|
|
|
INSTALL_AS_USER=$(whoami) "$__RootfsDir"/host/sbin/pkg -r "$__RootfsDir" -C "$__RootfsDir"/usr/local/etc/pkg.conf update
|
|
|
|
INSTALL_AS_USER=$(whoami) "$__RootfsDir"/host/sbin/pkg -r "$__RootfsDir" -C "$__RootfsDir"/usr/local/etc/pkg.conf install --yes $__FreeBSDPackages
|
2020-06-11 17:47:07 +00:00
|
|
|
elif [[ "$__CodeName" == "illumos" ]]; then
|
|
|
|
mkdir "$__RootfsDir/tmp"
|
|
|
|
pushd "$__RootfsDir/tmp"
|
2022-08-11 12:40:33 +00:00
|
|
|
JOBS=${MAXJOBS:="$(getconf _NPROCESSORS_ONLN)"}
|
2020-06-11 17:47:07 +00:00
|
|
|
echo "Downloading sysroot."
|
|
|
|
wget -O - https://github.com/illumos/sysroot/releases/download/20181213-de6af22ae73b-v1/illumos-sysroot-i386-20181213-de6af22ae73b-v1.tar.gz | tar -C "$__RootfsDir" -xzf -
|
|
|
|
echo "Building binutils. Please wait.."
|
|
|
|
wget -O - https://ftp.gnu.org/gnu/binutils/binutils-2.33.1.tar.bz2 | tar -xjf -
|
|
|
|
mkdir build-binutils && cd build-binutils
|
2022-07-15 18:56:08 +00:00
|
|
|
../binutils-2.33.1/configure --prefix="$__RootfsDir" --target="${__illumosArch}-sun-solaris2.10" --program-prefix="${__illumosArch}-illumos-" --with-sysroot="$__RootfsDir"
|
2020-06-11 17:47:07 +00:00
|
|
|
make -j "$JOBS" && make install && cd ..
|
|
|
|
echo "Building gcc. Please wait.."
|
|
|
|
wget -O - https://ftp.gnu.org/gnu/gcc/gcc-8.4.0/gcc-8.4.0.tar.xz | tar -xJf -
|
|
|
|
CFLAGS="-fPIC"
|
|
|
|
CXXFLAGS="-fPIC"
|
|
|
|
CXXFLAGS_FOR_TARGET="-fPIC"
|
|
|
|
CFLAGS_FOR_TARGET="-fPIC"
|
|
|
|
export CFLAGS CXXFLAGS CXXFLAGS_FOR_TARGET CFLAGS_FOR_TARGET
|
|
|
|
mkdir build-gcc && cd build-gcc
|
2022-07-15 18:56:08 +00:00
|
|
|
../gcc-8.4.0/configure --prefix="$__RootfsDir" --target="${__illumosArch}-sun-solaris2.10" --program-prefix="${__illumosArch}-illumos-" --with-sysroot="$__RootfsDir" --with-gnu-as \
|
2020-06-11 17:47:07 +00:00
|
|
|
--with-gnu-ld --disable-nls --disable-libgomp --disable-libquadmath --disable-libssp --disable-libvtv --disable-libcilkrts --disable-libada --disable-libsanitizer \
|
|
|
|
--disable-libquadmath-support --disable-shared --enable-tls
|
|
|
|
make -j "$JOBS" && make install && cd ..
|
2022-10-04 12:24:56 +00:00
|
|
|
BaseUrl=https://pkgsrc.smartos.org
|
2020-06-11 17:47:07 +00:00
|
|
|
if [[ "$__UseMirror" == 1 ]]; then
|
2022-10-04 12:24:56 +00:00
|
|
|
BaseUrl=https://pkgsrc.smartos.skylime.net
|
2020-06-11 17:47:07 +00:00
|
|
|
fi
|
2022-08-17 12:42:25 +00:00
|
|
|
BaseUrl="$BaseUrl/packages/SmartOS/trunk/${__illumosArch}/All"
|
|
|
|
echo "Downloading manifest"
|
|
|
|
wget "$BaseUrl"
|
2020-06-11 17:47:07 +00:00
|
|
|
echo "Downloading dependencies."
|
|
|
|
read -ra array <<<"$__IllumosPackages"
|
|
|
|
for package in "${array[@]}"; do
|
2022-08-17 12:42:25 +00:00
|
|
|
echo "Installing '$package'"
|
2022-10-04 12:24:56 +00:00
|
|
|
# find last occurrence of package in listing and extract its name
|
|
|
|
package="$(sed -En '/.*href="('"$package"'-[0-9].*).tgz".*/h;$!d;g;s//\1/p' All)"
|
2022-08-17 12:42:25 +00:00
|
|
|
echo "Resolved name '$package'"
|
2020-06-11 17:47:07 +00:00
|
|
|
wget "$BaseUrl"/"$package".tgz
|
|
|
|
ar -x "$package".tgz
|
2022-08-17 12:42:25 +00:00
|
|
|
tar --skip-old-files -xzf "$package".tmp.tg* -C "$__RootfsDir" 2>/dev/null
|
2020-06-11 17:47:07 +00:00
|
|
|
done
|
|
|
|
echo "Cleaning up temporary files."
|
|
|
|
popd
|
|
|
|
rm -rf "$__RootfsDir"/{tmp,+*}
|
|
|
|
mkdir -p "$__RootfsDir"/usr/include/net
|
|
|
|
mkdir -p "$__RootfsDir"/usr/include/netpacket
|
|
|
|
wget -P "$__RootfsDir"/usr/include/net https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/io/bpf/net/bpf.h
|
|
|
|
wget -P "$__RootfsDir"/usr/include/net https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/io/bpf/net/dlt.h
|
|
|
|
wget -P "$__RootfsDir"/usr/include/netpacket https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/inet/sockmods/netpacket/packet.h
|
|
|
|
wget -P "$__RootfsDir"/usr/include/sys https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/sys/sdt.h
|
2022-08-11 12:40:33 +00:00
|
|
|
elif [[ "$__CodeName" == "haiku" ]]; then
|
|
|
|
JOBS=${MAXJOBS:="$(getconf _NPROCESSORS_ONLN)"}
|
|
|
|
|
2023-05-12 16:01:32 +00:00
|
|
|
echo "Building Haiku sysroot for $__HaikuArch"
|
2022-08-11 12:40:33 +00:00
|
|
|
mkdir -p "$__RootfsDir/tmp"
|
2023-05-12 16:01:32 +00:00
|
|
|
pushd "$__RootfsDir/tmp"
|
|
|
|
|
|
|
|
mkdir "$__RootfsDir/tmp/download"
|
|
|
|
|
|
|
|
echo "Downloading Haiku package tool"
|
|
|
|
git clone https://github.com/haiku/haiku-toolchains-ubuntu --depth 1 $__RootfsDir/tmp/script
|
|
|
|
wget -O "$__RootfsDir/tmp/download/hosttools.zip" $($__RootfsDir/tmp/script/fetch.sh --hosttools)
|
|
|
|
unzip -o "$__RootfsDir/tmp/download/hosttools.zip" -d "$__RootfsDir/tmp/bin"
|
|
|
|
|
|
|
|
DepotBaseUrl="https://depot.haiku-os.org/__api/v2/pkg/get-pkg"
|
|
|
|
HpkgBaseUrl="https://eu.hpkg.haiku-os.org/haiku/master/$__HaikuArch/current"
|
|
|
|
|
|
|
|
# Download Haiku packages
|
|
|
|
echo "Downloading Haiku packages"
|
2022-08-11 12:40:33 +00:00
|
|
|
read -ra array <<<"$__HaikuPackages"
|
|
|
|
for package in "${array[@]}"; do
|
|
|
|
echo "Downloading $package..."
|
|
|
|
# API documented here: https://github.com/haiku/haikudepotserver/blob/master/haikudepotserver-api2/src/main/resources/api2/pkg.yaml#L60
|
|
|
|
# The schema here: https://github.com/haiku/haikudepotserver/blob/master/haikudepotserver-api2/src/main/resources/api2/pkg.yaml#L598
|
2023-05-12 16:01:32 +00:00
|
|
|
hpkgDownloadUrl="$(wget -qO- --post-data='{"name":"'"$package"'","repositorySourceCode":"haikuports_'$__HaikuArch'","versionType":"LATEST","naturalLanguageCode":"en"}' \
|
|
|
|
--header='Content-Type:application/json' "$DepotBaseUrl" | jq -r '.result.versions[].hpkgDownloadURL')"
|
|
|
|
wget -P "$__RootfsDir/tmp/download" "$hpkgDownloadUrl"
|
|
|
|
done
|
|
|
|
for package in haiku haiku_devel; do
|
|
|
|
echo "Downloading $package..."
|
|
|
|
hpkgVersion="$(wget -qO- $HpkgBaseUrl | sed -n 's/^.*version: "\([^"]*\)".*$/\1/p')"
|
|
|
|
wget -P "$__RootfsDir/tmp/download" "$HpkgBaseUrl/packages/$package-$hpkgVersion-1-$__HaikuArch.hpkg"
|
2022-08-11 12:40:33 +00:00
|
|
|
done
|
|
|
|
|
2023-05-12 16:01:32 +00:00
|
|
|
# Set up the sysroot
|
|
|
|
echo "Setting up sysroot and extracting required packages"
|
2022-08-11 12:40:33 +00:00
|
|
|
mkdir -p "$__RootfsDir/boot/system"
|
2023-05-12 16:01:32 +00:00
|
|
|
for file in "$__RootfsDir/tmp/download/"*.hpkg; do
|
|
|
|
echo "Extracting $file..."
|
|
|
|
LD_LIBRARY_PATH="$__RootfsDir/tmp/bin" "$__RootfsDir/tmp/bin/package" extract -C "$__RootfsDir/boot/system" "$file"
|
2022-08-11 12:40:33 +00:00
|
|
|
done
|
|
|
|
|
2023-05-12 16:01:32 +00:00
|
|
|
# Download buildtools
|
|
|
|
echo "Downloading Haiku buildtools"
|
|
|
|
wget -O "$__RootfsDir/tmp/download/buildtools.zip" $($__RootfsDir/tmp/script/fetch.sh --buildtools --arch=$__HaikuArch)
|
|
|
|
unzip -o "$__RootfsDir/tmp/download/buildtools.zip" -d "$__RootfsDir"
|
|
|
|
|
2022-08-11 12:40:33 +00:00
|
|
|
# Cleaning up temporary files
|
|
|
|
echo "Cleaning up temporary files"
|
2023-05-12 16:01:32 +00:00
|
|
|
popd
|
2022-08-11 12:40:33 +00:00
|
|
|
rm -rf "$__RootfsDir/tmp"
|
2022-07-28 12:36:53 +00:00
|
|
|
elif [[ -n "$__CodeName" ]]; then
|
2023-03-24 17:13:12 +00:00
|
|
|
|
|
|
|
if [[ "$__SkipSigCheck" == "0" ]]; then
|
|
|
|
__Keyring="$__Keyring --force-check-gpg"
|
|
|
|
fi
|
|
|
|
|
|
|
|
debootstrap "--variant=minbase" $__Keyring --arch "$__UbuntuArch" "$__CodeName" "$__RootfsDir" "$__UbuntuRepo"
|
2022-07-28 12:36:53 +00:00
|
|
|
cp "$__CrossDir/$__BuildArch/sources.list.$__CodeName" "$__RootfsDir/etc/apt/sources.list"
|
|
|
|
chroot "$__RootfsDir" apt-get update
|
|
|
|
chroot "$__RootfsDir" apt-get -f -y install
|
|
|
|
chroot "$__RootfsDir" apt-get -y install $__UbuntuPackages
|
|
|
|
chroot "$__RootfsDir" symlinks -cr /usr
|
|
|
|
chroot "$__RootfsDir" apt-get clean
|
2018-11-08 01:51:56 +00:00
|
|
|
|
2022-07-28 12:36:53 +00:00
|
|
|
if [[ "$__SkipUnmount" == "0" ]]; then
|
|
|
|
umount "$__RootfsDir"/* || true
|
2018-11-08 01:51:56 +00:00
|
|
|
fi
|
|
|
|
|
2020-11-20 17:08:04 +00:00
|
|
|
if [[ "$__BuildArch" == "armel" && "$__CodeName" == "jessie" ]]; then
|
2022-07-28 12:36:53 +00:00
|
|
|
pushd "$__RootfsDir"
|
|
|
|
patch -p1 < "$__CrossDir/$__BuildArch/armel.jessie.patch"
|
2020-11-20 17:08:04 +00:00
|
|
|
popd
|
|
|
|
fi
|
2020-06-11 17:47:07 +00:00
|
|
|
elif [[ "$__Tizen" == "tizen" ]]; then
|
2022-12-13 16:24:47 +00:00
|
|
|
ROOTFS_DIR="$__RootfsDir" "$__CrossDir/tizen-build-rootfs.sh" "$__BuildArch"
|
2018-11-08 01:51:56 +00:00
|
|
|
else
|
|
|
|
echo "Unsupported target platform."
|
|
|
|
usage;
|
|
|
|
exit 1
|
|
|
|
fi
|