aboutsummaryrefslogtreecommitdiff
blob: 3bd88def463a013fc1b05ad9b68fd8b60d7ac640 (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
50
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

LLVM_MAX_SLOT=14

MY_PN="${PN%-bin}"
BV=${PV}-1
BV_AMD64=${BV}-linux-x86_64

DESCRIPTION="The Crystal Programming Language"
HOMEPAGE="https://crystal-lang.org https://github.com/crystal-lang/crystal"
SRC_URI="
	amd64? ( https://github.com/${MY_PN}-lang/${MY_PN}/releases/download/${PV}/${MY_PN}-${BV_AMD64}.tar.gz )
	doc? ( https://github.com/${MY_PN}-lang/${MY_PN}/releases/download/${PV}/${MY_PN}-${PV}-docs.tar.gz )
"
S="${WORKDIR}/${MY_PN}-${BV}"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="-* ~amd64"
IUSE="doc"

# file collisions
RDEPEND="
	!dev-lang/crystal
	!games-mud/crystal
	!sci-chemistry/tinker
"

QA_PREBUILT="usr/bin/.*"

src_prepare() {
	default
	rm -r share/licenses || die
}

src_install() {
	dobin bin/*

	insinto /usr
	doins -r share

	insinto /usr/$(get_libdir)
	doins -r lib/crystal

	use doc && HTML_DOCS=( "${WORKDIR}"/${MY_PN}-${PV}-docs )
	einstalldocs
}