From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: perl-core/Encode/, perl-core/Encode/files/
Date: Sun, 18 Dec 2022 01:03:53 +0000 (UTC) [thread overview]
Message-ID: <1671325414.038c222a22b535f2b118c02091c7b53e2d9cb7a6.sam@gentoo> (raw)
commit: 038c222a22b535f2b118c02091c7b53e2d9cb7a6
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 18 01:03:14 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Dec 18 01:03:34 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=038c222a
perl-core/Encode: backport -Werror patch
It's not strictly needed (as this version isn't pulled in w/ Perl 5.36) but the patch
exists and it's cheap to pull in, so if it avoids someone wasting some time looking
into it, why not?
Closes: https://bugs.gentoo.org/886507
Signed-off-by: Sam James <sam <AT> gentoo.org>
perl-core/Encode/Encode-3.120.0.ebuild | 5 +++-
perl-core/Encode/files/Encode-3.120.0-Werror.patch | 29 ++++++++++++++++++++++
2 files changed, 33 insertions(+), 1 deletion(-)
diff --git a/perl-core/Encode/Encode-3.120.0.ebuild b/perl-core/Encode/Encode-3.120.0.ebuild
index 34933b10c1e1..76f94b2adc06 100644
--- a/perl-core/Encode/Encode-3.120.0.ebuild
+++ b/perl-core/Encode/Encode-3.120.0.ebuild
@@ -12,4 +12,7 @@ DESCRIPTION="Character encodings in Perl"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-PATCHES=( "${FILESDIR}"/gentoo_enc2xs.diff )
+PATCHES=(
+ "${FILESDIR}"/${P}-Werror.patch
+ "${FILESDIR}"/gentoo_enc2xs.diff
+)
diff --git a/perl-core/Encode/files/Encode-3.120.0-Werror.patch b/perl-core/Encode/files/Encode-3.120.0-Werror.patch
new file mode 100644
index 000000000000..34974911a32f
--- /dev/null
+++ b/perl-core/Encode/files/Encode-3.120.0-Werror.patch
@@ -0,0 +1,29 @@
+https://github.com/dankogai/p5-encode/commit/7c9c5be4e658a5b37632b46925a2735123f65c6e
+https://bugs.gentoo.org/886507
+
+From 7c9c5be4e658a5b37632b46925a2735123f65c6e Mon Sep 17 00:00:00 2001
+From: Nicholas Clark <nick@ccl4.org>
+Date: Wed, 13 Oct 2021 07:51:58 +0000
+Subject: [PATCH] Only add -Werror=declaration-after-statement for 5.035004 and
+ earlier
+
+Perl v5.35.5 now uses some C99 features. This means that Perl's headers now
+contain some code with mixed declarations and code., and so won't compile
+with -Werror=declaration-after-statement
+
+It still makes sense to add this flag for builds for earlier perl versions,
+because they support long obsolete compilers that are strict in rejecting
+certain C99 features, so adding this gcc flag allows us to audit that our
+code does not violate this.
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -20,7 +20,7 @@ if (!$ENV{PERL_CORE}) {
+ $gccver =~ s/\.//g; $gccver =~ s/ .*//;
+ $gccver .= "0" while length $gccver < 3;
+ $gccver = 0+$gccver;
+- $ccflags .= ' -Werror=declaration-after-statement' if $gccver > 412;
++ $ccflags .= ' -Werror=declaration-after-statement' if $gccver > 412 and $] < 5.035005;
+ $ccflags .= ' -Wpointer-sign' if !$Config{d_cplusplus} and $gccver > 400;
+ $ccflags .= ' -fpermissive' if $Config{d_cplusplus};
+ }
+
reply other threads:[~2022-12-18 1:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1671325414.038c222a22b535f2b118c02091c7b53e2d9cb7a6.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox