diff options
Diffstat (limited to 'app-misc/rover/files/rover-1.0.1-install.patch')
-rw-r--r-- | app-misc/rover/files/rover-1.0.1-install.patch | 113 |
1 files changed, 113 insertions, 0 deletions
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 + |