EAPI=5 PYTHON_COMPAT=( python{2_7,3_3} ) DISTUTILS_OPTIONAL=1 inherit distutils-r1 perl-module eutils DESCRIPTION="Matching Algorithm with Recursively Implemented StorAge" HOMEPAGE="" SRC_URI="https://marisa-trie.googlecode.com/files/${P}.tar.gz" LICENSE="BSD-2" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="perl python ruby" DEPEND=" perl? ( dev-lang/swig ) python? ( dev-lang/swig ) ruby? ( dev-lang/swig )" src_prepare() { epatch "${FILESDIR}/marisa-python.patch" pushd bindings/python if use python; then ln -sf ../marisa-swig.i marisa-swig.i ln -sf ../marisa-swig.h marisa-swig.h ln -sf ../marisa-swig.cxx marisa-swig.cxx distutils-r1_src_prepare fi popd } src_configure() { econf --disable-static } src_compile() { emake if use python; then pushd bindings/python distutils-r1_src_compile popd fi } src_install() { emake DESTDIR="${D}" install if use python; then pushd bindings/python distutils-r1_src_install popd fi prune_libtool_files }