Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions packages/mono/build.ncl
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,35 @@ let cmake = import "../cmake/build.ncl" in
let gcc = import "../gcc/build.ncl" in
let glibc = import "../glibc/build.ncl" in
let libtool = import "../libtool/build.ncl" in
let m4 = import "../m4/build.ncl" in
let make = import "../make/build.ncl" in
let perl = import "../perl/build.ncl" in
let pkgconf = import "../pkgconf/build.ncl" in
let python = import "../python/build.ncl" in
let toolchain = import "../toolchain/build.ncl" in
let zlib = import "../zlib/build.ncl" in

let version = "6.12.0.199" in
let version = "6.12.0.206" in
{
name = "mono",
build_deps = [
{ file = "build.sh" } | Local,
{
url = "https://download.mono-project.com/sources/mono/mono-%{version}.tar.xz",
sha256 = "c0850d545353a6ba2238d45f0914490c6a14a0017f151d3905b558f033478ef5",
# Sourced from the GitHub tag `mono-%{version}` (commit 0cbf0e2),
# mirrored to our archive bucket. The mono/mono GitHub repo has no
# release asset, and download.mono-project.com is Microsoft-archived
# infra (last touched 2024) that may disappear; this is a prepared
# `git archive --recurse-submodules` of the tag (source + the
# external/ submodules bundled, autotools generated at build time).
url = "gs://minimal-staging-archives/mono/mono/mono-%{version}.tar.gz",
sha256 = "c4074f319f801711f23aad8e52c8d8752405b2966d2566bccd2ab23e326ff146",
} | Source,
autoconf,
automake,
base,
cmake,
libtool,
m4,
make,
perl,
pkgconf,
Expand Down
12 changes: 11 additions & 1 deletion packages/mono/build.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
#!/bin/sh
set -e

tar -xof "mono-${MINIMAL_ARG_VERSION}.tar.xz"
tar -xof "mono-${MINIMAL_ARG_VERSION}.tar.gz"
cd "mono-${MINIMAL_ARG_VERSION}"

# The prepared tarball was archived on macOS, which scatters AppleDouble
# "._*" sidecar files through the tree. mono's C# build globs `*.cs` and
# feeds these binary sidecars to the compiler (CS1056 "unexpected character"
# on e.g. external/cecil/Mono.Cecil.PE/._TextMap.cs). Strip them all.
find . -name '._*' -type f -delete

# Provide a 'which' shim (not present in the sandbox, needed by BTLS Makefile)
mkdir -p shims
cat > shims/which << 'SHIM'
Expand Down Expand Up @@ -34,6 +40,10 @@ sed -i 's/cmake_minimum_required (VERSION 2\.8\.10)/cmake_minimum_required (VERS
mono/btls/CMakeLists.txt \
external/boringssl/CMakeLists.txt

# The GitHub-sourced tarball ships the raw tag tree (no generated
# `configure`), so regenerate the autotools build system first. mono's
# autogen.sh runs autoreconf and then invokes ./configure with "$@".
NOCONFIGURE=1 ./autogen.sh
./configure \
--prefix=/usr \
--sysconfdir=/usr/etc \
Expand Down