* [gentoo-commits] repo/gentoo:master commit in: dev-lang/janet/files/, dev-lang/janet/
@ 2020-03-18 8:30 Joonas Niilola
0 siblings, 0 replies; 2+ messages in thread
From: Joonas Niilola @ 2020-03-18 8:30 UTC (permalink / raw
To: gentoo-commits
commit: 4345a315c0ec90890696de5da1b71ebbf839d08a
Author: Oz Tiram <oz.tiram <AT> gmail <DOT> com>
AuthorDate: Wed Jan 29 06:21:43 2020 +0000
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Wed Mar 18 08:30:26 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4345a315
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 <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/14503
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
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(+)
diff --git a/dev-lang/janet/Manifest b/dev-lang/janet/Manifest
new file mode 100644
index 00000000000..7ec9de8ca78
--- /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 00000000000..81df47acc74
--- /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 00000000000..fc13f1d1812
--- /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 00000000000..01118a44a81
--- /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>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/janet/files/, dev-lang/janet/
@ 2021-07-20 10:25 Joonas Niilola
0 siblings, 0 replies; 2+ messages in thread
From: Joonas Niilola @ 2021-07-20 10:25 UTC (permalink / raw
To: gentoo-commits
commit: 26c3f1626c3b96f87397112c392caea9202f1a4a
Author: Oz N Tiram <oz.tiram <AT> gmail <DOT> com>
AuthorDate: Mon Jul 19 20:20:36 2021 +0000
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Tue Jul 20 10:25:17 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=26c3f162
dev-lang/janet: add 1.16.1
Signed-off-by: Oz N Tiram <oz.tiram <AT> gmail.com>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
dev-lang/janet/Manifest | 1 +
dev-lang/janet/files/janet-1.16.1-make.patch | 13 ++++++
dev-lang/janet/janet-1.16.1.ebuild | 64 ++++++++++++++++++++++++++++
3 files changed, 78 insertions(+)
diff --git a/dev-lang/janet/Manifest b/dev-lang/janet/Manifest
index 035d97b34cd..b861800be74 100644
--- a/dev-lang/janet/Manifest
+++ b/dev-lang/janet/Manifest
@@ -1,2 +1,3 @@
DIST janet-1.13.1.tar.gz 584998 BLAKE2B f1bfd9e62dde786127a1307d38f48fc7e75b9fb09f009f9d01eeefa593b67c2469e213fd366fac7c52e0372e61b1a9afdb558e8a1be1ab2f4f538b5fb39075f3 SHA512 8022ecbaf7680855611202a3c17b8e5f6dc61a9302508c9de5312dbd9e80d40c24786bb5e8ae653ab5a7b00191a2d7c44cc3e305d31245e3e8c53be0e1c80372
DIST janet-1.15.5.tar.gz 601033 BLAKE2B dfc8c2a2d238f2554aae667f706e84905ba15c732fa2f06b3c537f08d064375dcb00043117dfc56328365627e2e8f4e2a8f171731d9d6bc0d48206cea58f127c SHA512 ebdc090de6fbea0c94f0618957a4b36776fa0009298df77b279b79064d4524e73f42723ba2c315167cb6f3a40f2a4dffbb2a865fa2d479ba196aa9f0aa24cbf6
+DIST janet-1.16.1.tar.gz 493490 BLAKE2B 7542644a647d9d2ddd73d8e284f749cdad1900b8df2797c99a2f176c93eca412427b7f571493cfe62f64dd9c90bd12d8506b0f4b6b485ab2d3633e989e735cd9 SHA512 f4be0703676acad8896e41b46d79c4f6d99990c487028f1fd1abd681f756db119a06a5d6a0653b9301afcd62f45d6f1bb7876b9613c0ea28d7199e310a52895d
diff --git a/dev-lang/janet/files/janet-1.16.1-make.patch b/dev-lang/janet/files/janet-1.16.1-make.patch
new file mode 100644
index 00000000000..09429f4ff08
--- /dev/null
+++ b/dev-lang/janet/files/janet-1.16.1-make.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile b/Makefile
+index 7efef93b..12758ab0 100644
+--- a/Makefile
++++ b/Makefile
+@@ -254,7 +254,7 @@ build/doc.html: $(JANET_TARGET) tools/gendoc.janet
+
+ build/jpm: jpm $(JANET_TARGET)
+ $(JANET_TARGET) tools/patch-jpm.janet jpm build/jpm "--libpath=$(LIBDIR)" "--headerpath=$(INCLUDEDIR)/janet" "--binpath=$(BINDIR)"
+- chmod +x build/jpm
++ chmod +x jpm
+
+ .INTERMEDIATE: build/janet.pc
+ build/janet.pc: $(JANET_TARGET)
diff --git a/dev-lang/janet/janet-1.16.1.ebuild b/dev-lang/janet/janet-1.16.1.ebuild
new file mode 100644
index 00000000000..16f31087d1a
--- /dev/null
+++ b/dev-lang/janet/janet-1.16.1.ebuild
@@ -0,0 +1,64 @@
+# 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}"
+
+PATCHES="${FILESDIR}/janet-1.16.1-make.patch"
+
+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}"
+ emake LIBDIR="/usr/$(get_libdir)" PREFIX="/usr" build/jpm JANET_BUILD="${janet_build}"
+}
+
+src_install() {
+ dobin "build/janet"
+ dobin "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"
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-20 10:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-18 8:30 [gentoo-commits] repo/gentoo:master commit in: dev-lang/janet/files/, dev-lang/janet/ Joonas Niilola
-- strict thread matches above, loose matches on Subject: below --
2021-07-20 10:25 Joonas Niilola
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox