virtual/perl-Parse-CPAN-Meta: keyword ~riscv
[gentoo.git] / dev-util / dialog / dialog-1.3.20181107.ebuild
1 # Copyright 1999-2018 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 inherit eutils multilib versionator
6
7 DIA_P="${PN}-$(replace_version_separator 2 '-')"
8 DESCRIPTION="tool to display dialog boxes from a shell"
9 HOMEPAGE="https://invisible-island.net/dialog/"
10 SRC_URI="https://dev.gentoo.org/~jer/${DIA_P}.tgz"
11
12 LICENSE="GPL-2"
13 SLOT="0/15"
14 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
15 IUSE="examples minimal nls static-libs unicode"
16
17 RDEPEND="
18         >=sys-libs/ncurses-5.2-r5:=[unicode?]
19 "
20 DEPEND="
21         ${RDEPEND}
22         nls? ( sys-devel/gettext )
23         !minimal? ( sys-devel/libtool )
24         !<=sys-freebsd/freebsd-contrib-8.9999
25 "
26 S=${WORKDIR}/${DIA_P}
27
28 src_prepare() {
29         default
30         sed -i -e '/LIB_CREATE=/s:${CC}:& ${LDFLAGS}:g' configure || die
31         sed -i '/$(LIBTOOL_COMPILE)/s:$: $(LIBTOOL_OPTS):' makefile.in || die
32 }
33
34 src_configure() {
35         econf \
36                 --disable-rpath-hack \
37                 $(use_enable nls) \
38                 $(use_with !minimal libtool) \
39                 --with-libtool-opts=$(usex static-libs '' '-shared') \
40                 --with-ncurses$(usex unicode w '')
41 }
42
43 src_install() {
44         use minimal && default || emake DESTDIR="${D}" install-full
45
46         use examples && dodoc -r samples
47
48         dodoc CHANGES README
49
50         prune_libtool_files
51 }