summaryrefslogtreecommitdiff
blob: d1d9a0f07bff1a1f40bf7a92755bba5576a08c39 (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-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=6

inherit autotools

MYPN=CCfits
MYP=${MYPN}-${PV}

DESCRIPTION="C++ interface for cfitsio"
HOMEPAGE="http://heasarc.gsfc.nasa.gov/fitsio/CCfits/"
SRC_URI="${HOMEPAGE}/${MYP}.tar.gz"

LICENSE="BSD"
SLOT="0"
KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
IUSE="doc static-libs"

RDEPEND=">=sci-libs/cfitsio-3.080"
DEPEND="${RDEPEND}"

S="${WORKDIR}/${MYPN}"

DOCS=( CHANGES README.INSTALL )
PATCHES=(
	"${FILESDIR}"/${PN}-2.2-makefile.patch # avoid building cookbook by default and no rpath
)

src_prepare() {
	default
	mv configure.{in,ac} || die
	AT_M4DIR=config/m4 eautoreconf
}

src_configure() {
	econf $(use_enable static-libs static)
}

src_install () {
	if use doc; then
		DOCS+=( *.pdf )
		HTML_DOCS=( html/. )
	fi
	default

	find "${ED}" -name '*.la' -delete || die
}