dev-libs/libprelude: Bump version 4.0.0
[gentoo.git] / dev-libs / libprelude / libprelude-3.0.0.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 PYTHON_COMPAT=( python{2_7,3_{4,5}} )
7
8 USE_RUBY="ruby21 ruby22"
9
10 inherit autotools eutils python-r1 ruby-single
11
12 DESCRIPTION="Prelude-SIEM Framework Library"
13 HOMEPAGE="https://www.prelude-siem.org"
14 SRC_URI="https://www.prelude-siem.org/pkg/src/3.0.0/${P}.tar.gz"
15
16 LICENSE="GPL-2+"
17 SLOT="0"
18 KEYWORDS="~amd64 ~x86"
19 IUSE="doc lua python ruby perl"
20
21 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
22
23 RDEPEND="dev-libs/libgcrypt:0=
24         net-libs/gnutls
25         perl? ( dev-lang/perl virtual/perl-ExtUtils-MakeMaker )
26         lua? ( dev-lang/lua:* )
27         ruby? ( ${RUBY_DEPS} )
28         python? ( ${PYTHON_DEPS} )"
29
30 DEPEND="${RDEPEND}
31         doc? ( dev-util/gtk-doc )
32         sys-devel/flex
33         virtual/yacc
34         >=dev-lang/swig-3.0.7
35         virtual/pkgconfig"
36
37 PATCHES=(
38         "${FILESDIR}/${P}-perl-hardening.patch"
39         "${FILESDIR}/${P}-ruby-m4.patch"
40         "${FILESDIR}/${P}-ruby-configure.patch"
41 )
42
43 src_prepare() {
44         default_src_prepare
45
46         # Avoid null runpaths in Perl bindings.
47         sed -e 's/ LD_RUN_PATH=""//' -i "${S}/bindings/Makefile.am" || die "sed failed"
48
49         mv "${S}/configure.in" "${S}/configure.ac" || die "mv failed"
50
51         eautoreconf
52 }
53
54 src_configure() {
55         local python2_configure=--without-python2
56         local python3_configure=--without-python3
57
58         chk_python() {
59                 if [[ ${EPYTHON} == python2* ]]; then
60                         python2_configure=--with-python2
61                 elif [[ ${EPYTHON} == python3* ]]; then
62                         python3_configure=--with-python3
63                 fi
64         }
65
66         if use python; then
67                 python_foreach_impl chk_python
68         fi
69
70         econf \
71                 --enable-easy-bindings \
72                 --with-swig \
73                 $(use_with perl) \
74                 $(use_enable doc gtk-doc) \
75                 $(use_with lua) \
76                 $(use_with ruby) \
77                 ${python2_configure} \
78                 ${python3_configure}
79 }
80
81 src_install() {
82         default_src_install
83         prune_libtool_files --modules
84 }