diff options
author | Justin Lecher <jlec@gentoo.org> | 2011-10-07 09:01:12 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2011-10-07 09:01:12 +0000 |
commit | f298b5fc0cfb7be76692a49fbcfe0f3171f90e24 (patch) | |
tree | 021487739ab12bc2732ef48037e3b69bcd4a0c60 /sci-chemistry/coot/coot-0.6.2-r1.ebuild | |
parent | Remove old. (diff) | |
download | historical-f298b5fc0cfb7be76692a49fbcfe0f3171f90e24.tar.gz historical-f298b5fc0cfb7be76692a49fbcfe0f3171f90e24.tar.bz2 historical-f298b5fc0cfb7be76692a49fbcfe0f3171f90e24.zip |
Moved to autotools-utils.eclass in order to have correct .a/la file handling, #385865
Package-Manager: portage-2.2.0_alpha62/cvs/Linux x86_64
Diffstat (limited to 'sci-chemistry/coot/coot-0.6.2-r1.ebuild')
-rw-r--r-- | sci-chemistry/coot/coot-0.6.2-r1.ebuild | 162 |
1 files changed, 162 insertions, 0 deletions
diff --git a/sci-chemistry/coot/coot-0.6.2-r1.ebuild b/sci-chemistry/coot/coot-0.6.2-r1.ebuild new file mode 100644 index 000000000000..4e11b9c11ef9 --- /dev/null +++ b/sci-chemistry/coot/coot-0.6.2-r1.ebuild @@ -0,0 +1,162 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/coot/coot-0.6.2-r1.ebuild,v 1.1 2011/10/07 09:01:12 jlec Exp $ + +EAPI=3 + +PYTHON_DEPEND="2" + +inherit autotools-utils python toolchain-funcs versionator + +MY_S2_PV=$(replace_version_separator 2 - ${PV}) +MY_S2_P=${PN}-${MY_S2_PV/pre1/pre-1} +MY_S_P=${MY_S2_P}-${PR/r/revision-} +MY_PV=${PV} +MY_P=${PN}-${MY_PV} + +DESCRIPTION="Crystallographic Object-Oriented Toolkit for model building, completion and validation" +HOMEPAGE="http://www.biop.ox.ac.uk/coot/" +SRC_URI=" + http://www.biop.ox.ac.uk/coot/software/source/releases/${MY_P}.tar.gz + test? ( http://dev.gentoo.org/~jlec/distfiles/greg-data-${PV}.tar.gz )" + +SLOT="0" +LICENSE="GPL-3" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="+openmp static-libs test" + +AUTOTOOLS_IN_SOURCE_BUILD=1 + +SCIDEPS=" + >=sci-libs/ccp4-libs-6.1 + >=sci-libs/clipper-20090520 + >=sci-libs/coot-data-2 + >=sci-libs/gsl-1.3 + >=sci-libs/mmdb-1.23 + sci-libs/ssm + <sci-libs/monomer-db-1 + sci-chemistry/reduce + <sci-chemistry/refmac-5.6 + sci-chemistry/probe" + +XDEPS=" + gnome-base/libgnomecanvas + gnome-base/librsvg:2 + media-libs/libpng + media-libs/freeglut + x11-libs/gtk+:2 + x11-libs/gtkglext" + +SCHEMEDEPS=" + dev-scheme/net-http + dev-scheme/guile-gui + >=dev-scheme/guile-lib-0.1.6 + dev-scheme/guile-www + >=x11-libs/guile-gtk-2.1" + +RDEPEND=" + ${SCIDEPS} + ${XDEPS} + ${SCHEMEDEPS} + dev-python/pygtk:2 + >=dev-libs/gmp-4.2.2-r2 + >=net-misc/curl-7.19.6 + net-dns/libidn" +DEPEND="${RDEPEND} + dev-lang/swig + sys-devel/bc + test? ( dev-scheme/greg )" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + if use openmp; then + tc-has-openmp || die "Please use an OPENMP capable compiler" + has_version '<sys-devel/libtool-2.4-r2' && append-ldflags $(no-as-needed) + fi + python_set_active_version 2 +} + +PATCHES=( + "${FILESDIR}"/${PV}-clipper-config.patch + "${FILESDIR}"/${PV}-mmdb-config.patch + "${FILESDIR}"/${PV}-gl.patch + "${FILESDIR}"/${PV}-test.patch + "${FILESDIR}"/${PV}-ssm.patch + "${FILESDIR}"/${PV}-libpng15.patch + ) + +src_prepare() { + autotools-utils_src_prepare + + eautoreconf +} + +src_configure() { + # All the --with's are used to activate various parts. + # Yes, this is broken behavior. + local myeconfargs=( + --includedir='${prefix}/include/coot' + --with-gtkcanvas-prefix="${EPREFIX}/usr" + --with-gtkgl-prefix="${EPREFIX}/usr" + --with-guile + --with-python="${EPREFIX}/usr" + --with-guile-gtk + --with-gtk2 + --with-pygtk + $(use_enable openmp) + ) + autotools-utils_src_configure +} + +src_compile() { + autotools-utils_src_compile + python_convert_shebangs $(python_get_version) "${S}"/src/coot_gtk2.py + cp "${S}"/src/coot_gtk2.py python/coot.py || die +} + +src_test() { + source "${EPREFIX}/etc/profile.d/40ccp4.setup.sh" + mkdir "${T}"/coot_test + + export COOT_STANDARD_RESIDUES="${S}/standard-residues.pdb" + export COOT_SCHEME_DIR="${S}/scheme/" + export COOT_RESOURCES_FILE="${S}/cootrc" + export COOT_PIXMAPS_DIR="${S}/pixmaps" + export COOT_DATA_DIR="${S}" + export COOT_PYTHON_DIR="${S}/python" + export PYTHONPATH="${COOT_PYTHON_DIR}:${PYTHONPATH}" + export PYTHONHOME="${EPREFIX}"/usr + export CCP4_SCR="${T}"/coot_test + export CLIBD_MON="${EPREFIX}/usr/share/ccp4/data/monomers/" + export SYMINFO="${S}/syminfo.lib" + + export COOT_TEST_DATA_DIR="${WORKDIR}"/data/greg-data + + cat > command-line-greg.scm <<- EOF + (use-modules (ice-9 greg)) + (set! greg-tools (list "greg-tests")) + (set! greg-debug #t) + (set! greg-verbose 5) + (let ((r (greg-test-run))) + (if r + (coot-real-exit 0) + (coot-real-exit 1))) + EOF + + einfo "Running test with following paths ..." + einfo "COOT_STANDARD_RESIDUES $COOT_STANDARD_RESIDUES" + einfo "COOT_SCHEME_DIR $COOT_SCHEME_DIR" + einfo "COOT_RESOURCES_FILE $COOT_RESOURCES_FILE" + einfo "COOT_PIXMAPS_DIR $COOT_PIXMAPS_DIR" + einfo "COOT_DATA_DIR $COOT_DATA_DIR" + einfo "COOT_PYTHON_DIR $COOT_PYTHON_DIR" + einfo "PYTHONPATH $PYTHONPATH" + einfo "PYTHONHOME $PYTHONHOME" + einfo "CCP4_SCR ${CCP4_SCR}" + einfo "CLIBD_MON ${CLIBD_MON}" + einfo "SYMINFO ${SYMINFO}" + + "${S}"/src/coot-real --no-graphics --script command-line-greg.scm || die + "${S}"/src/coot-real --no-graphics --script python-tests/coot_unittest.py || die +} |