diff --git a/databases/postgresql95/Portfile b/databases/postgresql95/Portfile index 336e47dbcb0e1..47e0d2649f090 100644 --- a/databases/postgresql95/Portfile +++ b/databases/postgresql95/Portfile @@ -7,7 +7,6 @@ PortGroup deprecated 1.0 # Final release was on 2021-02-08 deprecated.upstream_support no -known_fail yes #remember to update the -doc and -server as well name postgresql95 @@ -38,6 +37,10 @@ use_bzip2 yes # do not build man or html files (use postgresqlXY-doc instead) patchfiles-append patch-no_doc.diff +# https://www.postgresql.org/message-id/attachment/152769/v1-0001-Make-PostgreSQL-work-with-newer-version-of-libxml.patch +# diff -NaurdwB ./postgresql95-orig ./postgresql95-new | sed -E -e 's/\.\/postgresql95-(orig|new)/\./g' | sed -E -e 's|/opt/local|@@PREFIX@@|g' > ~/Downloads/patch-xml_c.diff +patchfiles-append patch-xml_c.diff + depends_lib port:readline path:lib/libssl.dylib:openssl port:zlib port:libxml2 port:libxslt depends_build port:bison depends_run port:postgresql_select-95 diff --git a/databases/postgresql95/files/patch-xml_c.diff b/databases/postgresql95/files/patch-xml_c.diff new file mode 100644 index 0000000000000..8c1264a1f61fc --- /dev/null +++ b/databases/postgresql95/files/patch-xml_c.diff @@ -0,0 +1,31 @@ +diff -NaurdwB ./src/backend/utils/adt/xml.c ./src/backend/utils/adt/xml.c +--- ./src/backend/utils/adt/xml.c 2024-11-23 14:50:40 ++++ ./src/backend/utils/adt/xml.c 2024-11-23 14:57:53 +@@ -117,7 +117,12 @@ + + static xmlParserInputPtr xmlPgEntityLoader(const char *URL, const char *ID, + xmlParserCtxtPtr ctxt); ++/* https://www.postgresql.org/message-id/attachment/152769/v1-0001-Make-PostgreSQL-work-with-newer-version-of-libxml.patch */ ++#if LIBXML_VERSION >= 21200 ++static void xml_errorHandler(void *data, const xmlError *error); ++#else + static void xml_errorHandler(void *data, xmlErrorPtr error); ++#endif + static void xml_ereport_by_code(int level, int sqlcode, + const char *msg, int errcode); + static void chopStringInfoNewlines(StringInfo str); +@@ -1655,8 +1660,12 @@ + /* + * Error handler for libxml errors and warnings + */ +-static void +-xml_errorHandler(void *data, xmlErrorPtr error) ++/* https://www.postgresql.org/message-id/attachment/152769/v1-0001-Make-PostgreSQL-work-with-newer-version-of-libxml.patch */ ++#if LIBXML_VERSION >= 21200 ++static void xml_errorHandler(void *data, const xmlError *error) ++#else ++static void xml_errorHandler(void *data, xmlErrorPtr error) ++#endif + { + PgXmlErrorContext *xmlerrcxt = (PgXmlErrorContext *) data; + xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) error->ctxt;