diff --git a/x11-wm/hyprland/Makefile b/x11-wm/hyprland/Makefile index 6274aee8152a..1ee8b95e9b23 100644 --- a/x11-wm/hyprland/Makefile +++ b/x11-wm/hyprland/Makefile @@ -1,61 +1,56 @@ PORTNAME= hyprland DISTVERSIONPREFIX= v -DISTVERSION= 0.19.2beta +DISTVERSION= 0.20.0beta CATEGORIES= x11-wm wayland -PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/ -PATCHFILES+= 62efcc4e1cc1.patch:-p1 # https://github.com/hyprwm/Hyprland/pull/1251 -PATCHFILES+= 34d1def07dd1.patch:-p1 # https://github.com/hyprwm/Hyprland/pull/1252 -PATCHFILES+= afd5728d26a0.patch:-p1 # https://github.com/hyprwm/Hyprland/pull/1252 - 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.16.0<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= yes:build USE_GITHUB= yes USE_GL= egl opengl USE_GNOME= cairo USE_XORG= pixman GH_ACCOUNT= hyprwm GH_PROJECT= Hyprland GH_TUPLE= hyprwm:hyprland-protocols:301733a:hyprland_protocols/subprojects/hyprland-protocols 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.*/''/" \ -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 .ifdef GH_TUPLE post-install: # XXX USES=meson invokes ninja directly, so doesn't support --skip-subprojects @${RM} -r ${STAGEDIR}${PREFIX}/share/pkgconfig @${RM} -r ${STAGEDIR}${PREFIX}/share/protocols .endif .include diff --git a/x11-wm/hyprland/distinfo b/x11-wm/hyprland/distinfo index 155815d0bb08..dcc2b81d26c6 100644 --- a/x11-wm/hyprland/distinfo +++ b/x11-wm/hyprland/distinfo @@ -1,11 +1,5 @@ -TIMESTAMP = 1670857002 -SHA256 (hyprwm-Hyprland-v0.19.2beta_GH0.tar.gz) = 4454220b67699b79825ae45efdded68856343a005e3f5c08a258ef918e7e10b1 -SIZE (hyprwm-Hyprland-v0.19.2beta_GH0.tar.gz) = 701944 +TIMESTAMP = 1672957824 +SHA256 (hyprwm-Hyprland-v0.20.0beta_GH0.tar.gz) = 366da4957e61ebc5c33e42f7eb7c73ab79566774f50494241349cc515a140ca3 +SIZE (hyprwm-Hyprland-v0.20.0beta_GH0.tar.gz) = 708221 SHA256 (hyprwm-hyprland-protocols-301733a_GH0.tar.gz) = 3b3b4e948525f1d823313390b2551ea8969d0cbf82bd72e2a4a2ce2750552330 SIZE (hyprwm-hyprland-protocols-301733a_GH0.tar.gz) = 4852 -SHA256 (62efcc4e1cc1.patch) = 232f6eeb64a0f52a07e5cd3ecc2ccaa453176c91c8c63556313f6f74dc6000f7 -SIZE (62efcc4e1cc1.patch) = 2519 -SHA256 (34d1def07dd1.patch) = 38527787eca37e886a353e371d30e41bfd397b87eb10858a84e09f210c012667 -SIZE (34d1def07dd1.patch) = 1052 -SHA256 (afd5728d26a0.patch) = f2e605c9dbe6e87dfe4b222b277f584a98a3834482fbe201c93decebdfbf75dc -SIZE (afd5728d26a0.patch) = 551 diff --git a/x11-wm/hyprland/files/patch-system-wlroots b/x11-wm/hyprland/files/patch-system-wlroots index aaf80e30da0c..21457e7c2728 100644 --- a/x11-wm/hyprland/files/patch-system-wlroots +++ b/x11-wm/hyprland/files/patch-system-wlroots @@ -1,26 +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.orig 2023-01-05 22:30:24 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'), + dependency('libdrm'), + dependency('egl'), diff --git a/x11-wm/hyprland/files/patch-wlroots-0.16 b/x11-wm/hyprland/files/patch-wlroots-0.16 index 1d488a5289f4..5c7f6318dc45 100644 --- a/x11-wm/hyprland/files/patch-wlroots-0.16 +++ b/x11-wm/hyprland/files/patch-wlroots-0.16 @@ -1,136 +1,136 @@ Revert to wlroots 0.16 API as 0.17 is a moving target, so hard to use as system package with more than one consumer. https://github.com/hyprwm/Hyprland/commit/df132e5ff339 https://github.com/hyprwm/Hyprland/commit/c012e3d66b21 https://github.com/hyprwm/Hyprland/commit/d6b3bfc48e22 --- src/Compositor.cpp.orig 2022-12-06 13:15:18 UTC +++ src/Compositor.cpp @@ -53,7 +53,7 @@ CCompositor::CCompositor() { wl_event_loop_add_signal(m_sWLEventLoop, SIGTERM, handleCritSignal, nullptr); //wl_event_loop_add_signal(m_sWLEventLoop, SIGINT, handleCritSignal, nullptr); - m_sWLRBackend = wlr_backend_autocreate(m_sWLDisplay, &m_sWLRSession); + m_sWLRBackend = wlr_backend_autocreate(m_sWLDisplay); if (!m_sWLRBackend) { Debug::log(CRIT, "m_sWLRBackend was NULL!"); @@ -76,10 +76,11 @@ CCompositor::CCompositor() { wlr_renderer_init_wl_shm(m_sWLRRenderer, m_sWLDisplay); if (wlr_renderer_get_dmabuf_texture_formats(m_sWLRRenderer)) { - if (wlr_renderer_get_drm_fd(m_sWLRRenderer) >= 0) + if (wlr_renderer_get_drm_fd(m_sWLRRenderer) >= 0) { wlr_drm_create(m_sWLDisplay, m_sWLRRenderer); + } - m_sWLRLinuxDMABuf = wlr_linux_dmabuf_v1_create_with_renderer(m_sWLDisplay, 4, m_sWLRRenderer); + m_sWLRLinuxDMABuf = wlr_linux_dmabuf_v1_create(m_sWLDisplay, m_sWLRRenderer); } m_sWLRAllocator = wlr_allocator_autocreate(m_sWLRBackend, m_sWLRRenderer); @@ -131,7 +132,7 @@ CCompositor::CCompositor() { m_sWLRIdle = wlr_idle_create(m_sWLDisplay); - m_sWLRLayerShell = wlr_layer_shell_v1_create(m_sWLDisplay, 4); + m_sWLRLayerShell = wlr_layer_shell_v1_create(m_sWLDisplay); m_sWLRServerDecoMgr = wlr_server_decoration_manager_create(m_sWLDisplay); m_sWLRXDGDecoMgr = wlr_xdg_decoration_manager_v1_create(m_sWLDisplay); @@ -171,6 +172,8 @@ CCompositor::CCompositor() { wlr_xdg_foreign_v2_create(m_sWLDisplay, m_sWLRForeignRegistry); m_sWLRPointerGestures = wlr_pointer_gestures_v1_create(m_sWLDisplay); + + m_sWLRSession = wlr_backend_get_session(m_sWLRBackend); m_sWLRTextInputMgr = wlr_text_input_manager_v3_create(m_sWLDisplay); --- src/events/Events.hpp.orig 2022-12-06 13:15:18 UTC +++ src/events/Events.hpp @@ -96,7 +96,6 @@ namespace Events { // Monitor part 2 the sequel DYNLISTENFUNC(monitorFrame); DYNLISTENFUNC(monitorDestroy); - DYNLISTENFUNC(monitorStateRequest); // XWayland LISTENER(readyXWayland); ---- src/events/Monitors.cpp.orig 2022-12-06 13:15:18 UTC +--- src/events/Monitors.cpp.orig 2023-01-05 22:30:24 UTC +++ src/events/Monitors.cpp -@@ -266,10 +266,11 @@ void Events::listener_monitorFrame(void* owner, void* +@@ -265,10 +265,11 @@ void Events::listener_monitorFrame(void* owner, void* damageBlinkCleanup = 0; } - if (wlr_renderer_begin(g_pCompositor->m_sWLRRenderer, PMONITOR->vecPixelSize.x, PMONITOR->vecPixelSize.y)) { - wlr_output_render_software_cursors(PMONITOR->output, NULL); - wlr_renderer_end(g_pCompositor->m_sWLRRenderer); - } + wlr_renderer_begin(g_pCompositor->m_sWLRRenderer, PMONITOR->vecPixelSize.x, PMONITOR->vecPixelSize.y); + + wlr_output_render_software_cursors(PMONITOR->output, NULL); + + wlr_renderer_end(g_pCompositor->m_sWLRRenderer); } g_pHyprOpenGL->end(); -@@ -354,11 +355,4 @@ void Events::listener_monitorDestroy(void* owner, void - pMostHzMonitor = pMonitorMostHz; - } +@@ -339,11 +340,4 @@ void Events::listener_monitorDestroy(void* owner, void + + std::erase_if(g_pCompositor->m_vRealMonitors, [&](std::shared_ptr& el) { return el.get() == pMonitor; }); } -} - -void Events::listener_monitorStateRequest(void* owner, void* data) { - const auto PMONITOR = (CMonitor*)owner; -- const auto E = (wlr_output_event_request_state*)data; +- const auto E = (wlr_output_event_request_state*)data; - - wlr_output_commit_state(PMONITOR->output, E->state); } --- src/helpers/Monitor.cpp.orig 2022-12-06 13:15:18 UTC +++ src/helpers/Monitor.cpp @@ -5,10 +5,8 @@ void CMonitor::onConnect(bool noRule) { void CMonitor::onConnect(bool noRule) { hyprListener_monitorDestroy.removeCallback(); hyprListener_monitorFrame.removeCallback(); - hyprListener_monitorStateRequest.removeCallback(); hyprListener_monitorFrame.initCallback(&output->events.frame, &Events::listener_monitorFrame, this); hyprListener_monitorDestroy.initCallback(&output->events.destroy, &Events::listener_monitorDestroy, this); - hyprListener_monitorStateRequest.initCallback(&output->events.request_state, &Events::listener_monitorStateRequest, this); if (m_bEnabled) { wlr_output_enable(output, 1); @@ -185,7 +183,7 @@ void CMonitor::onDisconnect() { if (!BACKUPMON) { Debug::log(WARN, "Unplugged last monitor, entering an unsafe state. Good luck my friend."); - hyprListener_monitorStateRequest.removeCallback(); + hyprListener_monitorMode.removeCallback(); hyprListener_monitorDestroy.removeCallback(); g_pCompositor->m_bUnsafeState = true; --- src/helpers/Monitor.hpp.orig 2022-12-06 13:15:18 UTC +++ src/helpers/Monitor.hpp @@ -56,7 +56,7 @@ class CMonitor { (public) DYNLISTENER(monitorFrame); DYNLISTENER(monitorDestroy); - DYNLISTENER(monitorStateRequest); + DYNLISTENER(monitorMode); // hack: a group = workspaces on a monitor. // I don't really care lol :P --- src/helpers/SubsurfaceTree.cpp.orig 2022-12-06 13:15:18 UTC +++ src/helpers/SubsurfaceTree.cpp @@ -3,8 +3,8 @@ void addSurfaceGlobalOffset(SSurfaceTreeNode* node, in #include "../Compositor.hpp" void addSurfaceGlobalOffset(SSurfaceTreeNode* node, int* lx, int* ly) { - *lx += node->pSurface->current.dx; - *ly += node->pSurface->current.dy; + *lx += node->pSurface->sx; + *ly += node->pSurface->sy; if (node->offsetfn) { // This is the root node