pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel/asdf Add asdf, an extensible tool to manage each...
details: https://anonhg.NetBSD.org/pkgsrc/rev/ea956ae504f8
branches: trunk
changeset: 390692:ea956ae504f8
user: schmonz <schmonz%pkgsrc.org@localhost>
date: Tue Dec 27 16:11:00 2022 +0000
description:
Add asdf, an extensible tool to manage each of your project runtimes.
asdf is a CLI tool that can manage multiple language runtime versions on
a per-project basis. It is like `gvm`, `nvm`, `rbenv` & `pyenv` (and
more) all in one! Simply install your language's plugin!
Why use asdf?
- single CLI for multiple languages
- consistent commands to manage all your languages
- single global config keeping defaults in one place
- single `.tool-versions` config file per project
- support for existing config files `.node-version`, `.nvmrc`,
`.ruby-version` for easy migration
- automatically switches runtime versions as you traverse your directories
- simple plugin system to add support for your language of choice
- shell completion available for common shells (Bash, Zsh, Fish, Elvish)
diffstat:
devel/asdf/DESCR | 15 +++++
devel/asdf/Makefile | 66 +++++++++++++++++++++++
devel/asdf/PLIST | 46 ++++++++++++++++
devel/asdf/distinfo | 7 ++
devel/asdf/patches/patch-lib_commands_reshim.bash | 15 +++++
devel/asdf/patches/patch-lib_utils.bash | 15 +++++
6 files changed, 164 insertions(+), 0 deletions(-)
diffs (188 lines):
diff -r 59ea02178e82 -r ea956ae504f8 devel/asdf/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/asdf/DESCR Tue Dec 27 16:11:00 2022 +0000
@@ -0,0 +1,15 @@
+asdf is a CLI tool that can manage multiple language runtime versions on
+a per-project basis. It is like `gvm`, `nvm`, `rbenv` & `pyenv` (and
+more) all in one! Simply install your language's plugin!
+
+Why use asdf?
+
+- single CLI for multiple languages
+- consistent commands to manage all your languages
+- single global config keeping defaults in one place
+- single `.tool-versions` config file per project
+- support for existing config files `.node-version`, `.nvmrc`,
+ `.ruby-version` for easy migration
+- automatically switches runtime versions as you traverse your directories
+- simple plugin system to add support for your language of choice
+- shell completion available for common shells (Bash, Zsh, Fish, Elvish)
diff -r 59ea02178e82 -r ea956ae504f8 devel/asdf/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/asdf/Makefile Tue Dec 27 16:11:00 2022 +0000
@@ -0,0 +1,66 @@
+# $NetBSD: Makefile,v 1.1 2022/12/27 16:11:00 schmonz Exp $
+
+DISTNAME= asdf-0.11.0
+CATEGORIES= devel
+MASTER_SITES= ${MASTER_SITE_GITHUB:=asdf-vm/}
+GITHUB_TAG= v${PKGVERSION_NOREV}
+
+MAINTAINER= schmonz%NetBSD.org@localhost
+HOMEPAGE= https://asdf-vm.com/
+COMMENT= Manage each of your project runtimes with a single tool
+LICENSE= mit
+
+DEPENDS+= git-base-[0-9]*:../../devel/git-base
+
+USE_LANGUAGES= # none
+USE_TOOLS+= bash:run
+NO_BUILD= yes
+REPLACE_BASH= bin/asdf
+
+AUTO_MKDIRS= yes
+
+SUBST_CLASSES+= prefix
+SUBST_STAGE.prefix= do-configure
+SUBST_FILES.prefix= lib/utils.bash lib/commands/reshim.bash
+SUBST_VARS.prefix= PREFIX
+
+SUBST_CLASSES+= lib
+SUBST_STAGE.lib= do-configure
+SUBST_FILES.lib= bin/asdf lib/commands/*
+SUBST_SED.lib= -e 's|\$$(dirname "\$$(dirname "\$$0")")/lib|${PREFIX}/share/${PKGBASE}/lib|g'
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/bin/asdf \
+ ${DESTDIR}${PREFIX}/bin/
+ ${INSTALL_DATA} ${WRKSRC}/help.txt \
+ ${DESTDIR}${PREFIX}/share/${PKGBASE}/
+ ${INSTALL_DATA} ${WRKSRC}/version.txt \
+ ${DESTDIR}${PREFIX}/share/${PKGBASE}/
+ ${INSTALL_DATA} ${WRKSRC}/asdf.elv \
+ ${DESTDIR}${PREFIX}/share/${PKGBASE}/
+ ${INSTALL_DATA} ${WRKSRC}/asdf.fish \
+ ${DESTDIR}${PREFIX}/share/${PKGBASE}/
+ ${INSTALL_DATA} ${WRKSRC}/asdf.nu \
+ ${DESTDIR}${PREFIX}/share/${PKGBASE}/
+ ${INSTALL_DATA} ${WRKSRC}/asdf.sh \
+ ${DESTDIR}${PREFIX}/share/${PKGBASE}/
+ ${INSTALL_DATA} ${WRKSRC}/lib/asdf.fish \
+ ${DESTDIR}${PREFIX}/share/${PKGBASE}/lib/
+ ${INSTALL_DATA} ${WRKSRC}/lib/asdf.sh \
+ ${DESTDIR}${PREFIX}/share/${PKGBASE}/lib/
+ ${INSTALL_DATA} ${WRKSRC}/lib/utils.bash \
+ ${DESTDIR}${PREFIX}/share/${PKGBASE}/lib/
+ ${INSTALL_DATA} ${WRKSRC}/lib/commands/*.bash \
+ ${DESTDIR}${PREFIX}/share/${PKGBASE}/lib/commands/
+ ${INSTALL_DATA} ${WRKSRC}/lib/functions/*.bash \
+ ${DESTDIR}${PREFIX}/share/${PKGBASE}/lib/functions/
+ ${TOUCH} \
+ ${DESTDIR}${PREFIX}/share/${PKGBASE}/lib/asdf_updates_disabled
+ ${INSTALL_DATA} ${WRKSRC}/completions/asdf.bash \
+ ${DESTDIR}${PREFIX}/share/bash-completion/completions/asdf
+ ${INSTALL_DATA} ${WRKSRC}/completions/asdf.fish \
+ ${DESTDIR}${PREFIX}/share/fish/completions/
+ ${INSTALL_DATA} ${WRKSRC}/completions/_asdf \
+ ${DESTDIR}${PREFIX}/share/zsh/site-functions/
+
+.include "../../mk/bsd.pkg.mk"
diff -r 59ea02178e82 -r ea956ae504f8 devel/asdf/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/asdf/PLIST Tue Dec 27 16:11:00 2022 +0000
@@ -0,0 +1,46 @@
+@comment $NetBSD: PLIST,v 1.1 2022/12/27 16:11:00 schmonz Exp $
+bin/asdf
+share/asdf/asdf.elv
+share/asdf/asdf.fish
+share/asdf/asdf.nu
+share/asdf/asdf.sh
+share/asdf/help.txt
+share/asdf/lib/asdf.fish
+share/asdf/lib/asdf.sh
+share/asdf/lib/asdf_updates_disabled
+share/asdf/lib/commands/command-current.bash
+share/asdf/lib/commands/command-env.bash
+share/asdf/lib/commands/command-exec.bash
+share/asdf/lib/commands/command-export-shell-version.bash
+share/asdf/lib/commands/command-global.bash
+share/asdf/lib/commands/command-help.bash
+share/asdf/lib/commands/command-info.bash
+share/asdf/lib/commands/command-install.bash
+share/asdf/lib/commands/command-latest.bash
+share/asdf/lib/commands/command-list-all.bash
+share/asdf/lib/commands/command-list.bash
+share/asdf/lib/commands/command-local.bash
+share/asdf/lib/commands/command-plugin-add.bash
+share/asdf/lib/commands/command-plugin-list-all.bash
+share/asdf/lib/commands/command-plugin-list.bash
+share/asdf/lib/commands/command-plugin-push.bash
+share/asdf/lib/commands/command-plugin-remove.bash
+share/asdf/lib/commands/command-plugin-test.bash
+share/asdf/lib/commands/command-plugin-update.bash
+share/asdf/lib/commands/command-reshim.bash
+share/asdf/lib/commands/command-shim-versions.bash
+share/asdf/lib/commands/command-uninstall.bash
+share/asdf/lib/commands/command-update.bash
+share/asdf/lib/commands/command-version.bash
+share/asdf/lib/commands/command-where.bash
+share/asdf/lib/commands/command-which.bash
+share/asdf/lib/commands/reshim.bash
+share/asdf/lib/commands/version_commands.bash
+share/asdf/lib/functions/installs.bash
+share/asdf/lib/functions/plugins.bash
+share/asdf/lib/functions/versions.bash
+share/asdf/lib/utils.bash
+share/asdf/version.txt
+share/bash-completion/completions/asdf
+share/fish/completions/asdf.fish
+share/zsh/site-functions/_asdf
diff -r 59ea02178e82 -r ea956ae504f8 devel/asdf/distinfo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/asdf/distinfo Tue Dec 27 16:11:00 2022 +0000
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2022/12/27 16:11:00 schmonz Exp $
+
+BLAKE2s (asdf-0.11.0.tar.gz) = a811635ed0a8dbee262d932c38268aec9a546762a3d66535128fc275cfbd94a2
+SHA512 (asdf-0.11.0.tar.gz) = 1709d96038266557272f5b42403208d5fc2c5da99a3bf273abaee0668c8b3c2a32a253110c59f4af9f71eb8a6261ed0cd4f0749880a94d876f3a9ac5f71e1bc1
+Size (asdf-0.11.0.tar.gz) = 182784 bytes
+SHA1 (patch-lib_commands_reshim.bash) = 0a9927c33fb5a58f08e5dbaf15d4c41b0f3d5ec4
+SHA1 (patch-lib_utils.bash) = f6e3c3839d21ce21520cf0e9e8b98ab5cb678225
diff -r 59ea02178e82 -r ea956ae504f8 devel/asdf/patches/patch-lib_commands_reshim.bash
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/asdf/patches/patch-lib_commands_reshim.bash Tue Dec 27 16:11:00 2022 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-lib_commands_reshim.bash,v 1.1 2022/12/27 16:11:01 schmonz Exp $
+
+Use pkgsrc paths.
+
+--- lib/commands/reshim.bash.orig 2022-12-14 20:53:20.000000000 +0000
++++ lib/commands/reshim.bash
+@@ -97,7 +97,7 @@ write_shim_script() {
+ cat <<EOF >"$shim_path"
+ #!/usr/bin/env bash
+ # asdf-plugin: ${plugin_name} ${version}
+-exec $(asdf_dir)/bin/asdf exec "${executable_name}" "\$@" # asdf_allow: ' asdf '
++exec @PREFIX@/bin/asdf exec "${executable_name}" "\$@" # asdf_allow: ' asdf '
+ EOF
+ fi
+
diff -r 59ea02178e82 -r ea956ae504f8 devel/asdf/patches/patch-lib_utils.bash
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/asdf/patches/patch-lib_utils.bash Tue Dec 27 16:11:00 2022 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-lib_utils.bash,v 1.1 2022/12/27 16:11:01 schmonz Exp $
+
+Use pkgsrc paths.
+
+--- lib/utils.bash.orig 2022-12-14 20:53:20.000000000 +0000
++++ lib/utils.bash
+@@ -5,7 +5,7 @@ GREP_OPTIONS="--color=never"
+ # shellcheck disable=SC2034
+ GREP_COLORS=
+
+-ASDF_DIR=${ASDF_DIR:-''}
++ASDF_DIR=${ASDF_DIR:-'@PREFIX@/share/asdf'}
+ ASDF_DATA_DIR=${ASDF_DATA_DIR:-''}
+
+ asdf_version() {
Home |
Main Index |
Thread Index |
Old Index