summaryrefslogtreecommitdiff
path: root/dev-libs/openct
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/openct')
-rw-r--r--dev-libs/openct/Manifest2
-rw-r--r--dev-libs/openct/files/openct-0.6.20-incompatible-pointers.patch26
-rw-r--r--dev-libs/openct/openct-0.6.20-r6.ebuild89
3 files changed, 117 insertions, 0 deletions
diff --git a/dev-libs/openct/Manifest b/dev-libs/openct/Manifest
index f33cde8a561d..e01252c5cad5 100644
--- a/dev-libs/openct/Manifest
+++ b/dev-libs/openct/Manifest
@@ -1,6 +1,8 @@
AUX openct-0.6.20-automake.patch 786 BLAKE2B f37d39bdbc0c1db10ec7058536d0d34ac3009e7ac2081f36ae9cea3f17f2d0558d50e2062fe60fb808df710887b290683374ada1c9301cb91480d67484008186 SHA512 baf7fae52aea4dae53ed1f3364eab207aeaa3cd2aad28b44dbf05f5632fa27530436a03748c285ed325360b6b62821c685cd0e05713db2f95a3177ba1b5749be
+AUX openct-0.6.20-incompatible-pointers.patch 958 BLAKE2B 7dc9faf725a61e3f8c1acc45c0856ba5e0a12b315ce7309b452b1cec4a17e27fafec64f77782c679e06c23b9ac5edf2618c854094fdb4a5672c7c4703a9da90b SHA512 cdefe0fdb637bc000ec82c103ef512c726d612fb9035af5e0469e6ea427b2961dd6c513daaf989c65d583613afd14fca40bae6aaf31cced35eb0d61e2e08a017
AUX openct-0.6.20-slibtool.patch 1353 BLAKE2B b8a5747258cb7d5ac8bacda87c9eaf2f177e202490c162594aec6559f13c65e562b887e6c8d056c1ce5ab247e80c51ca6610654e61b2c593e7b13e22e458b43a SHA512 34ab2345b44424d9868c95a9af862d03603647b824e1d84a1f35a8171249b2beba7fae9ae3a4d0468d9029cf6c748c02fb2032e30462640eb42ff08d3cdd3868
AUX openct.initd 502 BLAKE2B 5f583c50b138d9017aecbda25aeb74f09643ea461be3449c50c4ca61a0379c50bf22036cfe46ec3e606519ddd94a49add053da48f8987d5e6f2e790408ad48d5 SHA512 18cb14070252c3f1babe117d5f6fe91639b1bdb07fab953573ba143e5cc49b55964ae56427f0cc741fb3d90e54eb2eec863864a340229929ad5f2aab21723f23
DIST openct-0.6.20.tar.gz 702818 BLAKE2B 13637fa914394e1e553d750062535c879ba11c6587c42570e2bc92c4af9f732a9b0dfc06e2140f4965480363f8d65bc5831f905910d734c36034ccf1916ad302 SHA512 5175b418847200dbd4af0d8ab09546d94568639c67db67bdea93c68cb042c7ef901bb356784d6b1d9f4de914535eee5a450b39a15d1ab9a676ffce790a408a3e
EBUILD openct-0.6.20-r5.ebuild 1928 BLAKE2B fa0fa24fbca2411f1b7bc7025ab0c5105cd412b0898486950c0caf76b57db8fd0d02e380576d61469d5f490c8f3a8cb18bf59b70e9b29e015c803bb192179e8b SHA512 d2f1a1013771d3ae4e39b55bbc823f76a6a8e52e173d95b29232ee9cc72d15632c3fd1b95a76e453b8cf37b3cf4bc2bd44c4473c8f992d337e1bb673933c21f5
+EBUILD openct-0.6.20-r6.ebuild 2067 BLAKE2B 9d65c716bf559d3e28a29ce38e8cea6acf63491f3250e513a41d5a9eac68f60228885b452cc7e3da96fbb13afdc9a9da046771a4bbe11383bab4ea47f96edb06 SHA512 353a125d27b55707f7a33585ead0b42f7565d44242c71e4e9cf77ba8cf58b42a5877e1a65fa38ff17c6910fd47724ef863af24304e2f3643ef4c206f6510e8b5
MISC metadata.xml 560 BLAKE2B 255522c34b5e1d9bf69da73ff2ab70a1df6703acab0e703c752bf6d03312d2b58974b08aede380deed3250025a21592e99cbd399cab8813d943b091042d597f7 SHA512 6abe85fb17bca4935dc62b3f1a55e4c54f7bc39c5d8ab43fd7081b6e5bbe5690551a8a04a9824a541f70833d652d0c4958ba35df32ec91b33e0ffe775d3cb26f
diff --git a/dev-libs/openct/files/openct-0.6.20-incompatible-pointers.patch b/dev-libs/openct/files/openct-0.6.20-incompatible-pointers.patch
new file mode 100644
index 000000000000..36444bd9d2a8
--- /dev/null
+++ b/dev-libs/openct/files/openct-0.6.20-incompatible-pointers.patch
@@ -0,0 +1,26 @@
+Correct types so all pointer types are compatibile.
+https://bugs.gentoo.org/920193
+diff '--color=auto' -ru openct-0.6.20.old/src/ifd/process.c openct-0.6.20/src/ifd/process.c
+--- openct-0.6.20.old/src/ifd/process.c 2025-01-20 19:26:08.226266610 +0400
++++ openct-0.6.20/src/ifd/process.c 2025-01-20 19:28:06.168582649 +0400
+@@ -450,7 +450,7 @@
+ ct_tlv_parser_t * args, ct_tlv_builder_t * resp)
+ {
+ unsigned char *data;
+- unsigned int data_len;
++ size_t data_len;
+ unsigned int address;
+ int rc;
+
+diff '--color=auto' -ru openct-0.6.20.old/src/include/openct/socket.h openct-0.6.20/src/include/openct/socket.h
+--- openct-0.6.20.old/src/include/openct/socket.h 2025-01-20 19:34:34.479330790 +0400
++++ openct-0.6.20/src/include/openct/socket.h 2025-01-20 19:36:19.708720553 +0400
+@@ -37,7 +37,7 @@
+ listener : 1;
+
+ /* events to poll for */
+- int events;
++ short events;
+
+ void * user_data;
+ int (*poll)(struct ct_socket *, struct pollfd *);
diff --git a/dev-libs/openct/openct-0.6.20-r6.ebuild b/dev-libs/openct/openct-0.6.20-r6.ebuild
new file mode 100644
index 000000000000..7354b74d3c97
--- /dev/null
+++ b/dev-libs/openct/openct-0.6.20-r6.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools flag-o-matic udev
+
+DESCRIPTION="library for accessing smart card terminals"
+HOMEPAGE="https://github.com/OpenSC/openct/wiki"
+SRC_URI="https://downloads.sourceforge.net/opensc/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="doc debug pcsc-lite selinux usb"
+
+DEPEND="
+ pcsc-lite? ( >=sys-apps/pcsc-lite-1.7.2-r1:= )
+ usb? ( virtual/libusb:0 )
+ dev-libs/libltdl:0=
+"
+RDEPEND="
+ ${DEPEND}
+ acct-group/openct
+ acct-user/openctd
+ selinux? ( sec-policy/selinux-openct )
+"
+BDEPEND="doc? ( app-text/doxygen )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-automake.patch
+ "${FILESDIR}"/${P}-slibtool.patch
+ "${FILESDIR}"/${P}-incompatible-pointers.patch
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ use debug && append-cppflags -DDEBUG_IFDH
+
+ econf \
+ --localstatedir=/var \
+ --with-udev="$(get_udevdir)" \
+ --enable-non-privileged \
+ --with-daemon-user=openctd \
+ --with-daemon-groups=usb \
+ --enable-shared \
+ --disable-static \
+ $(use_enable doc) \
+ $(use_enable doc api-doc) \
+ $(use_enable pcsc-lite pcsc) \
+ $(use_with pcsc-lite bundle /usr/$(get_libdir)/readers/usb) \
+ $(use_enable usb)
+}
+
+src_install() {
+ default
+
+ find "${ED}" -name '*.la' -delete || die
+ rm -f "${ED}"/usr/$(get_libdir)/openct-ifd.* || die
+
+ udev_newrules etc/openct.udev 70-openct.rules
+
+ newinitd "${FILESDIR}"/openct.initd openct
+}
+
+pkg_postinst() {
+ elog
+ elog "You need to edit /etc/openct.conf to enable serial readers."
+ elog
+ elog "You should add \"openct\" to your default runlevel. To do so"
+ elog "type \"rc-update add openct default\"."
+ elog
+ elog "You need to be a member of the (newly created) group openct to"
+ elog "access smart card readers connected to this system. Set users'"
+ elog "groups with usermod -G. root always has access."
+ elog
+
+ # bug https://bugs.gentoo.org/843071
+ udev_reload
+
+}
+
+pkg_postrm() {
+ udev_reload
+}