Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crystal: Support non-bootstrapped builds #23360

Merged
merged 3 commits into from
Feb 13, 2025
Merged
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
29 changes: 20 additions & 9 deletions mingw-w64-crystal/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Maintainer: Quinton Miller <nicetas.c@gmail.com>

_bootstrap=0
_realname=crystal
pkgbase="mingw-w64-${_realname}"
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=1.15.1
pkgrel=1
pkgrel=2
pkgdesc="Fast and statically typed, compiled language with Ruby-like syntax (mingw-w64)"
arch=('any')
mingw_arch=('ucrt64' 'mingw64' 'clang64')
Expand All @@ -25,22 +26,27 @@ depends=(
"${MINGW_PACKAGE_PREFIX}-libiconv"
"${MINGW_PACKAGE_PREFIX}-libxml2"
"${MINGW_PACKAGE_PREFIX}-libyaml"
"${MINGW_PACKAGE_PREFIX}-llvm"
"${MINGW_PACKAGE_PREFIX}-llvm-libs"
"${MINGW_PACKAGE_PREFIX}-openssl"
"${MINGW_PACKAGE_PREFIX}-zlib"
)
makedepends=(
"git"
"${MINGW_PACKAGE_PREFIX}-llvm"
$( (( _bootstrap )) || echo "${MINGW_PACKAGE_PREFIX}-crystal")
)
checkdepends=(
"${MINGW_PACKAGE_PREFIX}-lld" # needed for linking std_spec
)
source=(
"$pkgname-$pkgver::git+${msys2_repository_url}.git#tag=${pkgver}"
https://github.com/crystal-lang/crystal/releases/download/1.15.0/crystal-1.15.0-windows-x86_64-gnu-unsupported.zip # stage 0 compiler
)
sha256sums=('626fed60399d7f1dc83e2e5a2ecde20d235e19a3dcf6d70d6f52ec4de063b32b'
'7d7df1b4a99cb3f938106ba45e0b55ce1d9913491999f1acaa57da168a18becb')
source=("$pkgname-$pkgver::git+${msys2_repository_url}.git#tag=${pkgver}")
sha256sums=('626fed60399d7f1dc83e2e5a2ecde20d235e19a3dcf6d70d6f52ec4de063b32b')

if (( _bootstrap ))
then
# stage 0 compiler
source+=("https://github.com/crystal-lang/crystal/releases/download/1.15.0/crystal-1.15.0-windows-x86_64-gnu-unsupported.zip")
sha256sums+=('7d7df1b4a99cb3f938106ba45e0b55ce1d9913491999f1acaa57da168a18becb')
fi

prepare() {
cd "$pkgname-$pkgver"
Expand All @@ -53,7 +59,12 @@ prepare() {

build() {
cd "$pkgname-$pkgver"
CRYSTAL="$srcdir/bin/crystal.exe" make interpreter=1 release=1
if (( _bootstrap ))
then
CRYSTAL="$srcdir/bin/crystal.exe" make interpreter=1 release=1
else
make interpreter=1 release=1
fi
}

check() {
Expand Down