app-misc/hivex: update USE_RUBY to current versions
[gentoo.git] / app-misc / hivex / hivex-1.3.14.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 USE_RUBY="ruby23 ruby24 ruby25"
7 RUBY_OPTIONAL=yes
8
9 PYTHON_COMPAT=(python2_7 python3_{4,5,6})
10
11 inherit eutils perl-module ruby-ng python-single-r1
12
13 DESCRIPTION="Library for reading and writing Windows Registry 'hive' binary files"
14 HOMEPAGE="http://libguestfs.org"
15 SRC_URI="http://libguestfs.org/download/${PN}/${P}.tar.gz"
16
17 LICENSE="LGPL-2.1"
18 SLOT="0"
19 KEYWORDS="amd64 x86"
20 IUSE="ocaml readline +perl python test static-libs ruby"
21
22 RDEPEND="
23         virtual/libiconv
24         virtual/libintl
25         dev-libs/libxml2:2
26         ocaml? ( dev-lang/ocaml[ocamlopt]
27                          dev-ml/findlib[ocamlopt]
28                          )
29         readline? ( sys-libs/readline:0 )
30         perl? ( dev-perl/IO-stringy )
31         ruby? ( $(ruby_implementations_depend) )
32         python? ( ${PYTHON_DEPS} )
33         "
34
35 DEPEND="${RDEPEND}
36         perl? (
37                 test? ( dev-perl/Pod-Coverage
38                         dev-perl/Test-Pod-Coverage )
39                   )
40         "
41
42 ruby_add_bdepend "ruby? ( dev-ruby/rake
43                         virtual/rubygems
44                         dev-ruby/rdoc )"
45 ruby_add_rdepend "ruby? ( virtual/rubygems )"
46
47 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )
48                         ruby? ( || ( $(ruby_get_use_targets) ) )"
49
50 DOCS=( README )
51
52 S="${WORKDIR}/${P}"
53
54 pkg_setup() {
55         if use python; then
56                 python-single-r1_pkg_setup
57         fi
58 }
59
60 src_unpack() {
61         default
62         cp -prlP "${WORKDIR}/${P}" "${WORKDIR}"/all
63 }
64
65 src_configure() {
66         ruby-ng_src_configure
67
68         if use perl; then
69                 pushd perl
70                 perl-module_src_configure
71                 popd
72         fi
73
74         local myeconfargs=(
75                 $(use_with readline)
76                 $(use_enable ocaml)
77                 $(use_enable perl)
78                 --enable-nls
79                 --disable-ruby
80                 $(use_enable python)
81                 --disable-rpath
82                 )
83
84         econf ${myeconfargs[@]}
85 }
86
87 src_compile() {
88         default
89         ruby-ng_src_compile
90 }
91
92 src_install() {
93         strip-linguas -i po
94
95         emake install DESTDIR="${ED}" "LINGUAS=""${LINGUAS}"""
96
97         ruby-ng_src_install
98
99         if use perl; then
100                 perl_delete_localpod
101         fi
102 }