summaryrefslogtreecommitdiff
blob: 52171d64eca0f4849a316490e04ed7b9feecff42 (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
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-sci/rasmol/rasmol-2.6_beta2.ebuild,v 1.6 2003/09/06 22:23:06 msterret Exp $

DESCRIPTION="Free program which displays molecular structure."
HOMEPAGE="http://www.umass.edu/microbio/rasmol/index2.htm"
KEYWORDS="x86"
SLOT="0"
LICENSE="public-domain"

DEPEND="virtual/x11"

P0=rasmol_2.6b2
SRC_URI="ftp://ftp.debian.org/debian/pool/main/r/${PN}/${P0}.orig.tar.gz
		ftp://ftp.debian.org/debian/pool/main/r/${PN}/${P0}-6.diff.gz"

S="${WORKDIR}/RasMol2"

src_unpack() {
	unpack ${P0}.orig.tar.gz
	zcat ${DISTDIR}/${P0}-6.diff.gz | patch -d ${S} -p1 || die "debian patch failed"
}

src_compile() {
	xmkmf || die "xmkmf failed"
	make DEPTHDEF=-DEIGHTBIT=1 CC=gcc \
		CDEBUGFLAGS="${CFLAGS} -DLINUX" \
		|| die "8-bit make failed"
	mv rasmol rasmol.8
	make clean
	make DEPTHDEF=-DSIXTEENBIT=1 CC=gcc \
		CDEBUGFLAGS="${CFLAGS} -DLINUX" \
		|| die "16-bit make failed"
	mv rasmol rasmol.16
	make clean
	make DEPTHDEF=-DTHIRTYTWOBIT=1 CC=gcc \
		CDEBUGFLAGS="${CFLAGS} -DLINUX" \
		|| die "32-bit make failed"
	mv rasmol rasmol.32
	make clean
}

src_install () {
	newbin debian/rasmol.sh.debian rasmol
	insinto /usr/lib/${PN}
	doins rasmol.{8,16,32} rasmol.hlp
	chmod a+x ${D}/usr/lib/${PN}/rasmol.{8,16,32}
	dodoc INSTALL Announce PROJECTS README TODO doc/manual.ps doc/rasmol.txt
	dodoc doc/refcard.doc doc/refcard.ps
	doman debian/rasmol.1
	insinto /usr/lib/${PN}/databases
	doins data/*
}