apapche: fix build with libxml2 2.12

This commit is contained in:
Juergen Daubert 2023-11-29 11:51:29 +01:00
parent 9307a0bc88
commit f8ea335879
3 changed files with 51 additions and 4 deletions

View File

@ -1,7 +1,8 @@
untrusted comment: verify with /etc/ports/opt.pub
RWSE3ohX2g5d/S3Rpl+KIrXOhPw2y9z+21IABVV4xM8W4Jqa4oLKNMmxky7UOVj/qnPh5hoEpkp1F8XmFk3HdTif2nAwJkMqvgw=
SHA256 (Pkgfile) = d9d7a314c36edba74b503e1f1bcb11a37fa65daf39d44aff19252cdb6b2b4d8a
RWSE3ohX2g5d/T6NweX7MSQvO3i4wKwgpxv2mAD1DxRd3thRo6MDJCFIecuEOmTKgRcv1mr97QDgFlEaycqi9MrDZ4qMbCAzegQ=
SHA256 (Pkgfile) = 0723f93ce6f8da34cccadd3d796c6b241c031f054ab2c65a32b07fbd39f10cfc
SHA256 (.footprint) = c74d5e2fd28b7400bca7988e0b21f4e2b12748a0a85f1d21a819069f0f9f6c9f
SHA256 (httpd-2.4.58.tar.bz2) = fa16d72a078210a54c47dd5bef2f8b9b8a01d94909a51453956b3ec6442ea4c5
SHA256 (crux.layout) = a72a0d72c47aa72df4378f4bf1ff291eb9cdfd29f6c827b9970b8775f38f4dd6
SHA256 (apache) = 12d9aff5a78428589aba0b43988f383af434a546ae5daadc5f5ce7b9804e56a4
SHA256 (libxml2-2.12.patch) = e994c2aae15a5bcb344b5009323b7d23c7edf4f2d8c0fb3f34197f4f46f26e7f

View File

@ -5,13 +5,15 @@
name=apache
version=2.4.58
release=1
release=2
source=(https://www.apache.org/dist/httpd/httpd-$version.tar.bz2 \
crux.layout apache)
crux.layout apache libxml2-2.12.patch)
build(){
cd httpd-$version
patch -p1 -i $SRC/libxml2-2.12.patch
cat $SRC/crux.layout >> config.layout
sed -ri '/^(User|Group)/s/daemon/www/' docs/conf/httpd.conf.in

44
apache/libxml2-2.12.patch Normal file
View File

@ -0,0 +1,44 @@
From 27a68e54b7c6d2ae80dca396fd2727852897dab1 Mon Sep 17 00:00:00 2001
From: Eric Covener <covener@apache.org>
Date: Tue, 21 Nov 2023 12:58:47 +0000
Subject: [PATCH] mod_xml2enc: remove dependency on xmlstring header
Submitted by: ttachi <tachihara@hotmail.com>
Github: closes #393
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1914013 13f79535-47bb-0310-9956-ffa450edef68
---
changes-entries/xmlchar.txt | 2 ++
modules/filters/mod_xml2enc.c | 6 +++---
2 files changed, 5 insertions(+), 3 deletions(-)
create mode 100644 changes-entries/xmlchar.txt
diff --git a/changes-entries/xmlchar.txt b/changes-entries/xmlchar.txt
new file mode 100644
index 00000000000..d0e06300411
--- /dev/null
+++ b/changes-entries/xmlchar.txt
@@ -0,0 +1,2 @@
+ *) mod_xml2enc: Tolerate libxml2 2.12.0 and later.
+ [ttachi <tachihara AT hotmail.com>]
diff --git a/modules/filters/mod_xml2enc.c b/modules/filters/mod_xml2enc.c
index 34f8e8ee090..e8ee2647955 100644
--- a/modules/filters/mod_xml2enc.c
+++ b/modules/filters/mod_xml2enc.c
@@ -206,11 +206,11 @@ static void sniff_encoding(request_rec* r, xml2ctx* ctx)
}
}
}
-
+
/* to sniff, first we look for BOM */
if (ctx->xml2enc == XML_CHAR_ENCODING_NONE) {
- ctx->xml2enc = xmlDetectCharEncoding((const xmlChar*)ctx->buf,
- ctx->bytes);
+ ctx->xml2enc = xmlDetectCharEncoding((const unsigned char*)ctx->buf,
+ ctx->bytes);
if (HAVE_ENCODING(ctx->xml2enc)) {
ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(01432)
"Got charset from XML rules.") ;