nmon-16f.ebuild 961 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit flag-o-matic toolchain-funcs
  5. MY_P="lmon${PV}"
  6. DESCRIPTION="Nigel's performance MONitor for CPU, memory, network, disks, etc..."
  7. HOMEPAGE="http://nmon.sourceforge.net/"
  8. LICENSE="GPL-3"
  9. SRC_URI="mirror://sourceforge/${PN}/${MY_P}.c"
  10. SLOT="0"
  11. KEYWORDS="amd64 ~arm ~ppc64 x86"
  12. RDEPEND="sys-libs/ncurses:0="
  13. DEPEND="${RDEPEND}
  14. virtual/pkgconfig
  15. "
  16. S="${WORKDIR}"
  17. src_unpack() {
  18. cp -v -f "${DISTDIR}"/${MY_P}.c "${S}"/${PN}.c || die
  19. }
  20. src_configure() {
  21. local cflags=(
  22. ## recommended by upstream to be always on
  23. -DGETUSER
  24. -DJFS
  25. -DLARGEMEM
  26. -DKERNEL_2_6_18
  27. ## archs
  28. $(usex amd64 -DX86 '')
  29. $(usex x86 -DX86 '')
  30. $(usex arm -DARM '')
  31. $(usex ppc64 -DPOWER '')
  32. )
  33. append-cflags "${cflags[@]}"
  34. export LDLIBS="$( $(tc-getPKG_CONFIG) --libs ncurses ) -lm"
  35. }
  36. src_compile() {
  37. emake ${PN}
  38. }
  39. src_install() {
  40. dobin ${PN}
  41. }