From 8be3a67f84e44c43e4422ea8399401bce9910a07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Rolim?= Date: Mon, 6 Jul 2020 16:31:51 -0300 Subject: [PATCH] New package: tinygo-0.13.1. Based on #17955 by @renatoaguiar. --- srcpkgs/tinygo/template | 61 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 srcpkgs/tinygo/template diff --git a/srcpkgs/tinygo/template b/srcpkgs/tinygo/template new file mode 100644 index 00000000000..9417a7f5b12 --- /dev/null +++ b/srcpkgs/tinygo/template @@ -0,0 +1,61 @@ +# Template file for 'tinygo' +pkgname=tinygo +version=0.13.1 +revision=1 +_cmsis=9fe411cef1cef5de58e5957b89760759de44e393 +_avr=6624554c02b237b23dc17d53e992bf54033fc228 +_svd=15b462f152af86f3d15b952e1a5cf1bb9e2693e8 +_compiler_rt=5bc79797e1f9184f39e1bd30fac75d995b72cea3 +_nrfx=3ab39a9d457bfe627473ed0e03a7f1161d9e4f27 +_picolibc=80528c684b10aaee977397e7eb40c4784e6dc433 +_wasi=a280fead2ae71b9a230d3b48c1f95867431888e4 +create_wrksrc=yes +build_wrksrc=${pkgname}-${version} +build_style=go +go_import_path=github.com/tinygo-org/tinygo +makedepends="clang llvm" +short_desc="Go compiler for small places" +maintainer="Érico Nogueira " +license="BSD-3-Clause, Apache-2.0" +homepage="https://tinygo.org/" +distfiles="https://github.com/tinygo-org/tinygo/archive/v${version}.tar.gz + https://github.com/ARM-software/CMSIS/archive/${_cmsis}.tar.gz + https://github.com/avr-rust/avr-mcu/archive/${_avr}.tar.gz + https://github.com/posborne/cmsis-svd/archive/${_svd}.tar.gz + https://github.com/llvm-mirror/compiler-rt/archive/${_compiler_rt}.tar.gz + https://github.com/NordicSemiconductor/nrfx/archive/${_nrfx}.tar.gz + https://github.com/keith-packard/picolibc/archive/${_picolibc}.tar.gz + https://github.com/WebAssembly/wasi-libc/archive/${_wasi}.tar.gz" +checksum="27f4caa12e582f11a844636350d48207595a257dca634c62f67562ee33a61340 + a73982d8b7a2b6442fe5e309e46bc0b1c248f7fa126beb61b4cf1c052d171758 + 0f7a130d82a6b6f3cc171e42dfaf62228e0f987239c87711996d4f54b49ad9e0 + f03a7db4c6866a5fc7de60c3abb24d7dc61d9a42c4193878f00fbd65dfe2b551 + 67bf700571dcdbde05fbf870c3c4c153858a730ce90c9c553075e414be492b3e + d7df6a3e49b5ddb146bbd7ee866f2ec190edd83488e2fa0c1ddd27f016effa0f + 03eeac5a3e138ed5321ca6a433d25bd214de3cc1df94e1836b9689f9d59b063f + 3d79b48c63cdaaea441afb366872bf47d82349d3f05a5a4ed1fddc1cc266987b" + +_move_submodule() { + rmdir ${build_wrksrc}/lib/$2 + mv $1 ${build_wrksrc}/lib/$2 +} + +post_extract() { + _move_submodule CMSIS-${_cmsis} CMSIS + _move_submodule avr-mcu-${_avr} avr + _move_submodule cmsis-svd-${_svd} cmsis-svd + _move_submodule compiler-rt-${_compiler_rt} compiler-rt + _move_submodule nrfx-${_nrfx} nrfx + _move_submodule picolibc-${_picolibc} picolibc + _move_submodule wasi-libc-${_wasi} wasi-libc +} + +post_build() { + make gen-device +} + +post_install() { + vmkdir usr/lib/tinygo + vcopy "src/device/*" usr/lib/tinygo + vlicense LICENSE +}