git: 65afcc15c613 - main - x11-wm/compiz: permit compiling with newer libxml2

From: Charlie Li <vishwin_at_FreeBSD.org>
Date: Sat, 28 Jun 2025 15:54:14 UTC
The branch main has been updated by vishwin:

URL: https://cgit.FreeBSD.org/ports/commit/?id=65afcc15c613a008f1e1387de32a1216d6aa1fb5

commit 65afcc15c613a008f1e1387de32a1216d6aa1fb5
Author:     Chris Hutchinson <portmaster@BSDforge.com>
AuthorDate: 2025-06-18 02:05:00 +0000
Commit:     Charlie Li <vishwin@FreeBSD.org>
CommitDate: 2025-06-28 15:52:38 +0000

    x11-wm/compiz: permit compiling with newer libxml2
    
    While here, cleanup Makefile.
    
    Changes
    Makefile -- pets port(lint,fmt,clippy)
    files/patch-src_metadata.c -- new (the purpose of this pr(1))
    
    PR: 285906
    Co-authored-by: George Mitchell <george@m5p.com>
---
 x11-wm/compiz/Makefile                   | 51 ++++++++++++++++----------------
 x11-wm/compiz/files/patch-src_metadata.c | 10 +++++++
 2 files changed, 36 insertions(+), 25 deletions(-)

diff --git a/x11-wm/compiz/Makefile b/x11-wm/compiz/Makefile
index 76414e0c8d2f..a2ad76a1714a 100644
--- a/x11-wm/compiz/Makefile
+++ b/x11-wm/compiz/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	compiz
 PORTVERSION=	0.8.8
-PORTREVISION=	15
+PORTREVISION=	16
 CATEGORIES=	x11-wm
 MASTER_SITES=	https://BSDforge.com/projects/source/x11-wm/compiz/
 
@@ -8,8 +8,8 @@ MAINTAINER=	portmaster@BSDforge.com
 COMMENT=	Compiz Composite/Window Manager
 WWW=		http://www.compiz.org/
 
-LICENSE=		GPLv2+ LGPL21+ MIT
-LICENSE_COMB=		multi
+LICENSE=	GPLv2+ LGPL21+ MIT
+LICENSE_COMB=	multi
 LICENSE_FILE_GPLv2+ =	${WRKSRC}/COPYING.GPL
 LICENSE_FILE_LGPL21+ =	${WRKSRC}/COPYING.LGPL
 LICENSE_FILE_MIT=	${WRKSRC}/COPYING.MIT
@@ -19,54 +19,55 @@ LIB_DEPENDS=	libfontconfig.so:x11-fonts/fontconfig \
 		libgtop-2.0.so:devel/libgtop \
 		libpng.so:graphics/png \
 		libstartup-notification-1.so:x11/startup-notification
-RUN_DEPENDS=	glxinfo:graphics/mesa-demos \
-		${RUN_DEPENDS_${ARCH}}
+RUN_DEPENDS=	${RUN_DEPENDS_${ARCH}} \
+		glxinfo:graphics/mesa-demos
+
 RUN_DEPENDS_amd64=	nvidia-settings:x11/nvidia-settings
 RUN_DEPENDS_i386=	nvidia-settings:x11/nvidia-settings
 
-USES=		gettext-runtime gettext-tools gl gmake gnome libtool \
-		localbase pathfix tar:bzip2 xorg xorg-cat:app
+USES=		gettext-runtime gettext-tools gl gmake gnome libtool localbase \
+		pathfix tar:bzip2 xorg xorg-cat:app
 USE_GL=		gl glu
 USE_GNOME=	cairo intltool libxslt
 USE_LDCONFIG=	yes
-USE_XORG=	ice sm x11 xcomposite xdamage xext xfixes xinerama \
-		xorgproto xrandr xrender
+USE_XORG=	ice sm x11 xcomposite xdamage xext xfixes xinerama xorgproto \
+		xrandr xrender
 
 GNU_CONFIGURE=	yes
