# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils flag-o-matic DESCRIPTION="This is a sample skeleton ebuild file" HOMEPAGE="http://www.ysbl.york.ac.uk/~ccp4mg/" SRC_URI="http://www.ysbl.york.ac.uk/~ccp4mg/download/${P}-src.tar.gz" LICENSE="ccp4 glut" SLOT="0" KEYWORDS="~x86" IUSE="freetype" DEPEND="" RDEPEND="${DEPEND}" src_unpack() { unpack ${A} cd "${S}" epatch "${FILESDIR}"/${PV}-build-fixes.patch # Make sure we aren't using or relying on any unneeded internal code rm -rf tcltk_src # Link against internal mmdb/ssm, or swig stuff totally breaks find . -name Makefile \ | xargs grep -e lssm -e lmmdb -l \ | xargs sed -i \ -e "s:\(-lssm\):-L../ssm -L../../ssm \1:g" \ -e "s:\(-lmmdb\):-L../mmdb -L../../mmdb \1:g" } src_compile() { local conf_opts # Particularly swig-generated files are full of potential issues append-flags -fno-strict-aliasing use freetype && conf_opts="${conf_opts} --enable-freetype" conf_opts="${conf_opts} --opt=\"${CFLAGS}\"" # Need internal clipper for swig wrapper ./install_clipper.sh # It's a custom configure script, no econf here # This is also why we don't use use_enable() etc ./configure \ ${conf_opts} \ || die "econf failed" emake || die "emake failed" } src_install() { emake DESTDIR="${D}" install || die "emake install failed" }