summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororbea <orbea@riseup.net>2022-05-03 10:01:32 -0700
committerSam James <sam@gentoo.org>2022-06-16 01:15:55 +0100
commit5ee6d7919ef71df03256b5315c0c65903357a83b (patch)
tree711ddc44131e949e4917ae6c146a436c76da5e03
parentmedia-sound/pulseaudio-daemon: drop premature pipewire[sound-server(+)] blocker (diff)
downloadgentoo-5ee6d7919ef71df03256b5315c0c65903357a83b.tar.gz
gentoo-5ee6d7919ef71df03256b5315c0c65903357a83b.tar.bz2
gentoo-5ee6d7919ef71df03256b5315c0c65903357a83b.zip
app-misc/rover: Added package
Signed-off-by: orbea <orbea@riseup.net> Closes: https://github.com/gentoo/gentoo/pull/25624 Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--app-misc/rover/Manifest1
-rw-r--r--app-misc/rover/files/rover-1.0.1-install.patch113
-rw-r--r--app-misc/rover/files/rover-1.0.1-ncurses.patch72
-rw-r--r--app-misc/rover/metadata.xml15
-rw-r--r--app-misc/rover/rover-1.0.1.ebuild37
-rw-r--r--app-misc/rover/rover-9999.ebuild32
6 files changed, 270 insertions, 0 deletions
diff --git a/app-misc/rover/Manifest b/app-misc/rover/Manifest
new file mode 100644
index 000000000000..ee77c1fa4a14
--- /dev/null
+++ b/app-misc/rover/Manifest
@@ -0,0 +1 @@
+DIST rover-1.0.1.tar.gz 18068 BLAKE2B 7d755cb46185093cc17b4186e98e4b3646d00c5ccc48e6f83056238be1b990ada2e2db5fc83bd22f401d347530dc3a3d6509fe8e58e2010cabdef87fe847ec77 SHA512 9cac075438fe923064b143650670915bfb8ddad852d58aab451d6ccc4ea1fca15d917834c5cf153e964a3a9cfca08ec0d5263e2516ed44f8c9e5555edd8836d4
diff --git a/app-misc/rover/files/rover-1.0.1-install.patch b/app-misc/rover/files/rover-1.0.1-install.patch
new file mode 100644
index 000000000000..c64473d4092b
--- /dev/null
+++ b/app-misc/rover/files/rover-1.0.1-install.patch
@@ -0,0 +1,113 @@
+Upstream-PR: https://github.com/lecram/rover/pull/40
+From bceeabdf443d5e03ac38a80a195383d3ef800ffa Mon Sep 17 00:00:00 2001
+From: orbea <orbea@riseup.net>
+Date: Tue, 3 May 2022 09:29:28 -0700
+Subject: [PATCH 1/3] build: Use standard install variables
+
+This removes DESTDIR from both BINDIR and MANDIR and adds it directly
+to the intall and uninstall rules.
+
+This also moves 'man1' directly to the rules as it should not be
+configurable by the user.
+
+And lastly this removes the non-standard and now useless MANPREFIX.
+---
+ Makefile | 19 +++++++++----------
+ 1 file changed, 9 insertions(+), 10 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 8fea662..43c90f4 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,8 +1,7 @@
+ LDLIBS=-lncursesw
+ PREFIX=/usr/local
+-MANPREFIX=$(PREFIX)/man
+-BINDIR=$(DESTDIR)$(PREFIX)/bin
+-MANDIR=$(DESTDIR)$(MANPREFIX)/man1
++BINDIR=$(PREFIX)/bin
++MANDIR=$(PREFIX)/man
+
+ all: rover
+
+@@ -10,15 +9,15 @@ rover: rover.c config.h
+ $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LDLIBS)
+
+ install: rover
+- rm -f $(BINDIR)/rover
+- mkdir -p $(BINDIR)
+- cp rover $(BINDIR)/rover
+- mkdir -p $(MANDIR)
+- cp rover.1 $(MANDIR)/rover.1
++ rm -f $(DESTDIR)$(BINDIR)/rover
++ mkdir -p $(DESTDIR)$(BINDIR)
++ cp rover $(DESTDIR)$(BINDIR)/rover
++ mkdir -p $(DESTDIR)$(MANDIR)/man1
++ cp rover.1 $(DESTDIR)$(MANDIR)/man1/rover.1
+
+ uninstall:
+- rm -f $(BINDIR)/rover
+- rm -f $(MANDIR)/rover.1
++ rm -f $(DESTDIR)$(BINDIR)/rover
++ rm -f $(DESTDIR)$(MANDIR)/man1/rover.1
+
+ clean:
+ rm -f rover
+
+From 91dfa8e9b37b1433ebc3210a06779fd5163c70fb Mon Sep 17 00:00:00 2001
+From: orbea <orbea@riseup.net>
+Date: Tue, 3 May 2022 10:13:19 -0700
+Subject: [PATCH 2/3] build: Explicitly set variables
+
+---
+ Makefile | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 43c90f4..b54fc88 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,7 +1,7 @@
+-LDLIBS=-lncursesw
+-PREFIX=/usr/local
+-BINDIR=$(PREFIX)/bin
+-MANDIR=$(PREFIX)/man
++LDLIBS := -lncursesw
++PREFIX ?= /usr/local
++BINDIR ?= $(PREFIX)/bin
++MANDIR ?= $(PREFIX)/man
+
+ all: rover
+
+
+From f0518c52fef6f0822dc553e261b37db8075ca07e Mon Sep 17 00:00:00 2001
+From: orbea <orbea@riseup.net>
+Date: Tue, 3 May 2022 09:29:58 -0700
+Subject: [PATCH 3/3] build: Use FHS and GNU paths for MANDIR
+
+The FHS path for MANDIR is /usr/share/man.
+
+https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s11.html#usrsharemanManualPages
+
+While GNU directory variables show MANDIR to be DATADIR/man
+
+https://www.gnu.org/prep/standards/html_node/Directory-Variables.html
+---
+ Makefile | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index b54fc88..291a7b3 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,7 +1,9 @@
+ LDLIBS := -lncursesw
+ PREFIX ?= /usr/local
+ BINDIR ?= $(PREFIX)/bin
+-MANDIR ?= $(PREFIX)/man
++DATAROOTDIR ?= $(PREFIX)/share
++DATADIR ?= $(DATAROOTDIR)
++MANDIR ?= $(DATADIR)/man
+
+ all: rover
+
diff --git a/app-misc/rover/files/rover-1.0.1-ncurses.patch b/app-misc/rover/files/rover-1.0.1-ncurses.patch
new file mode 100644
index 000000000000..52c64c76b29a
--- /dev/null
+++ b/app-misc/rover/files/rover-1.0.1-ncurses.patch
@@ -0,0 +1,72 @@
+Upstream-PR: https://github.com/lecram/rover/pull/41
+From 9e1f635a4c31d1621141dce51bb620365c784a0e Mon Sep 17 00:00:00 2001
+From: orbea <orbea@riseup.net>
+Date: Sat, 7 May 2022 08:41:22 -0700
+Subject: [PATCH 1/2] build: Use pkgconfig to fix undefined references
+
+On gentoo the build also requires -ltinfow which is exposed
+by the ncursesw.pc pkgconfig file.
+---
+ Makefile | 8 ++++++--
+ rover.c | 2 ++
+ 2 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 291a7b3..bbf376b 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,14 +1,18 @@
+-LDLIBS := -lncursesw
+ PREFIX ?= /usr/local
+ BINDIR ?= $(PREFIX)/bin
+ DATAROOTDIR ?= $(PREFIX)/share
+ DATADIR ?= $(DATAROOTDIR)
+ MANDIR ?= $(DATADIR)/man
+
++PKG_CONFIG ?= pkg-config
++
++CFLAGS_NCURSESW := `$(PKG_CONFIG) --cflags ncursesw`
++LIBS_NCURSESW := `$(PKG_CONFIG) --libs ncursesw`
++
+ all: rover
+
+ rover: rover.c config.h
+- $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LDLIBS)
++ $(CC) $(CFLAGS) $(CFLAGS_NCURSESW) -o $@ $< $(LDFLAGS) $(LIBS_NCURSESW)
+
+ install: rover
+ rm -f $(DESTDIR)$(BINDIR)/rover
+diff --git a/rover.c b/rover.c
+index eca6aeb..342aa48 100644
+--- a/rover.c
++++ b/rover.c
+@@ -1,4 +1,6 @@
++#ifndef _XOPEN_SOURCE
+ #define _XOPEN_SOURCE 700
++#endif
+ #define _XOPEN_SOURCE_EXTENDED
+ #define _FILE_OFFSET_BITS 64
+
+
+From 7b5983d9d90d8ec0ff6e846a7fc7126cddc1d808 Mon Sep 17 00:00:00 2001
+From: orbea <orbea@riseup.net>
+Date: Sat, 7 May 2022 08:49:07 -0700
+Subject: [PATCH 2/2] build: Add CFLAGS default
+
+---
+ Makefile | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/Makefile b/Makefile
+index bbf376b..c2890fe 100644
+--- a/Makefile
++++ b/Makefile
+@@ -4,6 +4,8 @@ DATAROOTDIR ?= $(PREFIX)/share
+ DATADIR ?= $(DATAROOTDIR)
+ MANDIR ?= $(DATADIR)/man
+
++CFLAGS ?= -O2
++
+ PKG_CONFIG ?= pkg-config
+
+ CFLAGS_NCURSESW := `$(PKG_CONFIG) --cflags ncursesw`
diff --git a/app-misc/rover/metadata.xml b/app-misc/rover/metadata.xml
new file mode 100644
index 000000000000..e0477390ef0d
--- /dev/null
+++ b/app-misc/rover/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>orbea@riseup.net</email>
+ <name>orbea</name>
+ </maintainer>
+ <maintainer type="person" proxied="proxy">
+ <email>sam@gentoo.org</email>
+ <name>Sam James</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">lecram/rover</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-misc/rover/rover-1.0.1.ebuild b/app-misc/rover/rover-1.0.1.ebuild
new file mode 100644
index 000000000000..ea3173754330
--- /dev/null
+++ b/app-misc/rover/rover-1.0.1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="simple file browser for the terminal"
+HOMEPAGE="https://lecram.github.io/p/rover/"
+if [[ "${PV}" == *9999 ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/lecram/${PN}.git"
+else
+ SRC_URI="https://github.com/lecram/${PN}/archive/v${PV}/${P}.tar.gz"
+ KEYWORDS="~amd64"
+fi
+
+LICENSE="public-domain"
+SLOT="0"
+
+DEPEND="sys-libs/ncurses:=[unicode(+)]"
+RDEPEND="${DEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}/${P}-install.patch"
+ "${FILESDIR}/${P}-ncurses.patch"
+)
+
+src_compile() {
+ emake CC="$(tc-getCC)" PKG_CONFIG="$(tc-getPKG_CONFIG)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX="${EPREFIX}"/usr install
+ dodoc README.md
+}
diff --git a/app-misc/rover/rover-9999.ebuild b/app-misc/rover/rover-9999.ebuild
new file mode 100644
index 000000000000..590a037551fe
--- /dev/null
+++ b/app-misc/rover/rover-9999.ebuild
@@ -0,0 +1,32 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="simple file browser for the terminal"
+HOMEPAGE="https://lecram.github.io/p/rover/"
+if [[ "${PV}" == *9999 ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/lecram/${PN}.git"
+else
+ SRC_URI="https://github.com/lecram/${PN}/archive/v${PV}/${P}.tar.gz"
+ KEYWORDS="~amd64"
+fi
+
+LICENSE="public-domain"
+SLOT="0"
+
+DEPEND="sys-libs/ncurses:=[unicode(+)]"
+RDEPEND="${DEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+src_compile() {
+ emake CC="$(tc-getCC)" PKG_CONFIG="$(tc-getPKG_CONFIG)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX="${EPREFIX}"/usr install
+ dodoc README.md
+}