pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

devel/rbenv: Add rbenv version 1.3.2



Module Name:	pkgsrc-wip
Committed By:	Frédéric Fauberteau <frederic%fauberteau.org@localhost>
Pushed By:	frederic
Date:		Thu Jun 12 21:57:25 2025 +0200
Changeset:	85a661f3b27493dd578eb34deb8d92c3598e4954

Added Files:
	rbenv/COMMIT_MSG
	rbenv/DESCR
	rbenv/Makefile
	rbenv/PLIST
	rbenv/distinfo
	rbenv/patches/patch-libexec_rbenv

Log Message:
devel/rbenv: Add rbenv version 1.3.2

Packaged in wip by Frédéric Fauberteau

rbenv is a version manager tool for the Ruby programming language on Unix-like
systems. It is useful for switching between multiple Ruby versions on the same
machine and for ensuring that each project you are working on always runs on
the correct Ruby version.

After rbenv injects itself into your PATH at installation time, any invocation
of `ruby`, `gem`, `bundler`, or other Ruby-related executable will first
activate rbenv. Then, rbenv scans the current project directory for a file
named `.ruby-version`. If found, that file determines the version of Ruby that
should be used within that directory. Finally, rbenv looks up that Ruby version
among those installed under `~/.rbenv/versions/`.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=85a661f3b27493dd578eb34deb8d92c3598e4954

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 rbenv/COMMIT_MSG                  | 15 +++++++++++
 rbenv/DESCR                       | 11 ++++++++
 rbenv/Makefile                    | 53 +++++++++++++++++++++++++++++++++++++++
 rbenv/PLIST                       | 31 +++++++++++++++++++++++
 rbenv/distinfo                    |  6 +++++
 rbenv/patches/patch-libexec_rbenv | 15 +++++++++++
 6 files changed, 131 insertions(+)

