You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.1 KiB

  1. # Copyright 1999-2021 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="6"
  4. inherit autotools
  5. DESCRIPTION="Yet Another Part-of-Speech and Morphological Analyzer"
  6. HOMEPAGE="https://taku910.github.io/mecab/"
  7. SRC_URI="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/${PN}/${P}.tar.gz"
  8. LICENSE="|| ( BSD LGPL-2.1 GPL-2 )"
  9. KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ppc ppc64 ~riscv ~s390 sparc x86"
  10. SLOT="0"
  11. IUSE="static-libs unicode"
  12. DEPEND="dev-lang/perl
  13. virtual/libiconv"
  14. RDEPEND=""
  15. PDEPEND="|| (
  16. app-dicts/mecab-ipadic[unicode=]
  17. app-dicts/mecab-naist-jdic[unicode=]
  18. )"
  19. PATCHES=( "${FILESDIR}"/${PN}-0.98-iconv.patch )
  20. HTML_DOCS=( doc/. )
  21. src_prepare() {
  22. default
  23. sed -i \
  24. -e "/CFLAGS/s/-O3/${CFLAGS}/" \
  25. -e "/CXXFLAGS/s/-O3/${CXXFLAGS}/" \
  26. configure.in
  27. sed -i "s:/lib:/$(get_libdir):" ${PN}rc.in
  28. mv configure.{in,ac} || die
  29. eautoreconf
  30. }
  31. src_configure() {
  32. econf \
  33. $(use_enable static-libs static) \
  34. $(use_with unicode charset UTF-8)
  35. }
  36. src_install() {
  37. default
  38. find "${ED}" -name 'Makefile*' -delete || die
  39. use static-libs || find "${ED}" -name '*.la' -delete || die
  40. }