2022-08-04 18:27:59 +03:00
|
|
|
distributable:
|
|
|
|
url: https://github.com/denoland/deno/archive/refs/tags/v{{ version }}.tar.gz
|
|
|
|
strip-components: 1
|
|
|
|
|
|
|
|
versions:
|
|
|
|
github: denoland/deno
|
|
|
|
|
|
|
|
provides:
|
|
|
|
- bin/deno
|
|
|
|
|
|
|
|
interprets:
|
2022-11-25 19:03:11 +03:00
|
|
|
# extensions: [ts, js] # nodejs.org for now
|
|
|
|
extensions: ts
|
|
|
|
args: [deno, run]
|
2022-08-04 18:27:59 +03:00
|
|
|
|
2022-11-28 18:53:42 +03:00
|
|
|
runtime:
|
|
|
|
env:
|
|
|
|
DENO_NO_UPDATE_CHECK: "true"
|
|
|
|
|
2022-08-04 18:27:59 +03:00
|
|
|
build:
|
|
|
|
script: |
|
2022-09-15 23:26:40 +03:00
|
|
|
# https://github.com/denoland/deno/issues/15596 -- reported fixed in 1.25.3
|
2023-02-07 05:40:42 +03:00
|
|
|
if semverator satisfies '>=1.25.0<1.25.4' {{ version }}; then
|
2022-09-15 23:26:40 +03:00
|
|
|
find ext/ffi/tinycc -maxdepth 0 -empty -exec \
|
|
|
|
git clone https://github.com/TinyCC/tinycc.git {} \;
|
|
|
|
|
|
|
|
if test {{ hw.target }} = x86_64-apple-darwin; then
|
|
|
|
# our LLVM cannot build with deployment target set to 10.6
|
|
|
|
sed -i.bak s/MACOSX_DEPLOYMENT_TARGET/\#/ ext/ffi/tinycc/Makefile
|
|
|
|
fi
|
2022-08-27 21:11:25 +03:00
|
|
|
fi
|
|
|
|
|
2023-01-27 03:23:00 +03:00
|
|
|
# FIXME: until we unblock rust-lang.org>1.65.0, we need a feature flag
|
|
|
|
# to compile deno.land
|
2023-02-07 05:40:42 +03:00
|
|
|
if semverator satisfies '<1.66.0' {{ deps.rust-lang.org.version }}; then
|
|
|
|
git apply props/unzip_option_feature.diff
|
|
|
|
fi
|
2023-01-27 03:23:00 +03:00
|
|
|
|
2023-03-07 22:38:38 +03:00
|
|
|
# change default bindir to ~/.local/bin per our conventions
|
2023-04-14 21:58:59 +03:00
|
|
|
sed -i.bak -e 's/home_path.push(".deno")/home_path.push(".local")/' cli/tools/installer.rs
|
|
|
|
rm cli/tools/installer.rs.bak
|
|
|
|
grep home_path cli/tools/installer.rs
|
2023-03-07 22:38:38 +03:00
|
|
|
|
2022-08-04 18:27:59 +03:00
|
|
|
cargo build --release
|
|
|
|
mkdir -p "{{ prefix }}"/bin
|
|
|
|
mv target/release/deno "{{ prefix }}"/bin
|
|
|
|
dependencies:
|
2022-08-27 21:11:25 +03:00
|
|
|
git-scm.org: 2 # to build tinycc
|
2023-09-01 19:56:06 +03:00
|
|
|
rust-lang.org: ^1.70
|
2022-11-01 19:14:07 +03:00
|
|
|
rust-lang.org/cargo: ^0.65
|
2022-08-24 20:54:20 +03:00
|
|
|
llvm.org: '>=13' # macOS/aarch64 requires this (FIXME only dep where needed)
|
2022-08-04 18:27:59 +03:00
|
|
|
curl.se: '*' # required to download v8 (python is another option)
|
|
|
|
tea.xyz/gx/make: '*' # required to build the libffi parts
|
2023-02-07 05:40:42 +03:00
|
|
|
crates.io/semverator: '*'
|
2023-08-10 20:37:01 +03:00
|
|
|
cmake.org: ^3 # deno.land>=1.36.1 requires cmake
|
2022-08-04 18:27:59 +03:00
|
|
|
|
|
|
|
test:
|
2023-03-07 22:38:38 +03:00
|
|
|
script: |
|
|
|
|
deno --version | grep {{version}}
|
|
|
|
mv $FIXTURE test.ts
|
|
|
|
deno install test.ts
|
|
|
|
test "$(.local/bin/test)" = "Hello, world!"
|
|
|
|
fixture: |
|
|
|
|
console.log("Hello, world!");
|
|
|
|
|