diff --git a/textproc/p5-SGML-Parser-OpenSP/Makefile b/textproc/p5-SGML-Parser-OpenSP/Makefile index a99f525b25a2..e4c513bbe2ca 100644 --- a/textproc/p5-SGML-Parser-OpenSP/Makefile +++ b/textproc/p5-SGML-Parser-OpenSP/Makefile @@ -1,31 +1,31 @@ PORTNAME= SGML-Parser-OpenSP PORTVERSION= 0.994 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= textproc perl5 MASTER_SITES= CPAN PKGNAMEPREFIX= p5- MAINTAINER= cyberbotx@cyberbotx.com COMMENT= Parse SGML documents using OpenSP WWW= https://metacpan.org/release/SGML-Parser-OpenSP # The port's README says the port "is licensed under the same terms as Perl # itself". LICENSE= ART10 GPLv1+ LICENSE_COMB= dual BUILD_DEPENDS= ${RUN_DEPENDS} RUN_DEPENDS= onsgmls:textproc/opensp \ p5-Class-Accessor>=0:devel/p5-Class-Accessor \ p5-Test-Exception>=0:devel/p5-Test-Exception USES= dos2unix perl5 USE_PERL5= configure CC= ${CXX} CONFIGURE_ARGS+="INC=-I${LOCALBASE}/include" post-patch: (cd ${WRKSRC} ; \ ${REINPLACE_CMD} "s|%%LOCALBASE%%|${LOCALBASE}|g" Makefile.PL ) .include diff --git a/textproc/p5-SGML-Parser-OpenSP/files/patch-OpenSP.xs b/textproc/p5-SGML-Parser-OpenSP/files/patch-OpenSP.xs new file mode 100644 index 000000000000..e9bcc872bb1d --- /dev/null +++ b/textproc/p5-SGML-Parser-OpenSP/files/patch-OpenSP.xs @@ -0,0 +1,20 @@ +--- OpenSP.xs.orig 2023-07-04 14:18:21 UTC ++++ OpenSP.xs +@@ -162,7 +162,7 @@ SV* SgmlParserOpenSP::cs2sv(const SGMLApplication::Cha + { + d = m_temp; + for (i = 0; i < s.len; ++i) +- d = uvuni_to_utf8_flags(d, s.ptr[i], 0); ++ d = uvchr_to_utf8_flags(d, s.ptr[i], 0); + result = newSVpvn((const char*)m_temp, d - m_temp); + } + else +@@ -171,7 +171,7 @@ SV* SgmlParserOpenSP::cs2sv(const SGMLApplication::Cha + for (i = 0; i < s.len; ++i) + { + d = (U8 *)SvGROW(result, SvCUR(result) + UTF8_MAXLEN + 1); +- d = uvuni_to_utf8_flags(d + SvCUR(result), s.ptr[i], 0); ++ d = uvchr_to_utf8_flags(d + SvCUR(result), s.ptr[i], 0); + SvCUR_set(result, d - (U8 *)SvPVX(result)); + } + }