Skip to content

Commit

Permalink
New package: deno-1.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
shizonic committed Nov 16, 2020
1 parent 53f80e4 commit 2238146
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 0 deletions.
11 changes: 11 additions & 0 deletions srcpkgs/deno/patches/rusty_v8.patch
@@ -0,0 +1,11 @@
--- Cargo.lock 2020-10-10 12:30:55.000000000 +0200
+++ - 2020-10-22 17:12:50.248150438 +0200
@@ -1920,8 +1920,6 @@
[[package]]
name = "rusty_v8"
version = "0.11.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8c11463988ec37b3f8cb84e4c2fe8f63058c46e07348b6d1d27b114a2b981304"
dependencies = [
"bitflags",
"cargo_gn",
38 changes: 38 additions & 0 deletions srcpkgs/deno/template
@@ -0,0 +1,38 @@
# Template file for 'deno'
pkgname=deno
version=1.5.2
revision=1
build_helper="rust"
hostmakedepends="cargo pkg-config curl unzip python ninja gn clang nodejs
lld llvm gobject-introspection"
depends="libglib-devel"
short_desc="Simple, modern and secure runtime for JavaScript and TypeScript"
maintainer="shizonic <realtiaz@gmail.com>"
license="MIT"
homepage="https://deno.land"
distfiles="https://github.com/denoland/deno/archive/v${version}.tar.gz
https://void.johnnynator.dev/distfiles/rusty_v8-0.11.0.tar.gz"
checksum="5ceac4652c065ae4b3e90f620137e45fb5db8bbc66aadced877a121f5b019455
c4045d5a3e7f95f6faa323639a3289f7c543385c10a9015f73dfe97fc7d6ca7c"

post_extract() {
mv ../rusty_v8-0.11.0 rusty-void
cat >>Cargo.toml <<-'_EOF'
[patch.crates-io]
rusty_v8 = { path = 'rusty-void' }
_EOF
}

do_build() {
CLANG_BASE_PATH=/usr \
NINJA=/usr/bin/ninja \
GN=/usr/bin/gn \
V8_FROM_SOURCE=1 \
cargo build --release --locked --target ${RUST_TARGET} -vv
}

do_install() {
vbin target/${RUST_TARGET}/release/deno
vlicense LICENSE
}
2 changes: 2 additions & 0 deletions srcpkgs/deno/update
@@ -0,0 +1,2 @@
site="https://github.com/denoland/deno/releases"
pattern="\bv\K(\d+\.\d+\.\d+)\b"
32 changes: 32 additions & 0 deletions srcpkgs/gn/template
@@ -0,0 +1,32 @@
# Template file for 'gn'
pkgname=gn
version=0.0.20201022
revision=1
_githash=6f13aaac
create_wrksrc=yes
hostmakedepends="python3 ninja"
short_desc="Meta-build system that generates build files for Ninja"
maintainer="shizonic <realtiaz@gmail.com>"
license="BSD-3-Clause"
homepage="https://gn.googlesource.com/gn/"
distfiles="https://gn.googlesource.com/gn/+archive/${_githash}.tar.gz"
checksum=@80d9da7d58252fa49089386c943d8e3c493a4e314309dbf5e7b7585bfb484fa8

post_extract() {
printf '#define LAST_COMMIT_POSITION "%s"\n' "$version" >src/gn/last_commit_position.h
printf '#define LAST_COMMIT_POSITION_NUM 0\n' >>src/gn/last_commit_position.h
}

do_build() {
./build/gen.py --no-last-commit-position
ninja -C out
}

do_check() {
./out/gn_unittests
}

do_install() {
vbin out/gn
vlicense LICENSE
}

0 comments on commit 2238146

Please sign in to comment.