You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
78 lines
1.5 KiB
78 lines
1.5 KiB
2 years ago
|
# Copyright 1999-2022 Gentoo Authors
|
||
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
|
EAPI=8
|
||
|
|
||
|
inherit desktop fortran-2 flag-o-matic toolchain-funcs
|
||
|
|
||
|
MY_P="${PN}${PV}"
|
||
|
|
||
|
DESCRIPTION="Display molecular density from GAMESS-UK, GAMESS-US, GAUSSIAN and Mopac/Ampac"
|
||
|
HOMEPAGE="https://www.theochem.ru.nl/molden/"
|
||
|
SRC_URI="ftp://ftp.science.ru.nl/pub/Molden/${MY_P}.tar.gz"
|
||
|
S="${WORKDIR}/${MY_P}"
|
||
|
|
||
|
LICENSE="MOLDEN"
|
||
|
SLOT="0"
|
||
|
KEYWORDS="~amd64 ~x86"
|
||
|
IUSE="opengl"
|
||
|
|
||
2 years ago
|
DEPEND="
|
||
2 years ago
|
x11-libs/libXmu
|
||
|
opengl? (
|
||
|
media-libs/freeglut
|
||
|
virtual/opengl
|
||
|
virtual/glu
|
||
|
)
|
||
|
"
|
||
2 years ago
|
RDEPEND="${DEPEND}
|
||
|
sci-chemistry/surf
|
||
|
"
|
||
2 years ago
|
|
||
|
PATCHES=(
|
||
|
"${FILESDIR}/${P}-ldflags.patch"
|
||
|
)
|
||
|
|
||
|
src_prepare() {
|
||
|
default
|
||
|
sed 's:shell g77:shell $(FC):g' -i makefile || die
|
||
|
}
|
||
|
|
||
|
src_compile() {
|
||
|
local args=()
|
||
|
|
||
|
# Use -mieee on alpha, according to the Makefile
|
||
|
use alpha && append-flags -mieee
|
||
|
|
||
|
# GCC 10 workaround
|
||
|
# bug #724556
|
||
|
append-fflags $(test-flags-FC -fallow-argument-mismatch)
|
||
|
|
||
|
args=(
|
||
|
CC="$(tc-getCC) ${CFLAGS}"
|
||
|
FC="$(tc-getFC)"
|
||
|
LDR="$(tc-getFC)"
|
||
|
FFLAGS="${FFLAGS}"
|
||
|
)
|
||
|
|
||
|
einfo "Building Molden..."
|
||
2 years ago
|
emake -j1 molden ambfor/ambfor ambfor/ambmd "${args[@]}"
|
||
2 years ago
|
if use opengl ; then
|
||
|
einfo "Building Molden OpenGL helper..."
|
||
|
emake -j1 "${args[@]}" gmolden
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
src_install() {
|
||
2 years ago
|
dobin bin/molden bin/ambfor bin/ambmd
|
||
2 years ago
|
if use opengl; then
|
||
|
dobin bin/gmolden
|
||
|
doicon -s 64 haux/gmolden.png
|
||
|
make_desktop_entry gmolden MOLDEN gmolden
|
||
|
fi
|
||
|
|
||
|
dodoc HISTORY README REGISTER
|
||
|
cd doc || die
|
||
|
uncompress * && dodoc *
|
||
|
}
|