summaryrefslogtreecommitdiff
blob: 2d6148517bdf0ee92e4d93583acdd453437fbcb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit toolchain-funcs

DESCRIPTION="Purely functional dialect of Scheme"
HOMEPAGE="https://haltp.org/posts/owl.html
	https://gitlab.com/owl-lisp/owl/"

if [[ "${PV}" == *9999* ]] ; then
	inherit git-r3

	EGIT_REPO_URI="https://gitlab.com/owl-lisp/owl.git"
else
	SRC_URI="https://gitlab.com/owl-lisp/owl/-/archive/v${PV}/owl-v${PV}.tar.bz2"
	S="${WORKDIR}/owl-v${PV}"

	KEYWORDS="~amd64"
fi

LICENSE="MIT"
SLOT="0"

PATCHES=( "${FILESDIR}/${PN}-0.2.1-make-no-test.patch" )

src_prepare() {
	default

	sed -i 's|make bin/vm|$(MAKE) bin/vm|g' "${S}"/Makefile || die

	# Skip "tests/char-ready.sh", "does not work in background subshell".
	rm tests/char-ready.sh || die
}

src_compile(){
	emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" owl
}

src_install() {
	exeinto /usr/bin
	doexe bin/ol
	newexe bin/vm ovm

	doman doc/*.1

	einstalldocs
}