commit:     2a191d353a1e0999ddfebdaebba7f4538b6a1be6
Author:     Remigiusz Micielski <rmicielski <AT> purelymail <DOT> com>
AuthorDate: Wed Nov 22 17:20:24 2023 +0000
Commit:     Remigiusz Micielski <remigiusz.micielski <AT> gmail <DOT> com>
CommitDate: Wed Nov 22 17:27:12 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=2a191d35

gui-libs/xdg-desktop-portal-hyprland: add 1.2.5

Closes: https://bugs.gentoo.org/917678
Signed-off-by: Remigiusz Micielski <rmicielski <AT> purelymail.com>

 ...p-portal-hyprland-1.2.5_use_sys_sdbus-c++.patch | 35 +++++++++
 .../xdg-desktop-portal-hyprland-1.2.5.ebuild       | 84 ++++++++++++++++++++++
 2 files changed, 119 insertions(+)

diff --git 
a/gui-libs/xdg-desktop-portal-hyprland/files/xdg-desktop-portal-hyprland-1.2.5_use_sys_sdbus-c++.patch
 
b/gui-libs/xdg-desktop-portal-hyprland/files/xdg-desktop-portal-hyprland-1.2.5_use_sys_sdbus-c++.patch
new file mode 100644
index 0000000000..42ec92a2fa
--- /dev/null
+++ 
b/gui-libs/xdg-desktop-portal-hyprland/files/xdg-desktop-portal-hyprland-1.2.5_use_sys_sdbus-c++.patch
@@ -0,0 +1,35 @@
+From 7ec34c32dae716cb3976037e1086e193ff1b0cc3 Mon Sep 17 00:00:00 2001
+From: Remigiusz Micielski <[email protected]>
+Date: Wed, 22 Nov 2023 17:13:09 +0100
+Subject: [PATCH] fix: use sys sdbus-c++
+
+---
+ CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 44d1689..aa7588b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -21,16 +21,16 @@ endif()
+ include_directories(
+   .
+   "protocols/"
+-  "subprojects/sdbus-cpp/include/"
+ )
+ 
+ set(CMAKE_CXX_STANDARD 23)
+ add_compile_options(-Wall -Wextra -Wno-unused-parameter -Wno-unused-value 
-Wno-missing-field-initializers -Wno-narrowing -Wno-pointer-arith -fpermissive)
+ 
+ message(STATUS "Checking deps...")
+-add_subdirectory(subprojects/sdbus-cpp)
+ add_subdirectory(hyprland-share-picker)
+ 
++find_package(sdbus-c++ REQUIRED)
++
+ find_package(Threads REQUIRED)
+ 
+ find_package(PkgConfig REQUIRED)
+-- 
+2.41.0
+

diff --git 
a/gui-libs/xdg-desktop-portal-hyprland/xdg-desktop-portal-hyprland-1.2.5.ebuild 
b/gui-libs/xdg-desktop-portal-hyprland/xdg-desktop-portal-hyprland-1.2.5.ebuild
new file mode 100644
index 0000000000..1129bc9cca
--- /dev/null
+++ 
b/gui-libs/xdg-desktop-portal-hyprland/xdg-desktop-portal-hyprland-1.2.5.ebuild
@@ -0,0 +1,84 @@
+# Copyright 2022-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake toolchain-funcs
+
+DESCRIPTION="xdg-desktop-portal backend for hyprland"
+HOMEPAGE="https://github.com/hyprwm/xdg-desktop-portal-hyprland";
+
+KEYWORDS="~amd64"
+SRC_URI="https://github.com/hyprwm/xdg-desktop-portal-hyprland/archive/refs/tags/v${PV}.tar.gz
 \
+       -> xdg-desktop-hyprland-${PV}.tar.gz
+https://github.com/micielski/xdg-desktop-portal-hyprland-subprojects/releases/download/${PV}/xdg-desktop-portal-hyprland-${PV}-subprojects.tar.xz";
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="elogind systemd"
+REQUIRED_USE="?? ( elogind systemd )"
+
+DEPEND="
+       >=media-video/pipewire-0.3.41:=
+       dev-cpp/sdbus-c++
+       dev-libs/inih
+       dev-libs/wayland
+       dev-qt/qtbase
+       dev-qt/qtcore
+       dev-qt/qtgui
+       dev-qt/qtwayland:6
+       dev-qt/qtwidgets
+       media-libs/mesa
+       sys-apps/util-linux
+       x11-libs/libdrm
+       || (
+               systemd? ( >=sys-apps/systemd-237 )
+               elogind? ( >=sys-auth/elogind-237 )
+               sys-libs/basu
+       )
+"
+RDEPEND="
+       ${DEPEND}
+       sys-apps/xdg-desktop-portal
+"
+BDEPEND="
+       >=dev-libs/wayland-protocols-1.24
+       dev-libs/hyprland-protocols
+       virtual/pkgconfig
+       || ( >=sys-devel/gcc-13:* >=sys-devel/clang-17:* )
+"
+
+pkg_setup() {
+       [[ ${MERGE_TYPE} == binary ]] && return
+
+       if tc-is-gcc && ver_test $(gcc-version) -lt 13 ; then
+               eerror "XDPH needs >=gcc-13 or >=clang-17 to compile."
+               eerror "Please upgrade GCC: emerge -v1 sys-devel/gcc"
+               die "GCC version is too old to compile XDPH!"
+       elif tc-is-clang && ver_test $(clang-version) -lt 17 ; then
+               eerror "XDPH needs >=gcc-13 or >=clang-17 to compile."
+               eerror "Please upgrade Clang: emerge -v1 sys-devel/clang"
+               die "Clang version is too old to compile XDPH!"
+       fi
+}
+
+src_unpack() {
+       default
+       mv subprojects/* "xdg-desktop-portal-hyprland-${PV}/subprojects" || die
+}
+
+src_prepare() {
+       default
+       eapply 
"${FILESDIR}/xdg-desktop-portal-hyprland-1.2.5_use_sys_sdbus-c++.patch"
+       cmake_src_prepare
+}
+
+src_compile() {
+       cmake_src_compile all
+}
+
+src_install() {
+       cmake_src_install
+       exeinto /usr/libexec
+       doexe "${BUILD_DIR}/xdg-desktop-portal-hyprland"
+}

Reply via email to