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

fix(main/crystal): Pass Android API level to make #18221

Merged
merged 5 commits into from
Oct 17, 2023
Merged
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
10 changes: 5 additions & 5 deletions packages/crystal/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://crystal-lang.org
TERMUX_PKG_DESCRIPTION="Fast and statically typed, compiled language with Ruby-like syntax"
TERMUX_PKG_LICENSE="Apache-2.0"
TERMUX_PKG_MAINTAINER="@HertzDevil"
TERMUX_PKG_VERSION="1.9.2"
TERMUX_PKG_REVISION=2
TERMUX_PKG_VERSION="1.10.1"
TERMUX_PKG_GIT_BRANCH=$TERMUX_PKG_VERSION
TERMUX_PKG_SRCURL=git+https://github.com/crystal-lang/crystal
TERMUX_PKG_AUTO_UPDATE=true
Expand All @@ -23,7 +22,7 @@ termux_step_make() {

termux_setup_crystal

CC="$CC_FOR_BUILD" LLVM_CONFIG="$TERMUX_PREFIX/bin/llvm-config" \
CC="$CC_FOR_BUILD" ANDROID_PLATFORM="$TERMUX_PKG_API_LEVEL" LLVM_CONFIG="$TERMUX_PREFIX/bin/llvm-config" \
make crystal target=$TERMUX_HOST_PLATFORM release=1 FLAGS=-Dwithout_iconv

$CC .build/crystal.o -o .build/crystal $LDFLAGS -rdynamic src/llvm/ext/llvm_ext.o \
Expand All @@ -38,8 +37,9 @@ termux_step_make() {
mkdir -p lib/molinillo
termux_download "$MOLINILLO_URL" "$MOLINILLO_TARFILE" "$MOLINILLO_SHA256"
tar xzf "$MOLINILLO_TARFILE" --strip-components=1 -C lib/molinillo
CC="$CC_FOR_BUILD" make SHARDS=false release=1 \
FLAGS="--cross-compile --target aarch64-linux-android -Dwithout_iconv"
CC="$CC_FOR_BUILD" ANDROID_PLATFORM="$TERMUX_PKG_API_LEVEL" \
make SHARDS=false release=1 \
FLAGS="--cross-compile --target $TERMUX_HOST_PLATFORM -Dwithout_iconv"
$CC bin/shards.o -o bin/shards $LDFLAGS -rdynamic \
-lyaml -lpcre2-8 -lgc -levent -ldl
}
Expand Down
4 changes: 2 additions & 2 deletions scripts/build/setup/termux_setup_crystal.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
termux_setup_crystal() {
local TERMUX_CRYSTAL_VERSION=1.9.0
local TERMUX_CRYSTAL_SHA256=0c5fdc8e1e985553a7603c5e45527ee28045409666f687d9978b3eb71572145b
local TERMUX_CRYSTAL_VERSION=1.10.1
local TERMUX_CRYSTAL_SHA256=bd74b24cac07f6227ee0874c6d9264688ca4388a0a8687493e4ca04285454912
local TERMUX_CRYSTAL_TARNAME=crystal-${TERMUX_CRYSTAL_VERSION}-1-linux-x86_64-bundled.tar.gz
local TERMUX_CRYSTAL_TARFILE=$TERMUX_PKG_TMPDIR/crystal-$TERMUX_CRYSTAL_VERSION.tar.gz
local TERMUX_CRYSTAL_FOLDER
Expand Down