1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 )
8 inherit eutils multilib python-r1 toolchain-funcs
12 DESCRIPTION="A crystallographic real-space electron-density refinement and optimization program"
13 HOMEPAGE="http://www.gromacs.org/pipermail/eden-users/"
14 SRC_URI="mirror://gentoo/${MY_P}.tar.gz"
19 IUSE="double-precision"
32 export EDENHOME="${EPREFIX}/usr/$(get_libdir)/${PN}"
37 "${FILESDIR}"/${PV}-makefile-fixes.patch \
38 "${FILESDIR}"/${P}-impl-dec.patch \
39 "${FILESDIR}"/${P}-format-security.patch
42 -e "s:^\(FFTW.*=\).*:\1 ${EPREFIX}/usr:g" \
43 -e "s:^\(LIB.*=.*\$(FFTW)/\).*:\1$(get_libdir):g" \
44 -e "s:^\(BIN.*=\).*:\1 ${D}usr/bin:g" \
45 -e "s:^\(CFLAGS.*=\).*:\1 ${CFLAGS}:g" \
46 -e "s:-lgsl -lgslcblas:$($(tc-getPKG_CONFIG) --libs gsl):g" \
47 ${SRC}/Makefile || die
49 if ! use double-precision; then
50 sed -i -e "s:^\(DOUBLESWITCH.*=\).*:\1 OFF:g" ${SRC}/Makefile || die
58 emake CC=$(tc-getCC) -C ${SRC}
62 emake -C ${SRC} install
64 python_foreach_impl python_newscript python/${PN}.py i${PN}
65 python_foreach_impl python_domodule python/FileListDialog.py
68 insinto ${EDENHOME}/python
71 insinto ${EDENHOME}/help
74 insinto ${EDENHOME}/tools
77 dodoc manual/UserManual.pdf
79 cat >> "${T}"/60${PN} <<- EOF
80 EDENHOME="${EDENHOME}"
85 dosym ${EDEN_EXE} /usr/bin/${PN}