dev-libs/kuserfeedback: x86 stable wrt bug #721452
[gentoo.git] / dev-libs / libprelude / libprelude-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=6
5 PYTHON_COMPAT=( python3_6 )
6 USE_RUBY="ruby21 ruby22 ruby23 ruby24"
7 DISTUTILS_OPTIONAL=1
8
9 inherit autotools distutils-r1 ruby-single
10
11 DESCRIPTION="Prelude-SIEM Framework Library"
12 HOMEPAGE="https://www.prelude-siem.org"
13 SRC_URI="https://www.prelude-siem.org/pkg/src/${PV}/${P}.tar.gz"
14
15 LICENSE="GPL-2+"
16 SLOT="0"
17 KEYWORDS="~amd64 ~x86"
18 IUSE="lua perl python ruby"
19
20 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
21
22 RDEPEND="net-libs/gnutls:=
23         lua? ( dev-lang/lua:* )
24         perl? ( dev-lang/perl:= virtual/perl-ExtUtils-MakeMaker )
25         python? ( ${PYTHON_DEPS} )
26         ruby? ( ${RUBY_DEPS} )"
27
28 DEPEND="${RDEPEND}
29         >=dev-lang/swig-3.0.7
30         dev-util/gtk-doc-am
31         sys-devel/flex
32         virtual/pkgconfig
33         virtual/yacc"
34
35 PATCHES=(
36         "${FILESDIR}/${P}-fix-python-bindings.patch"
37 )
38
39 src_prepare() {
40         default
41
42         # Avoid null runpaths in Perl bindings.
43         sed -e 's/ LD_RUN_PATH=""//' -i "${S}/bindings/Makefile.am" || die "sed failed"
44
45         eautoreconf
46
47         if use python; then
48                 cd bindings/python || die
49                 distutils-r1_src_prepare
50         fi
51 }
52
53 src_configure() {
54         local myconf=(
55                 --enable-easy-bindings
56                 --with-swig
57                 $(use_with lua)
58                 $(use_with perl)
59                 $(usex perl '--with-perl-installdirs=vendor' '')
60                 $(use_with ruby)
61         )
62
63         if use python; then
64                 python_setup
65                 if python_is_python3; then
66                         myconf+=(--without-python2 --with-python3="${EPYTHON}")
67                 else
68                         myconf+=(--without-python3 --with-python2="${EPYTHON}")
69                 fi
70         else
71                 myconf+=(--without-python2 --without-python3)
72         fi
73
74         econf "${myconf[@]}"
75 }
76
77 src_compile() {
78         default
79         if use python; then
80                 cd bindings/python || die
81                 distutils-r1_src_compile
82         fi
83 }
84
85 src_install() {
86         default
87         find "${D}" -name '*.la' -delete || die
88         if use python; then
89                 cd bindings/python || die
90                 distutils-r1_src_install
91         fi
92 }