sys-process/glances: revbump 3.1.4.1, add missing doc dep
[gentoo.git] / sys-apps / pv / pv-1.6.0-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5 inherit linux-info toolchain-funcs
6
7 DESCRIPTION="Pipe Viewer: a tool for monitoring the progress of data through a pipe"
8 HOMEPAGE="https://www.ivarch.com/programs/pv.shtml"
9 SRC_URI="https://www.ivarch.com/programs/sources/${P}.tar.bz2"
10
11 LICENSE="Artistic-2"
12 SLOT="0"
13 KEYWORDS="~alpha amd64 arm arm64 hppa ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc64-solaris ~x86-solaris"
14 IUSE="debug nls"
15
16 PV_LINGUAS=( de fr pl pt )
17
18 DOCS=( README doc/NEWS doc/TODO )
19
20 pkg_setup() {
21         if use kernel_linux; then
22                 CONFIG_CHECK="~SYSVIPC"
23                 ERROR_SYSVIPC="You will need to enable CONFIG_SYSVIPC in your kernel to use the --remote option."
24                 linux-info_pkg_setup
25         fi
26 }
27
28 src_prepare() {
29         sed -i configure -e 's|CFLAGS="-g -Wall"|:|g' || die
30         # These should produce the same end result (working `pv`).
31         sed -i \
32                 -e 's:$(LD) $(LDFLAGS) -o:$(AR) rc:' \
33                 autoconf/make/modules.mk~ || die
34 }
35
36 src_configure() {
37         tc-export AR
38         local lingua
39         for lingua in ${PV_LINGUAS[@]}; do
40                 if ! has ${lingua} ${LINGUAS-${lingua}}; then
41                         sed -i configure -e "/ALL_LINGUAS=/s:${lingua}::g" || die
42                 fi
43         done
44         econf $(use_enable debug debugging) $(use_enable nls)
45 }
46
47 src_test() {
48         sed -i -e 's:usleep 200000 || ::g' tests/019-remote-cksum || die
49         default
50 }