You've already forked macports-ports
mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
vcdimager: Fix build with libxml2 >= 2.14
Closes: https://trac.macports.org/ticket/73723
This commit is contained in:
@@ -22,12 +22,14 @@ checksums rmd160 171b0deccee94281b2ef780056ab1d696bf54cd3 \
|
||||
sha256 67515fefb9829d054beae40f3e840309be60cda7d68753cafdd526727758f67a \
|
||||
size 1115207
|
||||
|
||||
depends_build port:pkgconfig
|
||||
depends_build path:bin/pkg-config:pkgconfig
|
||||
|
||||
depends_lib port:libcdio \
|
||||
port:popt \
|
||||
port:libxml2
|
||||
|
||||
patchfiles-append libxml2-2.14.patch
|
||||
|
||||
configure.args --disable-silent-rules \
|
||||
--with-cli-frontend \
|
||||
--with-xml-frontend
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
Fix:
|
||||
|
||||
error: invalid operands to binary expression ('void *' and 'union (anonymous union at /opt/local/include/libxml2/libxml/encoding.h:205:5)')
|
||||
error: called object type 'union (anonymous union at /opt/local/include/libxml2/libxml/encoding.h:205:5)' is not a function or function pointer
|
||||
|
||||
https://savannah.gnu.org/support/index.php?111233
|
||||
https://gitlab.archlinux.org/archlinux/packaging/packages/vcdimager/-/blob/88dc511b7f3dea8fb45e0c2bfa1345a75a088848/libxml214.diff
|
||||
--- frontends/xml/vcd_xml_common.c 2018-01-03 21:17:37.000000000 +0100
|
||||
+++ frontends/xml/vcd_xml_common.c 2025-04-26 05:22:03.008769534 +0200
|
||||
@@ -242,17 +242,27 @@ _convert (const char in[], const char en
|
||||
|
||||
temp = size - 1;
|
||||
if (from) {
|
||||
- if (NULL != handler->output)
|
||||
- ret = handler->output (out, &out_size, (const unsigned char *) in, &temp);
|
||||
- else
|
||||
+ if (!(handler->flags & 2) && NULL != handler->output.func)
|
||||
+ ret = handler->output.func (handler->outputCtxt, out, &out_size, (const unsigned char *) in, &temp, 1);
|
||||
+ if ((handler->flags & 2) && NULL != handler->output.legacyFunc)
|
||||
+ ret = handler->output.legacyFunc (out, &out_size, (const unsigned char *) in, &temp);
|
||||
+ else {
|
||||
+ xmlCharEncCloseFunc(handler);
|
||||
return strdup(in);
|
||||
+ }
|
||||
} else {
|
||||
- if (NULL != handler->input)
|
||||
- ret = handler->input (out, &out_size, (const unsigned char *) in, &temp);
|
||||
- else
|
||||
+ if (!(handler->flags & 2) && NULL != handler->input.func)
|
||||
+ ret = handler->input.func (handler->inputCtxt, out, &out_size, (const unsigned char *) in, &temp, 1);
|
||||
+ if ((handler->flags & 2) && NULL != handler->input.legacyFunc)
|
||||
+ ret = handler->input.legacyFunc (out, &out_size, (const unsigned char *) in, &temp);
|
||||
+ else {
|
||||
+ xmlCharEncCloseFunc(handler);
|
||||
return strdup(in);
|
||||
+ }
|
||||
}
|
||||
|
||||
+ xmlCharEncCloseFunc(handler);
|
||||
+
|
||||
if (ret < 0 || (temp - size + 1))
|
||||
{
|
||||
free (out);
|
||||
Reference in New Issue
Block a user