git: c5db03eaf71a - 2024Q1 - x11/xdg-desktop-portal-hyprland: convert to USES=cmake

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Fri, 05 Jan 2024 15:09:29 UTC
The branch 2024Q1 has been updated by jbeich:

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

commit c5db03eaf71ab2714fe28ac25efc0924513f8d9e
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2024-01-04 18:33:17 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2024-01-05 15:09:20 +0000

    x11/xdg-desktop-portal-hyprland: convert to USES=cmake
    
    (cherry picked from commit ad8bd257a16baf7813815ec7c597d0706e2343e5)
---
 x11/xdg-desktop-portal-hyprland/Makefile | 26 ++++++++++++++------------
 x11/xdg-desktop-portal-hyprland/distinfo | 14 ++++++++++++++
 2 files changed, 28 insertions(+), 12 deletions(-)

diff --git a/x11/xdg-desktop-portal-hyprland/Makefile b/x11/xdg-desktop-portal-hyprland/Makefile
index 73f7cf90b6f1..2b1c29f5a767 100644
--- a/x11/xdg-desktop-portal-hyprland/Makefile
+++ b/x11/xdg-desktop-portal-hyprland/Makefile
@@ -3,6 +3,15 @@ DISTVERSIONPREFIX=	v
 DISTVERSION=	1.3.0
 CATEGORIES=	x11 wayland
 
+PATCH_SITES=	https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
+PATCHFILES+=	f46cff1df2d8.patch:-p1 # https://github.com/hyprwm/xdg-desktop-portal-hyprland/issues/151
+PATCHFILES+=	21d216ed7f64.patch:-p1 # https://github.com/hyprwm/xdg-desktop-portal-hyprland/pull/154
+PATCHFILES+=	c0b606460a09.patch:-p1 # https://github.com/hyprwm/xdg-desktop-portal-hyprland/issues/156
+PATCHFILES+=	df8c154f5793.patch:-p1 # https://github.com/hyprwm/xdg-desktop-portal-hyprland/issues/157
+PATCHFILES+=	86a94c3e4edb.patch:-p1 # https://github.com/hyprwm/xdg-desktop-portal-hyprland/issues/158
+PATCHFILES+=	1c802128f6cc.patch:-p1 # https://github.com/hyprwm/xdg-desktop-portal-hyprland/issues/159
+PATCHFILES+=	379b27281e2c.patch:-p1 # https://github.com/hyprwm/xdg-desktop-portal-hyprland/issues/160
+
 MAINTAINER=	jbeich@FreeBSD.org
 COMMENT=	xdg-desktop-portal backend for hyprland
 WWW=		https://github.com/hyprwm/xdg-desktop-portal-hyprland
@@ -25,13 +34,14 @@ qt5_CONFLICTS_INSTALL=	${PORTNAME}-qt6
 qt6_CONFLICTS_INSTALL=	${PORTNAME}
 qt6_PKGNAMESUFFIX=	-qt6
 
-USES=		compiler:c++11-lib gl meson pkgconfig
+USES=		cmake compiler:c++11-lib gl pkgconfig
 USE_GITHUB=	yes
 USE_GL=		gbm
 GH_ACCOUNT=	hyprwm
 GH_TUPLE=	hyprwm:hyprland-protocols:v0.2:hyprland_protocols/subprojects/hyprland-protocols
-MESON_ARGS=	-Dsystemd=disabled
-PLIST_FILES=	libexec/${PORTNAME} \
+LDFLAGS+=	-Wl,--as-needed # sdbus-cpp deps
+PLIST_FILES=	lib/systemd/user/${PORTNAME}.service \
+		libexec/${PORTNAME} \
 		share/dbus-1/services/org.freedesktop.impl.portal.desktop.hyprland.service \
 		share/xdg-desktop-portal/portals/hyprland.portal
 
@@ -42,22 +52,14 @@ CXXFLAGS+=	-fexperimental-library
 
 post-patch:
 # XXX Merge with hyprland-share-picker instead
