bc-1.06.95-r1.ebuild 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="2"
  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 ~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? ( >=sys-libs/readline-4.1 >=sys-libs/ncurses-5.2 )
  14. libedit? ( dev-libs/libedit )"
  15. DEPEND="${RDEPEND}
  16. sys-devel/flex"
  17. src_prepare() {
  18. epatch "${FILESDIR}"/${P}-void_uninitialized.patch #349339
  19. }
  20. src_configure() {
  21. local myconf
  22. if use readline ; then
  23. myconf="--with-readline --without-libedit"
  24. elif use libedit ; then
  25. myconf="--without-readline --with-libedit"
  26. else
  27. myconf="--without-readline --without-libedit"
  28. fi
  29. use static && append-ldflags -static
  30. econf ${myconf}
  31. # Do not regen docs -- configure produces a small fragment that includes
  32. # the version info which causes all pages to regen (newer file). #554774
  33. touch -r doc doc/*
  34. }
  35. src_compile() {
  36. emake AR="$(tc-getAR)" || die
  37. }
  38. src_install() {
  39. emake install DESTDIR="${D}" || die
  40. dodoc AUTHORS FAQ NEWS README ChangeLog
  41. }