summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOz Tiram <oz.tiram@gmail.com>2020-01-29 07:21:43 +0100
committerJoonas Niilola <juippis@gentoo.org>2020-03-18 10:30:26 +0200
commit4345a315c0ec90890696de5da1b71ebbf839d08a (patch)
tree7de5a9db1621a806bb5859eeee24f3507e866d0f /dev-lang/janet
parentnet-misc/youtube-viewer: Add ewarn message about API requirement (diff)
downloadgentoo-4345a315c0ec90890696de5da1b71ebbf839d08a.tar.gz
gentoo-4345a315c0ec90890696de5da1b71ebbf839d08a.tar.bz2
gentoo-4345a315c0ec90890696de5da1b71ebbf839d08a.zip
dev-lang/janet: new package
Janet is a functional and imperative programming language and bytecode interpreter. It is a modern lisp, but lists are replaced by other data structures with better utility and performance (arrays, tables, structs, tuples). The language also supports bridging to native code written in C, meta-programming with macros, and bytecode assembly. Package-Manager: Portage-2.3.84, Repoman-2.3.16 Signed-off-by: Oz Tiram <oz.tiram@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/14503 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'dev-lang/janet')
-rw-r--r--dev-lang/janet/Manifest1
-rw-r--r--dev-lang/janet/files/janet-1.7.0-fix-ldflags-in-pkgconfig.patch11
-rw-r--r--dev-lang/janet/janet-1.7.0.ebuild54
-rw-r--r--dev-lang/janet/metadata.xml28
4 files changed, 94 insertions, 0 deletions
diff --git a/dev-lang/janet/Manifest b/dev-lang/janet/Manifest
new file mode 100644
index 000000000000..7ec9de8ca785
--- /dev/null
+++ b/dev-lang/janet/Manifest
@@ -0,0 +1 @@
+DIST janet-1.7.0.tar.gz 968936 BLAKE2B 49e6381d0f632fe43eefd498b9aaca2ec049e1f0d4fa7b3463bc00ac1ece67c8c3d108515702bfead1934434a8039e7c1f6eaae46aec7340330e5cda78eeaca4 SHA512 c180172f3016d1ca55ac39f2116789027bf622f08f585bf702b17acadd99d07bf91320e09ce21be76c3a1e60d1a8923591d0e07acc90884dac823a2c414f65e7
diff --git a/dev-lang/janet/files/janet-1.7.0-fix-ldflags-in-pkgconfig.patch b/dev-lang/janet/files/janet-1.7.0-fix-ldflags-in-pkgconfig.patch
new file mode 100644
index 000000000000..81df47acc748
--- /dev/null
+++ b/dev-lang/janet/files/janet-1.7.0-fix-ldflags-in-pkgconfig.patch
@@ -0,0 +1,11 @@
+--- ./Makefile 2020-02-02 06:35:17.000000000 +0100
++++ ./Makefile 2020-03-17 23:14:26.172766381 +0100
+@@ -242,7 +242,7 @@
+ echo "Description: Library for the Janet programming language." >> $@
+ $(JANET_TARGET) -e '(print "Version: " janet/version)' >> $@
+ echo 'Cflags: -I$${includedir}' >> $@
+- echo 'Libs: -L$${libdir} -ljanet $(LDFLAGS)' >> $@
++ echo 'Libs: -L$${libdir} -ljanet' >> $@
+ echo 'Libs.private: $(CLIBS)' >> $@
+
+ install: $(JANET_TARGET) build/janet.pc
diff --git a/dev-lang/janet/janet-1.7.0.ebuild b/dev-lang/janet/janet-1.7.0.ebuild
new file mode 100644
index 000000000000..fc13f1d1812b
--- /dev/null
+++ b/dev-lang/janet/janet-1.7.0.ebuild
@@ -0,0 +1,54 @@
+# Copyright 2020 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"
+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"
+
+PATCHES=(
+ "${FILESDIR}/${P}"-fix-ldflags-in-pkgconfig.patch
+)
+
+src_configure() {
+ append-ldflags -Wl,-soname,libjanet.so.0
+}
+
+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='\"f7ee8bd\"'
+ emake PREFIX="/usr" JANET_BUILD="${janet_build}"
+ emake PREFIX="/usr" build/janet.pc JANET_BUILD="${janet_build}"
+ emake PREFIX="/usr" docs JANET_BUILD="${janet_build}"
+}
+
+src_install() {
+ dobin "build/janet"
+ dobin "auxbin/jpm"
+
+ doheader "src/include/janet.h"
+ doheader "src/conf/janetconf.h"
+
+ dolib.so "build/libjanet.so"
+ dosym libjanet.so /usr/$(get_libdir)/libjanet.so.0
+
+ 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"
+}
diff --git a/dev-lang/janet/metadata.xml b/dev-lang/janet/metadata.xml
new file mode 100644
index 000000000000..01118a44a81d
--- /dev/null
+++ b/dev-lang/janet/metadata.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <name>Oz Tiram</name>
+ <email>oz.tiram@gmail.com</email>
+</maintainer>
+<maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+</maintainer>
+<longdescription lang="en">
+ Janet is a functional and imperative programming language and bytecode
+ interpreter. It is a modern lisp, but lists are replaced by other data
+ structures with better utility and performance
+ (arrays, tables, structs, tuples).
+ The language also supports bridging to native code written in C,
+ meta-programming with macros, and bytecode assembly.
+</longdescription>
+<upstream>
+ <remote-id type="github">janet-lang/janet</remote-id>
+</upstream>
+<use>
+ <flag name="static-libs">install janet static library archine,
+ you must enable this flag for using `jpm build`
+ </flag>
+</use>
+</pkgmetadata>