1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-02-01 10:59:55 +00:00

Fix staging as non-root.

Submitted by:	Anton Yuzhaninov <citrin@citrin.ru>

While I'm here, convert bash selection to OPTIONS.
This commit is contained in:
Adam Weinberger 2013-12-20 20:00:54 +00:00
parent e1bf909131
commit a79001505e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=337087
2 changed files with 25 additions and 6 deletions

View File

@ -10,14 +10,12 @@ MASTER_SITES= http://bash-completion.alioth.debian.org/files/
MAINTAINER= adamw@FreeBSD.org
COMMENT= Programmable completion library for Bash
.if defined(WITH_BASH_DEVEL)
RUN_DEPENDS=bash:${PORTSDIR}/shells/bash-devel
.else
RUN_DEPENDS=bash:${PORTSDIR}/shells/bash
.endif
OPTIONS_DEFINE= BASH_DEVEL
BASH_DEVEL_DESC= Use shells/bash-devel instead of shells/bash
CONFLICTS= bash-completion-classic-[0-9]*
USE_AUTOTOOLS= aclocal automake
GNU_CONFIGURE= yes
USE_GMAKE= yes
@ -26,7 +24,15 @@ USE_BZIP2= yes
SUB_FILES= pkg-message
SUB_LIST+= RUNFILE=${DATADIR}/bash_completion.sh
post-patch:
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MBASH_DEVEL}
RUN_DEPENDS=bash:${PORTSDIR}/shells/bash-devel
.else
RUN_DEPENDS=bash:${PORTSDIR}/shells/bash
.endif
post-configure:
@${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|g; \
s|/etc/bash_completion|${PREFIX}&|g; \
s|/usr\(/sbin/postconf\)|${PREFIX}\1|g; \

View File

@ -0,0 +1,13 @@
--- Makefile.am.orig 2013-12-20 13:44:12.000000000 -0500
+++ Makefile.am 2013-12-20 13:44:17.000000000 -0500
@@ -20,8 +20,10 @@
.dir-locals.el
install-data-hook:
+ chmod 644 $(DESTDIR)$(pkgdatadir)/bash_completion
tmpfile=`mktemp $${TMPDIR:-/tmp}/bash_completion.XXXXXX` && \
sed -e 's|=/etc/bash_completion\.d|=$(compatdir)|' \
$(DESTDIR)$(pkgdatadir)/bash_completion > $$tmpfile && \
cat $$tmpfile > $(DESTDIR)$(pkgdatadir)/bash_completion && \
rm $$tmpfile
+ chmod 444 $(DESTDIR)$(pkgdatadir)/bash_completion