commit:     b5e308a175dc5b9f0986d14aac5c6ab13009fa5c
Author:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 21 05:47:00 2024 +0000
Commit:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
CommitDate: Wed Aug 21 05:47:28 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5e308a1

dev-ruby/ruby-augeas: fix compilation with gcc14

Closes: https://bugs.gentoo.org/884303
Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>

 .../files/ruby-augeas-0.5.0-gcc14.patch            | 27 ++++++++++++++++++++++
 dev-ruby/ruby-augeas/ruby-augeas-0.5.0-r6.ebuild   | 26 +++++++++++++++++++++
 2 files changed, 53 insertions(+)

diff --git a/dev-ruby/ruby-augeas/files/ruby-augeas-0.5.0-gcc14.patch 
b/dev-ruby/ruby-augeas/files/ruby-augeas-0.5.0-gcc14.patch
new file mode 100644
index 000000000000..498ae9a992eb
--- /dev/null
+++ b/dev-ruby/ruby-augeas/files/ruby-augeas-0.5.0-gcc14.patch
@@ -0,0 +1,27 @@
+From 9f1f9df48ef8c6f62349eccb90dc54a3c3d75e3f Mon Sep 17 00:00:00 2001
+From: Ewoud Kohl van Wijngaarden <[email protected]>
+Date: Wed, 31 Jan 2024 12:52:45 +0100
+Subject: [PATCH] Remove unused sibling argument from augeas_rm
+
+This makes the function match the method definition. There was already a
+warning about this, but Fedora 40 applies more hardening and it's a
+fatal error.
+
+Fixes: e6b57c58d24b ("Initial ruby bindings, written by Bryan Kearney")
+---
+ ext/augeas/_augeas.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ext/augeas/_augeas.c b/ext/augeas/_augeas.c
+index f9b49d1..7ef0d7d 100644
+--- a/ext/augeas/_augeas.c
++++ b/ext/augeas/_augeas.c
+@@ -184,7 +184,7 @@ VALUE augeas_mv(VALUE s, VALUE src, VALUE dst) {
+  *
+  * Remove path and all its children. Returns the number of entries removed
+  */
+-VALUE augeas_rm(VALUE s, VALUE path, VALUE sibling) {
++VALUE augeas_rm(VALUE s, VALUE path) {
+     augeas *aug = aug_handle(s);
+     const char *cpath = StringValueCStr(path) ;
+ 

diff --git a/dev-ruby/ruby-augeas/ruby-augeas-0.5.0-r6.ebuild 
b/dev-ruby/ruby-augeas/ruby-augeas-0.5.0-r6.ebuild
new file mode 100644
index 000000000000..57614c50b3de
--- /dev/null
+++ b/dev-ruby/ruby-augeas/ruby-augeas-0.5.0-r6.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+USE_RUBY="ruby31 ruby32 ruby33"
+
+RUBY_FAKEGEM_DOCDIR="doc/site/api"
+RUBY_FAKEGEM_EXTRADOC="NEWS README.rdoc"
+
+RUBY_FAKEGEM_EXTENSIONS=(ext/augeas/extconf.rb)
+
+inherit ruby-fakegem
+
+DESCRIPTION="Ruby bindings for Augeas"
+HOMEPAGE="https://augeas.net/";
+SRC_URI="http://download.augeas.net/ruby/${P}.gem";
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86"
+
+RDEPEND=">=app-admin/augeas-1.1.0"
+DEPEND="${RDEPEND}
+               dev-libs/libxml2"
+
+PATCHES=( "${FILESDIR}/${P}-gcc14.patch" )

Reply via email to