summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--x11-misc/closest/closest-1.1.ebuild28
-rw-r--r--x11-misc/closest/closest-9999.ebuild36
-rw-r--r--x11-misc/closest/metadata.xml3
3 files changed, 27 insertions, 40 deletions
diff --git a/x11-misc/closest/closest-1.1.ebuild b/x11-misc/closest/closest-1.1.ebuild
index bafd51f..2629d49 100644
--- a/x11-misc/closest/closest-1.1.ebuild
+++ b/x11-misc/closest/closest-1.1.ebuild
@@ -8,9 +8,9 @@ if [[ ${PV} == *9999 ]]; then
 	EGIT_REPO_URI="https://github.com/phillbush/closest.git"
 fi
 
-inherit eutils ${SCM}
+inherit toolchain-funcs ${SCM}
 
-DESCRIPTION="focus the closest window in a given direction"
+DESCRIPTION="Focus the closest window in a given direction"
 HOMEPAGE="https://github.com/phillbush/closest"
 
 if [[ ${PV} == *9999 ]]; then
@@ -25,12 +25,32 @@ LICENSE="MIT"
 SLOT="0"
 IUSE=""
 
-DEPEND="x11-libs/libX11
+DEPEND="
+	x11-libs/libX11
 	x11-libs/libXinerama
 "
 RDEPEND="${DEPEND}"
 BDEPEND=""
 
+DOCS=( README.md )
+
+src_prepare() {
+	default
+
+	sed -e '/^CPPFLAGS/d' \
+		-e 's/^CFLAGS =/CFLAGS +=/g' \
+		-e 's/^LDFLAGS =/LDFLAGS +=/g' \
+		-i config.mk || die
+}
+
+src_compile() {
+	emake \
+		CC="$(tc-getCC)"
+}
+
 src_install() {
-	emake PREFIX= DESTDIR="${D}" MANPREFIX="/usr/share/man" install
+	emake install \
+		DESTDIR="${D}" \
+		PREFIX="${EPREFIX}/usr"
+	einstalldocs
 }
diff --git a/x11-misc/closest/closest-9999.ebuild b/x11-misc/closest/closest-9999.ebuild
deleted file mode 100644
index bafd51f..0000000
--- a/x11-misc/closest/closest-9999.ebuild
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright 2019-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-if [[ ${PV} == *9999 ]]; then
-	SCM="git-r3"
-	EGIT_REPO_URI="https://github.com/phillbush/closest.git"
-fi
-
-inherit eutils ${SCM}
-
-DESCRIPTION="focus the closest window in a given direction"
-HOMEPAGE="https://github.com/phillbush/closest"
-
-if [[ ${PV} == *9999 ]]; then
-	SRC_URI=""
-	KEYWORDS=""
-else
-	SRC_URI="https://github.com/phillbush/closest/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-	KEYWORDS="~amd64 ~x86"
-fi
-
-LICENSE="MIT"
-SLOT="0"
-IUSE=""
-
-DEPEND="x11-libs/libX11
-	x11-libs/libXinerama
-"
-RDEPEND="${DEPEND}"
-BDEPEND=""
-
-src_install() {
-	emake PREFIX= DESTDIR="${D}" MANPREFIX="/usr/share/man" install
-}
diff --git a/x11-misc/closest/metadata.xml b/x11-misc/closest/metadata.xml
index 7869e07..0aaf4f7 100644
--- a/x11-misc/closest/metadata.xml
+++ b/x11-misc/closest/metadata.xml
@@ -5,4 +5,7 @@
 		<email>azahi@teknik.io</email>
 		<name>azahi</name>
 	</maintainer>
+	<upstream>
+		<remote-id type="github">phillbush/closest</remote-id>
+	</upstream>
 </pkgmetadata>

Consider giving Nix/NixOS a try! <3