1 |
commit: 9cbbbbf7933c8e109205ffc48d52db704857b6d1 |
2 |
Author: Oz N Tiram <oz.tiram <AT> gmail <DOT> com> |
3 |
AuthorDate: Thu Jun 9 04:47:53 2022 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jul 2 17:35:14 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9cbbbbf7 |
7 |
|
8 |
dev-lang/janet: add 1.22.0 |
9 |
|
10 |
Signed-off-by: Oz N Tiram <oz.tiram <AT> gmail.com> |
11 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
12 |
|
13 |
dev-lang/janet/Manifest | 1 + |
14 |
dev-lang/janet/janet-1.22.0.ebuild | 73 ++++++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 74 insertions(+) |
16 |
|
17 |
diff --git a/dev-lang/janet/Manifest b/dev-lang/janet/Manifest |
18 |
index 9ff51eab62ec..a151f86a40c4 100644 |
19 |
--- a/dev-lang/janet/Manifest |
20 |
+++ b/dev-lang/janet/Manifest |
21 |
@@ -1,2 +1,3 @@ |
22 |
DIST janet-1.17.2.tar.gz 488524 BLAKE2B 33e801eb10b46d44a36b95bd29ea318ab3daa88654f47e12303344d2362a2ecc0d0f2ab9371d9539e0787df08664f503ee268b7acf967bd74a929992bc3ea2be SHA512 608ae20992d90cd93a364239c967fef8fdd1c631f1777211d916c6dc16cac5f007f52565bdf24cc0f8af1f521a0977a7245a3c137fc3b61583c2900e26fee81c |
23 |
DIST janet-1.19.2.tar.gz 486633 BLAKE2B 420b98218cf6a592ab385f5d9432d9e8ae98fe0a4b9c294aa2783e3ee810d256ef1ccf17c3986d7e490e4fcc046cb9a25b2d0f09ada223c19104e49d703d5d33 SHA512 4181f15ad61bfba46ce87acd148166bd0ab3c5dd5fb608d8d8722b912ecfa435baa7d881d4a8163aabb1b06bca2983b108dfb7256efa854c12c136e4f24c1ef2 |
24 |
+DIST janet-1.22.0.tar.gz 494011 BLAKE2B 2193cf0d87421adb122e86347d47ef1a9d3141d7dedf4ba88ed3d0e97c1b22a8216e1e42a6431266c6fbb4dcee665db63839e90ec9e5530491c64a94b8b11b04 SHA512 c1e90dafa833618e0999a1a53005241b768dee66bf7e6d4cc60b7c7ce87fccba955ca2faafd4eacda320801667acbfc56087f423a4ad6abe7e97d1f08e136107 |
25 |
|
26 |
diff --git a/dev-lang/janet/janet-1.22.0.ebuild b/dev-lang/janet/janet-1.22.0.ebuild |
27 |
new file mode 100644 |
28 |
index 000000000000..bff2523d8574 |
29 |
--- /dev/null |
30 |
+++ b/dev-lang/janet/janet-1.22.0.ebuild |
31 |
@@ -0,0 +1,73 @@ |
32 |
+# Copyright 2022 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=7 |
36 |
+ |
37 |
+inherit flag-o-matic toolchain-funcs |
38 |
+ |
39 |
+DESCRIPTION="A dynamic Lisp dialect and bytecode vm" |
40 |
+HOMEPAGE="https://janet-lang.org https://github.com/janet-lang/janet/" |
41 |
+SRC_URI="https://github.com/janet-lang/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
42 |
+ |
43 |
+LICENSE="MIT" |
44 |
+SLOT="0" |
45 |
+KEYWORDS="~amd64 ~x86" |
46 |
+IUSE="static-libs" |
47 |
+ |
48 |
+MY_RELEASE="${PV::-2}" |
49 |
+ |
50 |
+src_configure() { |
51 |
+ tc-export CC |
52 |
+ |
53 |
+ append-ldflags -Wl,-soname,libjanet.so.1.${MY_RELEASE} |
54 |
+ append-cflags -fPIC |
55 |
+} |
56 |
+ |
57 |
+src_compile() { |
58 |
+ # janet_build is the git hash of the commit related to the |
59 |
+ # current release - it defines a constant which is then shown |
60 |
+ # when starting janet |
61 |
+ local janet_build='\"'${PV}'\"' |
62 |
+ |
63 |
+ local target |
64 |
+ for target in '' build/janet.pc docs ; do |
65 |
+ einfo "Building: ${target:-main}" |
66 |
+ emake \ |
67 |
+ LIBDIR="/usr/$(get_libdir)" \ |
68 |
+ PREFIX="/usr" \ |
69 |
+ JANET_BUILD="${janet_build}" \ |
70 |
+ CFLAGS="${CFLAGS}" \ |
71 |
+ LDFLAGS="${LDFLAGS}" \ |
72 |
+ ${target} |
73 |
+ done |
74 |
+} |
75 |
+ |
76 |
+src_install() { |
77 |
+ dobin build/janet |
78 |
+ |
79 |
+ insinto /usr/include/janet |
80 |
+ doheader src/include/janet.h |
81 |
+ doheader src/conf/janetconf.h |
82 |
+ |
83 |
+ dolib.so build/libjanet.so |
84 |
+ dosym libjanet.so /usr/$(get_libdir)/libjanet.so.${MY_RELEASE} |
85 |
+ dosym libjanet.so.${MY_RELEASE} /usr/$(get_libdir)/libjanet.so.${PV} |
86 |
+ |
87 |
+ if use static-libs; then |
88 |
+ dolib.a build/libjanet.a |
89 |
+ fi |
90 |
+ |
91 |
+ doman janet.1 |
92 |
+ |
93 |
+ insinto /usr/$(get_libdir)/pkgconfig/ |
94 |
+ doins build/janet.pc |
95 |
+ |
96 |
+ dodoc -r examples |
97 |
+ dodoc build/doc.html |
98 |
+} |
99 |
+ |
100 |
+pkg_postinst() { |
101 |
+ elog "Note: jpm has been extracted to its own repository upstream." |
102 |
+ elog "Follow the upstream instructions on how to install it." |
103 |
+ elog "Enable use flag \"static-libs\" for building stand-alone executables with jpm" |
104 |
+} |