--- /dev/null
+From 73419594af15e94e77bae413d9754d3775cf0280 Mon Sep 17 00:00:00 2001
+From: Jan Palus <jpalus@fastmail.com>
+Date: Tue, 12 Dec 2023 19:45:54 +0100
+Subject: [PATCH] perl.req: make heredoc block matching more generic
+
+match any <<MARKER providing:
+
+- it is not in comment (not preceded by #)
+- it can't be string literal (not preceded by ' or ")
+- as a sanity check it must be preceded by either whitespace, comma or
+ equals sign
+
+adds support for
+
+ return <<"EOS";
+
+ fun(arg, <<"EOS");
+---
+ scripts/perl.req | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/scripts/perl.req b/scripts/perl.req
+index 1b50c50847..8bfa38771e 100755
+--- a/scripts/perl.req
++++ b/scripts/perl.req
+@@ -102,10 +102,10 @@ sub process_file {
+
+ while (<FILE>) {
+
+- # skip the "= <<" block
++ # skip the heredoc block
+
+- if (m/^\s*(?:my\s*)?\$(?:.*)\s*=\s*<<\s*(["'`])(.+?)\1/ ||
+- m/^\s*(?:my\s*)?\$(.*)\s*=\s*<<(\w+)\s*;/) {
++ if (m/^[^'"#]+[\s,=(]<<\s*(["'`])(.+?)\1/ ||
++ m/^[^'"#]+[\s,=(](<<)(\w+)\s*;/) {
+ $tag = $2;
+ while (<FILE>) {
+ chomp;
Summary(uk.UTF-8): Менеджер пакетів від RPM
Name: rpm
Version: 4.17.1.1
-Release: 5
+Release: 7
Epoch: 1
License: GPL v2 / LGPL v2.1
Group: Base
Patch37: no-exe-for-elf-req.patch
Patch38: gem-in-package-builddir.patch
Patch39: sqlite-log-crash.patch
+Patch40: perl-heredoc-matching.patch
URL: https://rpm.org/
BuildRequires: acl-devel
%{?with_audit:BuildRequires: audit-libs-devel}
Summary: RPMs library
Summary(pl.UTF-8): Biblioteki RPM-a
Group: Libraries
-Requires: elfutils >= 0.159
-Requires: elfutils-libelf >= 0.159
+Requires: elfutils-libs >= 0.159
Requires: libmagic >= 1.15-2
Requires: popt >= %{popt_ver}
Requires: sqlite3-libs >= 3.22.0
%patch37 -p1
%patch38 -p1
%patch39 -p1
+%patch40 -p1
%{__rm} po/*.gmo