summary refs log tree commit diff
path: root/x11-misc/closest/closest-1.1.ebuild
diff options
context:
space:
mode:
authorAzat Bahawi <azahi@teknik.io>2020-11-24 00:02:45 +0300
committerAzat Bahawi <azahi@teknik.io>2020-11-24 00:02:52 +0300
commitf070ad186c55ae3de7df97d32cc65e7df5ef25bd (patch)
treef0beab6c565d0cb16e23258598f5c8da867a8e47 /x11-misc/closest/closest-1.1.ebuild
parentx11-apps/sxinit: Add package (diff)
x11-misc/closest: Update build, remove live
Upstream archived the package leaving only releases. Live build will be
removed.

Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: Azat Bahawi <azahi@teknik.io>
Diffstat (limited to '')
-rw-r--r--x11-misc/closest/closest-1.1.ebuild28
1 files changed, 24 insertions, 4 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
 }

Consider giving Nix/NixOS a try! <3