bc-1.06.95-r2.ebuild 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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="Handy console-based calculator utility"
  6. HOMEPAGE="https://www.gnu.org/software/bc/bc.html"
  7. SRC_URI="mirror://gnu-alpha/bc/${P}.tar.bz2
  8. mirror://gnu/bc/${P}.tar.bz2"
  9. LICENSE="GPL-2 LGPL-2.1"
  10. SLOT="0"
  11. KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~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="libedit readline static"
  13. RDEPEND="!readline? ( libedit? ( dev-libs/libedit:= ) )
  14. readline? (
  15. >=sys-libs/readline-4.1:0=
  16. >=sys-libs/ncurses-5.2:=
  17. )"
  18. DEPEND="${RDEPEND}
  19. sys-devel/flex"
  20. src_prepare() {
  21. epatch "${FILESDIR}"/${P}-void_uninitialized.patch #349339
  22. epatch "${FILESDIR}"/${P}-mem-leak.patch #264889
  23. }
  24. src_configure() {
  25. local libedit
  26. if use readline ; then
  27. libedit="--without-libedit"
  28. else
  29. libedit=$(use_with libedit)
  30. fi
  31. use static && append-ldflags -static
  32. # Clobber any CONFIG_SHELL setting the user has forced on us.
  33. # We should be able to delete this w/the next release as it
  34. # should use updated autoconf.
  35. CONFIG_SHELL=/bin/bash \
  36. econf \
  37. $(use_with readline) \
  38. ${libedit}
  39. # Do not regen docs -- configure produces a small fragment that includes
  40. # the version info which causes all pages to regen (newer file). #554774
  41. touch -r doc doc/*
  42. }
  43. src_compile() {
  44. emake AR="$(tc-getAR)"
  45. }