aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2022-11-07 12:16:30 +0000
committerJan Beich <jbeich@FreeBSD.org>2022-11-07 17:58:09 +0000
commitcfe9880ad43f6392345ef62f5528b268e523c45e (patch)
treecfaa79d8480a8e001e08497e06d44ba4aca17530
parentb4e7dc9bf4a25f8fb4858b55d811f2b001a49602 (diff)
downloadports-cfe9880ad43f6392345ef62f5528b268e523c45e.tar.gz
ports-cfe9880ad43f6392345ef62f5528b268e523c45e.zip
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/
-rw-r--r--x11-wm/Makefile1
-rw-r--r--x11-wm/hyprland-devel/Makefile54
-rw-r--r--x11-wm/hyprland-devel/distinfo5
-rw-r--r--x11-wm/hyprland-devel/files/patch-system-wlroots26
-rw-r--r--x11-wm/hyprland-devel/pkg-descr5
-rw-r--r--x11-wm/hyprland-devel/pkg-plist9
6 files changed, 100 insertions, 0 deletions
diff --git a/x11-wm/Makefile b/x11-wm/Makefile
index 282b2c3ef57e..1a7c263cb77b 100644
--- a/x11-wm/Makefile
+++ b/x11-wm/Makefile
@@ -45,6 +45,7 @@
SUBDIR += herbstluftwm
SUBDIR += hikari
SUBDIR += hs-xmonad
+ SUBDIR += hyprland-devel
SUBDIR += i3
SUBDIR += i3-gaps
SUBDIR += icewm
diff --git a/x11-wm/hyprland-devel/Makefile b/x11-wm/hyprland-devel/Makefile
new file mode 100644
index 000000000000..5fd77a23dcec
--- /dev/null
+++ b/x11-wm/hyprland-devel/Makefile
@@ -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>
diff --git a/x11-wm/hyprland-devel/distinfo b/x11-wm/hyprland-devel/distinfo
new file mode 100644
index 000000000000..117af9b5125f
--- /dev/null
+++ b/x11-wm/hyprland-devel/distinfo
@@ -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
diff --git a/x11-wm/hyprland-devel/files/patch-system-wlroots b/x11-wm/hyprland-devel/files/patch-system-wlroots
new file mode 100644
index 000000000000..aaf80e30da0c
--- /dev/null
+++ b/x11-wm/hyprland-devel/files/patch-system-wlroots
@@ -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'),
diff --git a/x11-wm/hyprland-devel/pkg-descr b/x11-wm/hyprland-devel/pkg-descr
new file mode 100644
index 000000000000..20c74f73f889
--- /dev/null
+++ b/x11-wm/hyprland-devel/pkg-descr
@@ -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.
diff --git a/x11-wm/hyprland-devel/pkg-plist b/x11-wm/hyprland-devel/pkg-plist
new file mode 100644
index 000000000000..3c6d77e4eefd
--- /dev/null
+++ b/x11-wm/hyprland-devel/pkg-plist
@@ -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