summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororbea <orbea@riseup.net>2022-09-23 21:41:22 -0700
committerSam James <sam@gentoo.org>2022-09-25 02:27:19 +0100
commit85a1ad79647a6e5592c5c59172ceed1a91ef1ea8 (patch)
tree0d80f856f313f293f79b16b02f3cd99aaaa065dd /x11-misc
parentapp-crypt/tpm2-tss-engine: Allow tests to compile under musl (diff)
downloadgentoo-85a1ad79647a6e5592c5c59172ceed1a91ef1ea8.tar.gz
gentoo-85a1ad79647a6e5592c5c59172ceed1a91ef1ea8.tar.bz2
gentoo-85a1ad79647a6e5592c5c59172ceed1a91ef1ea8.zip
x11-misc/xssstate: Don't hardcode /usr/lib
Bug: https://bugs.gentoo.org/732450 Closes: https://bugs.gentoo.org/732450 Upstream-Commit: https://git.suckless.org/xssstate/commit/5d8e9b49ce2970f786f1e5aa12bbaae83900453f.html Signed-off-by: orbea <orbea@riseup.net> Closes: https://github.com/gentoo/gentoo/pull/27419 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'x11-misc')
-rw-r--r--x11-misc/xssstate/files/xssstate-1.1-libdir.patch23
-rw-r--r--x11-misc/xssstate/xssstate-1.1-r1.ebuild42
2 files changed, 65 insertions, 0 deletions
diff --git a/x11-misc/xssstate/files/xssstate-1.1-libdir.patch b/x11-misc/xssstate/files/xssstate-1.1-libdir.patch
new file mode 100644
index 000000000000..cedde569f12b
--- /dev/null
+++ b/x11-misc/xssstate/files/xssstate-1.1-libdir.patch
@@ -0,0 +1,23 @@
+Bug: https://bugs.gentoo.org/732450
+Upstream-Commit: https://git.suckless.org/xssstate/commit/5d8e9b49ce2970f786f1e5aa12bbaae83900453f.html
+
+From: orbea <orbea@riseup.net>
+Date: Fri, 23 Sep 2022 21:17:01 -0700
+Subject: [PATCH] config.mk: Add LIBDIR
+
+--- a/config.mk
++++ b/config.mk
+@@ -5,11 +5,12 @@ VERSION = 1.1
+
+ # paths
+ PREFIX = /usr/local
++LIBDIR = ${PREFIX}/lib
+ MANPREFIX = ${PREFIX}/share/man
+
+ # includes and libs
+ INCS = -I. -I/usr/include
+-LIBS = -L/usr/lib -lc -lX11 -lXss
++LIBS = -L${LIBDIR} -lc -lX11 -lXss
+
+ # flags
+ CPPFLAGS = -DVERSION=\"${VERSION}\"
diff --git a/x11-misc/xssstate/xssstate-1.1-r1.ebuild b/x11-misc/xssstate/xssstate-1.1-r1.ebuild
new file mode 100644
index 000000000000..a28494199a22
--- /dev/null
+++ b/x11-misc/xssstate/xssstate-1.1-r1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="A simple tool to retrieve the X screensaver state"
+HOMEPAGE="https://tools.suckless.org/x/xssstate"
+SRC_URI="https://dl.suckless.org/tools/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
+
+RDEPEND="
+ x11-libs/libX11
+ x11-libs/libXScrnSaver
+"
+DEPEND="
+ ${RDEPEND}
+ x11-base/xorg-proto
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.0.20130103-gentoo.patch
+ "${FILESDIR}"/${PN}-1.1-libdir.patch #732450
+)
+
+src_compile() {
+ emake CC="$(tc-getCC)" LIBDIR="${EPREFIX}/usr/$(get_libdir)"
+}
+
+src_install() {
+ emake install \
+ DESTDIR="${D}" \
+ PREFIX="${EPREFIX}"/usr \
+ LIBDIR="${EPREFIX}/usr/$(get_libdir)"
+
+ dodoc README xsidle.sh
+ doman ${PN}.1
+}