55 lines
1.1 KiB
Bash
55 lines
1.1 KiB
Bash
# Copyright 1999-2016 Gentoo Foundation
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
# $Id$
|
|
|
|
EAPI=6
|
|
inherit fcaps savedconfig toolchain-funcs
|
|
|
|
if [[ ${PV} = 9999 ]]; then
|
|
inherit git-r3
|
|
fi
|
|
DESCRIPTION="simple X screen locker with DPMS support"
|
|
HOMEPAGE="https://austenwares.com/gitea/applications/slock"
|
|
if [[ ${PV} = 9999 ]]; then
|
|
EGIT_REPO_URI="https://austenwares.com/gitea/applications/${PN}"
|
|
EGIT_BOOTSTRAP=""
|
|
KEYWORDS=""
|
|
fi
|
|
|
|
LICENSE="MIT"
|
|
SLOT="0"
|
|
|
|
DEPEND="
|
|
x11-libs/libX11
|
|
x11-libs/libXext
|
|
x11-libs/libXrandr
|
|
"
|
|
RDEPEND="
|
|
${DEPEND}
|
|
x11-proto/randrproto
|
|
x11-proto/xproto
|
|
"
|
|
src_prepare() {
|
|
eapply_user
|
|
sed -i \
|
|
-e '/^CFLAGS/{s: -Os::g; s:= :+= :g}' \
|
|
-e '/^CC/d' \
|
|
-e '/^LDFLAGS/{s:-s::g; s:= :+= :g}' \
|
|
config.mk || die
|
|
sed -i \
|
|
-e 's|@s{CC}|$(CC)|g' \
|
|
Makefile || die
|
|
if use elibc_FreeBSD; then
|
|
sed -i -e 's/-DHAVE_SHADOW_H//' config.mk || die
|
|
fi
|
|
tc-export CC
|
|
}
|
|
src_compile() { emake slock; }
|
|
src_install() {
|
|
dobin slock
|
|
}
|
|
pkg_postinst() {
|
|
fcaps cap_dac_override,cap_sys_resource /usr/bin/slock
|
|
savedconfig_pkg_postinst
|
|
}
|