Skip to content

Commit f17da7b

Browse files
author
taca
committed
lang/php56: fix compatibiltiy with libxml2>=2.13
Fix compatibiltiy with libxml2>=2.13. This compatibiltiy problem cause lang/pear break with php56. Found on <php/php-src#14834>. Bump PKGREVISION.
1 parent 7bb4326 commit f17da7b

3 files changed

Lines changed: 20 additions & 3 deletions

File tree

‎lang/php56/Makefile‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# $NetBSD: Makefile,v 1.43 2025/05/17 05:37:25 taca Exp $
1+
# $NetBSD: Makefile,v 1.44 2025/06/07 15:51:49 taca Exp $
22

33
#
44
# We can't omit PKGNAME here to handle PKG_OPTIONS.
55
#
66
PKGNAME= ${PHP_PKG_PREFIX}-${PHP_VERSION}
7-
PKGREVISION= 3
7+
PKGREVISION= 4
88
CATEGORIES= lang
99

1010
COMMENT= PHP Hypertext Preprocessor version 5.6

‎lang/php56/distinfo‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$NetBSD: distinfo,v 1.64 2025/04/18 15:54:30 wiz Exp $
1+
$NetBSD: distinfo,v 1.65 2025/06/07 15:51:49 taca Exp $
22

33
BLAKE2s (PHP-5.6.31-OpenSSL-1.1.0-compatibility-20170801.patch) = 9eaf6505d80e90147fd0b993fb501620030eea24ccd69e42c49d8faf50d47775
44
SHA512 (PHP-5.6.31-OpenSSL-1.1.0-compatibility-20170801.patch) = bbe39ad27a5a82c705692c921b214c5630227ed9852f0432340f74533b5e618d9bea01bff75a4b7a1f1b72876b6d092d2db4533758d9a927f274cff7361f3eb4
@@ -39,6 +39,7 @@ SHA1 (patch-ext_sqlite3_config0.m4) = 2435e1518a88c7d05eb93cf3c8e716fe4ea0748b
3939
SHA1 (patch-ext_standard_basic__functions.c) = ca1de427a3d793c3a3e99581fbd2d1fcf99aeb30
4040
SHA1 (patch-ext_standard_php__dns.h) = 8e544eb637044e9428a0becb7402336f64a3a23d
4141
SHA1 (patch-ext_tidy_tidy.c) = 8f075f17ac913f21e65f4b704574c0ae5ffdfc84
42+
SHA1 (patch-ext_xml_compat.c) = fbea14c738728d33cdaf38405688ed6361f8894d
4243
SHA1 (patch-ext_xsl_php__xsl.h) = a9877bff7bacc77926a4541a0ac171c00ad1a627
4344
SHA1 (patch-makedist) = 091d5c0ba3e890ade475faa33446c8f97bcb7bc3
4445
SHA1 (patch-php.ini-development) = e1a187070a9dfc28762d7476d9acc796a93c7fac
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
$NetBSD: patch-ext_xml_compat.c,v 1.1 2025/06/07 15:51:49 taca Exp $
2+
3+
Fix parse error some XML file so that lang/pear work again.
4+
<https://github.com/php/php-src/issues/14834>
5+
6+
--- ext/xml/compat.c.orig 2019-01-09 09:54:13.000000000 +0000
7+
+++ ext/xml/compat.c
8+
@@ -382,7 +382,7 @@ _get_entity(void *user, const xmlChar *n
9+
if (ret == NULL)
10+
ret = xmlGetDocEntity(parser->parser->myDoc, name);
11+
12+
- if (ret == NULL || (parser->parser->instate != XML_PARSER_ENTITY_VALUE && parser->parser->instate != XML_PARSER_ATTRIBUTE_VALUE)) {
13+
+ if (ret == NULL || parser->parser->instate == XML_PARSER_CONTENT) {
14+
if (ret == NULL || ret->etype == XML_INTERNAL_GENERAL_ENTITY || ret->etype == XML_INTERNAL_PARAMETER_ENTITY || ret->etype == XML_INTERNAL_PREDEFINED_ENTITY) {
15+
/* Predefined entities will expand unless no cdata handler is present */
16+
if (parser->h_default && ! (ret && ret->etype == XML_INTERNAL_PREDEFINED_ENTITY && parser->h_cdata)) {

0 commit comments

Comments
 (0)