# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=2 PYTHON_DEPEND="python? *" SUPPORT_PYTHON_ABIS="1" inherit distutils eutils java-pkg-opt-2 java-ant-2 DESCRIPTION="Framework for scalable cross-language services development" HOMEPAGE="http://incubator.apache.org/thrift/" SRC_URI="mirror://apache/incubator/${PN}/${PV}-incubating/${PN}-${PV}-incubating.tar.gz" LICENSE="Apache-2.0" SLOT="0" KEYWORDS="~amd64" IUSE="cxx erlang java mono perl python ruby +libevent" RESTRICT_PYTHON_ABIS="3.*" JAVA_COMMON_DEPS="dev-java/commons-lang:2.1 dev-java/slf4j-api:0" COMMON_DEPS="sys-devel/bison cxx? ( dev-libs/boost ) libevent? ( dev-libs/libevent ) mono? ( dev-lang/mono ) ruby? ( dev-lang/ruby ) erlang? ( dev-lang/erlang )" DEPEND="${COMMON_DEPS} java? ( >=virtual/jdk-1.5 ${JAVA_COMMON_DEPS} )" RDEPEND="${COMMON_DEPS} java? ( >=virtual/jre-1.5 ${JAVA_COMMON_DEPS} )" src_configure() { java-ant-2_src_configure econf $(use_with cxx boost) \ $(use_with libevent libevent) \ $(use_with erlang erlang) \ $(use_with mono csharp) \ $(use_with perl perl) \ $(use_with ruby ruby) \ --with-zlib \ --without-py \ --without-java || die #Will use java eclasses for this } src_compile() { emake DESTDIR="${D}" if use python; then cd ${S}/lib/py distutils_src_compile fi # compile java stuff } src_install() { emake DESTDIR="${D}" install || die if use python; then cd ${S}/lib/py distutils_src_install fi #install java stuff }