community/perl-xml-easy: apply debian patch

to fix implicit declaration of function
`uvuni_to_utf8_flags` (removed in Perl 5.38)
This commit is contained in:
Celeste 2024-05-25 14:50:29 +00:00
parent ab56476568
commit 1cf83854eb
2 changed files with 42 additions and 3 deletions

View File

@ -13,7 +13,9 @@ depends="perl-params-classify"
makedepends="perl-dev perl-module-build"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/Z/ZE/ZEFRAM/XML-Easy-$pkgver.tar.gz
syntax_main-test.patch"
syntax_main-test.patch
uvuni_to_utf8_flags.patch
"
builddir="$srcdir/$_pkgreal-$pkgver"
build() {
@ -31,5 +33,8 @@ package() {
find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}
sha512sums="19e325a2968cd62e255e6f4e3e870a15f84c2d69ea6a1bf457b1de25d352554285f7162c01fd1dbb363bbad6ae882bc7d49b94655a4795664a735392871b2e02 XML-Easy-0.011.tar.gz
6696f9fdb393b39d6e58a45ce7e591bf22f8af59849b96dc947ae274420f41fe77fc8b9ff04fac15cfbc28c63a2af95bf5078ac63fd7810f2f3c954498d8615e syntax_main-test.patch"
sha512sums="
19e325a2968cd62e255e6f4e3e870a15f84c2d69ea6a1bf457b1de25d352554285f7162c01fd1dbb363bbad6ae882bc7d49b94655a4795664a735392871b2e02 XML-Easy-0.011.tar.gz
6696f9fdb393b39d6e58a45ce7e591bf22f8af59849b96dc947ae274420f41fe77fc8b9ff04fac15cfbc28c63a2af95bf5078ac63fd7810f2f3c954498d8615e syntax_main-test.patch
cf08eb3ab76d620041486cf40a248fab698a3fac229f135f855f9e21cd0a9feeea2b7d439f6e1bb44fd89ad4428e59b3ac36903541dec4e2a697f491b49d1ac8 uvuni_to_utf8_flags.patch
"

View File

@ -0,0 +1,34 @@
Patch-Source: https://sources.debian.org/data/main/libx/libxml-easy-perl/0.011-4/debian/patches/uvuni_to_utf8_flags.patch
--
Description: Use uvchr_to_utf8_flags instead of uvuni_to_utf8_flags (removed in perl 5.38.0)
Inspired by https://bugzilla.redhat.com/show_bug.cgi?id=2241708 and
https://rt.cpan.org/Public/Bug/Display.html?id=149108
Origin: vendor
Bug-Debian: https://bugs.debian.org/1065785
Forwarded: not-yet, CPAN RT is not cooperative
Author: gregor herrmann <gregoa@debian.org>
Reviewed-by: gregor herrmann <gregoa@debian.org>
Last-Update: 2024-03-10
--- a/lib/XML/Easy.xs
+++ b/lib/XML/Easy.xs
@@ -50,6 +50,10 @@
(!sv_is_glob(sv) && !sv_is_regexp(sv) && \
(SvFLAGS(sv) & (SVf_IOK|SVf_NOK|SVf_POK|SVp_IOK|SVp_NOK|SVp_POK)))
+#ifndef uvchr_to_utf8_flags
+#define uvchr_to_utf8_flags(d, uv, flags) uvuni_to_utf8_flags(d, uv, flags);
+#endif
+
/* exceptions */
#define throw_utf8_error() croak("broken internal UTF-8 encoding\n")
@@ -1151,7 +1155,7 @@
vlen = SvCUR(value);
vstart = (U8*)SvGROW(value, vlen+4+1);
voldend = vstart + vlen;
- vnewend = uvuni_to_utf8_flags(voldend, val,
+ vnewend = uvchr_to_utf8_flags(voldend, val,
UNICODE_ALLOW_ANY);
*vnewend = 0;
SvCUR_set(value, vnewend - vstart);