summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOz N Tiram <oz.tiram@gmail.com>2021-01-11 20:48:26 +0100
committerJoonas Niilola <juippis@gentoo.org>2021-01-28 09:36:21 +0200
commit62de7343cd60650fe93527fdebe2583221601004 (patch)
tree0d7aedb590306df64aa7aaf327ef02684846f77d /dev-lang/janet/janet-1.13.1.ebuild
parentapp-backup/zbackup: cmake eclass, EAPI 7 (diff)
downloadgentoo-62de7343cd60650fe93527fdebe2583221601004.tar.gz
gentoo-62de7343cd60650fe93527fdebe2583221601004.tar.bz2
gentoo-62de7343cd60650fe93527fdebe2583221601004.zip
dev-lang/janet: bump version to 0.13.1
Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Oz Tiram <oz.tiram@gmail.com> Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'dev-lang/janet/janet-1.13.1.ebuild')
-rw-r--r--dev-lang/janet/janet-1.13.1.ebuild62
1 files changed, 62 insertions, 0 deletions
diff --git a/dev-lang/janet/janet-1.13.1.ebuild b/dev-lang/janet/janet-1.13.1.ebuild
new file mode 100644
index 000000000000..eafa5bbb9208
--- /dev/null
+++ b/dev-lang/janet/janet-1.13.1.ebuild
@@ -0,0 +1,62 @@
+# 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"
+
+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='\"1.13.1\"'
+ 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}"
+ emake LIBDIR="/usr/$(get_libdir)" PREFIX="/usr" build/jpm JANET_BUILD="${janet_build}"
+}
+
+src_install() {
+ dobin "build/janet"
+ dobin "build/jpm"
+ 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"
+ doman "jpm.1"
+
+ insinto /usr/$(get_libdir)/pkgconfig/
+ doins "build/janet.pc"
+ dodoc -r examples
+ dodoc "build/doc.html"
+ # required for jpm
+ keepdir /usr/$(get_libdir)/janet/.cache
+}
+
+pkg_postinst() {
+ elog "Enable use flag \"static-libs\" for building stand-alone executables with jpm"
+}