From 4345a315c0ec90890696de5da1b71ebbf839d08a Mon Sep 17 00:00:00 2001 From: Oz Tiram Date: Wed, 29 Jan 2020 07:21:43 +0100 Subject: 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 Closes: https://github.com/gentoo/gentoo/pull/14503 Signed-off-by: Joonas Niilola --- dev-lang/janet/Manifest | 1 + .../janet-1.7.0-fix-ldflags-in-pkgconfig.patch | 11 +++++ dev-lang/janet/janet-1.7.0.ebuild | 54 ++++++++++++++++++++++ dev-lang/janet/metadata.xml | 28 +++++++++++ 4 files changed, 94 insertions(+) create mode 100644 dev-lang/janet/Manifest create mode 100644 dev-lang/janet/files/janet-1.7.0-fix-ldflags-in-pkgconfig.patch create mode 100644 dev-lang/janet/janet-1.7.0.ebuild create mode 100644 dev-lang/janet/metadata.xml 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 @@ + + + + + Oz Tiram + oz.tiram@gmail.com + + + proxy-maint@gentoo.org + Proxy Maintainers + + + 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. + + + janet-lang/janet + + + install janet static library archine, + you must enable this flag for using `jpm build` + + + -- cgit v1.2.3-65-gdbad