diff --git a/x11-wm/hyprland/Makefile b/x11-wm/hyprland/Makefile index f8219a7430d2..e33e63c0e3f6 100644 --- a/x11-wm/hyprland/Makefile +++ b/x11-wm/hyprland/Makefile @@ -1,106 +1,106 @@ PORTNAME= hyprland DISTVERSIONPREFIX= v DISTVERSION= 0.27.0 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= x11-wm wayland 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= cmake:devel/cmake-core \ evdev-proto>0:devel/evdev-proto \ wayland-protocols>=1.25:graphics/wayland-protocols \ wlroots>=0.16.0.654<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_GITHUB= yes USE_GL= egl opengl USE_GNOME= cairo pango USE_XORG= pixman GH_ACCOUNT= hyprwm GH_PROJECT= Hyprland GH_TUPLE= hyprwm:hyprland-protocols:4d29e48:hyprland_protocols/subprojects/hyprland-protocols \ canihavesomecoffee:udis86:1.7.2-186-g5336633:udis86/subprojects/udis86 MESON_ARGS= -Dsystemd=disabled OPTIONS_DEFINE= X11 OPTIONS_DEFAULT=X11 X11_USE= XORG=xcb X11_MESON_ENABLED= xwayland post-extract: .if defined(PATCHFILES) && ${PATCHFILES:M147e96237006*} # Pretend to be a regular file for vendor patch to apply as is @${RMDIR} ${WRKSRC}/subprojects/wlroots @${ECHO_CMD} "Subproject commit 6668c822b3bf58ca5af5d370ef03b075be3e4d27" \ >${WRKSRC}/subprojects/wlroots .endif 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/d" \ -e "/GIT_DIRTY/s/run_command.*/'portbld'/" \ -e "/version.*jq/s/run_command.*/'${DISTVERSIONFULL}',/" \ ${WRKSRC}/meson.build # Respect PREFIX for wallpapers @${REINPLACE_CMD} 's,/usr/share,${DATADIR:H},' \ ${WRKSRC}/src/render/OpenGL.cpp # Respect LOCALBASE for xdg-desktop-portal-hyprland installation @${REINPLACE_CMD} 's,/usr/share,${LOCALBASE}/share,g' \ ${WRKSRC}/src/Compositor.cpp .ifdef GH_TUPLE post-configure: @${REINPLACE_CMD} 's/meson install/& \ --skip-subprojects/' ${BUILD_WRKSRC}/build.ninja .endif post-install: # Plugin API installs all headers (no private vs. public) @(cd ${STAGEDIR}${PREFIX} && ${FIND} include/${PORTNAME} ! -type d) >>${TMPPLIST} # 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) USES+= llvm:min=16,build PATH:= ${LLVM_PREFIX}/bin:${PATH} # XXX _CMAKE_TOOLCHAIN_SUFFIX vs. devel/llvm* CC= clang${LLVM_VERSION} CXX= clang++${LLVM_VERSION} CPP= clang-cpp${LLVM_VERSION} 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 CXXFLAGS+= -nostdinc++ -isystem${WRKDIR}/libcxx_prefix/include/c++/v1 # Don't link against new libc++ as it's not necessary #LDFLAGS+= -nostdlib++ -L${WRKDIR}/libcxx_prefix/lib -l:libc++.a -lcxxrt pre-configure: bundled-libcxx bundled-libcxx: @${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} \ -DLIBCXX_INCLUDE_BENCHMARKS:BOOL=OFF \ -DCMAKE_INSTALL_PREFIX:PATH=${WRKDIR}/libcxx_prefix \ -B ${WRKDIR}/libcxx_build -S ${WRKSRC_libcxx}/libcxx @${DO_MAKE_BUILD:NDESTDIR*} install -C ${WRKDIR}/libcxx_build .endif .endif # exists(/usr/lib/libc++.so) .include "${.CURDIR:H:H}/x11-toolkits/wlroots-devel/override.mk" post-patch: wlroots-devel-patch wlroots-devel-patch: # Prefer headers (used by ) from wlroots-devel @${REINPLACE_CMD} -i .devel "/subdirs/s|''|'../wlroots-devel/include', &|" \ ${WRKSRC}/meson.build .include diff --git a/x11-wm/hyprland/files/patch-wlroots-0.17 b/x11-wm/hyprland/files/patch-wlroots-0.17 index 823cf84594f1..53bc2554205b 100644 --- a/x11-wm/hyprland/files/patch-wlroots-0.17 +++ b/x11-wm/hyprland/files/patch-wlroots-0.17 @@ -1,147 +1,147 @@ Apply https://github.com/swaywm/sway/commit/6f1a3b6652b9 ../src/Compositor.cpp:461:5: error: use of undeclared identifier 'wlr_xcursor_manager_set_cursor_image'; did you mean 'wlr_xcursor_manager_get_xcursor'? wlr_xcursor_manager_set_cursor_image(m_sWLRXCursorMgr, "left_ptr", m_sWLRCursor); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/render/Renderer.cpp:1898:17: error: use of undeclared identifier 'wlr_xcursor_manager_set_cursor_image'; did you mean 'wlr_xcursor_manager_get_xcursor'? wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, "left_ptr", g_pCompositor->m_sWLRCursor); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/managers/input/InputManager.cpp:295:21: error: use of undeclared identifier 'wlr_xcursor_manager_set_cursor_image'; did you mean 'wlr_xcursor_manager_get_xcursor'? wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, "crosshair", g_pCompositor->m_sWLRCursor); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/managers/input/InputManager.cpp:297:21: error: use of undeclared identifier 'wlr_xcursor_manager_set_cursor_image'; did you mean 'wlr_xcursor_manager_get_xcursor'? wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, "left_ptr", g_pCompositor->m_sWLRCursor); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/managers/input/InputManager.cpp:470:9: error: use of undeclared identifier 'wlr_xcursor_manager_set_cursor_image'; did you mean 'wlr_xcursor_manager_get_xcursor'? wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, "crosshair", g_pCompositor->m_sWLRCursor); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/managers/input/InputManager.cpp:496:13: error: use of undeclared identifier 'wlr_xcursor_manager_set_cursor_image'; did you mean 'wlr_xcursor_manager_get_xcursor'? wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, "left_ptr", g_pCompositor->m_sWLRCursor); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/managers/input/InputManager.cpp:508:13: error: use of undeclared identifier 'wlr_xcursor_manager_set_cursor_image'; did you mean 'wlr_xcursor_manager_get_xcursor'? wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, "crosshair", g_pCompositor->m_sWLRCursor); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/managers/input/InputManager.cpp:1431:5: error: use of undeclared identifier 'wlr_xcursor_manager_set_cursor_image'; did you mean 'wlr_xcursor_manager_get_xcursor'? wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, name.c_str(), g_pCompositor->m_sWLRCursor); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/managers/input/InputManager.cpp:1441:9: error: use of undeclared identifier 'wlr_xcursor_manager_set_cursor_image'; did you mean 'wlr_xcursor_manager_get_xcursor'? wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, "left_ptr", g_pCompositor->m_sWLRCursor); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Apply https://github.com/swaywm/sway/commit/91079079690c ../src/render/Renderer.cpp:60:9: error: use of undeclared identifier 'wlr_presentation_surface_sampled_on_output'; did you mean 'wlr_presentation_surface_textured_on_output'? wlr_presentation_surface_sampled_on_output(g_pCompositor->m_sWLRPresentation, surface, RDATA->pMonitor->output); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/render/Renderer.cpp:780:5: error: use of undeclared identifier 'wlr_presentation_surface_sampled_on_output'; did you mean 'wlr_presentation_surface_textured_on_output'? wlr_presentation_surface_sampled_on_output(g_pCompositor->m_sWLRPresentation, PSURFACE, pMonitor->output); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- src/Compositor.cpp.orig 2023-07-11 02:50:09 UTC +++ src/Compositor.cpp @@ -458,7 +458,7 @@ void CCompositor::startCompositor() { throw std::runtime_error("The backend could not start!"); } - wlr_xcursor_manager_set_cursor_image(m_sWLRXCursorMgr, "left_ptr", m_sWLRCursor); + wlr_cursor_set_xcursor(m_sWLRCursor, m_sWLRXCursorMgr, "left_ptr"); #ifdef USES_SYSTEMD if (sd_booted() > 0) --- src/managers/input/InputManager.cpp.orig 2023-05-29 17:17:38 UTC +++ src/managers/input/InputManager.cpp @@ -292,9 +292,9 @@ void CInputManager::mouseMoveUnified(uint32_t time, bo if (g_pHyprRenderer->m_bHasARenderedCursor) { // TODO: maybe wrap? if (m_ecbClickBehavior == CLICKMODE_KILL) - wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, "crosshair", g_pCompositor->m_sWLRCursor); + wlr_cursor_set_xcursor(g_pCompositor->m_sWLRCursor, g_pCompositor->m_sWLRXCursorMgr, "crosshair"); else - wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, "left_ptr", g_pCompositor->m_sWLRCursor); + wlr_cursor_set_xcursor(g_pCompositor->m_sWLRCursor, g_pCompositor->m_sWLRXCursorMgr, "left_ptr"); } m_bEmptyFocusCursorSet = true; @@ -361,7 +361,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bo // if (!m_bCursorImageOverridden) { // if (!VECINRECT(m_vLastCursorPosFloored, pFoundWindow->m_vRealPosition.vec().x, pFoundWindow->m_vRealPosition.vec().y, // pFoundWindow->m_vRealPosition.vec().x + pFoundWindow->m_vRealSize.vec().x, pFoundWindow->m_vRealPosition.vec().y + pFoundWindow->m_vRealSize.vec().y)) { - // wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, "left_ptr", g_pCompositor->m_sWLRCursor); + // wlr_cursor_set_xcursor(g_pCompositor->m_sWLRCursor, g_pCompositor->m_sWLRXCursorMgr, "left_ptr"); // cursorSurfaceInfo.bUsed = false; // } else if (!cursorSurfaceInfo.bUsed) { // cursorSurfaceInfo.bUsed = true; @@ -467,7 +467,7 @@ void CInputManager::processMouseRequest(wlr_seat_point } if (m_ecbClickBehavior == CLICKMODE_KILL) { - wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, "crosshair", g_pCompositor->m_sWLRCursor); + wlr_cursor_set_xcursor(g_pCompositor->m_sWLRCursor, g_pCompositor->m_sWLRXCursorMgr, "crosshair"); return; } @@ -493,7 +493,7 @@ void CInputManager::setClickMode(eClickBehaviorMode mo case CLICKMODE_DEFAULT: Debug::log(LOG, "SetClickMode: DEFAULT"); m_ecbClickBehavior = CLICKMODE_DEFAULT; - wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, "left_ptr", g_pCompositor->m_sWLRCursor); + wlr_cursor_set_xcursor(g_pCompositor->m_sWLRCursor, g_pCompositor->m_sWLRXCursorMgr, "left_ptr"); break; case CLICKMODE_KILL: @@ -505,7 +505,7 @@ void CInputManager::setClickMode(eClickBehaviorMode mo refocus(); // set cursor - wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, "crosshair", g_pCompositor->m_sWLRCursor); + wlr_cursor_set_xcursor(g_pCompositor->m_sWLRCursor, g_pCompositor->m_sWLRXCursorMgr, "crosshair"); break; default: break; } @@ -1428,7 +1428,7 @@ void CInputManager::setCursorImageUntilUnset(std::stri } void CInputManager::setCursorImageUntilUnset(std::string name) { - wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, name.c_str(), g_pCompositor->m_sWLRCursor); + wlr_cursor_set_xcursor(g_pCompositor->m_sWLRCursor, g_pCompositor->m_sWLRXCursorMgr, name.c_str()); m_bCursorImageOverridden = true; } @@ -1438,7 +1438,7 @@ void CInputManager::unsetCursorImage() { m_bCursorImageOverridden = false; if (!g_pHyprRenderer->m_bWindowRequestedCursorHide) - wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, "left_ptr", g_pCompositor->m_sWLRCursor); + wlr_cursor_set_xcursor(g_pCompositor->m_sWLRCursor, g_pCompositor->m_sWLRXCursorMgr, "left_ptr"); } std::string CInputManager::deviceNameToInternalString(std::string in) { --- src/render/Renderer.cpp.orig 2023-07-11 02:50:09 UTC +++ src/render/Renderer.cpp @@ -57,7 +57,7 @@ void renderSurface(struct wlr_surface* surface, int x, if (!g_pHyprRenderer->m_bBlockSurfaceFeedback) { wlr_surface_send_frame_done(surface, RDATA->when); - wlr_presentation_surface_sampled_on_output(g_pCompositor->m_sWLRPresentation, surface, RDATA->pMonitor->output); -+ wlr_presentation_surface_scanned_out_on_output(g_pCompositor->m_sWLRPresentation, surface, RDATA->pMonitor->output); ++ wlr_presentation_surface_textured_on_output(g_pCompositor->m_sWLRPresentation, surface, RDATA->pMonitor->output); } // reset the UV, we might've set it above @@ -777,7 +777,7 @@ bool CHyprRenderer::attemptDirectScanout(CMonitor* pMo timespec now; clock_gettime(CLOCK_MONOTONIC, &now); wlr_surface_send_frame_done(PSURFACE, &now); - wlr_presentation_surface_sampled_on_output(g_pCompositor->m_sWLRPresentation, PSURFACE, pMonitor->output); + wlr_presentation_surface_scanned_out_on_output(g_pCompositor->m_sWLRPresentation, PSURFACE, pMonitor->output); if (wlr_output_commit(pMonitor->output)) { if (!m_pLastScanout) { @@ -1916,7 +1916,7 @@ void CHyprRenderer::ensureCursorRenderingMode() { m_bHasARenderedCursor = true; if (!m_bWindowRequestedCursorHide) - wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, "left_ptr", g_pCompositor->m_sWLRCursor); + wlr_cursor_set_xcursor(g_pCompositor->m_sWLRCursor, g_pCompositor->m_sWLRXCursorMgr, "left_ptr"); Debug::log(LOG, "Showing the cursor (timeout)");