summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOz N Tiram <oz.tiram@gmail.com>2021-10-03 21:10:33 +0200
committerSam James <sam@gentoo.org>2021-10-20 03:02:33 +0000
commit35d12680238d06114167a0bbf1bb187e657b28d3 (patch)
treefd819a466a24aacd91d3103af42b73b8e0a09686 /dev-lang
parentdev-go/delve: ebuild tidying (diff)
downloadgentoo-35d12680238d06114167a0bbf1bb187e657b28d3.tar.gz
gentoo-35d12680238d06114167a0bbf1bb187e657b28d3.tar.bz2
gentoo-35d12680238d06114167a0bbf1bb187e657b28d3.zip
dev-lang/janet: add 1.17.2
Signed-off-by: Oz N Tiram <oz.tiram@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/janet/Manifest1
-rw-r--r--dev-lang/janet/janet-1.17.2.ebuild65
2 files changed, 66 insertions, 0 deletions
diff --git a/dev-lang/janet/Manifest b/dev-lang/janet/Manifest
index 9fb109a25539..487676aa4940 100644
--- a/dev-lang/janet/Manifest
+++ b/dev-lang/janet/Manifest
@@ -1,2 +1,3 @@
DIST janet-1.15.5.tar.gz 601033 BLAKE2B dfc8c2a2d238f2554aae667f706e84905ba15c732fa2f06b3c537f08d064375dcb00043117dfc56328365627e2e8f4e2a8f171731d9d6bc0d48206cea58f127c SHA512 ebdc090de6fbea0c94f0618957a4b36776fa0009298df77b279b79064d4524e73f42723ba2c315167cb6f3a40f2a4dffbb2a865fa2d479ba196aa9f0aa24cbf6
DIST janet-1.16.1.tar.gz 493490 BLAKE2B 7542644a647d9d2ddd73d8e284f749cdad1900b8df2797c99a2f176c93eca412427b7f571493cfe62f64dd9c90bd12d8506b0f4b6b485ab2d3633e989e735cd9 SHA512 f4be0703676acad8896e41b46d79c4f6d99990c487028f1fd1abd681f756db119a06a5d6a0653b9301afcd62f45d6f1bb7876b9613c0ea28d7199e310a52895d
+DIST janet-1.17.2.tar.gz 488524 BLAKE2B 33e801eb10b46d44a36b95bd29ea318ab3daa88654f47e12303344d2362a2ecc0d0f2ab9371d9539e0787df08664f503ee268b7acf967bd74a929992bc3ea2be SHA512 608ae20992d90cd93a364239c967fef8fdd1c631f1777211d916c6dc16cac5f007f52565bdf24cc0f8af1f521a0977a7245a3c137fc3b61583c2900e26fee81c
diff --git a/dev-lang/janet/janet-1.17.2.ebuild b/dev-lang/janet/janet-1.17.2.ebuild
new file mode 100644
index 000000000000..c06aad8f7409
--- /dev/null
+++ b/dev-lang/janet/janet-1.17.2.ebuild
@@ -0,0 +1,65 @@
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic
+
+DESCRIPTION="A dynamic Lisp dialect and bytecode vm"
+HOMEPAGE="https://janet-lang.org https://github.com/janet-lang/janet/"
+SRC_URI="https://github.com/janet-lang/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static-libs test"
+
+RESTRICT="!test? ( test )"
+
+MY_RELEASE="${PV::-2}"
+
+src_configure() {
+ append-ldflags -Wl,-soname,libjanet.so.1.${MY_RELEASE}
+ append-cflags -fPIC
+}
+
+src_compile() {
+ # janet_build is the git hash of the commit related to the
+ # current release - it defines a constant which is then shown
+ # when starting janet
+ local janet_build='\"'${PV}'\"'
+ emake LIBDIR="/usr/$(get_libdir)" PREFIX="/usr" JANET_BUILD="${janet_build}"
+ emake LIBDIR="/usr/$(get_libdir)" PREFIX="/usr" build/janet.pc JANET_BUILD="${janet_build}"
+ emake LIBDIR="/usr/$(get_libdir)" PREFIX="/usr" docs JANET_BUILD="${janet_build}"
+}
+
+src_install() {
+ dobin "build/janet"
+ insinto "usr/include/janet"
+ doheader "src/include/janet.h"
+ doheader "src/conf/janetconf.h"
+
+ dolib.so "build/libjanet.so"
+ dosym libjanet.so /usr/$(get_libdir)/libjanet.so.${MY_RELEASE}
+ dosym libjanet.so.${MY_RELEASE} /usr/$(get_libdir)/libjanet.so.${PV}
+
+ if use static-libs; then
+ dolib.a "build/libjanet.a"
+ fi
+ doman "janet.1"
+
+ insinto /usr/$(get_libdir)/pkgconfig/
+ doins "build/janet.pc"
+ dodoc -r examples
+ dodoc "build/doc.html"
+}
+
+src_test(){
+ emake test
+}
+
+pkg_postinst() {
+ elog "Note: jpm has been extracted to it's own repository upstream."
+ elog "Follow the upstream instructions on how to install it."
+ elog "Enable use flag \"static-libs\" for building stand-alone executables with jpm"
+}