Skip to content

Commit

Permalink
x11/xdg-desktop-portal-hyprland: convert to USES=cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
jbeich committed Jan 5, 2024
1 parent 024e2ea commit ad8bd25
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 12 deletions.
26 changes: 14 additions & 12 deletions x11/xdg-desktop-portal-hyprland/Makefile
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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
Expand Down
14 changes: 14 additions & 0 deletions x11/xdg-desktop-portal-hyprland/distinfo
Expand Up @@ -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

0 comments on commit ad8bd25

Please sign in to comment.