aboutsummaryrefslogtreecommitdiff
blob: 0bb430de192f67405fb1ee0df961498aa91e9a90 (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
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=3

inherit eutils

MY_PN="FoX"
MY_P="${MY_PN}-${PV}"
DIRV="${PV/%[0-9]/X}"

DESCRIPTION="A library designed to allow the easy use of XML from Fortran"
HOMEPAGE="http://www1.gly.bris.ac.uk/~walker/FoX/"
SRC_URI="http://www1.gly.bris.ac.uk/~walker/FoX/source/${MY_PN}-${DIRV}/${MY_P}-full.tar.gz"
LICENSE="BSD ZLIB"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="debug doc dom fast sax wcml wxml"
RDEPEND=""
DEPEND="${RDEPEND}"
S="${WORKDIR}/${MY_P}"

src_prepare() {
	epatch "${FILESDIR}"/4.0.4-install-customizations.patch
}

src_configure() {
		econf --prefix=/usr \
		$(use_enable debug) \
		$(use_enable dom) \
		$(use_enable fast) \
		$(use_enable sax) \
		$(use_enable wcml) \
		$(use_enable wxml) \
		FCFLAGS="${FCFLAGS:- ${FFLAGS:- -O2}}"
}

src_compile() {
	emake -j1 || die "make failed"
}

src_test() {
	emake -j1 check || die "make check failed"
	einfo "Please look at the last few RESULT lines for a summary."
}

src_install() {
	sed -i -e's%^comp_prefix=.*$%comp_prefix=/usr%' \
		-e's%comp_prefix/finclude%comp_prefix/lib/finclude%' \
		FoX-config
	emake -j1 DESTDIR="${D}" install || die "make install failed"
	dodoc README.FoX.txt Changelog LICENSE || die "dodoc failed"
	if use doc; then
		dohtml -r DoX/ || die "installing the HTML docs failed"
	fi
}