Github messages for voidlinux
 help / color / mirror / Atom feed
From: dataCobra <dataCobra@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] khal: update to 0.10.5.
Date: Thu, 11 Aug 2022 07:27:24 +0200	[thread overview]
Message-ID: <20220811052724.eytsYsdljfKjjnDqEZppMkbs0KCKhLFp_lUkDah7pqM@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-38583@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 695 bytes --]

There is an updated pull request by dataCobra against master on the void-packages repository

https://github.com/dataCobra/void-packages khal-update-10.5
https://github.com/void-linux/void-packages/pull/38583

khal: update to 0.10.5.
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl (crossbuild)

Since version 0.10.5 there is no longer a `__khal` file. This is why I deleted line 26.


A patch file from https://github.com/void-linux/void-packages/pull/38583.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-khal-update-10.5-38583.patch --]
[-- Type: text/x-diff, Size: 4966 bytes --]

From e498185356f69213897c9e03b4c27884dfa814cd Mon Sep 17 00:00:00 2001
From: dataCobra <datacobra@thinkbot.de>
Date: Thu, 11 Aug 2022 07:27:11 +0200
Subject: [PATCH] khal: update to 0.10.5.

---
 srcpkgs/khal/files/khal.bash | 29 +++++++++++++++++++++++++++++
 srcpkgs/khal/files/khal.fish | 22 ++++++++++++++++++++++
 srcpkgs/khal/files/khal.zsh  | 35 +++++++++++++++++++++++++++++++++++
 srcpkgs/khal/template        | 14 +++++++++-----
 4 files changed, 95 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/khal/files/khal.bash
 create mode 100644 srcpkgs/khal/files/khal.fish
 create mode 100644 srcpkgs/khal/files/khal.zsh

diff --git a/srcpkgs/khal/files/khal.bash b/srcpkgs/khal/files/khal.bash
new file mode 100644
index 000000000000..1a8fd294fdf9
--- /dev/null
+++ b/srcpkgs/khal/files/khal.bash
@@ -0,0 +1,29 @@
+_khal_completion() {
+    local IFS=$'\n'
+    local response
+
+    response=$(env COMP_WORDS="${COMP_WORDS[*]}" COMP_CWORD=$COMP_CWORD _KHAL_COMPLETE=bash_complete $1)
+
+    for completion in $response; do
+        IFS=',' read type value <<< "$completion"
+
+        if [[ $type == 'dir' ]]; then
+            COMPREPLY=()
+            compopt -o dirnames
+        elif [[ $type == 'file' ]]; then
+            COMPREPLY=()
+            compopt -o default
+        elif [[ $type == 'plain' ]]; then
+            COMPREPLY+=($value)
+        fi
+    done
+
+    return 0
+}
+
+_khal_completion_setup() {
+    complete -o nosort -F _khal_completion khal
+}
+
+_khal_completion_setup;
+
diff --git a/srcpkgs/khal/files/khal.fish b/srcpkgs/khal/files/khal.fish
new file mode 100644
index 000000000000..9c02b4052bb5
--- /dev/null
+++ b/srcpkgs/khal/files/khal.fish
@@ -0,0 +1,22 @@
+function _khal_completion;
+    set -l response;
+
+    for value in (env _KHAL_COMPLETE=fish_complete COMP_WORDS=(commandline -cp) COMP_CWORD=(commandline -t) khal);
+        set response $response $value;
+    end;
+
+    for completion in $response;
+        set -l metadata (string split "," $completion);
+
+        if test $metadata[1] = "dir";
+            __fish_complete_directories $metadata[2];
+        else if test $metadata[1] = "file";
+            __fish_complete_path $metadata[2];
+        else if test $metadata[1] = "plain";
+            echo $metadata[2];
+        end;
+    end;
+end;
+
+complete --no-files --command khal --arguments "(_khal_completion)";
+
diff --git a/srcpkgs/khal/files/khal.zsh b/srcpkgs/khal/files/khal.zsh
new file mode 100644
index 000000000000..21ce8b86c3b5
--- /dev/null
+++ b/srcpkgs/khal/files/khal.zsh
@@ -0,0 +1,35 @@
+#compdef khal
+
+_khal_completion() {
+    local -a completions
+    local -a completions_with_descriptions
+    local -a response
+    (( ! $+commands[khal] )) && return 1
+
+    response=("${(@f)$(env COMP_WORDS="${words[*]}" COMP_CWORD=$((CURRENT-1)) _KHAL_COMPLETE=zsh_complete khal)}")
+
+    for type key descr in ${response}; do
+        if [[ "$type" == "plain" ]]; then
+            if [[ "$descr" == "_" ]]; then
+                completions+=("$key")
+            else
+                completions_with_descriptions+=("$key":"$descr")
+            fi
+        elif [[ "$type" == "dir" ]]; then
+            _path_files -/
+        elif [[ "$type" == "file" ]]; then
+            _path_files -f
+        fi
+    done
+
+    if [ -n "$completions_with_descriptions" ]; then
+        _describe -V unsorted completions_with_descriptions -U
+    fi
+
+    if [ -n "$completions" ]; then
+        compadd -U -V unsorted -a completions
+    fi
+}
+
+compdef _khal_completion khal;
+
diff --git a/srcpkgs/khal/template b/srcpkgs/khal/template
index 91143e91002c..48e3de880a4b 100644
--- a/srcpkgs/khal/template
+++ b/srcpkgs/khal/template
@@ -1,7 +1,7 @@
 # Template file for 'khal'
 pkgname=khal
