| 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-text/hunspell/hunspell-1.3.2-r3.ebuild,v 1.14 2012/07/23 14:16:19 scarabeus Exp $
|
| 4 |
|
| 5 |
EAPI=4
|
| 6 |
inherit eutils multilib autotools flag-o-matic versionator
|
| 7 |
|
| 8 |
MY_P=${PN}-${PV/_beta/b}
|
| 9 |
|
| 10 |
DESCRIPTION="Hunspell spell checker - an improved replacement for myspell in OOo."
|
| 11 |
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
|
| 12 |
HOMEPAGE="http://hunspell.sourceforge.net/"
|
| 13 |
|
| 14 |
SLOT="0"
|
| 15 |
LICENSE="MPL-1.1 GPL-2 LGPL-2.1"
|
| 16 |
IUSE="ncurses nls readline static-libs"
|
| 17 |
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
|
| 18 |
|
| 19 |
RDEPEND="
|
| 20 |
ncurses? ( sys-libs/ncurses )
|
| 21 |
readline? ( sys-libs/readline )"
|
| 22 |
DEPEND="${RDEPEND}
|
| 23 |
sys-devel/gettext"
|
| 24 |
|
| 25 |
# describe properly mi
|
| 26 |
LANGS="af bg ca cs cy da de el en eo es et fo fr ga gl he hr hu ia id is it km
|
| 27 |
ku lt lv mk ms nb nl nn pl pt pt_BR ro ru sk sl sq sv sw tn uk zu"
|
| 28 |
|
| 29 |
DICT_DEP="app-dicts/myspell-en"
|
| 30 |
for lang in ${LANGS}; do
|
| 31 |
if [[ ${lang} == de ]] ; then
|
| 32 |
DICT_DEP+=" linguas_de? (
|
| 33 |
|| (
|
| 34 |
app-dicts/myspell-de
|
| 35 |
app-dicts/myspell-de-alt
|
| 36 |
)
|
| 37 |
)"
|
| 38 |
else
|
| 39 |
DICT_DEP+=" linguas_${lang}? ( app-dicts/myspell-${lang/pt_BR/pt-br} )"
|
| 40 |
fi
|
| 41 |
IUSE+=" linguas_${lang}"
|
| 42 |
done
|
| 43 |
PDEPEND="${DICT_DEP}"
|
| 44 |
|
| 45 |
unset lang LANGS DICT_DEP
|
| 46 |
|
| 47 |
S=${WORKDIR}/${MY_P}
|
| 48 |
|
| 49 |
DOCS=(
|
| 50 |
AUTHORS ChangeLog NEWS README THANKS TODO license.hunspell
|
| 51 |
AUTHORS.myspell README.myspell license.myspell
|
| 52 |
)
|
| 53 |
|
| 54 |
src_prepare() {
|
| 55 |
# Upstream package creates some executables which names are too generic
|
| 56 |
# to be placed in /usr/bin - this patch prefixes them with 'hunspell-'.
|
| 57 |
# It modifies a Makefile.am file, hence eautoreconf.
|
| 58 |
epatch "${FILESDIR}"/${PN}-1.3-renameexes.patch
|
| 59 |
epatch "${FILESDIR}"/${P}-static-lib.patch
|
| 60 |
eautoreconf
|
| 61 |
}
|
| 62 |
|
| 63 |
src_configure() {
|
| 64 |
# missing somehow, and I am too lazy to fix it properly
|
| 65 |
[[ ${CHOST} == *-darwin* ]] && append-libs -liconv
|
| 66 |
|
| 67 |
# I wanted to put the include files in /usr/include/hunspell.
|
| 68 |
# You can do that, libreoffice can find them anywhere, just
|
| 69 |
# ping me when you do so ; -- scarabeus
|
| 70 |
econf \
|
| 71 |
$(use_enable nls) \
|
| 72 |
$(use_with ncurses ui) \
|
| 73 |
$(use_with readline readline) \
|
| 74 |
$(use_enable static-libs static)
|
| 75 |
}
|
| 76 |
|
| 77 |
src_install() {
|
| 78 |
default
|
| 79 |
|
| 80 |
find "${ED}" -name '*.la' -exec rm -f {} +
|
| 81 |
|
| 82 |
#342449
|
| 83 |
pushd "${ED}"/usr/$(get_libdir)/ >/dev/null
|
| 84 |
ln -s lib${PN}{-$(get_major_version).$(get_version_component_range 2).so.0.0.0,.so}
|
| 85 |
popd >/dev/null
|
| 86 |
}
|