# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=2 # Inherit distutils for convenience functions, not because this uses distutils # build system inherit python distutils DESCRIPTION="A free, extensible Graphical User Interface (GUI) for community chemistry programs" HOMEPAGE="http://www.cse.scitech.ac.uk/ccg/software/ccp1gui/" SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="" RDEPEND="dev-lang/python dev-python/numeric dev-python/scientificpython sci-libs/vtk[tcl,tk] dev-python/pmw" DEPEND="${RDEPEND}" S="${WORKDIR}/${PN}" pkg_setup() { distutils_python_tkinter } src_unpack() { unpack ${A} ebegin "Removing CVS directories" find . -type d -name CVS \ | xargs rm -rf eend $? ebegin "Updating for MOPAC script name in Gentoo, run_mopac7" sed -i \ -e "s:\(run_mopac\):\17:g" \ "${S}"/interfaces/mopac.py eend $? } # Overwrite distutils.eclass default src_compile() { :; } src_install() { python_version local PYDIR="$(get_libdir)/python${PYVER}/site-packages/${PN}" local DIR="/usr/${PYDIR}" dodir ${DIR} || die "Creating installation directory failed" local subdir for subdir in basis chempy generic idle interfaces jobmanager objects scripts viewer; do cp -pPR ${subdir} "${D}${DIR}" \ || die "Copying files to installation directory failed" done dodoc README doc/*txt || die "Installing docs failed" dohtml -r doc/*htm doc/html/* || die "Installing html docs failed" dodir /usr/share/${PN} cp -pPR examples ${D}usr/share/${PN}/ || die "Installing examples failed" # Create a wrapper executable cat >> "${T}"/${PN} <<- EOF #!/bin/sh python "${DIR}"/viewer/main.py $* EOF dobin "${T}"/${PN} || die "Installing wrapper failed" }