From 6b82f6a25080de77afd3e32ea53f013e89d82a5a Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Tue, 6 Jul 2021 11:11:04 +0200 Subject: [PATCH] New package: babashka-0.5.0. --- srcpkgs/babashka/template | 83 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 srcpkgs/babashka/template diff --git a/srcpkgs/babashka/template b/srcpkgs/babashka/template new file mode 100644 index 00000000000..0a8b279864d --- /dev/null +++ b/srcpkgs/babashka/template @@ -0,0 +1,83 @@ +# Template file for 'babashka' +pkgname=babashka +version=0.5.0 +revision=1 +hostmakedepends="mandrel leiningen git" +makedepends="zlib-devel" +checkdepends="clojure curl" +short_desc="Native, fast starting Clojure interpreter for scripting" +maintainer="Leah Neukirchen " +license="EPL-1.0" +homepage="https://babashka.org/" +_sci_commit=5ed2190f3c97de6d30f3aba96362bf6c68e95e90 +_babashka_curl_commit=cf71c8ae24a4f8ec85663970f4b8a3f63a0c1a6b +_babashka_nrepl_commit=bd1ce0cbc0861350a4a36e9c31ef79fa0c7cff84 +_depstar_commit=c419b8c82041855d55593c5b561fc7cea8234712 +_process_commit=4c6699d06b49773d3e5c5b4c11d3334fb78cc996 +_pods_commit=de4c3610c9ef3879370d01b7202a9f3a9d056f6e +_deps_clj_commit=985e5ca7f9cb123f86a0747aded1ee98e1f3deee +_fs_commit=1beb91cd5f352d1e3a914c94e7ec25a2644b07e5 +distfiles="https://github.com/babashka/babashka/archive/refs/tags/v${version}.tar.gz + https://github.com/borkdude/sci/archive/${_sci_commit}.tar.gz + https://github.com/babashka/babashka.curl/archive/${_babashka_curl_commit}.tar.gz + https://github.com/babashka/babashka.nrepl/archive/${_babashka_nrepl_commit}.tar.gz + https://github.com/babashka/depstar/archive/${_depstar_commit}.tar.gz + https://github.com/babashka/process/archive/${_process_commit}.tar.gz + https://github.com/babashka/pods/archive/${_pods_commit}.tar.gz + https://github.com/borkdude/deps.clj/archive/${_deps_clj_commit}.tar.gz + https://github.com/babashka/fs/archive/${_fs_commit}.tar.gz" +checksum="485866c1aeb9c5e17707f67a0efcd39404aa8b75fa7f34f49b0b4353beb5b412 + 86a95fa5966d1aae1632102a2c8dd4fe6bea41533eaa07943f116a2ac3d727f7 + e318e4563a278488a0a2d91b2d7c56bd8a0e2be8b895d91435822a047e85c0c3 + 83e3e122bdca4449649199ea7916a46423ac29c0611b7fc7d0f84557105bfdcc + 9d214a10a4f5e4f15b9c80354dae85689a40e941ec3417203354c0dc3ce9457b + 83816c89603bc1b1c938eca9ab941222e51cbe1ab110329717e13760c0f4d1eb + 9fdd931dc27ff8831dcd456ee5382eda5698cb4d34bf4a72ded0c8c7ac6f74bc + 836d73dbcd05b370911eb9b6dc9a99c8047173b9a96650efe53da0e7c4ac3a2d + b9977751969dbe38403f235fe757a8d1a07d539857d01b31f4bea24e4d58e7e3" + +post_extract() { + rmdir -v ${wrksrc}/sci + mv ${wrksrc}/../sci-${_sci_commit} ${wrksrc}/sci + rmdir -v ${wrksrc}/babashka.curl + mv ${wrksrc}/../babashka.curl-${_babashka_curl_commit} ${wrksrc}/babashka.curl + rmdir -v ${wrksrc}/babashka.nrepl + mv ${wrksrc}/../babashka.nrepl-${_babashka_nrepl_commit} ${wrksrc}/babashka.nrepl + rmdir -v ${wrksrc}/depstar + mv ${wrksrc}/../depstar-${_depstar_commit} ${wrksrc}/depstar + rmdir -v ${wrksrc}/process + mv ${wrksrc}/../process-${_process_commit} ${wrksrc}/process + rmdir -v ${wrksrc}/pods + mv ${wrksrc}/../pods-${_pods_commit} ${wrksrc}/pods + rmdir -v ${wrksrc}/deps.clj + mv ${wrksrc}/../deps.clj-${_deps_clj_commit} ${wrksrc}/deps.clj + rmdir -v ${wrksrc}/fs + mv ${wrksrc}/../fs-${_fs_commit} ${wrksrc}/fs +} + +do_patch() { + vsed -i -e '/install native-image/d' script/compile +} + +do_build() { + export GRAALVM_HOME=/usr/lib/jvm/mandrel11 + if [ "$XBPS_TARGET_LIBC" = musl ]; then + export BABASHKA_MUSL=true + export BABASHKA_STATIC=true # mandrel workaround + fi + + lein deps + script/uberjar + script/compile +} + +do_check() { + export BABASHKA_TEST_ENV=native + script/test + script/run_lib_tests +} + +do_install() { + vbin bb + vlicense LICENSE +}