sys-apps/gawk: stable 5.0.1 for ppc64, bug #725374
[gentoo.git] / sys-apps / texinfo / texinfo-6.7.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 # Note: if your package uses the texi2dvi utility, it must depend on the
5 # virtual/texi2dvi package to pull in all the right deps.  The tool is not
6 # usable out-of-the-box because it requires the large tex packages.
7
8 EAPI=7
9
10 inherit flag-o-matic toolchain-funcs
11
12 DESCRIPTION="The GNU info program and utilities"
13 HOMEPAGE="https://www.gnu.org/software/texinfo/"
14 SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
15
16 LICENSE="GPL-3"
17 SLOT="0"
18 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
19 IUSE="nls +standalone static"
20
21 RDEPEND="
22         !=app-text/tetex-2*
23         >=sys-libs/ncurses-5.2-r2:0=
24         standalone? ( dev-lang/perl )
25         !standalone?  (
26                 dev-lang/perl:=
27                 dev-perl/libintl-perl
28                 dev-perl/Unicode-EastAsianWidth
29                 dev-perl/Text-Unidecode
30         )
31         nls? ( virtual/libintl )"
32 DEPEND="${RDEPEND}
33         app-arch/xz-utils
34         nls? ( >=sys-devel/gettext-0.19.6 )"
35
36 src_configure() {
37         # Respect compiler and CPPFLAGS/CFLAGS/LDFLAGS for Perl extensions. #622576
38         local -x PERL_EXT_CC="$(tc-getCC)" PERL_EXT_CPPFLAGS="${CPPFLAGS}" PERL_EXT_CFLAGS="${CFLAGS}" PERL_EXT_LDFLAGS="${LDFLAGS}"
39
40         use static && append-ldflags -static
41         local myeconfargs
42         if use standalone ; then
43                 myeconfargs=(
44                         --without-external-libintl-perl
45                         --without-external-Unicode-EastAsianWidth
46                         --without-external-Text-Unidecode
47                         $(use_enable nls)
48                         --disable-perl-xs
49                 )
50         else
51                 myeconfargs=(
52                         --with-external-libintl-perl
53                         --with-external-Unicode-EastAsianWidth
54                         --with-external-Text-Unidecode
55                         $(use_enable nls)
56                         --enable-perl-xs
57                 )
58         fi
59         econf "${myeconfargs[@]}"
60 }