summaryrefslogtreecommitdiff
path: root/dev-libs/libprelude
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/libprelude')
-rw-r--r--dev-libs/libprelude/Manifest11
-rw-r--r--dev-libs/libprelude/files/libprelude-3.0.0-perl-hardening.patch14
-rw-r--r--dev-libs/libprelude/files/libprelude-3.0.0-ruby-configure.patch14
-rw-r--r--dev-libs/libprelude/files/libprelude-3.0.0-ruby-m4.patch20
-rw-r--r--dev-libs/libprelude/files/libprelude-4.0.0-fix-python-bindings.patch38
-rw-r--r--dev-libs/libprelude/libprelude-3.0.0.ebuild84
-rw-r--r--dev-libs/libprelude/libprelude-3.1.0-r1.ebuild77
-rw-r--r--dev-libs/libprelude/libprelude-4.0.0.ebuild92
-rw-r--r--dev-libs/libprelude/metadata.xml20
9 files changed, 370 insertions, 0 deletions
diff --git a/dev-libs/libprelude/Manifest b/dev-libs/libprelude/Manifest
new file mode 100644
index 000000000000..8b70bc76d3c7
--- /dev/null
+++ b/dev-libs/libprelude/Manifest
@@ -0,0 +1,11 @@
+AUX libprelude-3.0.0-perl-hardening.patch 1019 BLAKE2B 5e59c001ef66a1a24193b2f83e15527caec44154730ed4e02846b367c98fc25e2fcc073fbaad4cd1a35a689c2f57391fd932330182d5614511aef329f6b31f34 SHA512 0e6b08eb4e3a00ad3f78afb0ea6360bb82cbc21a2a5f419629d865a0c5598450f6923327c160b15a2874c98bc313e185d5a1f0379b55366b50a2fe6dd15ab7cb
+AUX libprelude-3.0.0-ruby-configure.patch 619 BLAKE2B 8c1d0c21ffd0de7defb87becb0f0e56b234e1512cc1b01df3928e30006ee20bd58bfa6e5005d9faac246b8277cadf9b1a8ca204f1ed5f52a709a026e84f6d93c SHA512 a268dd1ca72ff8295bc8cb9fd037c8bdfcdcacf68122cefdf17b056c8828770be205853aaf7a7ad18f0e6369bc325703583405f5372ed8c731f2591f1da5d09d
+AUX libprelude-3.0.0-ruby-m4.patch 1539 BLAKE2B 26934566408e3271c25f30902bfbb86a68cfa80e4bd174f21eda92e3cafd5394da1e34709beef1c706383df77d4779335a34232276beb841c8d447748aa332c4 SHA512 cd98e208260e497b46a56a4ca0430f0650282de949259caedfb06ce1d348af52a630def53c39c812d08247c289e551e9b6f70d8da17fb9b9627fb773af4e55a2
+AUX libprelude-4.0.0-fix-python-bindings.patch 1136 BLAKE2B 287f5e3c049ef4d3af54932f968f1973aebe0541e50403e4154512772e9d625324e879a06ff4c5810bb90f3d2c968c09fa361067435e7e4bc6131ea78f6ad794 SHA512 6990cd9e79d6e9e42c9f377f1c9a9f48920310aaf47d9bc731fc133c743256874a613ad5740eb4bc25825b341e313f79c8cfa1160a58e6eda228b9ca6bfef2b2
+DIST libprelude-3.0.0.tar.gz 2900153 BLAKE2B dd03b46a11b673252dc36701e4568c445fe1e3a61a79c92ce04ed6fefac804983ba03e39928038a67768d9e5e0542d74703c07254c0112d5a6906a7c37ae4403 SHA512 a1fd51aa3bb1b68759a00dd1636cb96379f0e954a66f4e39887ab20a5b4c191a0455dd6bd5f41b20ad94d06fff59af7f89b258f42e1c0dd4cfc99185a77d1797
+DIST libprelude-3.1.0.tar.gz 2949462 BLAKE2B 52764791766c54e2c1baa96231c6578f06219a6d1c48a97ad318fc8445fc64f90a63019654f7350d65ec4e0a336eef66bd449484321c590d1ee4596a6a386724 SHA512 f2878b19b4ba3cc74b0530f8741525ecf1425540d30356d182c4e0a797dbb5f4023792351bd059105dafc6b7818d4caa2e9c8b39be9a7039a89680244fcf1239
+DIST libprelude-4.0.0.tar.gz 2864402 BLAKE2B 2e51eb1af74b63140bc66a358b112a753c1a0fd86d6bb8bb43ccddca4cd396e34566168edca55a626a0b43ba56e676301f3792247c25f64c7a31430af3708311 SHA512 5d88e8f211b09cc3e43dbe299e935d8f11575ae3f1894059793966cd14a8e47177ef8963d45305e1a24f9efc4048520329b31681301a21815909bd38606c2ce7
+EBUILD libprelude-3.0.0.ebuild 1795 BLAKE2B b515c9cc9e685dfd0584abc38c169ffe232b80817d2568d0643a574cda233262133adec1439a9ec8ded278fc4f37f79e22df9f7b191e079a44bf664abd9fbe04 SHA512 334217f69b8c55b5bcc5e76116a330c77d053d3c4c6f3e0912efc73fef4d8bc299706687977009c8c42abc4795b560cfad5ff1b316f1d1d096344464f920eafb
+EBUILD libprelude-3.1.0-r1.ebuild 1630 BLAKE2B f299532775781f50784ca2430a8c0e5349be44389998abc6db100b667868aeec0ead7d0e6a76fad26823a518b0405e5e557d2925c465b09a19c3b4a074c5cd98 SHA512 415c10afc56e9ae8f841cedf17239e9a337ee01291706b192e0cf429b2a5380afaf703e111fdee179896143afa234bad76f0bd514ce9d2bac921d82bdafca30f
+EBUILD libprelude-4.0.0.ebuild 1843 BLAKE2B ec2155103f408bcdf1f66c367676b1ca310533dad0703f52c26826d7e154b5640937d349b8b2eecd51cede8da682eef0584365005979d70333da982d078c14bf SHA512 4dca9697d94e6c527e27448c3224d9c4673e72132a9be442dae74116135fae487a037289a3540c0808978ae4a80f0a0c6830b39e9b01f0da3497a6b76b48f8eb
+MISC metadata.xml 871 BLAKE2B bf71e839f29918c8b71d3bd9e45c6afa99391f476ff8c94eb43d9378e754ddafb9cf4aeef69dce4fc2210819b08f62898d7ec4717a9d7f13d04ee3df24e0a734 SHA512 bf4e35e6d51f1797b24c262a6cfd38ef1ce06e80b504afabb2f3f0aa7f069335e96562f3716b819abaa1bcb1f8f88bcb1a72a11047cd87fd4d62d7903b200cec
diff --git a/dev-libs/libprelude/files/libprelude-3.0.0-perl-hardening.patch b/dev-libs/libprelude/files/libprelude-3.0.0-perl-hardening.patch
new file mode 100644
index 000000000000..df77899c82fa
--- /dev/null
+++ b/dev-libs/libprelude/files/libprelude-3.0.0-perl-hardening.patch
@@ -0,0 +1,14 @@
+When : when building perl bindings. Without this patch, it does not take care of LDFLAGS.
+Why : It is required if you want to customize your own LDFLAGS, example : for hardening
+Upstream : https://www.prelude-siem.org/issues/761 It should be added in the next version of Prelude.
+--- a/bindings/perl/Makefile.PL.in
++++ b/bindings/perl/Makefile.PL.in
+@@ -27,7 +27,7 @@
+ my %attributs = (NAME => 'Prelude',
+ INC => '-I@top_builddir@ -I@top_builddir@/src/include -I@top_srcdir@/src/include -I@top_builddir@/src/libprelude-error -I@top_srcdir@/bindings/c++/include',
+ LIBS => ["-L@top_builddir@/src/.libs -lprelude -L@top_builddir@/bindings/c++/.libs -lpreludecpp", "-L$ENV{LIBDIR} -lprelude @LIBPRELUDE_LIBS@ @LIBADD_DL@ @LTLIBTHREAD@" ],
+- LDDLFLAGS => "-L@top_builddir@/src/.libs $Config{lddlflags}");
++ LDDLFLAGS => "-L@top_builddir@/src/.libs $Config{lddlflags} @LDFLAGS@,-rpath");
+
+ if ( abs_path("@top_srcdir@") ne abs_path("@top_builddir@") ) {
+ foreach my $filename ( qw/Prelude.cxx Prelude.pm/ ) {
diff --git a/dev-libs/libprelude/files/libprelude-3.0.0-ruby-configure.patch b/dev-libs/libprelude/files/libprelude-3.0.0-ruby-configure.patch
new file mode 100644
index 000000000000..fc09beace223
--- /dev/null
+++ b/dev-libs/libprelude/files/libprelude-3.0.0-ruby-configure.patch
@@ -0,0 +1,14 @@
+--- a/configure.in
++++ b/configure.in
+@@ -525,9 +525,9 @@
+ dnl * Ruby support *
+ dnl **************************************************
+
+-
+-AM_PATH_RUBY(,with_ruby=yes, with_ruby=no)
++AC_ARG_WITH(ruby, AC_HELP_STRING(--with-ruby@<:@=PATH@:>@, Enable support for ruby binding @<:@default=auto@:>@),,with_ruby=no)
+ if test x$with_ruby != xno; then
++ AM_PATH_RUBY(,with_ruby=yes, with_ruby=no)
+ RUBY_ARCHDIR=`$RUBY -e 'require "rbconfig.rb"; puts RbConfig::expand("\$(archdir)")'`
+ RUBY_LIBRUBYARG=`$RUBY -e 'require "rbconfig.rb"; puts RbConfig::expand("\$(LIBRUBYARG)")'`
+
diff --git a/dev-libs/libprelude/files/libprelude-3.0.0-ruby-m4.patch b/dev-libs/libprelude/files/libprelude-3.0.0-ruby-m4.patch
new file mode 100644
index 000000000000..b02555afb65f
--- /dev/null
+++ b/dev-libs/libprelude/files/libprelude-3.0.0-ruby-m4.patch
@@ -0,0 +1,20 @@
+When : when building ruby bindings, it can not find ruby versin so configure will never enable ruby support
+Why : It is required if you want to use libprelude with ruby
+Upstream : https://www.prelude-siem.org/issues/759 It should be added in the next version of Prelude.
+--- a/m4/am_path_ruby.m4
++++ b/m4/am_path_ruby.m4
+@@ -96,11 +96,11 @@
+ dnl (shared libraries)
+ AC_CACHE_CHECK([for $am_display_RUBY extension module directory],
+ [am_cv_ruby_rbexecdir],
+- [am_cv_ruby_rbexecdir=`$RUBY -rrbconfig -e "drive = File::PATH_SEPARATOR == ';' ? /\A\w:/ : /\A/; prefix = Regexp.new('\\A' + Regexp.quote(RbConfig::CONFIG[['prefix']])); \\$prefix = RbConfig::CONFIG[['prefix']].sub(drive, ''); \\$sitearchdir = RbConfig::CONFIG[['sitearchdir']].sub(prefix, '\\$(prefix)').sub(drive, ''); print \\$sitearchdir;" 2>/dev/null || echo "${RUBY_EXEC_PREFIX}/local/lib/site_ruby/${RUBY_VERSION}/${RUBY_PLATFORM}"`])
++ [am_cv_ruby_rbexecdir=`$RUBY -r rbconfig -e "print RbConfig::CONFIG[['vendorarchdir']]"`])
+ AC_SUBST([rbexecdir], [$am_cv_ruby_rbexecdir])
+
+- RUBY_INCLUDES=`$RUBY -r rbconfig -e 'if RbConfig::CONFIG[["archdir"]] then print " -I" + RbConfig::CONFIG[["archdir"]] end
+- if RbConfig::CONFIG[["rubyhdrdir"]] then print " -I" + RbConfig::CONFIG[["rubyhdrdir"]] end'`
++ RUBY_VER=`$RUBY -rrbconfig -e "print RbConfig::CONFIG[['ruby_pc']]" | sed 's/.pc//g'`
++ RUBY_INCLUDES=`pkg-config $RUBY_VER --cflags`
+ AC_SUBST([RUBY_INCLUDES])
+
+ dnl pkgrbexecdir -- $(rbexecdir)/$(PACKAGE)
diff --git a/dev-libs/libprelude/files/libprelude-4.0.0-fix-python-bindings.patch b/dev-libs/libprelude/files/libprelude-4.0.0-fix-python-bindings.patch
new file mode 100644
index 000000000000..7336b620045a
--- /dev/null
+++ b/dev-libs/libprelude/files/libprelude-4.0.0-fix-python-bindings.patch
@@ -0,0 +1,38 @@
+--- a/bindings/python/Makefile.am 2017-07-17 12:03:05.653000000 +0200
++++ b/bindings/python/Makefile.am 2017-09-06 18:51:57.179778549 +0200
+@@ -9,35 +9,6 @@
+ all-am: python-build
+
+ python-build: _prelude.cxx
+-if HAVE_PYTHON2
+- CC="$(CXX)" $(PYTHON2) setup.py build
+-endif
+-if HAVE_PYTHON3
+- CC="$(CXX)" $(PYTHON3) setup.py build
+-endif
+-install-exec-hook:
+-if HAVE_PYTHON2
+- $(PYTHON2) setup.py install `test -n "$(DESTDIR)" && echo --root $(DESTDIR)` --prefix @prefix@
+-endif
+-if HAVE_PYTHON3
+- $(PYTHON3) setup.py install `test -n "$(DESTDIR)" && echo --root $(DESTDIR)` --prefix @prefix@
+-endif
+-
+-uninstall-hook:
+-if HAVE_PYTHON2
+- $(PYTHON2) setup.py uninstall `test -n "$(DESTDIR)" && echo --root $(DESTDIR)` --prefix @prefix@
+-endif
+-if HAVE_PYTHON3
+- $(PYTHON3) setup.py uninstall `test -n "$(DESTDIR)" && echo --root $(DESTDIR)` --prefix @prefix@
+-endif
+-
+-clean-local:
+-if HAVE_PYTHON2
+- $(PYTHON2) setup.py clean -a
+-endif
+-if HAVE_PYTHON3
+- $(PYTHON3) setup.py clean -a
+-endif
+
+ _prelude.cxx prelude.py: $(top_srcdir)/bindings/c++/include/*.hxx $(top_srcdir)/bindings/libpreludecpp.i libpreludecpp-python.i
+ if HAVE_SWIG
diff --git a/dev-libs/libprelude/libprelude-3.0.0.ebuild b/dev-libs/libprelude/libprelude-3.0.0.ebuild
new file mode 100644
index 000000000000..8a9e5f98a1aa
--- /dev/null
+++ b/dev-libs/libprelude/libprelude-3.0.0.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_{4,5}} )
+
+USE_RUBY="ruby22 ruby23"
+
+inherit autotools eutils python-r1 ruby-single
+
+DESCRIPTION="Prelude-SIEM Framework Library"
+HOMEPAGE="https://www.prelude-siem.org"
+SRC_URI="https://www.prelude-siem.org/pkg/src/3.0.0/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc lua python ruby perl"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="dev-libs/libgcrypt:0=
+ net-libs/gnutls
+ perl? ( dev-lang/perl virtual/perl-ExtUtils-MakeMaker )
+ lua? ( dev-lang/lua:* )
+ ruby? ( ${RUBY_DEPS} )
+ python? ( ${PYTHON_DEPS} )"
+
+DEPEND="${RDEPEND}
+ doc? ( dev-util/gtk-doc )
+ sys-devel/flex
+ virtual/yacc
+ >=dev-lang/swig-3.0.7
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}/${P}-perl-hardening.patch"
+ "${FILESDIR}/${P}-ruby-m4.patch"
+ "${FILESDIR}/${P}-ruby-configure.patch"
+)
+
+src_prepare() {
+ default_src_prepare
+
+ # Avoid null runpaths in Perl bindings.
+ sed -e 's/ LD_RUN_PATH=""//' -i "${S}/bindings/Makefile.am" || die "sed failed"
+
+ mv "${S}/configure.in" "${S}/configure.ac" || die "mv failed"
+
+ eautoreconf
+}
+
+src_configure() {
+ local python2_configure=--without-python2
+ local python3_configure=--without-python3
+
+ chk_python() {
+ if [[ ${EPYTHON} == python2* ]]; then
+ python2_configure=--with-python2
+ elif [[ ${EPYTHON} == python3* ]]; then
+ python3_configure=--with-python3
+ fi
+ }
+
+ if use python; then
+ python_foreach_impl chk_python
+ fi
+
+ econf \
+ --enable-easy-bindings \
+ --with-swig \
+ $(use_with perl) \
+ $(use_enable doc gtk-doc) \
+ $(use_with lua) \
+ $(use_with ruby) \
+ ${python2_configure} \
+ ${python3_configure}
+}
+
+src_install() {
+ default_src_install
+ prune_libtool_files --modules
+}
diff --git a/dev-libs/libprelude/libprelude-3.1.0-r1.ebuild b/dev-libs/libprelude/libprelude-3.1.0-r1.ebuild
new file mode 100644
index 000000000000..5cdc2766edba
--- /dev/null
+++ b/dev-libs/libprelude/libprelude-3.1.0-r1.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_{4,5}} )
+
+USE_RUBY="ruby22 ruby23"
+
+inherit autotools python-r1 ruby-single
+
+DESCRIPTION="Prelude-SIEM Framework Library"
+HOMEPAGE="https://www.prelude-siem.org"
+SRC_URI="https://www.prelude-siem.org/pkg/src/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc lua python ruby perl"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="dev-libs/libgcrypt:0=
+ net-libs/gnutls:=
+ perl? ( dev-lang/perl:= virtual/perl-ExtUtils-MakeMaker )
+ lua? ( dev-lang/lua:* )
+ ruby? ( ${RUBY_DEPS} )
+ python? ( ${PYTHON_DEPS} )"
+
+DEPEND="${RDEPEND}
+ doc? ( dev-util/gtk-doc )
+ sys-devel/flex
+ virtual/yacc
+ >=dev-lang/swig-3.0.7
+ virtual/pkgconfig"
+
+src_prepare() {
+ default
+
+ # Avoid null runpaths in Perl bindings.
+ sed -e 's/ LD_RUN_PATH=""//' -i "${S}/bindings/Makefile.am" || die "sed failed"
+
+ eautoreconf
+}
+
+src_configure() {
+ local python2_configure=--without-python2
+ local python3_configure=--without-python3
+
+ chk_python() {
+ if [[ ${EPYTHON} == python2* ]]; then
+ python2_configure=--with-python2
+ elif [[ ${EPYTHON} == python3* ]]; then
+ python3_configure=--with-python3
+ fi
+ }
+
+ if use python; then
+ python_foreach_impl chk_python
+ fi
+
+ econf \
+ --enable-easy-bindings \
+ --with-swig \
+ $(use_with perl) \
+ $(use_with perl perl-installdirs vendor) \
+ $(use_enable doc gtk-doc) \
+ $(use_with lua) \
+ $(use_with ruby) \
+ ${python2_configure} \
+ ${python3_configure}
+}
+
+src_install() {
+ default
+ find "${D}" -name '*.la' -delete || die
+}
diff --git a/dev-libs/libprelude/libprelude-4.0.0.ebuild b/dev-libs/libprelude/libprelude-4.0.0.ebuild
new file mode 100644
index 000000000000..1207e821b0d0
--- /dev/null
+++ b/dev-libs/libprelude/libprelude-4.0.0.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python{2_7,3_{4,5,6}} )
+USE_RUBY="ruby21 ruby22 ruby23 ruby24"
+DISTUTILS_OPTIONAL=1
+
+inherit autotools distutils-r1 ruby-single
+
+DESCRIPTION="Prelude-SIEM Framework Library"
+HOMEPAGE="https://www.prelude-siem.org"
+SRC_URI="https://www.prelude-siem.org/pkg/src/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="lua perl python ruby"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="net-libs/gnutls:=
+ lua? ( dev-lang/lua:* )
+ perl? ( dev-lang/perl:= virtual/perl-ExtUtils-MakeMaker )
+ python? ( ${PYTHON_DEPS} )
+ ruby? ( ${RUBY_DEPS} )"
+
+DEPEND="${RDEPEND}
+ >=dev-lang/swig-3.0.7
+ dev-util/gtk-doc-am
+ sys-devel/flex
+ virtual/pkgconfig
+ virtual/yacc"
+
+PATCHES=(
+ "${FILESDIR}/${P}-fix-python-bindings.patch"
+)
+
+src_prepare() {
+ default
+
+ # Avoid null runpaths in Perl bindings.
+ sed -e 's/ LD_RUN_PATH=""//' -i "${S}/bindings/Makefile.am" || die "sed failed"
+
+ eautoreconf
+
+ if use python; then
+ cd bindings/python || die
+ distutils-r1_src_prepare
+ fi
+}
+
+src_configure() {
+ local myconf=(
+ --enable-easy-bindings
+ --with-swig
+ $(use_with lua)
+ $(use_with perl)
+ $(usex perl '--with-perl-installdirs=vendor' '')
+ $(use_with ruby)
+ )
+
+ if use python; then
+ python_setup
+ if python_is_python3; then
+ myconf+=(--without-python2 --with-python3="${EPYTHON}")
+ else
+ myconf+=(--without-python3 --with-python2="${EPYTHON}")
+ fi
+ else
+ myconf+=(--without-python2 --without-python3)
+ fi
+
+ econf "${myconf[@]}"
+}
+
+src_compile() {
+ default
+ if use python; then
+ cd bindings/python || die
+ distutils-r1_src_compile
+ fi
+}
+
+src_install() {
+ default
+ find "${D}" -name '*.la' -delete || die
+ if use python; then
+ cd bindings/python || die
+ distutils-r1_src_install
+ fi
+}
diff --git a/dev-libs/libprelude/metadata.xml b/dev-libs/libprelude/metadata.xml
new file mode 100644
index 000000000000..1870d87272ec
--- /dev/null
+++ b/dev-libs/libprelude/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>thomas.andrejak@gmail.com</email>
+ <name>Thomas Andrejak</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription lang="en">
+ Libprelude is a library that guarantees secure connections between all sensors
+ and the Prelude Manager. Libprelude provides an Application Programming Interface
+ (API) for the communication with Prelude sub-systems, it supplies the necessary
+ functionality for generating and emitting IDMEF events with Prelude and automates
+ the saving and re-transmission of data in times of temporary interruption of one
+ of the components of the system.
+ </longdescription>
+</pkgmetadata>