summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/libprelude/files/libprelude-3.0.0-ruby-m4.patch')
-rw-r--r--dev-libs/libprelude/files/libprelude-3.0.0-ruby-m4.patch20
1 files changed, 20 insertions, 0 deletions
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)