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.

58 lines
1.3 KiB

  1. # Copyright 1999-2021 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=7
  4. PYTHON_COMPAT=( python3_{8..10} )
  5. inherit flag-o-matic python-any-r1 toolchain-funcs
  6. DESCRIPTION="Convert files between various character sets"
  7. HOMEPAGE="https://github.com/rrthomas/recode"
  8. SRC_URI="https://github.com/rrthomas/recode/releases/download/v${PV}/${P}.tar.gz"
  9. LICENSE="GPL-3+"
  10. # librecode soname version
  11. SLOT="0/3"
  12. KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x86-solaris"
  13. IUSE="nls test"
  14. RESTRICT="!test? ( test )"
  15. RDEPEND="virtual/libiconv"
  16. DEPEND="
  17. ${RDEPEND}
  18. sys-devel/flex
  19. "
  20. BDEPEND="
  21. nls? ( sys-devel/gettext )
  22. test? (
  23. ${PYTHON_DEPS}
  24. $(python_gen_any_dep '
  25. dev-python/cython[${PYTHON_USEDEP}]
  26. ')
  27. )
  28. "
  29. python_check_deps() {
  30. if use test ; then
  31. has_version -b "dev-python/cython[${PYTHON_USEDEP}]" || return 1
  32. fi
  33. }
  34. src_configure() {
  35. tc-export CC LD
  36. # on solaris -lintl is needed to compile
  37. [[ ${CHOST} == *-solaris* ]] && append-libs "-lintl"
  38. # --without-included-gettext means we always use system headers
  39. # and library
  40. econf \
  41. $(use_enable nls) \
  42. --disable-static
  43. }
  44. src_install() {
  45. default
  46. find "${ED}" -name '*.la' -delete || die
  47. }