diffs:
diff --git a/rbenv/COMMIT_MSG b/rbenv/COMMIT_MSG
new file mode 100644
index 0000000000..9302df59b1
--- /dev/null
+++ b/rbenv/COMMIT_MSG
@@ -0,0 +1,15 @@
+devel/rbenv: Add rbenv version 1.3.2
+
+Packaged in wip by Frédéric Fauberteau
+
+rbenv is a version manager tool for the Ruby programming language on Unix-like
+systems. It is useful for switching between multiple Ruby versions on the same
+machine and for ensuring that each project you are working on always runs on
+the correct Ruby version.
+
+After rbenv injects itself into your PATH at installation time, any invocation
+of `ruby`, `gem`, `bundler`, or other Ruby-related executable will first
+activate rbenv. Then, rbenv scans the current project directory for a file
+named `.ruby-version`. If found, that file determines the version of Ruby that
+should be used within that directory. Finally, rbenv looks up that Ruby version
+among those installed under `~/.rbenv/versions/`.
diff --git a/rbenv/DESCR b/rbenv/DESCR
new file mode 100644
index 0000000000..a421f7ab91
--- /dev/null
+++ b/rbenv/DESCR
@@ -0,0 +1,11 @@
+rbenv is a version manager tool for the Ruby programming language on Unix-like
+systems. It is useful for switching between multiple Ruby versions on the same
+machine and for ensuring that each project you are working on always runs on
+the correct Ruby version.
+
+After rbenv injects itself into your PATH at installation time, any invocation
+of `ruby`, `gem`, `bundler`, or other Ruby-related executable will first
+activate rbenv. Then, rbenv scans the current project directory for a file
+named `.ruby-version`. If found, that file determines the version of Ruby that
+should be used within that directory. Finally, rbenv looks up that Ruby version
+among those installed under `~/.rbenv/versions/`.
diff --git a/rbenv/Makefile b/rbenv/Makefile
new file mode 100644
index 0000000000..196a2f3162
--- /dev/null
+++ b/rbenv/Makefile
@@ -0,0 +1,53 @@
+# $NetBSD$
+
+DISTNAME=	rbenv-1.3.2
+CATEGORIES=	devel
+MASTER_SITES=	${MASTER_SITE_GITHUB:=rbenv/}
+GITHUB_TAG=	v${PKGVERSION_NOREV}
+
+MAINTAINER=	triaxx%NetBSD.org@localhost
+HOMEPAGE=	https://rbenv.org/
+COMMENT=	Ruby version manager
+LICENSE=	mit
+
+NO_BUILD=	yes
+
+USE_TOOLS=	bash
+USE_LANGUAGES=	# none
+
+DEPENDS+=	ruby-build-[0-9]*:../../local/ruby-build
+
+REPLACE_BASH=	libexec/rbenv* rbenv.d/exec/gem-rehash.bash
+
+INSTALLATION_DIRS=	bin libexec/rbenv/hooks/exec/gem-rehash
+INSTALLATION_DIRS+=	share/bash-completion/completions ${PKGMANDIR}/man1
+
+OWN_DIRS+=	${PKG_SYSCONFDIR}/rbenv.d/exec
+OWN_DIRS+=	${PKG_SYSCONFDIR}/rbenv.d/exec/gem-rehash
+REQD_FILES+=	${PREFIX}/libexec/rbenv/hooks/exec/gem-rehash.bash \
+		${PKG_SYSCONFDIR}/rbenv.d/exec/gem-rehash.bash
+REQD_FILES+=	${PREFIX}/libexec/rbenv/hooks/exec/gem-rehash/rubygems_plugin.rb \
+		${PKG_SYSCONFDIR}/rbenv.d/exec/gem-rehash/rubygems_plugin.rb
+
+SUBST_CLASSES+=		paths
+SUBST_FILES.paths=	libexec/rbenv
+SUBST_MESSAGE.paths=	Fixing paths.
+SUBST_STAGE.paths=	pre-configure
+SUBST_VARS.paths=	PKG_SYSCONFDIR PREFIX
+
+do-install:
+	${RUN} ${INSTALL_DATA} ${WRKSRC}/rbenv.d/exec/gem-rehash.bash \
+		${DESTDIR}${PREFIX}/libexec/rbenv/hooks/exec/gem-rehash.bash
+	${RUN} ${INSTALL_DATA} ${WRKSRC}/rbenv.d/exec/gem-rehash/rubygems_plugin.rb \
+		${DESTDIR}${PREFIX}/libexec/rbenv/hooks/exec/gem-rehash/rubygems_plugin.rb
+	${RUN} ${INSTALL_DATA} ${WRKSRC}/completions/rbenv.bash \
+		${DESTDIR}${PREFIX}/share/bash-completion/completions/rbenv
+	${RUN} ${INSTALL_MAN} ${WRKSRC}/share/man/man1/rbenv.1 \
+		${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/rbenv.1
+	${RUN} cd ${WRKSRC} && cd libexec && ${FIND} . -type f ! -name "*.orig" | \
+		${XARGS} -I {} ${INSTALL_SCRIPT} {} \
+		${DESTDIR}${PREFIX}/libexec/rbenv/{}
+	${RUN} ${LN} -sf ${DESTDIR}${PREFIX}/libexec/rbenv/rbenv \
+		${DESTDIR}${PREFIX}/bin/rbenv
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/rbenv/PLIST b/rbenv/PLIST
new file mode 100644
index 0000000000..6bb4a0342f
--- /dev/null
+++ b/rbenv/PLIST
@@ -0,0 +1,31 @@
+@comment $NetBSD$
+bin/rbenv
+libexec/rbenv/hooks/exec/gem-rehash.bash
+libexec/rbenv/hooks/exec/gem-rehash/rubygems_plugin.rb
+libexec/rbenv/rbenv
+libexec/rbenv/rbenv---version
+libexec/rbenv/rbenv-commands
+libexec/rbenv/rbenv-completions
+libexec/rbenv/rbenv-exec
+libexec/rbenv/rbenv-global
+libexec/rbenv/rbenv-help
+libexec/rbenv/rbenv-hooks
+libexec/rbenv/rbenv-init
+libexec/rbenv/rbenv-local
+libexec/rbenv/rbenv-prefix
+libexec/rbenv/rbenv-rehash
+libexec/rbenv/rbenv-root
+libexec/rbenv/rbenv-sh-rehash
+libexec/rbenv/rbenv-sh-shell
+libexec/rbenv/rbenv-shims
+libexec/rbenv/rbenv-version
+libexec/rbenv/rbenv-version-file
+libexec/rbenv/rbenv-version-file-read
+libexec/rbenv/rbenv-version-file-write
+libexec/rbenv/rbenv-version-name
+libexec/rbenv/rbenv-version-origin
+libexec/rbenv/rbenv-versions
+libexec/rbenv/rbenv-whence
+libexec/rbenv/rbenv-which
+man/man1/rbenv.1
+share/bash-completion/completions/rbenv
diff --git a/rbenv/distinfo b/rbenv/distinfo
new file mode 100644
index 0000000000..990bc5354f
--- /dev/null
+++ b/rbenv/distinfo
@@ -0,0 +1,6 @@
+$NetBSD$
+
+BLAKE2s (rbenv-1.3.2.tar.gz) = da43da9717a8b4aabce9bc1e744a64257578bc8215aa424dbccd97e000cf9200
+SHA512 (rbenv-1.3.2.tar.gz) = cf687b4c7b096587dcc48cf265bf049460cf96a874a55c4eb811ddd8781d8962a95f4c7e3d20fd3bc7f2357cc8002a0b1b72658c897c7352c7ed06af17d69037
+Size (rbenv-1.3.2.tar.gz) = 31736 bytes
+SHA1 (patch-libexec_rbenv) = 8853772d0cde3f392d6ddb5cbe5d85f45423970d
diff --git a/rbenv/patches/patch-libexec_rbenv b/rbenv/patches/patch-libexec_rbenv
new file mode 100644
index 0000000000..b9be304b8c
--- /dev/null
+++ b/rbenv/patches/patch-libexec_rbenv
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Fix paths to comply with pkgsrc.
+
+--- libexec/rbenv.orig	2025-06-12 14:50:01.743883372 +0000
++++ libexec/rbenv
+@@ -82,7 +82,7 @@ if [ ! "${libexec_dir%/*}"/rbenv.d -ef "
+   # Add rbenv's own `rbenv.d` unless rbenv was cloned to RBENV_ROOT
+   RBENV_HOOK_PATH="${RBENV_HOOK_PATH}:${libexec_dir%/*}/rbenv.d"
+ fi
+-RBENV_HOOK_PATH="${RBENV_HOOK_PATH}:/usr/etc/rbenv.d:/usr/local/etc/rbenv.d:/etc/rbenv.d:/usr/lib/rbenv/hooks"
++RBENV_HOOK_PATH="${RBENV_HOOK_PATH}:@PKG_SYSCONFDIR@/rbenv.d:@PREFIX@/libexec/rbenv/hooks"
+ for plugin_hook in "${RBENV_ROOT}/plugins/"*/etc/rbenv.d; do
+   RBENV_HOOK_PATH="${RBENV_HOOK_PATH}:${plugin_hook}"
+ done


Home | Main Index | Thread Index | Old Index