-version=0.10.4
-revision=2
+version=0.10.5
+revision=1
 build_style=python3-module
 hostmakedepends="python3-setuptools"
 depends="python3-setuptools python3-click python3-click-log python3-configobj
@@ -11,18 +11,22 @@ checkdepends="python3-pytest python3-freezegun vdirsyncer $depends"
 short_desc="Command-line calendar build around CalDAV"
 maintainer="Anachron <gith@cron.world>"
 license="MIT"
+changelog="https://raw.githubusercontent.com/pimutils/khal/master/CHANGELOG.rst"
 homepage="http://lostpackets.de/khal/"
 distfiles="${PYPI_SITE}/k/khal/khal-${version}.tar.gz"
-checksum=3fdb980a9a61c0206d7a82b16f77b408a4f341a2b866b9c9fcf6a641850d129f
-make_check=ci-skip
+checksum=4eefb7ac302a26d8606db392817587a4ed94c27a15bf2ea211614a464fcf0c76
+make_check=ci-skip # some tests fail when running as root
 
 pre_build() {
 	vsed -i setup.py \
 		-e '/setup_requires=/d' \
 		-e "s|use_scm_version=.*|version='${version}',|"
 }
+
 post_install() {
 	vlicense COPYING
-	vinstall misc/__khal 644 usr/share/zsh/site-functions
+	vcompletion "${FILESDIR}/khal.bash" bash
+	vcompletion "${FILESDIR}/khal.fish" fish
+	vcompletion "${FILESDIR}/khal.zsh" zsh
 	vsconf khal.conf.sample
 }

  parent reply	other threads:[~2022-08-11  5:27 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-10 16:40 [PR PATCH] " dataCobra
2022-08-10 17:10 ` dataCobra
2022-08-10 17:15 ` [PR PATCH] [Updated] " dataCobra
2022-08-10 17:16 ` dataCobra
2022-08-10 18:50 ` paper42
2022-08-10 18:51 ` paper42
2022-08-11  4:41 ` classabbyamp
2022-08-11  4:48 ` [PR PATCH] [Updated] " dataCobra
2022-08-11  4:54 ` dataCobra
2022-08-11  4:59 ` classabbyamp
2022-08-11  5:03 ` classabbyamp
2022-08-11  5:19 ` dataCobra
2022-08-11  5:25 ` dataCobra
2022-08-11  5:27 ` dataCobra [this message]
2022-08-11  5:29 ` [PR PATCH] [Updated] " dataCobra
2022-08-11  5:41 ` dataCobra
2022-08-11  5:41 ` dataCobra
2022-08-11  5:42 ` Anachron
2022-08-11  5:42 ` Anachron
2022-08-11  6:07 ` classabbyamp
2022-08-11  6:09 ` classabbyamp
2022-08-11  7:37 ` dataCobra
2022-08-11  7:37 ` [PR PATCH] [Updated] " dataCobra
2022-08-11  7:39 ` dataCobra
2022-08-11  7:39 ` dataCobra
2022-08-11  7:41 ` dataCobra
2022-08-11  7:50 ` dataCobra
2022-08-11  7:57 ` classabbyamp
2022-08-11  8:16 ` dataCobra
2022-08-11  8:41 ` dataCobra
2022-08-11  8:42 ` dataCobra
2022-08-11  8:43 ` Anachron
2022-08-11  8:43 ` [PR PATCH] [Updated] " dataCobra
2022-08-11  8:45 ` dataCobra
2022-08-11  8:46 ` dataCobra
2022-08-11  8:47 ` dataCobra
2022-08-11  9:03 ` dataCobra
2022-08-11  9:24 ` paper42
2022-08-11  9:31 ` [PR PATCH] [Updated] " dataCobra
2022-08-11  9:32 ` dataCobra
2022-08-11 16:18 ` dataCobra
2022-08-11 17:29 ` Anachron
2022-08-12  5:05 ` [PR PATCH] [Updated] " dataCobra
2022-08-12  5:22 ` dataCobra
2022-08-12  5:26 ` [PR PATCH] [Updated] " dataCobra
2022-08-12  5:30 ` dataCobra
2022-08-12  5:31 ` dataCobra
2022-08-12  6:17 ` [PR REVIEW] " classabbyamp
2022-08-12  6:17 ` classabbyamp
2022-08-12  6:17 ` classabbyamp
2022-08-12 12:07 ` [PR PATCH] [Updated] " dataCobra
2022-08-12 12:10 ` dataCobra
2022-08-12 12:13 ` dataCobra
2022-08-12 16:38 ` classabbyamp
2022-08-12 17:06 ` paper42
2022-08-12 18:43 ` [PR PATCH] [Updated] " dataCobra
2022-08-12 18:47 ` dataCobra
2022-08-12 21:44 ` classabbyamp
2022-08-12 21:45 ` classabbyamp
2022-08-12 21:45 ` classabbyamp
2022-08-13  5:56 ` [PR PATCH] [Updated] " dataCobra
2022-08-13  6:15 ` dataCobra
2022-08-13  6:23 ` [PR PATCH] [Merged]: " classabbyamp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220811052724.eytsYsdljfKjjnDqEZppMkbs0KCKhLFp_lUkDah7pqM@z \
    --to=datacobra@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).