git: 0a98c2b01be2 - main - textproc/p5-Net-IDN-Encode: fix Undefined symbol "uvuni_to_utf8_flags" for newer perl versions

From: Kurt Jaeger <pi_at_FreeBSD.org>
Date: Sun, 01 Sep 2024 15:36:43 UTC
The branch main has been updated by pi:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0a98c2b01be2705e2d22d56e5e3cf2d0b7affad9

commit 0a98c2b01be2705e2d22d56e5e3cf2d0b7affad9
Author:     Kurt Jaeger <pi@FreeBSD.org>
AuthorDate: 2024-09-01 15:35:00 +0000
Commit:     Kurt Jaeger <pi@FreeBSD.org>
CommitDate: 2024-09-01 15:35:00 +0000

    textproc/p5-Net-IDN-Encode: fix Undefined symbol "uvuni_to_utf8_flags" for newer perl versions
    
    - Patch from upstream:
      https://rt.cpan.org/Public/Bug/Display.html?id=149108
    
    PR:             281186
    Approved:       bofh (maintainer)
---
 textproc/p5-Net-IDN-Encode/Makefile                |  1 +
 .../files/patch-lib_Net_IDN_Punycode.xs            | 22 ++++++++++++++++++++++
 2 files changed, 23 insertions(+)

diff --git a/textproc/p5-Net-IDN-Encode/Makefile b/textproc/p5-Net-IDN-Encode/Makefile
index 097a21154404..ba83b9318e36 100644
--- a/textproc/p5-Net-IDN-Encode/Makefile
+++ b/textproc/p5-Net-IDN-Encode/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	Net-IDN-Encode
 PORTVERSION=	2.500
+PORTREVISION=	1
 CATEGORIES=	textproc perl5
 MASTER_SITES=	CPAN
 PKGNAMEPREFIX=	p5-
diff --git a/textproc/p5-Net-IDN-Encode/files/patch-lib_Net_IDN_Punycode.xs b/textproc/p5-Net-IDN-Encode/files/patch-lib_Net_IDN_Punycode.xs
new file mode 100644
index 000000000000..17c26c321191
--- /dev/null
+++ b/textproc/p5-Net-IDN-Encode/files/patch-lib_Net_IDN_Punycode.xs
@@ -0,0 +1,22 @@
+--- lib/Net/IDN/Punycode.xs.orig	2018-10-06 00:28:07 UTC
++++ 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 */