gptfdisk-1.0.1.ebuild 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit flag-o-matic toolchain-funcs
  5. DESCRIPTION="GPT partition table manipulator for Linux"
  6. HOMEPAGE="http://www.rodsbooks.com/gdisk/"
  7. SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="alpha amd64 arm ~arm64 ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~arm-linux ~x86-linux"
  11. IUSE="kernel_linux ncurses static"
  12. LIB_DEPEND="
  13. dev-libs/popt[static-libs(+)]
  14. ncurses? ( >=sys-libs/ncurses-5.7-r7:0=[static-libs(+)] )
  15. kernel_linux? ( sys-apps/util-linux[static-libs(+)] )" # libuuid
  16. RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
  17. DEPEND="${RDEPEND}
  18. static? ( ${LIB_DEPEND} )
  19. virtual/pkgconfig"
  20. src_prepare() {
  21. tc-export CXX PKG_CONFIG
  22. if ! use ncurses; then
  23. sed -i \
  24. -e '/^all:/s:cgdisk::' \
  25. Makefile || die
  26. fi
  27. sed \
  28. -e '/g++/s:=:?=:g' \
  29. -e 's:-lncursesw:$(shell $(PKG_CONFIG) --libs ncursesw):g' \
  30. -i Makefile || die
  31. use static && append-ldflags -static
  32. }
  33. src_install() {
  34. dosbin gdisk sgdisk $(usex ncurses cgdisk '') fixparts
  35. doman *.8
  36. dodoc NEWS README
  37. }