summaryrefslogtreecommitdiff
blob: 776b27a6ebe68c6dfa0406625b56287fe9e78457 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DESCRIPTION="Multi-target universal programming language"
HOMEPAGE="https://haxe.org/
	https://github.com/HaxeFoundation/haxe/"

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

	EGIT_REPO_URI="https://github.com/HaxeFoundation/haxe.git"
else
	# Haxe-debian is a distribution variant then contains the required git modules.
	SRC_URI="https://github.com/HaxeFoundation/haxe-debian/archive/upstream/${PV}.tar.gz
		-> ${P}.tar.gz"
	S="${WORKDIR}/haxe-debian-upstream-${PV}"

	KEYWORDS="~amd64"
fi

LICENSE="GPL-2+ MIT"
SLOT="0/${PV}"
IUSE="+ocamlopt"
RESTRICT="strip"

RDEPEND="
	>=dev-lang/ocaml-4:=[ocamlopt?]
	>=dev-ml/luv-0.5.12:=
	dev-ml/extlib:=
	dev-ml/ocaml-sha:=
	dev-ml/ptmap:=
	dev-ml/sedlex:=
	dev-ml/xml-light:=

	dev-lang/neko:=
	dev-libs/boehm-gc:=
	dev-libs/libpcre:=
	net-libs/mbedtls:=
	sys-libs/zlib:=
"
DEPEND="
	${RDEPEND}
"
BDEPEND="
	dev-ml/camlp5
	dev-ml/dune
	dev-ml/findlib
"

QA_FLAGS_IGNORED="usr/bin/haxelib"
QA_PRESTRIPPED="usr/bin/haxelib"

src_configure() {
	export OCAMLOPT="$(usex ocamlopt ocamlopt.opt ocamlopt)"
}

src_compile() {
	emake -j1 BRANCH="" COMMIT_DATE="" COMMIT_SHA="" \
		OCAMLOPT="${OCAMLOPT}" INSTALL_DIR="/usr"
}

src_install() {
	emake DESTDIR="${D}" INSTALL_DIR="/usr" install
	dodoc *.md
}