-CONFIGURE_ARGS=	--disable-kde4 \
-		--disable-kde \
-		--disable-gconf \
+CONFIGURE_ARGS=	--disable-gconf \
 		--disable-gnome \
 		--disable-gnome-keybindings \
-		--disable-metacity \
-		--disable-inotify
+		--disable-inotify \
+		--disable-kde \
+		--disable-kde4 \
+		--disable-metacity
 INSTALL_TARGET=	install-strip
 
-SUB_FILES=		compiz-manager
 DESKTOP_ENTRIES=	"Compiz Manager" \
 			"Wrapper script for starting compiz" \
 			"" \
 			"compiz-manager" \
 			"System;Core;" \
 			false
+SUB_FILES=	compiz-manager
 
-OPTIONS_DEFINE=	DBUS FUSE GTK2 SVG
-OPTIONS_DEFAULT=DBUS GTK2 SVG
-OPTIONS_SUB=	yes
+OPTIONS_DEFINE=		DBUS FUSE GTK2 SVG
+OPTIONS_DEFAULT=	DBUS GTK2 SVG
+OPTIONS_SUB=		yes
 
-DBUS_CONFIGURE_ENABLE=	dbus
 DBUS_BUILD_DEPENDS=	${LOCALBASE}/libdata/pkgconfig/dbus-1.pc:devel/dbus
 DBUS_RUN_DEPENDS=	${LOCALBASE}/libdata/pkgconfig/dbus-1.pc:devel/dbus
+DBUS_CONFIGURE_ENABLE=	dbus
 
-FUSE_CONFIGURE_ENABLE=	fuse
 FUSE_USES=		fuse
+FUSE_CONFIGURE_ENABLE=	fuse
 
-GTK2_CONFIGURE_ENABLE=	gtk
-GTK2_USE=	GNOME=glib20
 GTK2_LIB_DEPENDS=	libwnck-1.so:x11-toolkits/libwnck
+GTK2_USE=		GNOME=glib20
+GTK2_CONFIGURE_ENABLE=	gtk
 
+SVG_USE=		GNOME=librsvg2
 SVG_CONFIGURE_ENABLE=	librsvg
-SVG_USE=	GNOME=librsvg2
 
 .include <bsd.port.options.mk>
 
@@ -76,8 +77,8 @@ CFLAGS+=	-Wno-error=incompatible-function-pointer-types
 
 .if ${PORT_OPTIONS:MDBUS} && ${PORT_OPTIONS:MGTK2}
 CONFIGURE_ARGS+=	--enable-dbus-glib
-BUILD_DEPENDS+=	${LOCALBASE}/libdata/pkgconfig/dbus-glib-1.pc:devel/dbus-glib
-RUN_DEPENDS+=	${LOCALBASE}/libdata/pkgconfig/dbus-glib-1.pc:devel/dbus-glib
+BUILD_DEPENDS+=		${LOCALBASE}/libdata/pkgconfig/dbus-glib-1.pc:devel/dbus-glib
+RUN_DEPENDS+=		${LOCALBASE}/libdata/pkgconfig/dbus-glib-1.pc:devel/dbus-glib
 .else
 CONFIGURE_ARGS+=	--disable-dbus-glib
 .endif
diff --git a/x11-wm/compiz/files/patch-src_metadata.c b/x11-wm/compiz/files/patch-src_metadata.c
new file mode 100644
index 000000000000..899dc4111393
--- /dev/null
+++ b/x11-wm/compiz/files/patch-src_metadata.c
@@ -0,0 +1,10 @@
+--- src/metadata.c.orig	2025-06-18 00:29:08 UTC
++++ src/metadata.c
+@@ -25,6 +25,7 @@
+  *          David Reveman <davidr@novell.com>
+  */
+ 
++#include <stdlib.h>
+ #include <string.h>
+ #include <libxml/tree.h>
+ #include <libxml/xpath.h>