dev-python/pytest: arm64 stable (bug #723996)
[gentoo.git] / dev-lang / janet / janet-1.7.0.ebuild
1 # Copyright 2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit flag-o-matic
7
8 DESCRIPTION="A dynamic Lisp dialect and bytecode vm"
9 HOMEPAGE="https://janet-lang.org https://github.com/janet-lang/janet/"
10 SRC_URI="https://github.com/janet-lang/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
11
12 LICENSE="MIT"
13 SLOT="0"
14 KEYWORDS="~amd64 ~x86"
15 IUSE="static-libs"
16
17 PATCHES=(
18         "${FILESDIR}/${P}"-fix-ldflags-in-pkgconfig.patch
19 )
20
21 src_configure() {
22         append-ldflags -Wl,-soname,libjanet.so.0
23 }
24
25 src_compile() {
26         # janet_build is the git hash of the commit related to the
27         # current release - it defines a constant which is then shown
28         # when starting janet
29         local janet_build='\"f7ee8bd\"'
30         emake PREFIX="/usr" JANET_BUILD="${janet_build}"
31         emake PREFIX="/usr" build/janet.pc JANET_BUILD="${janet_build}"
32         emake PREFIX="/usr" docs JANET_BUILD="${janet_build}"
33 }
34
35 src_install() {
36         dobin "build/janet"
37         dobin "auxbin/jpm"
38
39         doheader "src/include/janet.h"
40         doheader "src/conf/janetconf.h"
41
42         dolib.so "build/libjanet.so"
43         dosym libjanet.so /usr/$(get_libdir)/libjanet.so.0
44
45         if use static-libs; then
46                 dolib.a "build/libjanet.a"
47         fi
48         doman "janet.1"
49         doman "jpm.1"
50
51         insinto /usr/$(get_libdir)/pkgconfig/
52         doins "build/janet.pc"
53         dodoc -r examples
54         dodoc "build/doc.html"
55 }