# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils fortran DESCRIPTION="EUHEDRAL was developed for the refinement of the crystal shape against the intensities of multiple measured reflections coming from redundant area detector data." HOMEPAGE="http://www.crystal.chem.uu.nl/distr/euhedral/" SRC_URI="ftp://ftp.chem.uu.nl/pub/ks/euhedral/${P}.tar.gz" LICENSE="freedist" SLOT="0" KEYWORDS="~x86" IUSE="" RDEPEND="sci-chemistry/platon \ dev-lang/tcl" DEPEND="${RDEPEND} \ || ( x11-libs/libX11 virtual/x11 )" S=${WORKDIR} pkg_setup() { need_fortran g77 gfortran } src_unpack() { unpack ${A} cd ${S} # the package comes with solely a Makefile with hardwired FC, CC, etc vars.. sed -i -e "s:^FC=f77:FC=g77:" \ -e "s:^CC=cc:CC=gcc:" \ -e "s:^CFLAGS= -O2 -DPOSIX -DUNIX:CFLAGS= -DPOSIX -DUNIX ${CFLAGS}:" \ Makefile } src_compile() { make all || die "Make failed" } src_install() { # Euhedral is looking for docs and special files # at the location of its binary. Putting it in # /opt seems to be the cleanest solution so far. MY_D=/opt/${P} insinto ${MY_D} exeinto ${MY_D} doexe euhedral euhedral.tcl doins -r euhedral.commands euhedral.init doc make_wrapper euhedral ${MY_D}/euhedral make_wrapper euhedralgui ${MY_D}/euhedral.tcl }