aboutsummaryrefslogtreecommitdiff
blob: e887f037552925609c96f1a1cc4d7422ad309945 (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
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=5

FORTRAN_NEEDED=fortran
FORTRAN_STANDARD=90
PYTHON_COMPAT=( python2_7 )
inherit fortran-2 flag-o-matic python-single-r1

DESCRIPTION="Data format for neutron and x-ray scattering data"
HOMEPAGE="http://nexusformat.org/"
SRC_URI="http://download.nexusformat.org/kits/${PV}/${P}.tar.gz"

LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64"
IUSE="cbf doc fortran guile java python swig tcl xml"

RDEPEND="
	sci-libs/hdf5
	python?	( ${PYTHON_DEPS} )
	xml?	( dev-libs/mxml )
	cbf?	( sci-libs/cbflib )
	guile?	( dev-scheme/guile )
" # N.B. the website says it depends on HDF4 too, but I find it builds fine without it

DEPEND="${RDEPEND}
	doc?	( app-doc/doxygen dev-tex/xcolor )
	swig?	( dev-lang/swig )
"

pkg_setup() {
	use python && python-single-r1_pkg_setup
	# Handling of dependencies between Fortran module files doesn't play well with parallel make
	use fortran && export MAKEOPTS="${MAKEOPTS} -j1 "
	use fortran && fortran-2_pkg_setup
}

src_configure() {
	# Linking between Fortran libraries gives a relocation error, using workaround suggested at:
	# http://www.gentoo.org/proj/en/base/amd64/howtos/?part=1&chap=3
	use fortran && append-fflags -fPIC

	econf	$(use_with doc doxygen) \
		$(use_with fortran f90) \
		$(use_with swig) \
		$(use_with xml) \
		$(use_with cbf cbflib) \
		$(use_with guile) \
		$(use_with java) \
		$(use_with python)
}