pv-1.6.0-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=5
  4. inherit linux-info toolchain-funcs
  5. DESCRIPTION="Pipe Viewer: a tool for monitoring the progress of data through a pipe"
  6. HOMEPAGE="http://www.ivarch.com/programs/pv.shtml"
  7. SRC_URI="http://www.ivarch.com/programs/sources/${P}.tar.bz2"
  8. LICENSE="Artistic-2"
  9. SLOT="0"
  10. KEYWORDS="alpha amd64 arm arm64 hppa ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc64-solaris ~x86-solaris"
  11. IUSE="debug nls"
  12. PV_LINGUAS=( de fr pl pt )
  13. IUSE+=" ${PV_LINGUAS[@]/#/linguas_}"
  14. DOCS=( README doc/NEWS doc/TODO )
  15. pkg_setup() {
  16. if use kernel_linux; then
  17. CONFIG_CHECK="~SYSVIPC"
  18. ERROR_SYSVIPC="You will need to enable CONFIG_SYSVIPC in your kernel to use the --remote option."
  19. linux-info_pkg_setup
  20. fi
  21. }
  22. src_prepare() {
  23. sed -i configure -e 's|CFLAGS="-g -Wall"|:|g' || die
  24. # These should produce the same end result (working `pv`).
  25. sed -i \
  26. -e 's:$(LD) $(LDFLAGS) -o:$(AR) rc:' \
  27. autoconf/make/modules.mk~ || die
  28. }
  29. src_configure() {
  30. tc-export AR
  31. local lingua
  32. for lingua in ${PV_LINGUAS[@]}; do
  33. if ! use linguas_${lingua}; then
  34. sed -i configure -e "/ALL_LINGUAS=/s:${lingua}::g" || die
  35. fi
  36. done
  37. econf $(use_enable debug debugging) $(use_enable nls)
  38. }
  39. src_test() {
  40. sed -i -e 's:usleep 200000 || ::g' tests/019-remote-cksum || die
  41. default
  42. }