summaryrefslogtreecommitdiff
blob: d64df43d7139d5474d861292fda8a3d8f0e7d67f (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-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/prekin/prekin-6.51.081122.ebuild,v 1.3 2010/10/10 21:28:36 ulm Exp $

EAPI="2"

inherit toolchain-funcs eutils multilib

MY_P="${PN}.${PV}"

DESCRIPTION="Prepares molecular kinemages (input files for Mage & KiNG) from PDB-format coordinate files"
HOMEPAGE="http://kinemage.biochem.duke.edu/software/prekin.php"
SRC_URI="http://kinemage.biochem.duke.edu/downloads/software/prekin/${MY_P}.src.tgz"

LICENSE="richardson"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
IUSE="X"

RDEPEND="
	x11-libs/libX11
	x11-libs/libXt
	X? ( >=x11-libs/openmotif-2.3:0 )"
DEPEND="${RDEPEND}"

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

src_prepare() {
	epatch \
		"${FILESDIR}"/${PV}-Makefile.patch \
		"${FILESDIR}"/${PV}-overflow.patch
	sed  \
		-e 's:cc:$(CC):g' \
		-e "s:GENTOOLIBDIR:$(get_libdir):g" \
		"${S}"/Makefile.linux > Makefile
}

src_compile() {
	local mytarget

	if use X; then
		mytarget="${PN}"
	else
		mytarget="nogui"
	fi

	emake \
		CC="$(tc-getCC)" \
		${mytarget} || die "make failed"
}

src_install() {
	dobin "${S}"/prekin || die "dobin failed"
}