From b99d094da26977938043a92f89ef882a70250cf8 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 9 Mar 2023 18:02:55 +0000 Subject: gentoo auto-resync : 09:03:2023 - 18:02:55 --- app-eselect/Manifest.gz | Bin 6535 -> 6533 bytes app-eselect/eselect-zig/Manifest | 4 +- app-eselect/eselect-zig/eselect-zig-1-r1.ebuild | 24 +++++ app-eselect/eselect-zig/eselect-zig-1.ebuild | 24 ----- app-eselect/eselect-zig/files/zig.eselect-1 | 132 ------------------------ app-eselect/eselect-zig/files/zig.eselect-1-r1 | 132 ++++++++++++++++++++++++ 6 files changed, 158 insertions(+), 158 deletions(-) create mode 100644 app-eselect/eselect-zig/eselect-zig-1-r1.ebuild delete mode 100644 app-eselect/eselect-zig/eselect-zig-1.ebuild delete mode 100644 app-eselect/eselect-zig/files/zig.eselect-1 create mode 100644 app-eselect/eselect-zig/files/zig.eselect-1-r1 (limited to 'app-eselect') diff --git a/app-eselect/Manifest.gz b/app-eselect/Manifest.gz index f8ba2b38f930..622b7be7a5a1 100644 Binary files a/app-eselect/Manifest.gz and b/app-eselect/Manifest.gz differ diff --git a/app-eselect/eselect-zig/Manifest b/app-eselect/eselect-zig/Manifest index 205f46fad026..8117b6387aee 100644 --- a/app-eselect/eselect-zig/Manifest +++ b/app-eselect/eselect-zig/Manifest @@ -1,3 +1,3 @@ -AUX zig.eselect-1 2860 BLAKE2B 2b873f3719f00c7ed9054329ccd26bf7f771c11f1258a04dee603992d76d0a4c3228e1088caa13996f23e9450cde9cfe7a0eaf57e882d7270f4ff124f1c4189e SHA512 c5b75d178010cbe0dec643f80f0348ff4b86893ae714f28387211a2e8ad5022220650dbb5eb2efeb039f924f7525c81325da26f7a201bf472622965a6097b9ef -EBUILD eselect-zig-1.ebuild 458 BLAKE2B 52a3d5a98860b863784de6d686fa420501c68b2e7816c0c9d7bbaa67817c942e3877583a04a8db552bfd2a4669f29471295e312eaf2be0e63851e0f245b27d0e SHA512 8281d834c396e9de3a813cf92e18c14beaa385ee36a2a64dfe748158fb809d2102a6439b112d9c2d7d45a6846fd02e4b567da54c61fc897d9594f0659b10b571 +AUX zig.eselect-1-r1 2861 BLAKE2B ed6a05f461307e166164f97a44b3532aec49088886fae01b6a79a79be6f0b27ca5cfe2b98122d808bf27ef8e34f01fb280d2f9f5946befad80824dfdd13bdbfd SHA512 1c0ec2ce2ef8e1740de7de38045dba5a91a63b91d4cb0ee72ba53c0c0262c8edbaac74d6ed32fc252d047e6eef25a37a7fcc1a730da47bd130a6f9cc25941fa9 +EBUILD eselect-zig-1-r1.ebuild 458 BLAKE2B 52a3d5a98860b863784de6d686fa420501c68b2e7816c0c9d7bbaa67817c942e3877583a04a8db552bfd2a4669f29471295e312eaf2be0e63851e0f245b27d0e SHA512 8281d834c396e9de3a813cf92e18c14beaa385ee36a2a64dfe748158fb809d2102a6439b112d9c2d7d45a6846fd02e4b567da54c61fc897d9594f0659b10b571 MISC metadata.xml 430 BLAKE2B 1babe1d0968ae0b34f660e07873f79457134f2f9684029903b8a8747710bfd1ac14642d4ad49851935a42787b6fba77926754ceb80d12a335943cc73e959971d SHA512 ccc634b9a183ea5012749759a510499b7cad1cc6b86e3c40bbda1428a9320949f8e04a15a862670d03ce17a85ce861ac45d497979ac047717106432fba19ec82 diff --git a/app-eselect/eselect-zig/eselect-zig-1-r1.ebuild b/app-eselect/eselect-zig/eselect-zig-1-r1.ebuild new file mode 100644 index 000000000000..6986fff09954 --- /dev/null +++ b/app-eselect/eselect-zig/eselect-zig-1-r1.ebuild @@ -0,0 +1,24 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Manages Zig versions" +HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86" + +RDEPEND=" + app-admin/eselect + !dev-lang/zig:0 + !dev-lang/zig-bin:0 +" + +S="${WORKDIR}" + +src_install() { + insinto /usr/share/eselect/modules/ + newins "${FILESDIR}"/zig.eselect-${PVR} zig.eselect +} diff --git a/app-eselect/eselect-zig/eselect-zig-1.ebuild b/app-eselect/eselect-zig/eselect-zig-1.ebuild deleted file mode 100644 index 6986fff09954..000000000000 --- a/app-eselect/eselect-zig/eselect-zig-1.ebuild +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DESCRIPTION="Manages Zig versions" -HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86" - -RDEPEND=" - app-admin/eselect - !dev-lang/zig:0 - !dev-lang/zig-bin:0 -" - -S="${WORKDIR}" - -src_install() { - insinto /usr/share/eselect/modules/ - newins "${FILESDIR}"/zig.eselect-${PVR} zig.eselect -} diff --git a/app-eselect/eselect-zig/files/zig.eselect-1 b/app-eselect/eselect-zig/files/zig.eselect-1 deleted file mode 100644 index 938a0d665226..000000000000 --- a/app-eselect/eselect-zig/files/zig.eselect-1 +++ /dev/null @@ -1,132 +0,0 @@ -# -*-eselect-*- vim: ft=eselect -# Copyright 2022-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -DESCRIPTION="Manage Zig versions" -MAINTAINER="bratishkaerik@getgoogleoff.me" - -show_selected_target() { - readlink "${EROOT}/usr/bin/zig" -} - -find_targets() { - for f in "${EROOT}"/usr/bin/zig-*; do - [[ -f "${f}" ]] && basename "${f}" - done -} - -remove_symlinks() { - rm "${EROOT}/usr/bin/zig" -} - -set_symlinks() { - local target=$1 - if is_number "${target}"; then - local targets=( $(find_targets) ) - target=${targets[target-1]} - fi - - [[ -z "${target}" || ! -f "${EROOT}/usr/bin/${target}" ]] \ - && die -q "Target \"$1\" doesn't appear to be valid!" - - ln -s "${target}" "${EROOT}/usr/bin/zig" -} - - - -### show action ### - -describe_show() { - echo "Show current Zig version" -} - -do_show() { - write_list_start "Current Zig version:" - if [[ -L "${EROOT}/usr/bin/zig" ]]; then - write_kv_list_entry "$(show_selected_target)" "" - else - write_kv_list_entry "(unset)" "" - fi -} - -### list action ### - -describe_list() { - echo "List available Zig versions" -} - -do_list() { - local targets=( $(find_targets) ) - local selected_target - selected_target=$(show_selected_target) - - write_list_start "Available Zig versions:" - for (( i = 0; i < ${#targets[@]}; i++ )); do - [[ ${targets[i]} == "${selected_target}" ]] && targets[i]=$(highlight_marker "${targets[i]}") - done - write_numbered_list -m "(none found)" "${targets[@]}" -} - - -### set action ### - -describe_set() { - echo "Set active Zig version" -} - -describe_set_parameters() { - echo "" -} - -describe_set_options() { - echo "target: Target name or number (from 'list' action)" -} - -do_set() { - [[ -z $1 ]] && die -q "You need to specify a target" - [[ $# -gt 1 ]] && die -q "Too many parameters" - test_usr_bin_writeable - - if [[ -L "${EROOT}/usr/bin/zig" ]]; then - remove_symlinks || die -q "Couldn't remove symlink" - fi - set_symlinks "$1" || die -q "Couldn't set a new symlink" -} - - -### update action ### - -describe_update() { - echo "Automatically update the zig symlink" -} - -describe_update_options() { - echo "ifunset: Do not override currently set version" -} - -do_update() { - [[ -z $1 || $1 == ifunset ]] || die -q "Usage error" - [[ $# -gt 1 ]] && die -q "Too many parameters" - test_usr_bin_writeable - - if [[ -L ${EROOT}/usr/bin/zig ]]; then - if [[ $1 == ifunset && -e ${EROOT}/usr/bin/zig ]]; then - return - fi - remove_symlink - elif [[ -e ${EROOT}/usr/bin/zig ]]; then - die -q "${EROOT}/usr/bin/zig exists but is not a symlink" - fi - - local targets=( $(find_targets) ) - if [[ ${#targets[@]} -gt 0 ]]; then - set_symlinks "${targets[${#targets[@]}-1]}" - fi -} - - -### helper functions ### - -test_usr_bin_writeable() { - [[ -w ${EROOT}/usr/bin ]] || die -q "${EROOT}/usr/bin not writeable by current user. Are you root?" -} diff --git a/app-eselect/eselect-zig/files/zig.eselect-1-r1 b/app-eselect/eselect-zig/files/zig.eselect-1-r1 new file mode 100644 index 000000000000..0918e68316eb --- /dev/null +++ b/app-eselect/eselect-zig/files/zig.eselect-1-r1 @@ -0,0 +1,132 @@ +# -*-eselect-*- vim: ft=eselect +# Copyright 2022-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +DESCRIPTION="Manage Zig versions" +MAINTAINER="bratishkaerik@getgoogleoff.me" + +show_selected_target() { + readlink "${EROOT}/usr/bin/zig" +} + +find_targets() { + for f in "${EROOT}"/usr/bin/zig-*; do + [[ -f "${f}" ]] && basename "${f}" + done +} + +remove_symlinks() { + rm "${EROOT}/usr/bin/zig" +} + +set_symlinks() { + local target=$1 + if is_number "${target}"; then + local targets=( $(find_targets) ) + target=${targets[target-1]} + fi + + [[ -z "${target}" || ! -f "${EROOT}/usr/bin/${target}" ]] \ + && die -q "Target \"$1\" doesn't appear to be valid!" + + ln -s "${target}" "${EROOT}/usr/bin/zig" +} + + + +### show action ### + +describe_show() { + echo "Show current Zig version" +} + +do_show() { + write_list_start "Current Zig version:" + if [[ -L "${EROOT}/usr/bin/zig" ]]; then + write_kv_list_entry "$(show_selected_target)" "" + else + write_kv_list_entry "(unset)" "" + fi +} + +### list action ### + +describe_list() { + echo "List available Zig versions" +} + +do_list() { + local targets=( $(find_targets) ) + local selected_target + selected_target=$(show_selected_target) + + write_list_start "Available Zig versions:" + for (( i = 0; i < ${#targets[@]}; i++ )); do + [[ ${targets[i]} == "${selected_target}" ]] && targets[i]=$(highlight_marker "${targets[i]}") + done + write_numbered_list -m "(none found)" "${targets[@]}" +} + + +### set action ### + +describe_set() { + echo "Set active Zig version" +} + +describe_set_parameters() { + echo "" +} + +describe_set_options() { + echo "target: Target name or number (from 'list' action)" +} + +do_set() { + [[ -z $1 ]] && die -q "You need to specify a target" + [[ $# -gt 1 ]] && die -q "Too many parameters" + test_usr_bin_writeable + + if [[ -L "${EROOT}/usr/bin/zig" ]]; then + remove_symlinks || die -q "Couldn't remove symlink" + fi + set_symlinks "$1" || die -q "Couldn't set a new symlink" +} + + +### update action ### + +describe_update() { + echo "Automatically update the zig symlink" +} + +describe_update_options() { + echo "ifunset: Do not override currently set version" +} + +do_update() { + [[ -z $1 || $1 == ifunset ]] || die -q "Usage error" + [[ $# -gt 1 ]] && die -q "Too many parameters" + test_usr_bin_writeable + + if [[ -L ${EROOT}/usr/bin/zig ]]; then + if [[ $1 == ifunset && -e ${EROOT}/usr/bin/zig ]]; then + return + fi + remove_symlinks + elif [[ -e ${EROOT}/usr/bin/zig ]]; then + die -q "${EROOT}/usr/bin/zig exists but is not a symlink" + fi + + local targets=( $(find_targets) ) + if [[ ${#targets[@]} -gt 0 ]]; then + set_symlinks "${targets[${#targets[@]}-1]}" + fi +} + + +### helper functions ### + +test_usr_bin_writeable() { + [[ -w ${EROOT}/usr/bin ]] || die -q "${EROOT}/usr/bin not writeable by current user. Are you root?" +} -- cgit v1.2.3