commit: 12eda58851c7f4935bcb470b588bb7d48610653a
Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 2 06:33:19 2025 +0000
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Tue Dec 2 06:33:46 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=12eda588
app-text/rpl: add 2.0.4
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
app-text/rpl/Manifest | 1 +
app-text/rpl/files/rpl-2.0.4-tests.patch | 24 +++++
app-text/rpl/files/rpl-2.0.4-uchardet-vala.patch | 108 +++++++++++++++++++++++
app-text/rpl/rpl-2.0.4.ebuild | 40 +++++++++
4 files changed, 173 insertions(+)
diff --git a/app-text/rpl/Manifest b/app-text/rpl/Manifest
index 6f8cbe3a1a07..7438dcb76f1f 100644
--- a/app-text/rpl/Manifest
+++ b/app-text/rpl/Manifest
@@ -1,2 +1,3 @@
DIST rpl-1.15.5.gh.tar.gz 24401 BLAKE2B
91f0914ce80167305f9b403f691e58cd3f219d9e22f0ae7587b6dc5c60809e03bf38bd3878696916026b7cd0e597b67a6fcbb97d55005fd113e80aa7296f0e95
SHA512
1669a2de5b09090a3058421e2f9560f9b155151ec6d91f9d4f3b43070082d2541981de7754f047771c515e6d1450998c55e3b018a589a5ae4bd48e28464bb858
DIST rpl-1.18.gh.tar.gz 25750 BLAKE2B
f090049d51e3fa4da1d0c3827a750b861fbd730b66d2e5336193332b119ac58bc26d64f429090443b6f45099fe078e0499f0aaf9e5488a543b5792de8f2d33a9
SHA512
08b68c0894085451a9bce169e972a67cddbbbc18565f514fc53a4ae1dbcc13818f71b8a6402e305c47298b1abc75a2ae39ac1acf175c29ee86fe6f6d2e6f474c
+DIST rpl-2.0.4.tar.gz 1098594 BLAKE2B
5337bbc9e2fa42d4904f04aee3db711d9446717b3727b5971d4cf2be8b583b42f5e1ae1aae58b3d15564e48b76246638c769be8a6445d0dee6e3f252f44c9d94
SHA512
0908f53bb6b48a1a80f8c9c364da01430d2d630848f6c99691ccf8d630121811c1d85218d68576b611877667039c882eb7d245f24152207cb48dcfa5d19fafa5
diff --git a/app-text/rpl/files/rpl-2.0.4-tests.patch
b/app-text/rpl/files/rpl-2.0.4-tests.patch
new file mode 100644
index 000000000000..f01f47800adf
--- /dev/null
+++ b/app-text/rpl/files/rpl-2.0.4-tests.patch
@@ -0,0 +1,24 @@
+diff --git a/test.vala b/test.vala
+index 8e62a32..0e8c8a7 100644
+--- a/test.vala
++++ b/test.vala
+@@ -77,16 +77,9 @@ Subprocess check_prog (string prog, string[] args) throws
Error {
+ }
+
+ bool try_sudo (string[] cmd) {
+- try {
+- var cmd_args = new Array<string>.take_zero_terminated(cmd);
+- cmd_args.prepend_val ("-n");
+- check_prog ("sudo", cmd_args.data);
+- return true;
+- } catch (Error e) {
+- print ("cannot sudo, skipping test\n");
+- Test.skip ();
+- return false;
+- }
++ print ("cannot sudo, skipping test\n");
++ Test.skip ();
++ return false;
+ }
+
+ Output run_prog (string prog, string[] args, int expected_rc = 0) {
diff --git a/app-text/rpl/files/rpl-2.0.4-uchardet-vala.patch
b/app-text/rpl/files/rpl-2.0.4-uchardet-vala.patch
new file mode 100644
index 000000000000..c19b538dcff0
--- /dev/null
+++ b/app-text/rpl/files/rpl-2.0.4-uchardet-vala.patch
@@ -0,0 +1,108 @@
+From 3669921bb1bab7bc9f7f5fb1ef4b9ceb2cf02ff7 Mon Sep 17 00:00:00 2001
+From: Reuben Thomas <[email protected]>
+Date: Mon, 10 Nov 2025 23:37:49 +0000
+Subject: [PATCH] Revert "Use UcharDet VAPI from vala-extra-vapis project, not
+ our own one"
+
+This reverts commit f5e40e01f84b8841c8a30ef9b7890bf0cbd0beaf.
+
+The vala-extra-vapis VAPI does not work properly with pkg-config; see
+https://gitlab.gnome.org/GNOME/vala-extra-vapis/-/issues/28
+---
+ .gitmodules | 3 ---
+ Makefile.am | 4 ++--
+ rpl.vala | 5 ++---
+ uchardet.vapi | 36 ++++++++++++++++++++++++++++++++++++
+ vala-extra-vapis | 1 -
+ 5 files changed, 40 insertions(+), 9 deletions(-)
+ create mode 100644 uchardet.vapi
+ delete mode 160000 vala-extra-vapis
+
+diff --git a/Makefile.am b/Makefile.am
+index 8c3301d..5a86282 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -8,11 +8,11 @@ SUBDIRS = lib
+
+ include $(top_srcdir)/aminclude_static.am
+
+-AM_VALAFLAGS = --debug --vapidir=$(srcdir)
--vapidir=$(srcdir)/vala-extra-vapis
++AM_VALAFLAGS = --debug --vapidir=$(srcdir)
+ if OS_WIN32
+ AM_VALAFLAGS += -D WINDOWS
+ endif
+-VAPIS = config.vapi cmdline.vapi gnu.vapi pcre2.vapi
++VAPIS = config.vapi cmdline.vapi gnu.vapi pcre2.vapi uchardet.vapi
+
+ LDADD = $(top_builddir)/lib/libgnu.a $(CODE_COVERAGE_LDFLAGS)
+ AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_builddir)/lib
$(CODE_COVERAGE_CPPFLAGS)
+diff --git a/rpl.vala b/rpl.vala
+index 32aab87..9bc0374 100644
+--- a/rpl.vala
++++ b/rpl.vala
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env -S vala --vapidir=. --vapidir=./vala-extra-vapis --pkg
gio-2.0 --pkg posix --pkg gnu --pkg config --pkg cmdline --pkg pcre2 --pkg
uchardet fd-stream.vala prefix-input-stream.vala
++#! /usr/bin/env -S vala --vapidir=. --pkg gio-2.0 --pkg posix --pkg gnu --pkg
config --pkg cmdline --pkg pcre2 --pkg uchardet fd-stream.vala
prefix-input-stream.vala
+ // rpl: search and replace text in files
+ //
+ // © 2025 Reuben Thomas <[email protected]>
+@@ -20,7 +20,6 @@ using Config;
+ using Posix;
+ using Pcre2;
+ using Gengetopt;
+-using UcharDet;
+
+
+ void info (string msg) {
+@@ -569,7 +568,7 @@ int main (string[] argv) {
+ warn (@"error reading $filename: $(e.message);
skipping!");
+ continue;
+ } // GCOVR_EXCL_STOP
+- var detector = new UcharDet.Classifier ();
++ var detector = new UCharDet ();
+ var ok = detector.handle_data (buf.data) == 0;
+ GLib.assert (ok);
+ detector.data_end ();
+diff --git a/uchardet.vapi b/uchardet.vapi
+new file mode 100644
+index 0000000..db25893
+--- /dev/null
++++ b/uchardet.vapi
+@@ -0,0 +1,36 @@
++/* uchardet.vapi
++ *
++ * Copyright (C) 2025 Reuben Thomas
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
USA
++ *
++ * Author:
++ * Reuben Thomas <[email protected]>
++ */
++
++[Compact]
++[CCode (cprefix = "uchardet_", cheader_filename = "uchardet.h", cname =
"uchardet_t", free_function = "uchardet_delete")]
++public class UCharDet {
++ [CCode (cname = "uchardet_new")]
++ public UCharDet ();
++
++ public int handle_data ([CCode (array_length_type = "size_t")] uint8[]
data);
++
++ public void data_end ();
++
++ public void data_reset ();
++
++ public unowned string get_charset ();
++}
+\ No newline at end of file
diff --git a/app-text/rpl/rpl-2.0.4.ebuild b/app-text/rpl/rpl-2.0.4.ebuild
new file mode 100644
index 000000000000..fee71c543bab
--- /dev/null
+++ b/app-text/rpl/rpl-2.0.4.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools vala
+
+DESCRIPTION="Intelligent recursive search/replace utility"
+HOMEPAGE="https://rpl.sourceforge.net/ https://github.com/rrthomas/rpl"
+SRC_URI="https://github.com/rrthomas/rpl/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64"
+# unable to cause tests to pass fully
+RESTRICT="test"
+
+RDEPEND="
+ app-i18n/uchardet
+ dev-libs/glib:2
+ dev-libs/libpcre2:=
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ dev-util/gengetopt
+ sys-apps/help2man
+ virtual/pkgconfig
+ $(vala_depend)
+"
+
+PATCHES=(
+ "${FILESDIR}/${P}-uchardet-vala.patch"
+)
+
+src_prepare() {
+ default
+ eautoreconf
+ vala_setup
+ rm *_vala.stamp || die
+}