summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaphael Kubo da Costa <rakuco@FreeBSD.org>2016-01-27 10:30:42 +0000
committerRaphael Kubo da Costa <rakuco@FreeBSD.org>2016-01-27 10:30:42 +0000
commit57f7e97b8d70d30f9b685a33faf7be8b5bcf01a0 (patch)
tree4e0acae84ab1a7fe6581a9456ebb806090b0e915
parent- Update to 0.15.0 (diff)
Fix build on FreeBSD 9 and clean up.
- Add a small patch to fix the build on FreeBSD 9 and unmark it BROKEN there. - Drop patch-Makefile, everything that it was changed can be set via MAKE_ARGS instead. - Unconditionally install the bash-completion file and stop build-depending on shells/bash-completion: it is not needed at all, reptyr just installs a file into a bash-completion directory and does not actually need it for that. The BASH option was not even working before r407168 (see bug 206541). PR: 206539 Approved by: Andrey Cherkashin <andoriyu@gmail.com> (maintainer) MFH: 2016Q1
Notes
Notes: svn path=/head/; revision=407349
-rw-r--r--sysutils/reptyr/Makefile21
-rw-r--r--sysutils/reptyr/files/patch-Makefile32
-rw-r--r--sysutils/reptyr/files/patch-platform_freebsd_freebsd.c16
-rw-r--r--sysutils/reptyr/pkg-plist3
4 files changed, 21 insertions, 51 deletions
diff --git a/sysutils/reptyr/Makefile b/sysutils/reptyr/Makefile
index dd5bb6f1b12c..4533117c1d55 100644
--- a/sysutils/reptyr/Makefile
+++ b/sysutils/reptyr/Makefile
@@ -3,7 +3,7 @@
PORTNAME= reptyr
PORTVERSION= 0.6.3a
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= sysutils
MAINTAINER= andoriyu@gmail.com
@@ -15,26 +15,13 @@ USE_GITHUB= yes
GH_ACCOUNT= nelhage
GH_TAGNAME= 6fb15adb4552e170bcd5e648803da83dba57283b
+MAKE_ARGS= BASHCOMPDIR=${PREFIX}/share/bash-completion/completions \
+ MANDIR=${MANPREFIX}/man
USES= gmake
-OPTIONS_DEFINE= BASH
-OPTIONS_SUB= yes
-
ONLY_FOR_ARCHS= i386 amd64
-.include <bsd.port.pre.mk>
-.if ${PORT_OPTIONS:MBASH}
-BUILD_DEPENDS= ${LOCALBASE}/share/bash-completion/bash_completion:${PORTSDIR}/shells/bash-completion
-.endif
-
-BROKEN_FreeBSD_9= Not supported on FreeBSD older than 10.0
-
post-install:
-.if ${PORT_OPTIONS:MBASH}
- ${MKDIR} ${STAGEDIR}${PREFIX}/etc/bash_completion.d
- ${INSTALL_SCRIPT} ${WRKSRC}/reptyr.bash \
- ${STAGEDIR}${PREFIX}/etc/bash_completion.d/reptyr
-.endif
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/reptyr
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/sysutils/reptyr/files/patch-Makefile b/sysutils/reptyr/files/patch-Makefile
deleted file mode 100644
index 9d561161cdc7..000000000000
--- a/sysutils/reptyr/files/patch-Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
---- Makefile.orig 2015-06-05 21:41:48 UTC
-+++ Makefile
-@@ -14,7 +14,7 @@ endif
- # e.g. install to /usr with `make PREFIX=/usr`
- PREFIX=/usr/local
- BINDIR=$(PREFIX)/bin
--MANDIR=$(PREFIX)/share/man
-+MANDIR=$(PREFIX)/man
-
- PKG_CONFIG ?= pkg-config
-
-@@ -43,7 +43,7 @@ ptrace.o: ptrace.h platform/platform.h $
- clean:
- rm -f reptyr $(OBJS) test/victim.o test/victim
-
--BASHCOMPDIR ?= $(shell $(PKG_CONFIG) --variable=completionsdir bash-completion 2>/dev/null)
-+BASHCOMPDIR ?= $(PREFIX)/share/bash-completion/completions
-
- install: reptyr
- install -d -m 755 $(DESTDIR)$(BINDIR)
-@@ -52,9 +52,7 @@ install: reptyr
- install -m 644 reptyr.1 $(DESTDIR)$(MANDIR)/man1/reptyr.1
- install -d -m 755 $(DESTDIR)$(MANDIR)/fr/man1
- install -m 644 reptyr.fr.1 $(DESTDIR)$(MANDIR)/fr/man1/reptyr.1
-- bashcompdir=$(BASHCOMPDIR) ; \
-- test -z "$$bashcompdir" && bashcompdir=/etc/bash_completion.d ; \
-- install -d -m 755 $(DESTDIR)$$bashcompdir ; \
-- install -m 644 reptyr.bash $(DESTDIR)$$bashcompdir/reptyr
-+ install -d -m 755 $(DESTDIR)$(BASHCOMPDIR)
-+ install -m 644 reptyr.bash $(DESTDIR)$(BASHCOMPDIR)/reptyr
-
- .PHONY: PHONY
diff --git a/sysutils/reptyr/files/patch-platform_freebsd_freebsd.c b/sysutils/reptyr/files/patch-platform_freebsd_freebsd.c
new file mode 100644
index 000000000000..03b0aae508c5
--- /dev/null
+++ b/sysutils/reptyr/files/patch-platform_freebsd_freebsd.c
@@ -0,0 +1,16 @@
+Fix the build on FreeBSD 9:
+
+cc1: warnings being treated as errors
+platform/freebsd/freebsd.c: In function 'check_proc_stopped':
+platform/freebsd/freebsd.c:57: warning: 'state' may be used uninitialized in this function
+--- platform/freebsd/freebsd.c.orig 2015-06-05 21:41:48 UTC
++++ platform/freebsd/freebsd.c
+@@ -54,7 +54,7 @@ int check_pgroup(pid_t target) {
+ int check_proc_stopped(pid_t pid, int fd) {
+ struct procstat *procstat;
+ struct kinfo_proc *kp;
+- int state;
++ int state = 0;
+ unsigned int cnt;
+
+ procstat = procstat_open_sysctl();
diff --git a/sysutils/reptyr/pkg-plist b/sysutils/reptyr/pkg-plist
index a915cee8acab..ed1cb29a5328 100644
--- a/sysutils/reptyr/pkg-plist
+++ b/sysutils/reptyr/pkg-plist
@@ -1,5 +1,4 @@
-%%BASH%%etc/bash_completion.d/reptyr
-%%BASH%%share/bash-completion/completions/reptyr
bin/reptyr
man/fr/man1/reptyr.1.gz
man/man1/reptyr.1.gz
+share/bash-completion/completions/reptyr