|
Lines 1-6
Link Here
|
| 1 |
# Copyright 1999-2008 Gentoo Foundation |
1 |
# Copyright 1999-2008 Gentoo Foundation |
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/platon/platon-20080725.ebuild,v 1.1 2008/08/30 11:27:28 markusle Exp $ |
3 |
# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/platon/platon-20080702.ebuild,v 1.2 2008/07/07 05:36:37 dberkholz Exp $ |
| 4 |
|
4 |
|
| 5 |
inherit fortran toolchain-funcs flag-o-matic |
5 |
inherit fortran toolchain-funcs flag-o-matic |
| 6 |
|
6 |
|
|
Lines 11-17
Link Here
|
| 11 |
RESTRICT="fetch" |
11 |
RESTRICT="fetch" |
| 12 |
LICENSE="free-noncomm" |
12 |
LICENSE="free-noncomm" |
| 13 |
SLOT="0" |
13 |
SLOT="0" |
| 14 |
KEYWORDS="~ppc ~x86 ~amd64" |
14 |
KEYWORDS="~amd64 ~x86" |
| 15 |
IUSE="" |
15 |
IUSE="" |
| 16 |
# Can't do libf2c dependent on whether <gcc-4 is selected for the build, |
16 |
# Can't do libf2c dependent on whether <gcc-4 is selected for the build, |
| 17 |
# so we must always require it |
17 |
# so we must always require it |
|
Lines 36-47
Link Here
|
| 36 |
} |
36 |
} |
| 37 |
|
37 |
|
| 38 |
src_compile() { |
38 |
src_compile() { |
| 39 |
local F2C |
|
|
| 40 |
# Needs signal_ and system_, which g77 and libf2c provide, |
| 41 |
# but gfortran does not |
| 42 |
if [[ ${FORTRANC} != g77 ]]; then |
| 43 |
F2C="-lf2c" |
| 44 |
fi |
| 45 |
|
39 |
|
| 46 |
# easy to ICE, at least on gcc 4.3 |
40 |
# easy to ICE, at least on gcc 4.3 |
| 47 |
strip-flags |
41 |
strip-flags |
|
Lines 49-58
Link Here
|
| 49 |
COMMAND="$(tc-getCC) -c ${CFLAGS} xdrvr.c" |
43 |
COMMAND="$(tc-getCC) -c ${CFLAGS} xdrvr.c" |
| 50 |
echo ${COMMAND} |
44 |
echo ${COMMAND} |
| 51 |
${COMMAND} || die "Compilation of xdrvr.c failed" |
45 |
${COMMAND} || die "Compilation of xdrvr.c failed" |
| 52 |
COMMAND="${FORTRANC} -c ${FFLAGS:- -O2} -fno-second-underscore platon.f" |
46 |
COMMAND="${FORTRANC} -c ${FFLAGS:- -O2} platon.f" |
| 53 |
echo ${COMMAND} |
47 |
echo ${COMMAND} |
| 54 |
${COMMAND} || die "Compilation of platon.f failed" |
48 |
${COMMAND} || die "Compilation of platon.f failed" |
| 55 |
COMMAND="${FORTRANC} -o platon ${LDFLAGS} platon.o xdrvr.o -lX11 ${F2C}" |
49 |
COMMAND="${FORTRANC} -o platon ${LDFLAGS} platon.o xdrvr.o -lX11" |
| 56 |
echo ${COMMAND} |
50 |
echo ${COMMAND} |
| 57 |
${COMMAND} || die "Linking failed" |
51 |
${COMMAND} || die "Linking failed" |
| 58 |
} |
52 |
} |