/[gentoo-x86]/sci-chemistry/molden/molden-4.8-r2.ebuild
Gentoo

Contents of /sci-chemistry/molden/molden-4.8-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Sat Jun 23 11:21:23 2012 UTC (2 years, 6 months ago) by jlec
Branch: MAIN
sci-chemistry/molden: Fix buffer overflow, #342907; Version Bump, #355741; Fix build failures, #358917, #423015; drop old

(Portage version: 2.2.0_alpha111/cvs/Linux x86_64)

1 jlec 1.1 # Copyright 1999-2012 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3     # $Header: /var/cvsroot/gentoo-x86/sci-chemistry/molden/molden-4.8-r1.ebuild,v 1.6 2011/06/21 16:03:06 jlec Exp $
4    
5     EAPI=4
6    
7     inherit eutils fortran-2 flag-o-matic toolchain-funcs
8    
9     MY_P="${PN}${PV}"
10    
11     DESCRIPTION="Display molecular density from GAMESS-UK, GAMESS-US, GAUSSIAN and Mopac/Ampac"
12     HOMEPAGE="http://www.cmbi.kun.nl/~schaft/molden/molden.html"
13     SRC_URI="ftp://ftp.cmbi.kun.nl/pub/molgraph/${PN}/${MY_P}.tar.gz"
14    
15     LICENSE="as-is"
16     SLOT="0"
17     KEYWORDS="~alpha ~amd64 ~ia64 ~x86"
18     IUSE="opengl"
19    
20     RDEPEND="
21     virtual/fortran
22     x11-libs/libXmu
23     opengl? (
24     media-libs/freeglut
25     virtual/opengl )"
26     DEPEND="${RDEPEND}
27     x11-misc/gccmakedep
28     app-editors/vim"
29     # vim provides ex, which the build system uses (surf/Makefile, at least)
30    
31     S="${WORKDIR}/${MY_P}"
32    
33     src_prepare() {
34     epatch "${FILESDIR}"/${P}-ambfor.patch \
35     "${FILESDIR}"/${P}-overflow.patch \
36     "${FILESDIR}"/${P}-ldflags.patch \
37     "${FILESDIR}"/${PN}-4.7-implicit-dec.patch
38     sed \
39     -e 's:makedepend:gccmakedep:g' \
40     -e "s:/usr/include/sgidefs.h::g" \
41     -i surf/Makefile || die
42     sed 's:shell g77:shell $(FC):g' -i makefile || die
43     }
44    
45     src_compile() {
46     # Use -mieee on alpha, according to the Makefile
47     use alpha && append-flags -mieee
48    
49     # Honor CC, CFLAGS, FC, and FFLAGS from environment;
50     # unfortunately a bash bug prevents us from doing typeset and
51     # assignment on the same line.
52     typeset -a args
53     args=(
54     CC="$(tc-getCC) ${CFLAGS}" \
55     FC="$(tc-getFC)" \
56     LDR="$(tc-getFC)" \
57     FFLAGS="${FFLAGS}" )
58    
59     einfo "Building Molden..."
60     emake -j1 "${args[@]}"
61     if use opengl ; then
62     einfo "Building Molden OpenGL helper..."
63     emake -j1 "${args[@]}" moldenogl
64     fi
65     }
66    
67     src_install() {
68     dobin ${PN} g${PN}
69     if use opengl ; then
70     dobin ${PN}ogl
71     fi
72    
73     dodoc HISTORY README REGISTER
74     cd doc
75     uncompress * && dodoc *
76     }

  ViewVC Help
Powered by ViewVC 1.1.20