grep-2.25.ebuild 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils flag-o-matic toolchain-funcs
  5. DESCRIPTION="GNU regular expression matcher"
  6. HOMEPAGE="https://www.gnu.org/software/grep/"
  7. SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
  8. mirror://gentoo/${P}.tar.xz"
  9. LICENSE="GPL-3"
  10. SLOT="0"
  11. KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
  12. IUSE="nls pcre static"
  13. LIB_DEPEND="pcre? ( >=dev-libs/libpcre-7.8-r1[static-libs(+)] )"
  14. RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
  15. nls? ( virtual/libintl )
  16. virtual/libiconv"
  17. DEPEND="${RDEPEND}
  18. virtual/pkgconfig
  19. nls? ( sys-devel/gettext )
  20. static? ( ${LIB_DEPEND} )"
  21. DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO )
  22. src_prepare() {
  23. sed -i \
  24. -e "s:@SHELL@:${EPREFIX}/bin/sh:g" \
  25. src/egrep.sh || die #523898
  26. }
  27. src_configure() {
  28. use static && append-ldflags -static
  29. # Always use pkg-config to get lib info for pcre.
  30. export ac_cv_search_pcre_compile=$(
  31. usex pcre "$($(tc-getPKG_CONFIG) --libs $(usex static --static '') libpcre)" ''
  32. )
  33. econf \
  34. --bindir="${EPREFIX}"/bin \
  35. $(use_enable nls) \
  36. $(use_enable pcre perl-regexp)
  37. }