summaryrefslogtreecommitdiff
blob: fca8719df7872e1bf422837fede031fff158ceec (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
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit multiprocessing toolchain-funcs

CRYSTAL_MOLINILLO_PV=0.1.0
CRYSTAL_MOLINILLO_P=crystal-molinillo-${CRYSTAL_MOLINILLO_PV}

DESCRIPTION="Dependency manager for the Crystal language"
HOMEPAGE="https://github.com/crystal-lang/shards"
SRC_URI="
	https://github.com/crystal-lang/shards/archive/v${PV}.tar.gz -> ${P}.tar.gz
	https://github.com/crystal-lang/crystal-molinillo/archive/v${CRYSTAL_MOLINILLO_PV}.tar.gz -> ${CRYSTAL_MOLINILLO_P}.tar.gz
"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"

DEPEND="
	>dev-lang/crystal-0.11.1[yaml]
"
RDEPEND="${DEPEND}"

RESTRICT=test # missing files in tarball

src_prepare() {
	default

	# bundle crystal-molinillo to bootstrap 'shards'
	mkdir -p lib || die
	ln -s ../../${CRYSTAL_MOLINILLO_P} lib/molinillo || die

	tc-export CC
}

src_compile() {
	emake release=1 FLAGS="--link-flags=\"${LDFLAGS}\" --verbose --threads $(makeopts_jobs)"
}

src_install() {
	dobin bin/${PN}
	dodoc README.md
}