1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-18 19:49:40 +00:00

x11-wm/hyprland-devel: add new port

Hyprland is a dynamic tiling Wayland compositor based on wlroots that
doesn't sacrifice on its looks.

It supports multiple layouts, fancy effects, has a very flexible IPC
model allowing for a lot of customization, and more.

https://hyprland.org/
This commit is contained in:
Jan Beich 2022-11-07 12:16:30 +00:00
parent b4e7dc9bf4
commit cfe9880ad4
6 changed files with 100 additions and 0 deletions

View File

@ -45,6 +45,7 @@
SUBDIR += herbstluftwm
SUBDIR += hikari
SUBDIR += hs-xmonad
SUBDIR += hyprland-devel
SUBDIR += i3
SUBDIR += i3-gaps
SUBDIR += icewm

View File

@ -0,0 +1,54 @@
PORTNAME= hyprland
DISTVERSIONPREFIX= v
DISTVERSION= 0.17.0beta-51
DISTVERSIONSUFFIX= -g1a55fb4
CATEGORIES= x11-wm wayland
PKGNAMESUFFIX= -devel
PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
PATCHFILES+= 74c6424a7e8b.patch:-p1 # https://github.com/hyprwm/Hyprland/pull/971
MAINTAINER= jbeich@FreeBSD.org
COMMENT= Dynamic tiling Wayland compositor that doesn't sacrifice on its looks #'
WWW= https://hyprland.org/
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= evdev-proto>0:devel/evdev-proto \
wayland-protocols>=1.25:graphics/wayland-protocols \
wlroots>=0.15.0.478<0.17.0:x11-toolkits/wlroots
LIB_DEPENDS= libwayland-server.so:graphics/wayland \
libwlroots.so:x11-toolkits/wlroots \
libinput.so:x11/libinput \
libxkbcommon.so:x11/libxkbcommon
USES= compiler:c++11-lib gl gnome meson pkgconfig xorg
USE_GCC= 12+:build
USE_GITHUB= yes
USE_GL= egl gl
USE_GNOME= cairo
USE_XORG= pixman
GH_ACCOUNT= hyprwm
GH_PROJECT= Hyprland
LDFLAGS+= -static-libstdc++ -static-libgcc # avoid libc++ conflict
OPTIONS_DEFINE= X11
OPTIONS_DEFAULT=X11
X11_USE= XORG=xcb
X11_MESON_ENABLED= xwayland
post-patch:
# Extract (snapshot) version from the port instead of meson.build
@${REINPLACE_CMD} -i .nogit -e "/GIT_BRANCH/s/run_command.*/'main'/" \
-e "/GIT_COMMIT_HASH/s/run_command.*/'${DISTVERSIONFULL}'/" \
-e "/GIT_COMMIT_MESSAGE/s/run_command.*/'<unknown>'/" \
-e "/GIT_DIRTY/s/run_command.*/'portbld'/" \
${WRKSRC}/meson.build
# Respect PREFIX for wallpapers
@${REINPLACE_CMD} 's,/usr/share,${DATADIR:H},' \
${WRKSRC}/src/render/OpenGL.cpp
.include "${.CURDIR:H:H}/x11-toolkits/wlroots-devel/override.mk"
.include <bsd.port.mk>

View File

@ -0,0 +1,5 @@
TIMESTAMP = 1667823390
SHA256 (hyprwm-Hyprland-v0.17.0beta-51-g1a55fb4_GH0.tar.gz) = 044b3da4456d0533168d5690ea71e6b10dc0ce60467490c5e1d294d7e3feed6f
SIZE (hyprwm-Hyprland-v0.17.0beta-51-g1a55fb4_GH0.tar.gz) = 683730
SHA256 (74c6424a7e8b.patch) = 6a30db3bf98d4cad1c5107ebe5b830c047d580ceabc91f7eaf738f2c82fb6ca1
SIZE (74c6424a7e8b.patch) = 713

View File

@ -0,0 +1,26 @@
Allow system wlroots to reduce maintenance (wlroots has tons of options)
--- meson.build.orig 2022-11-07 12:16:30 UTC
+++ meson.build
@@ -37,8 +37,8 @@ add_project_arguments(
],
language: 'cpp')
-wlroots = subproject('wlroots', default_options: ['examples=false'])
-have_xwlr = wlroots.get_variable('features').get('xwayland')
+wlroots = dependency('wlroots', version: ['>=0.16.0', '<0.17.0'], default_options: ['examples=false'])
+have_xwlr = wlroots.get_variable(pkgconfig: 'have_xwayland', internal: 'have_xwayland') == 'true'
xcb_dep = dependency('xcb', required: get_option('xwayland'))
if get_option('xwayland').enabled() and not have_xwlr
--- src/meson.build.orig 2022-11-07 12:16:30 UTC
+++ src/meson.build
@@ -7,7 +7,7 @@ executable('Hyprland', src,
server_protos,
dependency('wayland-server'),
dependency('wayland-client'),
- wlroots.get_variable('wlroots'),
+ wlroots,
dependency('cairo'),
dependency('pango'),
dependency('pangocairo'),

View File

@ -0,0 +1,5 @@
Hyprland is a dynamic tiling Wayland compositor based on wlroots that
doesn't sacrifice on its looks.
It supports multiple layouts, fancy effects, has a very flexible IPC
model allowing for a lot of customization, and more.

View File

@ -0,0 +1,9 @@
bin/Hyprland
bin/hyprctl
man/man1/Hyprland.1.gz
man/man1/hyprctl.1.gz
%%DATADIR%%/hyprland.conf
%%DATADIR%%/wall_2K.png
%%DATADIR%%/wall_4K.png
%%DATADIR%%/wall_8K.png
share/wayland-sessions/hyprland.desktop