commit:     4cf6c83449a84fa726e19ba15bf56592794de2f5
Author:     Adel KARA SLIMANE <adel.ks <AT> zegrapher <DOT> com>
AuthorDate: Tue Aug 15 17:28:31 2023 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Tue Aug 15 18:04:52 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=4cf6c834

kde-apps/kwalletcli: new package, add 3.03

Signed-off-by: Adel KARA SLIMANE <adel.ks <AT> zegrapher.com>

 kde-apps/kwalletcli/Manifest                       |  1 +
 .../files/pinentry-qt-interaction-3.03.patch       | 33 ++++++++++++++
 kde-apps/kwalletcli/kwalletcli-3.03.ebuild         | 52 ++++++++++++++++++++++
 kde-apps/kwalletcli/metadata.xml                   | 11 +++++
 4 files changed, 97 insertions(+)

diff --git a/kde-apps/kwalletcli/Manifest b/kde-apps/kwalletcli/Manifest
new file mode 100644
index 0000000000..aa54c82e77
--- /dev/null
+++ b/kde-apps/kwalletcli/Manifest
@@ -0,0 +1 @@
+DIST kwalletcli-3_03.tar.gz 64973 BLAKE2B 
f0c0bc8e031bbff2025eae46bc1392f3b18cfe6f79b25a92398e01a7317116e2323e32cd5678c1b4c91d5d7fbfe31db2e2eaba20eb8cb5629b9d92a84adef150
 SHA512 
799466dd98cb0d2b9ce66282ecbc972b70eaa8b2434ebe45d8c9f4f6cacd8940b44c4f86b9424587f26f5b69ef02e6e962df3fbbd09d9e10e44f3c969975c1bc

diff --git a/kde-apps/kwalletcli/files/pinentry-qt-interaction-3.03.patch 
b/kde-apps/kwalletcli/files/pinentry-qt-interaction-3.03.patch
new file mode 100644
index 0000000000..4166568244
--- /dev/null
+++ b/kde-apps/kwalletcli/files/pinentry-qt-interaction-3.03.patch
@@ -0,0 +1,33 @@
+From 38d7f23378bb6212b4975fc195af09743bb88199 Mon Sep 17 00:00:00 2001
+From: Naoaki Iwakiri <naok...@gmail.com>
+Date: Tue, 6 Aug 2019 21:40:15 +0900
+Subject: [PATCH] Wait the passcode skipping additional informations if any.
+
+This is a fix to use pinentry-kwallet with rather new pinentry-qt which tells 
whether the passcode is from input or a cached one before sending the actual 
passcode.
+It yet still ignores the 'allow-external-cache' option and try to store in 
kwallet always.
+---
+ pinentry-kwallet | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/pinentry-kwallet b/pinentry-kwallet
+index 11665d7..8768272 100644
+--- a/pinentry-kwallet
++++ b/pinentry-kwallet
+@@ -219,11 +219,12 @@ function getit {
+               io_s_out GETPIN
+               io_s_in resp
+               pw=
+-              #XXX normally, read until OK|ERR
+-              if [[ $resp = @(D )* ]]; then
+-                      pw=${resp#D }
+-                      io_s_in resp
+-              fi
++              while [[ $resp != @(OK|ERR)@(| *) ]]; do
++                  if [[ $resp = @(D )* ]]; then
++                          pw=${resp#D }
++                  fi
++            io_s_in resp
++        done
+               [[ $resp = OK@(| *) ]] && tw=1
+       fi
+       (( tw && !blst )) && if kwalletcli_getpin -q -b \

diff --git a/kde-apps/kwalletcli/kwalletcli-3.03.ebuild 
b/kde-apps/kwalletcli/kwalletcli-3.03.ebuild
new file mode 100644
index 0000000000..613be013f3
--- /dev/null
+++ b/kde-apps/kwalletcli/kwalletcli-3.03.ebuild
@@ -0,0 +1,52 @@
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic
+
+MY_PV="$(ver_cut 1)_$(ver_cut 2)"
+
+DESCRIPTION="CLI for the KDE Wallet"
+HOMEPAGE="http://www.mirbsd.org/kwalletcli.htm";
+SRC_URI="https://github.com/MirBSD/kwalletcli/archive/refs/tags/kwalletcli-$MY_PV.tar.gz";
+S="${WORKDIR}/${PN}-${PN}-${MY_PV}"
+
+LICENSE="MirOS"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="
+       dev-qt/qtcore:5
+       dev-qt/qtgui:5
+       kde-frameworks/kcoreaddons:5
+       kde-frameworks/ki18n:5
+       kde-frameworks/kwallet:5
+"
+
+PDEPEND="
+       app-shells/mksh
+"
+
+PATCHES=( "${FILESDIR}/pinentry-qt-interaction-${PV}.patch" )
+
+src_compile() {
+       append-flags "-fPIC"
+       append-ldflags "-fPIC"
+       emake KDE_VER=5
+}
+
+src_install() {
+       mkdir -p "${ED}/usr/bin" || die
+       mkdir -p "${ED}/usr/share/man/man1" || die
+       emake DESTDIR="${ED}" INSTALL_STRIP= install
+       einstalldocs
+}
+
+pkg_postinst() {
+       elog "To use pinentry-kwallet with GnuPG, add/change the line:"
+       elog "   pinentry-program /usr/bin/pinentry-kwallet"
+       elog "to ~/.gnupg/gpg-agent.conf"
+       elog "then restart your gnupg-agent with"
+       elog "   gpg-connect-agent reloadagent /bye"
+}

diff --git a/kde-apps/kwalletcli/metadata.xml b/kde-apps/kwalletcli/metadata.xml
new file mode 100644
index 0000000000..286388b4bb
--- /dev/null
+++ b/kde-apps/kwalletcli/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="person">
+               <name>Adel Kara Slimane</name>
+               <email>adel...@zegrapher.com</email>
+       </maintainer>
+       <upstream>
+               <remote-id type="github">MirBSD/kwalletcli</remote-id>
+       </upstream>
+</pkgmetadata>

Reply via email to