-	@${REINPLACE_CMD} '/hyprland-share-picker/d' ${WRKSRC}/meson.build
-
-.ifdef GH_TUPLE
-post-configure:
-	@${REINPLACE_CMD} 's/meson install/& \
-		--skip-subprojects/' ${BUILD_WRKSRC}/build.ninja
-.endif
+	@${REINPLACE_CMD} '/hyprland-share-picker/d' ${WRKSRC}/CMakeLists.txt
 
 # XXX Drop after FreeBSD 13.2 EOL around 2024-05-01 (don't forget distinfo)
 .if ${CXX} == c++ && exists(/usr/lib/libc++.so)
 .if !exists(/usr/include/c++/v1/__ranges/as_rvalue_view.h) || make(makesum) || make(fetch)
-BUILD_DEPENDS+=	${CMAKE_BIN}:devel/cmake-core
 USES+=		llvm:min=16,build,export
 PATH:=		${LLVM_PREFIX}/bin:${PATH} # XXX _CMAKE_TOOLCHAIN_SUFFIX vs. devel/llvm*
 CONFIGURE_ENV+=	CC="${CC}" CXX="${CXX}" CPP="${CPP}"
-CMAKE_BIN=	${LOCALBASE}/bin/cmake
 
 # XXX Move into separate port and standardize via USES
 GH_TUPLE+=	llvm:llvm-project:llvmorg-16.0.1:libcxx
diff --git a/x11/xdg-desktop-portal-hyprland/distinfo b/x11/xdg-desktop-portal-hyprland/distinfo
index e258b7c1add6..d261a9b5d24e 100644
--- a/x11/xdg-desktop-portal-hyprland/distinfo
+++ b/x11/xdg-desktop-portal-hyprland/distinfo
@@ -5,3 +5,17 @@ SHA256 (hyprwm-hyprland-protocols-v0.2_GH0.tar.gz) = 106cb189d0fbe4ec0ee11a12a17
 SIZE (hyprwm-hyprland-protocols-v0.2_GH0.tar.gz) = 6342
 SHA256 (llvm-llvm-project-llvmorg-16.0.1_GH0.tar.gz) = b5a9ff1793b1e2d388a3819bf35797002b1d2e40bb35a10c65605e0ea1435271
 SIZE (llvm-llvm-project-llvmorg-16.0.1_GH0.tar.gz) = 179289803
+SHA256 (f46cff1df2d8.patch) = c33ca9926012d563d1c5e8c68132556dae039dcc8e7b5805b3be55f14ab1c075
+SIZE (f46cff1df2d8.patch) = 1345
+SHA256 (21d216ed7f64.patch) = 04249d9ac3ff4157005439580fe1b7be31f609456e8364479d643643897c8d2b
+SIZE (21d216ed7f64.patch) = 8417
+SHA256 (c0b606460a09.patch) = 66f8d6f936b7050497d37b3f4aa29dae033b9230e3b20f224629f95ed97120de
+SIZE (c0b606460a09.patch) = 787
+SHA256 (df8c154f5793.patch) = 11d736a17916617d69936e109312764264d9ddc120545147ff3816c5520a1cee
+SIZE (df8c154f5793.patch) = 1135
+SHA256 (86a94c3e4edb.patch) = 02b10b0888ebfc36726b5743eb2ac961abaaef064f84f5555d1e1e630ae8916a
+SIZE (86a94c3e4edb.patch) = 766
+SHA256 (1c802128f6cc.patch) = bd8b01b6e7e9b0ab34458dcd8a41eaee24c296c2b917c3c68b236f2c1bf8bfc0
+SIZE (1c802128f6cc.patch) = 839
+SHA256 (379b27281e2c.patch) = 3abb1a458423d678bbd819c509266e8568474081b434c2ca0999252dc0a3a8f3
+SIZE (379b27281e2c.patch) = 794