app-i18n/man-pages-l10n: Remaining arches stable (#716724).
[gentoo.git] / app-i18n / man-pages-l10n / man-pages-l10n-4.0.0.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 MY_P="${PN/-}-v${PV}"
7 DESCRIPTION="A somewhat comprehensive collection of man page translations"
8 HOMEPAGE="https://manpages-l10n-team.pages.debian.net/manpages-l10n/"
9 SRC_URI="https://salsa.debian.org/manpages-l10n-team/manpages-l10n/-/archive/v${PV}/${MY_P}.tar.bz2"
10 S="${WORKDIR}/${MY_P}"
11
12 LICENSE="GPL-3+"
13 SLOT="0"
14 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~amd64-linux ~x86-linux"
15 # omit pt-BR and ro for now, because they each install only two man pages
16 MY_L10N=(de fr nl pl)
17 IUSE="${MY_L10N[@]/#/l10n_}"
18 REQUIRED_USE="|| ( ${MY_L10N[@]/#/l10n_} )"
19
20 RDEPEND="virtual/man
21         l10n_de? ( !app-i18n/man-pages-de )
22         l10n_fr? ( !app-i18n/man-pages-fr )
23         l10n_nl? ( !app-i18n/man-pages-nl )
24         l10n_pl? ( !app-i18n/man-pages-pl )"
25
26 BDEPEND="app-text/po4a
27         dev-lang/perl"
28
29 DOCS=(AUTHORS.md CHANGES.md README.md)
30
31 src_prepare() {
32         default
33         sed -i -e "/^SUBDIRS/s/=.*/= ${L10N//-/_}/" po/Makefile.{am,in} || die
34
35         # some packages have their own translations
36         local noinst_manpages=(
37                 # app-arch/xz-utils
38                 de/xz.1
39                 de/xzdiff.1
40                 de/xzgrep.1
41                 de/xzless.1
42                 de/xzmore.1
43                 # sys-apps/shadow
44                 {de,pl}/groups.1
45                 de/su.1
46                 # sys-process/procps
47                 {de,pl}/free.1
48                 {de,fr}/pgrep.1
49                 {de,fr}/pmap.1
50                 {de,fr}/pwdx.1
51                 {de,fr}/tload.1
52                 {de,fr,pl}/uptime.1
53                 {de,fr}/sysctl.conf.5
54                 {de,fr}/sysctl.8
55                 {de,fr}/vmstat.8
56         )
57         printf '%s\n' "${noinst_manpages[@]}" \
58                 | sed 's%^\(.*\)/\(.*\)\.\(.*\)$%po/\1/man\3/\2.\3.po%' | xargs rm
59         assert
60 }
61
62 src_configure() {
63         econf --enable-compression=none
64 }