bc-1.06.95.ebuild 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. inherit eutils flag-o-matic toolchain-funcs
  4. DESCRIPTION="Handy console-based calculator utility"
  5. HOMEPAGE="https://www.gnu.org/software/bc/bc.html"
  6. SRC_URI="mirror://gnu-alpha/bc/${P}.tar.bz2
  7. mirror://gnu/bc/${P}.tar.bz2"
  8. LICENSE="GPL-2 LGPL-2.1"
  9. SLOT="0"
  10. KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~x64-solaris ~x86-solaris"
  11. IUSE="libedit readline static"
  12. RDEPEND="readline? ( >=sys-libs/readline-4.1 >=sys-libs/ncurses-5.2 )
  13. libedit? ( dev-libs/libedit )"
  14. DEPEND="${RDEPEND}
  15. sys-devel/flex"
  16. src_compile() {
  17. local myconf
  18. if use readline ; then
  19. myconf="--with-readline --without-libedit"
  20. elif use libedit ; then
  21. myconf="--without-readline --with-libedit"
  22. else
  23. myconf="--without-readline --without-libedit"
  24. fi
  25. use static && append-ldflags -static
  26. econf ${myconf} || die
  27. emake || die
  28. }
  29. src_install() {
  30. emake install DESTDIR="${D}" || die
  31. dodoc AUTHORS FAQ NEWS README ChangeLog
  32. }