add gui-apps/hyprlock

This commit is contained in:
roku 2025-02-05 10:35:36 +01:00
parent 1660bb2f46
commit 9bc41b658c
3 changed files with 93 additions and 0 deletions

View file

@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c2dfd6c..96f34b0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,7 +15,6 @@ if(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES DEBUG)
message(STATUS "Configuring hyprlock in Debug with CMake")
add_compile_definitions(HYPRLAND_DEBUG)
else()
- add_compile_options(-O3)
message(STATUS "Configuring hyprlock in Release with CMake")
endif()

View file

@ -0,0 +1,37 @@
https://github.com/hyprwm/hyprlock/commit/023aff52ad45a3c55144c6bbda33395dfb9e9db0
https://bugs.gentoo.org/947781
Allow building on a system that lacks GLX support.
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.19)
+cmake_minimum_required(VERSION 3.27)
file(READ "${CMAKE_SOURCE_DIR}/VERSION" VER_RAW)
string(STRIP ${VER_RAW} VERSION)
@@ -37,7 +37,7 @@ message(STATUS "Checking deps...")
find_package(Threads REQUIRED)
find_package(PkgConfig REQUIRED)
-find_package(OpenGL REQUIRED)
+find_package(OpenGL REQUIRED COMPONENTS EGL GLES3)
pkg_check_modules(
deps
REQUIRED
@@ -47,7 +47,6 @@ pkg_check_modules(
wayland-egl
hyprlang>=0.4.0
egl
- opengl
xkbcommon
libjpeg
libwebp
@@ -63,7 +62,7 @@ pkg_check_modules(
file(GLOB_RECURSE SRCFILES CONFIGURE_DEPENDS "src/*.cpp")
add_executable(hyprlock ${SRCFILES})
target_link_libraries(hyprlock PRIVATE pam rt Threads::Threads PkgConfig::deps
- OpenGL::EGL OpenGL::GL)
+ OpenGL::EGL OpenGL::GLES3)
# protocols
find_program(WaylandScanner NAMES wayland-scanner)

View file

@ -0,0 +1,44 @@
# Copyright 2023-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake
DESCRIPTION="Hyprland's GPU-accelerated screen locking utility"
HOMEPAGE="https://github.com/hyprwm/hyprlock"
SRC_URI="https://github.com/hyprwm/${PN^}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64"
LICENSE="BSD"
SLOT="0"
RDEPEND="
dev-cpp/sdbus-c++:0/2
dev-libs/hyprgraphics
>=dev-libs/hyprlang-0.4.0
>=gui-libs/hyprutils-0.2.6:=
dev-libs/date
dev-libs/glib:2
dev-libs/wayland
media-libs/libglvnd
media-libs/libjpeg-turbo:=
media-libs/libwebp:=
media-libs/mesa[opengl]
sys-libs/pam
x11-libs/cairo
x11-libs/libxkbcommon
x11-libs/libdrm
x11-libs/pango
"
DEPEND="
${RDEPEND}
dev-libs/wayland-protocols
"
BDEPEND="
dev-util/wayland-scanner
>=dev-util/hyprwayland-scanner-0.4.4
virtual/pkgconfig
"