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

EAPI=4

inherit eutils fortran-2 toolchain-funcs

DESCRIPTION="The crystallographic computing system"
HOMEPAGE="http://www-xray.fzu.cz/jana/jana.html"
SRC_URI="ftp://ftp.fzu.cz/pub/cryst/beta2000/${PN}.tar.gz"

LICENSE="freedist"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

RDEPEND="
	x11-libs/libX11
	virtual/fortran"
DEPEND="${RDEPEND}
	x11-proto/xproto
	sys-apps/gawk"

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

src_prepare() {
	einfo "setting up the Makefile for $(tc-getFC)"

	if [[ $(tc-getFC) =~ gfortran ]]; then
		epatch "${FILESDIR}/${PV}-gfortran.diff"
	elif [[ $(tc-getFC) =~ g77 ]]; then
		epatch "${FILESDIR}/${PV}-g77.diff"
	fi
}

src_compile() {
	emake -j1 CCOM="$(tc-getCC)"
}

src_install() {
	dobin jana2000
	dodoc README.TXT

	insinto /usr/share/${PN}/source
	doins -r source/{fg,data}

	echo "JANADIR=/usr/share/${PN}" >"${T}/jana2000env"
	newenvd "${T}/jana2000env" 99jana2000env
}

pkg_postinst() {
	elog "The Development of Jana2000 is stopped."
	elog "The successor Jana2006 is not yet available for unix/linux platforms"
	elog "check at http://www-xray.fzu.cz/jana/jana.html for news"
	elog "please cite Jana2000 as follows:"
	elog "  Petricek, V., Dusek, M. and Palatinus, L. (2000):"
	elog "  Jana2006. The crystallographic computing system."
	elog "  Institute of Physics, Praha, Czech Republic."
}