2016-08-21 01:43:24 -04:00
|
|
|
# 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"
|
2017-02-05 18:36:10 -05:00
|
|
|
HOMEPAGE="https://austenwares.com/gitea/applications/slock"
|
2016-08-21 01:43:24 -04:00
|
|
|
if [[ ${PV} = 9999 ]]; then
|
2017-02-05 18:36:10 -05:00
|
|
|
EGIT_REPO_URI="https://austenwares.com/gitea/applications/${PN}"
|
2016-08-21 01:43:24 -04:00
|
|
|
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
|
|
|
|
}
|