commit:     cb6d3c717a87fabae248dab4a06416e20a5a7d26
Author:     Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Fri Sep 15 05:45:19 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Sep 24 22:07:29 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cb6d3c71

app-crypt/asekey: update EAPI 7 -> 8

Closes: https://bugs.gentoo.org/714222
Closes: https://bugs.gentoo.org/745291
Closes: https://bugs.gentoo.org/854237
Signed-off-by: Alfred Wingate <parona <AT> protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/32791
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-crypt/asekey/asekey-3.7-r1.ebuild              | 44 ++++++++++++++++++++++
 ...sekey-3.7-dont-call-toolchain-cc-directly.patch | 13 +++++++
 .../asekey/files/asekey-3.7-musl-ushort.patch      | 14 +++++++
 3 files changed, 71 insertions(+)

diff --git a/app-crypt/asekey/asekey-3.7-r1.ebuild 
b/app-crypt/asekey/asekey-3.7-r1.ebuild
new file mode 100644
index 000000000000..e6e750fd38e4
--- /dev/null
+++ b/app-crypt/asekey/asekey-3.7-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit udev
+
+DESCRIPTION="ASEKey USB SIM Card Reader"
+HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage";
+SRC_URI="https://dev.gentoo.org/~sam/distfiles/app-crypt/asekey/${P}.tar.bz2";
+
+LICENSE="BSD LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~riscv ~x86"
+
+RDEPEND="
+       sys-apps/pcsc-lite[udev]
+       virtual/libusb:0
+"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+       "${FILESDIR}/asekey-3.7-bundle.patch"
+       "${FILESDIR}/asekey-3.7-dont-call-toolchain-cc-directly.patch"
+       "${FILESDIR}/asekey-3.7-musl-ushort.patch"
+)
+
+src_prepare() {
+       default
+       sed -i -e 's/GROUP="pcscd"/ENV{PCSCD}="1"/' "92_pcscd_${PN}.rules" || 
die
+}
+
+src_configure() {
+       econf --with-udev-rules-dir="$(get_udevdir)/rules.d"
+}
+
+pkg_postinst() {
+       udev_reload
+}
+
+pkg_postrm() {
+       udev_reload
+}

diff --git 
a/app-crypt/asekey/files/asekey-3.7-dont-call-toolchain-cc-directly.patch 
b/app-crypt/asekey/files/asekey-3.7-dont-call-toolchain-cc-directly.patch
new file mode 100644
index 000000000000..ba51ff4dea9f
--- /dev/null
+++ b/app-crypt/asekey/files/asekey-3.7-dont-call-toolchain-cc-directly.patch
@@ -0,0 +1,13 @@
+https://bugs.gentoo.org/745291
+
+--- a/Makefile
++++ b/Makefile
+@@ -4,7 +4,7 @@
+ DRIVER_DIR=${DESTDIR}/${USBDROPDIR}/ifd-ASEKey.bundle
+ UDEV_DIR=${DESTDIR}/${UDEVDIR}
+ 
+-CC=${BUILD}-gcc
++CC?=gcc
+ 
+ SOURCES=usb.c atr.c DriverIO.c CommandTypes.c ReaderCommands.c T1Protocol.c 
MemoryCards.c InitCardParams.c ifdhandler.c
+ 

diff --git a/app-crypt/asekey/files/asekey-3.7-musl-ushort.patch 
b/app-crypt/asekey/files/asekey-3.7-musl-ushort.patch
new file mode 100644
index 000000000000..5893527eff8a
--- /dev/null
+++ b/app-crypt/asekey/files/asekey-3.7-musl-ushort.patch
@@ -0,0 +1,14 @@
+https://bugs.gentoo.org/714222
+
+Hack instead of fix because upstream is dead and the typedef is used 
extensively.
+
+--- a/Ase.h
++++ b/Ase.h
+@@ -24,6 +24,7 @@
+ #include "T1Protocol.h"
+ #include "MemoryCards.h"
+ 
++typedef unsigned short ushort;
+ 
+ //#define ASE_DEBUG
+ 

Reply via email to