summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /x11-misc/slock
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'x11-misc/slock')
-rw-r--r--x11-misc/slock/Manifest1
-rw-r--r--x11-misc/slock/files/slock-1.2-dontdieonme.patch11
-rw-r--r--x11-misc/slock/metadata.xml9
-rw-r--r--x11-misc/slock/slock-1.2.ebuild57
4 files changed, 78 insertions, 0 deletions
diff --git a/x11-misc/slock/Manifest b/x11-misc/slock/Manifest
new file mode 100644
index 000000000000..3d81cb7ba2af
--- /dev/null
+++ b/x11-misc/slock/Manifest
@@ -0,0 +1 @@
+DIST slock-1.2.tar.gz 4853 SHA256 3402658f890a88da3f34db04fca1783ed549ade45c2ebb8d8f0cd2b549f633b3 SHA512 0e66c5451c72a5df391a61eefa6b1a1493705fc9c0b04d9db934a56c11852c284ecca8706f47ceb1d1c8cfc5241c818c6026afb30fc9cf3938e44ea282338bee WHIRLPOOL b24a0efaa4272520f05991a7370bdbf2e34c31c58b01b900e39f2398081e829461b62c43c322fd40f0debaa491c57f768a652055341b213cc98d88680923916d
diff --git a/x11-misc/slock/files/slock-1.2-dontdieonme.patch b/x11-misc/slock/files/slock-1.2-dontdieonme.patch
new file mode 100644
index 000000000000..e4d1b464597f
--- /dev/null
+++ b/x11-misc/slock/files/slock-1.2-dontdieonme.patch
@@ -0,0 +1,11 @@
+--- a/slock.c
++++ b/slock.c
+@@ -57,7 +57,7 @@
+ if (fd < 0 && errno == ENOENT)
+ return;
+ if (fd < 0 || write(fd, "-1000\n", 6) != 6 || close(fd) != 0)
+- die("cannot disable the out-of-memory killer for this process\n");
++ fprintf(stderr, "cannot disable the out-of-memory killer for this process\n");
+ }
+ #endif
+
diff --git a/x11-misc/slock/metadata.xml b/x11-misc/slock/metadata.xml
new file mode 100644
index 000000000000..68ea403e7ceb
--- /dev/null
+++ b/x11-misc/slock/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>desktop-misc</herd>
+<maintainer>
+ <email>jer@gentoo.org</email>
+</maintainer>
+<longdescription>simple X screen locker</longdescription>
+</pkgmetadata>
diff --git a/x11-misc/slock/slock-1.2.ebuild b/x11-misc/slock/slock-1.2.ebuild
new file mode 100644
index 000000000000..ae04a409d34e
--- /dev/null
+++ b/x11-misc/slock/slock-1.2.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils fcaps savedconfig toolchain-funcs
+
+DESCRIPTION="simple X screen locker"
+HOMEPAGE="http://tools.suckless.org/slock"
+SRC_URI="http://dl.suckless.org/tools/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 hppa x86 ~x86-fbsd"
+
+RDEPEND="
+ x11-libs/libX11
+ x11-libs/libXext
+"
+DEPEND="
+ ${RDEPEND}
+ x11-proto/xproto
+"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-dontdieonme.patch
+
+ 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|@${CC}|$(CC)|g' \
+ Makefile || die
+ if use elibc_FreeBSD; then
+ sed -i -e 's/-DHAVE_SHADOW_H//' config.mk || die
+ fi
+ restore_config config.h
+ tc-export CC
+}
+
+src_compile() { emake slock; }
+
+src_install() {
+ dobin slock
+ 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_sys_resource /usr/bin/slock
+
+ savedconfig_pkg_postinst
+}