Bug 177755 - [patch] devel/rbenv: fix rbenv-init completions
[patch] devel/rbenv: fix rbenv-init completions
Status: Closed FIXED
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s)
Latest
Any Any
: Normal Affects Only Me
Assigned To: jgh@FreeBSD.org
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-10 15:40 UTC by Geoff Garside
Modified: 2013-06-08 07:50 UTC (History)
0 users

See Also:


Attachments
file.diff (543 bytes, patch)
2013-04-10 15:40 UTC, Geoff Garside
no flags Details | Diff
patch.txt (601 bytes, text/plain; charset=us-ascii)
2013-04-11 22:22 UTC, fmb
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Geoff Garside 2013-04-10 15:40:00 UTC
When rbenv is installed into Bash with

    eval "$(rbenv init -)"

the following code is run

    source "/usr/local/libexec/../completions/rbenv.bash"

which will fail as the completions are in DATADIR/completions, the attached patch uses a post-patch to REINPLACE the "$root/completions" with the expanded DATADIR/completions path so that the correct completion file will be loaded.

Fix: Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer 2013-04-10 15:40:14 UTC
Maintainer of devel/rbenv,

Please note that PR ports/177755 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/177755

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 2 Edwin Groothuis freebsd_committer 2013-04-10 15:40:15 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 fmb 2013-04-11 22:22:58 UTC
Hi,

thanks for the patch. I updated it just a little bit.

-- 
fmb
Comment 4 Geoff Garside 2013-05-23 10:02:01 UTC
Could this be applied?

Geoff
Comment 5 dfilter freebsd_committer 2013-06-08 07:39:56 UTC
Author: jgh
Date: Sat Jun  8 06:39:45 2013
New Revision: 320237
URL: http://svnweb.freebsd.org/changeset/ports/320237

Log:
  - fix completions installations [1]
  - while here explictly name LICENSE_PERMS
  
  PR:		177755
  Submitted by:	freebsd@geoffgarside.co.uk [1], fmb@onibox.net (maintainer)
  Approved by:	maintainer

Modified:
  head/devel/rbenv/Makefile

Modified: head/devel/rbenv/Makefile
==============================================================================
--- head/devel/rbenv/Makefile	Sat Jun  8 06:31:04 2013	(r320236)
+++ head/devel/rbenv/Makefile	Sat Jun  8 06:39:45 2013	(r320237)
@@ -2,6 +2,7 @@
 
 PORTNAME=	rbenv
 PORTVERSION=	0.4.0
+PORTREVISION=	1
 CATEGORIES=	devel ruby
 MASTER_SITES=	GH
 
@@ -11,7 +12,7 @@ COMMENT=	Manage multiple versions of rub
 LICENSE=	RBENV
 LICENSE_NAME=	Sam Stephenson
 LICENSE_FILE=	${WRKSRC}/LICENSE
-LICENSE_PERMS=	${_LICENSE_PERMS_DEFAULT}
+LICENSE_PERMS=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
 
 RUN_DEPENDS=	bash:${PORTSDIR}/shells/bash
 
@@ -23,6 +24,11 @@ GH_TAGNAME=	v${PORTVERSION}
 
 NO_BUILD=	yes
 
+REINPLACE_ARGS=	-i ''
+
+post-patch:
+	@${REINPLACE_CMD} -e "s|\$$root/completions|${DATADIR}/completions|g" ${WRKSRC}/libexec/rbenv-init
+
 do-install:
 	@${INSTALL_SCRIPT} ${WRKSRC}/bin/ruby-local-exec ${PREFIX}/bin
 	@( cd ${WRKSRC}/libexec && ${COPYTREE_BIN} \* ${PREFIX}/libexec )
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 6 jgh@FreeBSD.org freebsd_committer 2013-06-08 07:40:55 UTC
Responsible Changed
From-To: freebsd-ports-bugs->jgh

Committed with minor changes. Thanks!
Comment 7 jgh@FreeBSD.org freebsd_committer 2013-06-08 07:42:06 UTC
State Changed
From-To: feedback->closed

Committed with minor changes. Thanks!