summaryrefslogtreecommitdiff
blob: 083818379ede3afa32b346c5c2b1a2772b64aec2 (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-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

FORTRAN_NEEDED=plugins

inherit autotools flag-o-matic fortran-2

DESCRIPTION="Fast implementation of several recombination jet algorithms"
HOMEPAGE="http://www.fastjet.fr/"
SRC_URI="http://www.fastjet.fr/repo/${P}.tar.gz"

LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
IUSE="cgal doc examples +plugins"

RDEPEND="
	cgal? ( sci-mathematics/cgal:=[shared(+)] )
	plugins? ( sci-physics/siscone:= )"
DEPEND="${RDEPEND}"
BDEPEND="doc? ( app-doc/doxygen[dot] )"

PATCHES=( "${FILESDIR}"/${P}-system-siscone.patch )

src_prepare() {
	default
	eautoreconf
}

src_configure() {
	use cgal && \
		has_version 'sci-mathematics/cgal[gmp]' && append-libs -lgmp

	CONFIG_SHELL="${EPREFIX}/bin/bash" \
	econf \
		--disable-static \
		$(use_enable cgal) \
		$(use_enable plugins allplugins) \
		$(use_enable plugins allcxxplugins)
}

src_compile() {
	default

	if use doc; then
		doxygen Doxyfile || die
		HTML_DOCS=( html/. )
	fi
}

src_install() {
	default

	if use examples; then
		emake -C example maintainer-clean
		find example -iname 'makefile*' -delete || die

		docinto examples
		dodoc -r example/.
		docompress -x /usr/share/doc/${PF}/examples
	fi

	# no static archives
	find "${ED}" -name '*.la' -delete || die
}