summaryrefslogtreecommitdiff
blob: 38b2af9a08c7e341585ab02b806e8519a359e2ac (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
68
69
70
71
72
73
74
75
76
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit autotools

DESCRIPTION="Qore, the embeddable multithreaded scripting language"
HOMEPAGE="http://qore.org/
	https://github.com/qorelanguage/qore/"

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

	EGIT_REPO_URI="https://github.com/qorelanguage/${PN}.git"
else
	SRC_URI="https://github.com/qorelanguage/${PN}/archive/release-${PV}.tar.gz
		-> ${P}.tar.gz"
	S="${WORKDIR}/${PN}-release-${PV}"

	KEYWORDS="amd64 ~x86"
fi

LICENSE="GPL-2+ LGPL-2.1+ MIT"
SLOT="0"
IUSE="debug"

RDEPEND="
	app-arch/bzip2:=
	dev-libs/libpcre:=
	dev-libs/mpfr:=
	dev-libs/openssl:=
	sys-libs/zlib:=
"
DEPEND="
	${RDEPEND}
"
BDEPEND="
	sys-devel/bison
	sys-devel/flex
"

src_prepare() {
	default

	eautoreconf
}

src_configure() {
	# Needs "bison" and "flex" exactly.
	unset LEX
	unset YACC

	local -a myconf=(
		--disable-optimization
		--disable-profile
		--disable-static-bz2
		--disable-static-common
		--disable-static-openssl
		--disable-static-pcre
		--disable-static-zlib
		$(use_enable debug)
	)
	econf "${myconf[@]}"
}

src_test() {
	PATH="${S}:${PATH}" emake check
}

src_install() {
	default

	find "${ED}" -type f -name "*.la" -delete ||
		die "failed to remove libtool files without corresponding static libraries"
}