diff --git a/x11-wm/hyprland/Makefile b/x11-wm/hyprland/Makefile index cc830a14d576..92d37c769483 100644 --- a/x11-wm/hyprland/Makefile +++ b/x11-wm/hyprland/Makefile @@ -1,124 +1,133 @@ PORTNAME= hyprland DISTVERSIONPREFIX= v -DISTVERSION= 0.38.1 -PORTREVISION= 1 +DISTVERSION= 0.39.0 CATEGORIES= x11-wm wayland +PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/ +PATCHFILES+= 2ea367839bf6.patch:-p1 # https://github.com/hyprwm/Hyprland/pull/5595 + 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 LIB_DEPENDS= libhyprlang.so:devel/hyprlang \ libtomlplusplus.so:devel/tomlplusplus \ libdrm.so:graphics/libdrm \ libwayland-server.so:graphics/wayland \ libwlroots.so:x11-toolkits/wlroots \ libhyprcursor.so:x11/hyprcursor \ 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:v0.2-4-g0c2ce70:hyprland_protocols/subprojects/hyprland-protocols \ canihavesomecoffee:udis86:1.7.2-186-g5336633:udis86/subprojects/udis86 MESON_ARGS= -Dsystemd=disabled # Generated by "make update-hash" for commit_pins in hyprpm.toml -GH_HASH= 360ede79d124ffdeebbe8401f1ac4bc0dbec2c91 +GH_HASH= e93fbd7c4f991cb8ef03e433ccc4d43587923e15 # XXX Drop after FreeBSD 14.0 EOL around 2025-03-01 .if exists(/usr/lib/libc++.so) && !exists(/usr/include/c++/v1/__format/write_escaped.h) CXXFLAGS+= -fexperimental-library .endif +# XXX Drop after FreeBSD 13.4 EOL around 2026-01-31 +# https://cgit.freebsd.org/src/commit/?id=af93fea71038 +.if !exists(/usr/include/sys/timerfd.h) +LIB_DEPENDS+= libepoll-shim.so:devel/libepoll-shim +.endif + 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 "/version.*jq/s/run_command.*/'${DISTVERSIONFULL}',/" \ ${WRKSRC}/meson.build @${REINPLACE_CMD} -i .nogit \ -e '/^HASH/s/=.*/=${GH_HASH}/' \ -e '/^BRANCH/s/=.*/=main/' \ -e '/^MESSAGE/s/=.*/="?"/' \ -e "/^DATE/s/=.*/=\"$$(date -ur $$(${AWK} \ '/TIMESTAMP/ { print $$3 }' ${DISTINFO_FILE}))\"/" \ -e '/^DIRTY/s/=.*/=portbld/' \ -e '/^TAG/s/=.*/=${DISTVERSIONFULL}/' \ + -e '/^COMMITS/s/=.*/="?"/' \ ${WRKSRC}/scripts/generateVersion.sh # Respect PREFIX for wallpapers @${REINPLACE_CMD} 's,/usr/share,${DATADIR:H},' \ ${WRKSRC}/src/render/OpenGL.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} update-hash: # https://docs.github.com/en/rest/commits/commits#get-a-commit # Pretend to be curl(1) for pretty-printed JSON to help parse with sed(1) @${REINPLACE_CMD} -i '' -e "/^GH_HASH=/s/=.*/= $$(\ ${SETENV} HTTP_USER_AGENT=curl ${FETCH_CMD} -qo- \ https://api.github.com/repos/${GH_ACCOUNT}/${GH_PROJECT}/commits/${GH_TAGNAME} | \ ${SED} -n '/sha/ { s/.*\"\([0-9a-f]\{40\}\).*/\1/p; q; }' \ )/" \ ${.CURDIR}/Makefile # XXX Drop after FreeBSD 13.2 EOL around 2024-07-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,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 CXXFLAGS+= -nostdinc++ -isystem${WRKDIR}/libcxx_prefix/include/c++/v1 # Don't link against new libc++ as it's not necessary CXXFLAGS+= -D_LIBCPP_HAS_NO_VERBOSE_ABORT_IN_LIBRARY #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 # XXX Work around !target(makesum) makesum: update-hash diff --git a/x11-wm/hyprland/distinfo b/x11-wm/hyprland/distinfo index d08429b31261..dd58b7216dbc 100644 --- a/x11-wm/hyprland/distinfo +++ b/x11-wm/hyprland/distinfo @@ -1,9 +1,11 @@ -TIMESTAMP = 1712413453 -SHA256 (hyprwm-Hyprland-v0.38.1_GH0.tar.gz) = e183eac80c940477a31d236a344939b18e51b0145295d6559a26b3c8084fd0f3 -SIZE (hyprwm-Hyprland-v0.38.1_GH0.tar.gz) = 47880233 +TIMESTAMP = 1713120508 +SHA256 (hyprwm-Hyprland-v0.39.0_GH0.tar.gz) = cf268af89b61a5d7a1535a6837997b43955da26b2dde9a71ff72a57dccefc470 +SIZE (hyprwm-Hyprland-v0.39.0_GH0.tar.gz) = 47898832 SHA256 (hyprwm-hyprland-protocols-v0.2-4-g0c2ce70_GH0.tar.gz) = d8eb9712d66a167a22a0dae829b6dba2b85814b566d0a87918c944e7c0388d1b SIZE (hyprwm-hyprland-protocols-v0.2-4-g0c2ce70_GH0.tar.gz) = 6478 SHA256 (canihavesomecoffee-udis86-1.7.2-186-g5336633_GH0.tar.gz) = 69aff959179ff6247b375b92e797221dbd8e078eabbf1366280b0532617e7fb8 SIZE (canihavesomecoffee-udis86-1.7.2-186-g5336633_GH0.tar.gz) = 116938 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 (2ea367839bf6.patch) = ca06b9d357e050c130e6195137a86c830e5eb0e66b392afe48a80ef85040df9a +SIZE (2ea367839bf6.patch) = 4269 diff --git a/x11-wm/hyprland/files/patch-system-wlroots b/x11-wm/hyprland/files/patch-system-wlroots index cdd4e4d97185..113ad5a4ad85 100644 --- a/x11-wm/hyprland/files/patch-system-wlroots +++ b/x11-wm/hyprland/files/patch-system-wlroots @@ -1,47 +1,47 @@ Allow system wlroots to reduce maintenance (wlroots has tons of options) ---- meson.build.orig 2023-09-22 23:07:52 UTC +--- meson.build.orig 2024-04-14 18:48:28 UTC +++ meson.build -@@ -39,8 +39,8 @@ add_project_arguments( - ], - language: 'cpp') +@@ -33,8 +33,8 @@ endif + add_project_arguments('-DHAS_EXECINFO', language: 'cpp') + endif --wlroots = subproject('wlroots', default_options: ['examples=false', 'renderers=gles2']) +-wlroots = subproject('wlroots-hyprland', default_options: ['examples=false', 'renderers=gles2']) -have_xwlr = wlroots.get_variable('features').get('xwayland') +wlroots = dependency('wlroots', version: ['>=0.18.0', '<0.19.0'], default_options: ['examples=false', 'renderers=gles2']) +have_xwlr = wlroots.get_variable(pkgconfig: 'have_xwayland', internal: 'have_xwayland') == 'true' xcb_dep = dependency('xcb', required: get_option('xwayland')) cmake = import('cmake') ---- src/meson.build.orig 2023-03-14 21:56:31 UTC +--- src/meson.build.orig 2024-04-14 18:48:28 UTC +++ src/meson.build -@@ -7,7 +7,7 @@ executable('Hyprland', src, +@@ -9,7 +9,7 @@ executable('Hyprland', src, server_protos, dependency('wayland-server'), dependency('wayland-client'), - wlroots.get_variable('wlroots'), + wlroots, dependency('cairo'), - dependency('libdrm'), - dependency('egl'), ---- hyprpm/src/core/PluginManager.cpp.orig 2024-02-05 01:59:02 UTC + dependency('hyprcursor'), + dependency('hyprlang', version: '>= 0.3.2'), +--- hyprpm/src/core/PluginManager.cpp.orig 2024-04-14 18:48:28 UTC +++ hyprpm/src/core/PluginManager.cpp -@@ -285,9 +285,6 @@ eHeadersErrors CPluginManager::headersValid() { +@@ -316,9 +316,6 @@ eHeadersErrors CPluginManager::headersValid() { eHeadersErrors CPluginManager::headersValid() { const auto HLVER = getHyprlandVersion(); - if (!std::filesystem::exists(DataState::getHeadersPath() + "/share/pkgconfig/hyprland.pc")) - return HEADERS_MISSING; - // find headers commit - std::string cmd = std::format("PKG_CONFIG_PATH=\"{}/share/pkgconfig\" pkg-config --cflags --keep-system-cflags hyprland", DataState::getHeadersPath()); + std::string cmd = std::format("PKG_CONFIG_PATH=\"{}/share/pkgconfig\" pkgconf --cflags --keep-system-cflags hyprland", DataState::getHeadersPath()); auto headers = execAndGet(cmd.c_str()); -@@ -307,7 +304,7 @@ eHeadersErrors CPluginManager::headersValid() { +@@ -338,7 +335,7 @@ eHeadersErrors CPluginManager::headersValid() { else headers = ""; -- if (PATH.ends_with("protocols") || PATH.ends_with("wlroots")) +- if (PATH.ends_with("protocols") || PATH.ends_with("wlroots-hyprland")) + if (PATH.ends_with("protocols") || PATH.contains("wlroots")) continue; verHeader = removeBeginEndSpacesTabs(PATH.substr(2)) + "/hyprland/src/version.h"; diff --git a/x11-wm/hyprland/pkg-plist b/x11-wm/hyprland/pkg-plist index 9587e6b1a9e8..a823e3cff4d8 100644 --- a/x11-wm/hyprland/pkg-plist +++ b/x11-wm/hyprland/pkg-plist @@ -1,12 +1,18 @@ bin/Hyprland bin/hyprctl bin/hyprpm +share/bash-completions/hyprctl +share/bash-completions/hyprpm +share/fish/vendor_completions.d/hyprctl.fish +share/fish/vendor_completions.d/hyprpm.fish %%DATADIR%%/hyprland.conf %%DATADIR%%/wall0.png %%DATADIR%%/wall1.png %%DATADIR%%/wall2.png share/man/man1/Hyprland.1.gz share/man/man1/hyprctl.1.gz share/pkgconfig/hyprland.pc share/wayland-sessions/hyprland.desktop share/xdg-desktop-portal/hyprland-portals.conf +share/zsh/site-functions/_hyprctl +share/zsh/site-functions/_hyprpm