x11-misc/slock: add 1.6

- CC related seds are no longer needed
- default src_compile phase works correctly
- install man page

Signed-off-by: Petr Vaněk <arkamar@gentoo.org>
This commit is contained in:
Petr Vaněk 2025-08-11 11:24:28 +02:00
parent 07fb5f859c
commit e1172acd37
No known key found for this signature in database
GPG Key ID: 351D91B6D7DF9E50
2 changed files with 60 additions and 0 deletions

View File

@ -1 +1,2 @@
DIST slock-1.5.tar.gz 6898 BLAKE2B f3435311b24c20fef656589f468b4cd6bbed30568459cb1d525b7dd5b57e5759ee287787d7506ad6cb922fd092bad504f38ab8c57b41deebec4f6aa554269a41 SHA512 2402b1e49f5dbe06cca2f3a31efedce6359413b240f2b98c57147483591a873c3c5457dbf6707485167002ff6d7ee0e9005d9fa506a51bf71337624e8728bb43
DIST slock-1.6.tar.gz 7187 BLAKE2B b13f71fff5d951de68167c840d6aa42badae33415988797e91a20113a841bc3582de827d7dc4608ac163b417a12f435862a6cb77a053bcde34d698d13249798b SHA512 3d8c4701c2db47804f48332a20fc5a58d615f2df0b559b6537cefe32eebedabd13328d060561ad402d16671bf73ada9ff831aa95cc65ed0ce5e3639488d8b2de

View File

@ -0,0 +1,59 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit fcaps savedconfig toolchain-funcs
DESCRIPTION="simple X display locker"
HOMEPAGE="https://tools.suckless.org/slock/"
SRC_URI="https://dl.suckless.org/tools/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~hppa ~ppc64 ~x86"
RDEPEND="
virtual/libcrypt:=
x11-libs/libX11
x11-libs/libXext
x11-libs/libXrandr
"
DEPEND="
${RDEPEND}
x11-base/xorg-proto
"
PATCHES=(
"${FILESDIR}"/slock-1.4-fix-link-paths.patch
)
src_prepare() {
default
sed -i \
-e '/^CFLAGS/{s: -Os::g; s:= :+= :g}' \
-e '/^LDFLAGS/{s:-s::g; s:= :+= :g}' \
config.mk || die
sed -i "s/VERSION/${PV}/g" slock.1
restore_config config.h
tc-export CC
}
src_install() {
dobin slock
doman slock.1
save_config config.h
}
pkg_postinst() {
# cap_dac_read_search used to be enough for shadow access
# but now slock wants to write to /proc/self/oom_score_adj
# and for that it needs:
fcaps \
cap_dac_override,cap_setgid,cap_setuid,cap_sys_resource \
/usr/bin/slock
savedconfig_pkg_postinst
}