pantry/projects/deno.land/package.yml

81 lines
2.5 KiB
YAML
Raw Normal View History

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:
# 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:
2023-12-14 08:10:53 +03:00
DENO_NO_UPDATE_CHECK: 'true'
2022-11-28 18:53:42 +03:00
companions:
# denort added in v1.41.0 requires `unzip`
info-zip.org/unzip: '*'
dependencies:
2024-03-11 22:27:19 +03:00
x86-64:
llvm.org: 17 # libunwind
2022-08-04 18:27:59 +03:00
build:
2023-12-14 08:10:53 +03:00
script:
# https://github.com/denoland/deno/pull/22298
# deno.land 1.41.0 will currently _not_ run deno compile on linux/aarch64
# for their first official release, they're using ubuntu 22.04, which means
# a newer glibc. Patching via the https://github.com/LukeChannings/deno-arm64
# repo may be possible, but lets not delay the three usable arches for the rare
# one. Revist this.
# Obviously, I'd just skip the test, except everything we _do_ relies on
# deno compile, so that'd just break the unholy everything out of pkgx.
- run: test "{{hw.platform}}+{{ hw.arch }}" != "linux+aarch64"
if: 1.41.0
# https://github.com/denoland/deno/issues/15596 -- reported fixed in 1.25.3
2023-12-14 08:10:53 +03:00
- run: |
find ext/ffi/tinycc -maxdepth 0 -empty -exec \
git clone https://github.com/TinyCC/tinycc.git {} \;
2023-12-14 08:10:53 +03:00
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
if: '>=1.25.0<1.25.4'
2023-01-27 03:23:00 +03:00
# change default bindir to ~/.local/bin per our conventions
2023-12-14 08:10:53 +03:00
- sed -i'' -e 's/home_path.push(".deno")/home_path.push(".local")/' cli/tools/installer.rs
- grep home_path cli/tools/installer.rs
- cargo install --locked --path cli --root "{{ prefix }}"
2022-08-04 18:27:59 +03:00
dependencies:
2023-12-14 08:10:53 +03:00
git-scm.org: 2 # to build tinycc
2023-09-01 19:56:06 +03:00
rust-lang.org: ^1.70
rust-lang.org/cargo: ^0
llvm.org: 17 # macOS/aarch64 requires (FIXME only dep where needed)
2023-12-14 08:10:53 +03:00
curl.se: '*' # required to download v8 (python is another option)
cmake.org: ^3 # deno.land>=1.36.1 requires cmake
protobuf.dev: '*' # deno.land>=1.36.4 requires protoc
2023-10-13 05:22:18 +03:00
env:
linux:
LD: clang
2022-08-04 18:27:59 +03:00
test:
2023-12-14 08:10:53 +03:00
script:
- deno --version | grep {{version}}
- mv $FIXTURE test.ts
- deno install -f test.ts
2023-12-14 08:10:53 +03:00
- test "$($HOME/.local/bin/test)" = "Hello, world!"
- deno compile test.ts
- test "$(./test)" = "Hello, world!"
fixture: |
console.log("Hello, world!");