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

EAPI=6

inherit eutils autotools ltprune

DESCRIPTION="GNU Astronomy Utilities"
HOMEPAGE="https://www.gnu.org/software/gnuastro"
SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"

LICENSE="GPL-3"
SLOT="0/1"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"

IUSE="static-libs threads"

# jpeg, pdf, and libgit2 are forced deps
# because they are automagically detected.

RDEPEND="
	app-text/ghostscript-gpl
	dev-libs/libgit2:=
	sci-astronomy/wcslib:0=
	sci-libs/cfitsio:0=
	sci-libs/gsl:0=
	virtual/jpeg:0=
"
DEPEND="${RDEPEND}"

src_prepare() {
	default
	sed -i -e 's/-O3//' configure.ac || die
	eautoreconf
}

src_configure() {
	local myeconfargs=(
		--enable-bin-op-alltypes
		$(use_enable static-libs static)
		$(use_enable threads)
	)
	econf ${myeconfargs[@]}
}

src_install() {
	default
	use static-libs || prune_libtool_files --all
}