|
| 1 | +# Copyright 1999-2015 Gentoo Foundation |
| 2 | +# Distributed under the terms of the GNU General Public License v2 |
| 3 | +# $Header: $ |
| 4 | + |
| 5 | +EAPI=5 |
| 6 | + |
| 7 | +EGIT_REPO_URI="https://github.com/apache/thrift.git" |
| 8 | + |
| 9 | +PYTHON_COMPAT=( python2_7 ) |
| 10 | +DISTUTILS_OPTIONAL=1 |
| 11 | +GENTOO_DEPEND_ON_PERL="no" |
| 12 | + |
| 13 | +inherit autotools eutils distutils-r1 perl-module git-2 |
| 14 | + |
| 15 | +DESCRIPTION="Lightweight, language-independent software stack with associated code generation mechanism for RPC" |
| 16 | +HOMEPAGE="http://thrift.apache.org" |
| 17 | +#SRC_URI="mirror://apache/${PN}/${PV}/${P}.tar.gz" |
| 18 | + |
| 19 | +LICENSE="Apache-2.0" |
| 20 | +SLOT="0" |
| 21 | +KEYWORDS="~amd64" |
| 22 | +IUSE="+cpp csharp +glib +event perl +python qt4 qt5 nodejs lua ruby haskell go haxe d static-libs test +zlib" |
| 23 | + |
| 24 | +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
| 25 | + |
| 26 | +RDEPEND="cpp? ( dev-libs/boost:=[static-libs] ) |
| 27 | + event? ( dev-libs/libevent ) |
| 28 | + glib? ( dev-libs/glib:2 ) |
| 29 | + perl? ( dev-lang/perl:= dev-perl/Bit-Vector ) |
| 30 | + qt4? ( dev-qt/qtcore:4 ) |
| 31 | + qt5? ( dev-qt/qtcore:5 ) |
| 32 | + zlib? ( sys-libs/zlib ) |
| 33 | + python? ( ${PYTHON_DEPS} )" |
| 34 | +DEPEND="${RDEPEND} |
| 35 | + python? ( dev-python/setuptools[${PYTHON_USEDEP}] ) |
| 36 | + virtual/pkgconfig" |
| 37 | + |
| 38 | +src_prepare() { |
| 39 | + #epatch "${FILESDIR}/0.9.1-autoconf-fixes.patch" |
| 40 | + |
| 41 | + # fixed in 1.0-dev |
| 42 | + sed -i -e 's|tutorial||' Makefile.am || die |
| 43 | + |
| 44 | + AT_NO_RECURSIVE=1 eautoreconf |
| 45 | + |
| 46 | + if use python ; then |
| 47 | + cd "${S}/lib/py" |
| 48 | + distutils-r1_src_prepare |
| 49 | + fi |
| 50 | +} |
| 51 | + |
| 52 | +src_configure() { |
| 53 | + econf \ |
| 54 | + $(use_enable static-libs static) \ |
| 55 | + $(use_enable test) \ |
| 56 | + $(use_with cpp) \ |
| 57 | + $(use_with cpp boost) \ |
| 58 | + $(use_with csharp csharp) \ |
| 59 | + $(use_with event libevent) \ |
| 60 | + $(use_with glib c_glib) \ |
| 61 | + $(use_with qt4 qt4) \ |
| 62 | + $(use_with qt5 qt5) \ |
| 63 | + $(use_with nodejs nodejs) \ |
| 64 | + $(use_with lua lua) \ |
| 65 | + $(use_with ruby ruby) \ |
| 66 | + $(use_with haskell haskell) \ |
| 67 | + $(use_with zlib) \ |
| 68 | + --without-{python,perl} \ |
| 69 | + --without-{csharp,java,erlang,php,php_extension,ruby,haskell,go,d,nodejs} |
| 70 | + |
| 71 | + if use perl ; then |
| 72 | + cd "${S}/lib/perl" |
| 73 | + perl-module_src_configure |
| 74 | + fi |
| 75 | + |
| 76 | + if use python ; then |
| 77 | + cd "${S}/lib/py" |
| 78 | + distutils-r1_src_configure |
| 79 | + fi |
| 80 | +} |
| 81 | + |
| 82 | +src_compile() { |
| 83 | + default |
| 84 | + |
| 85 | + if use perl ; then |
| 86 | + cd "${S}/lib/perl" |
| 87 | + perl-module_src_compile |
| 88 | + fi |
| 89 | + |
| 90 | + if use python ; then |
| 91 | + cd "${S}/lib/py" |
| 92 | + distutils-r1_src_compile |
| 93 | + fi |
| 94 | +} |
| 95 | + |
| 96 | +src_install() { |
| 97 | + default |
| 98 | + prune_libtool_files |
| 99 | + |
| 100 | + if use perl ; then |
| 101 | + cd "${S}/lib/perl" |
| 102 | + perl-module_src_install |
| 103 | + fi |
| 104 | + |
| 105 | + if use python ; then |
| 106 | + cd "${S}/lib/py" |
| 107 | + distutils-r1_src_install |
| 108 | + fi |
| 109 | +} |
0 commit comments