summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Andrejak <thomas.andrejak@gmail.com>2016-07-17 15:09:29 +0200
committerGöktürk Yüksek <gokturk@gentoo.org>2016-08-04 21:10:12 -0400
commita390b6011ea0586d18850c8e7f4a03f5285247eb (patch)
tree2ddbea551df135f5ac925a4ac05058f12d0161ef /dev-libs/libprelude
parentdev-perl/Email-Simple: Rm excess test deps on dev-perl/Test-Pod{,-Coverage} (diff)
downloadgentoo-a390b6011ea0586d18850c8e7f4a03f5285247eb.tar.gz
gentoo-a390b6011ea0586d18850c8e7f4a03f5285247eb.tar.bz2
gentoo-a390b6011ea0586d18850c8e7f4a03f5285247eb.zip
dev-libs/libprelude: New package
Libprelude is a library that guarantees secure connections between all sensors and the Prelude Manager. Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=583126
Diffstat (limited to 'dev-libs/libprelude')
-rw-r--r--dev-libs/libprelude/Manifest1
-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/libprelude-3.0.0.ebuild85
-rw-r--r--dev-libs/libprelude/metadata.xml20
6 files changed, 154 insertions, 0 deletions
diff --git a/dev-libs/libprelude/Manifest b/dev-libs/libprelude/Manifest
new file mode 100644
index 000000000000..8cbf82a84983
--- /dev/null
+++ b/dev-libs/libprelude/Manifest
@@ -0,0 +1 @@
+DIST libprelude-3.0.0.tar.gz 2900153 SHA256 8dd1acdd49ec42b3c54642c33987c574ced43b92feb9a523998e07317434cec2 SHA512 a1fd51aa3bb1b68759a00dd1636cb96379f0e954a66f4e39887ab20a5b4c191a0455dd6bd5f41b20ad94d06fff59af7f89b258f42e1c0dd4cfc99185a77d1797 WHIRLPOOL 5ee5a90d0448c8079977dbf84a5c3650bc00aff8c6fe4355a7926313b2364824281d2fea898d92e80bc8b7cb17190c6f7e36b2c9de2ebc62f8b4411417541d58
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/libprelude-3.0.0.ebuild b/dev-libs/libprelude/libprelude-3.0.0.ebuild
new file mode 100644
index 000000000000..149d06d29765
--- /dev/null
+++ b/dev-libs/libprelude/libprelude-3.0.0.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_{3,4,5}} )
+
+USE_RUBY="ruby21"
+
+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/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>