| 1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/app-i18n/tomoe/tomoe-0.6.0-r1.ebuild,v 1.5 2012/06/08 11:52:50 phajdan.jr Exp $
|
| 4 |
|
| 5 |
EAPI="3"
|
| 6 |
PYTHON_DEPEND="python? 2"
|
| 7 |
inherit autotools eutils multilib python
|
| 8 |
|
| 9 |
DESCRIPTION="Japanese handwriting recognition engine"
|
| 10 |
HOMEPAGE="http://tomoe.sourceforge.jp/"
|
| 11 |
SRC_URI="mirror://sourceforge/tomoe/${P}.tar.gz"
|
| 12 |
|
| 13 |
LICENSE="LGPL-2.1"
|
| 14 |
SLOT="0"
|
| 15 |
KEYWORDS="amd64 x86"
|
| 16 |
IUSE="doc hyperestraier mysql ruby python static-libs subversion"
|
| 17 |
|
| 18 |
RDEPEND=">=dev-libs/glib-2.4
|
| 19 |
ruby? ( dev-ruby/ruby-glib2 )
|
| 20 |
hyperestraier? ( app-text/hyperestraier )
|
| 21 |
subversion? (
|
| 22 |
>=dev-libs/apr-1
|
| 23 |
dev-vcs/subversion
|
| 24 |
)
|
| 25 |
mysql? ( dev-db/mysql )
|
| 26 |
python? (
|
| 27 |
dev-python/pygobject:2
|
| 28 |
dev-python/pygtk:2
|
| 29 |
)"
|
| 30 |
# test? ( app-dicts/uconv )
|
| 31 |
|
| 32 |
DEPEND="${DEPEND}
|
| 33 |
dev-util/gtk-doc-am
|
| 34 |
dev-util/intltool
|
| 35 |
virtual/pkgconfig
|
| 36 |
doc? ( dev-util/gtk-doc )"
|
| 37 |
|
| 38 |
RESTRICT="test"
|
| 39 |
|
| 40 |
pkg_setup() {
|
| 41 |
if use python ; then
|
| 42 |
python_set_active_version 2
|
| 43 |
fi
|
| 44 |
}
|
| 45 |
|
| 46 |
src_prepare() {
|
| 47 |
epatch \
|
| 48 |
"${FILESDIR}/${P}-export-symbols.patch" \
|
| 49 |
"${FILESDIR}/${P}-ldflags.patch" \
|
| 50 |
"${FILESDIR}/${P}-glib232.patch"
|
| 51 |
|
| 52 |
if ! use hyperestraier ; then
|
| 53 |
sed -i -e "s/use_est=yes/use_est=no/" configure.ac || die
|
| 54 |
fi
|
| 55 |
if ! use mysql ; then
|
| 56 |
sed -i -e "s/use_mysql=yes/use_mysql=no/" configure.ac || die
|
| 57 |
fi
|
| 58 |
if ! use subversion ; then
|
| 59 |
sed -i -e "s/use_svn=yes/use_svn=no/" macros/svn.m4 || die
|
| 60 |
fi
|
| 61 |
|
| 62 |
eautoreconf
|
| 63 |
}
|
| 64 |
|
| 65 |
src_configure() {
|
| 66 |
local myconf
|
| 67 |
|
| 68 |
# --with-python b0rked
|
| 69 |
use python || myconf="${myconf} --without-python"
|
| 70 |
|
| 71 |
econf \
|
| 72 |
$(use_enable doc gtk-doc) \
|
| 73 |
$(use_with ruby) \
|
| 74 |
$(use_enable static-libs static) \
|
| 75 |
$(use_enable ruby dict-ruby) \
|
| 76 |
${myconf} || die
|
| 77 |
}
|
| 78 |
|
| 79 |
src_install() {
|
| 80 |
emake DESTDIR="${D}" install || die "make install failed"
|
| 81 |
|
| 82 |
find "${ED}/usr/$(get_libdir)/tomoe" \( -name '*.la' -o -name '*.a' \) -type f -delete || die
|
| 83 |
if ! use static-libs ; then
|
| 84 |
find "${ED}" -name '*.la' -type f -delete || die
|
| 85 |
fi
|
| 86 |
|
| 87 |
dodoc AUTHORS ChangeLog NEWS TODO || die
|
| 88 |
}
|