Re: git: e02b2ca451b0 - main - textproc/libxml2: Fix cmake file
Date: Fri, 11 Jul 2025 16:53:30 UTC
On 2025-07-10 13:08, Zsolt Udvari wrote:
> The branch main has been updated by uzsolt:
>
> URL:https://cgit.FreeBSD.org/ports/commit/?id=e02b2ca451b050db7a63fb19ccf0decc6c7d04a1
>
> commit e02b2ca451b050db7a63fb19ccf0decc6c7d04a1
> Author: Zsolt Udvari<uzsolt@FreeBSD.org>
> AuthorDate: 2025-07-10 11:03:37 +0000
> Commit: Zsolt Udvari<uzsolt@FreeBSD.org>
> CommitDate: 2025-07-10 11:08:15 +0000
>
> textproc/libxml2: Fix cmake file
>
> The port's cmake file is wrong because there is an unclosed
> if-statement.
> Can check with 'cmake -P test-libxml2.cmake' where the content of
> test-libxml2.cmake is:
> include("/usr/local/lib/cmake/libxml2/libxml2-config.cmake")
>
> The test's result is:
> CMake Error at /usr/local/lib/cmake/libxml2/libxml2-config.cmake:53 (if):
> Flow control statements are not properly nested.
> Call Stack (most recent call first):
> test-libxml2.cmake:1 (include)
>
> Approved by: portmgr (blanket, trivial runtime fix)
> ---
> textproc/libxml2/Makefile | 2 +-
> textproc/libxml2/files/patch-libxml2-config.cmake.in | 10 ++++++++++
> 2 files changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/textproc/libxml2/Makefile b/textproc/libxml2/Makefile
> index 7f2922589d85..af933570190a 100644
> --- a/textproc/libxml2/Makefile
> +++ b/textproc/libxml2/Makefile
> @@ -1,6 +1,6 @@
> PORTNAME?= libxml2
> DISTVERSION= 2.14.4
> -PORTREVISION?= 0
> +PORTREVISION?= 1
> CATEGORIES?= textproc gnome
> MASTER_SITES= GNOME
> DISTNAME= libxml2-${DISTVERSION}
> diff --git a/textproc/libxml2/files/patch-libxml2-config.cmake.in b/textproc/libxml2/files/patch-libxml2-config.cmake.in
> new file mode 100644
> index 000000000000..581142a44aaf
> --- /dev/null
> +++ b/textproc/libxml2/files/patch-libxml2-config.cmake.in
> @@ -0,0 +1,10 @@
> +--- libxml2-config.cmake.in.orig 2025-07-10 08:31:10 UTC
> ++++ libxml2-config.cmake.in
> +@@ -119,6 +119,7 @@ if(NOT LIBXML2_SHARED)
> + if(LIBXML2_WITH_HTTP)
> + list(APPEND LIBXML2_LIBRARIES ws2_32)
> + list(APPEND LIBXML2_INTERFACE_LINK_LIBRARIES "\$<LINK_ONLY:ws2_32>")
> ++ endif()
> + endif()
> + endif()
> +
Hi,
For more context, this is upstream commit
d3e33dc214276498e73b61188be02b2863c9670a which was committed the first
time but removed the second time around...
https://gitlab.gnome.org/GNOME/libxml2/-/commit/d3e33dc214276498e73b61188be02b2863c9670a
Best regards, Daniel