8
0

Compare commits

3 Commits

5 changed files with 73 additions and 15 deletions

12
README.md Normal file
View File

@@ -0,0 +1,12 @@
## Build Results
Current state of perl in openSUSE:Factory is
![Factory build results](https://br.opensuse.org/status/openSUSE:Factory/perl-Net-IDN-Encode/standard)
The current state of perl in the devel project build (devel:languages:perl)
![Devel project build results](https://br.opensuse.org/status/devel:languages:perl/perl-Net-IDN-Encode)

View File

@@ -4,8 +4,8 @@
#sources:
# - source1
# - source2
#patches:
# encodeoffbyone.diff:
patches:
use-uvchr_to_utf8_flags-instead-of-uvuni_to_utf8_fla.patch: -p1 PATCH-FIX-UPSTREAM https://rt.cpan.org/Public/Bug/Display.html?id=149108
#preamble: |-
# BuildRequires: gcc-c++
#post_prep: |-

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Jan 16 14:32:56 UTC 2025 - Ana Guerrero <ana.guerrero@suse.com>
- Add patch use-uvchr_to_utf8_flags-instead-of-uvuni_to_utf8_fla.patch
to build after uvuni_to_utf8_flags was deprecated in Perl 5.36.0
-------------------------------------------------------------------
Mon Oct 21 15:16:27 UTC 2019 - Tina Mueller <tina.mueller@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package perl-Net-IDN-Encode
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,21 +16,22 @@
#
%define cpan_name Net-IDN-Encode
Name: perl-Net-IDN-Encode
Version: 2.500
Release: 0
%define cpan_name Net-IDN-Encode
Summary: Internationalizing Domain Names in Applications (IDNA)
License: Artistic-1.0 OR GPL-1.0-or-later
Group: Development/Libraries/Perl
Url: https://metacpan.org/release/%{cpan_name}
Summary: Internationalizing Domain Names in Applications (UTS #46)
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/C/CF/CFAERBER/%{cpan_name}-%{version}.tar.gz
Source1: cpanspec.yml
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source100: README.md
# PATCH-FIX-UPSTREAM https://rt.cpan.org/Public/Bug/Display.html?id=149108
Patch0: use-uvchr_to_utf8_flags-instead-of-uvuni_to_utf8_fla.patch
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(ExtUtils::CBuilder)
BuildRequires: perl(Module::Build) >= 0.420000
BuildRequires: perl(Module::Build) >= 0.42
BuildRequires: perl(Test::NoWarnings)
%{perl_requires}
@@ -51,22 +52,22 @@ correctly encoded input. See perlunitut, perluniintro and perlunicode for
details.
%prep
%setup -q -n %{cpan_name}-%{version}
find . -type f ! -path "*/t/*" ! -name "*.pl" ! -name "*.sh" -print0 | xargs -0 chmod 644
%autosetup -n %{cpan_name}-%{version} -p1
find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -path "*/scripts/*" ! -name "configure" -print0 | xargs -0 chmod 644
%build
perl Build.PL installdirs=vendor optimize="%{optflags}"
./Build build flags=%{?_smp_mflags}
perl Build.PL --installdirs=vendor optimize="%{optflags}"
./Build build --flags=%{?_smp_mflags}
%check
./Build test
%install
./Build install destdir=%{buildroot} create_packlist=0
./Build install --destdir=%{buildroot} --create_packlist=0
%perl_gen_filelist
%files -f %{name}.files
%defattr(-,root,root,755)
%doc Changes README
%license LICENSE

View File

@@ -0,0 +1,39 @@
From 3ebe6f2e239b470efcb64a044edc8202798188af Mon Sep 17 00:00:00 2001
From: Shin Kojima <shin@kojima.org>
Date: Sun, 23 Jul 2023 13:15:59 +0900
Subject: [PATCH] use uvchr_to_utf8_flags instead of uvuni_to_utf8_flags (which
is removed in perl 5.38.0)
https://perldoc.perl.org/5.36.0/perlintern#uvuni_to_utf8_flags
Signed-off-by: Shin Kojima <shin@kojima.org>
---
lib/Net/IDN/Punycode.xs | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lib/Net/IDN/Punycode.xs b/lib/Net/IDN/Punycode.xs
index 211ef9c..36530dd 100644
--- a/lib/Net/IDN/Punycode.xs
+++ b/lib/Net/IDN/Punycode.xs
@@ -24,6 +24,10 @@
#define utf8_to_uvchr_buf(in_p,in_e,u8) utf8_to_uvchr(in_p,u8);
#endif
+#ifndef uvchr_to_utf8_flags
+#define uvchr_to_utf8_flags(d, uv, flags) uvuni_to_utf8_flags(d, uv, flags);
+#endif
+
static char enc_digit[BASE] = {
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
@@ -253,7 +257,7 @@ decode_punycode(input)
if(skip_p < re_p) /* move succeeding chars */
Move(skip_p, skip_p + u8, re_p - skip_p, char);
re_p += u8;
- uvuni_to_utf8_flags((U8*)skip_p, n, UNICODE_ALLOW_ANY);
+ uvchr_to_utf8_flags((U8*)skip_p, n, UNICODE_ALLOW_ANY);
}
if(!first) SvUTF8_on(RETVAL); /* UTF-8 chars have been inserted */
--
2.48.0