summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-emulation/libcacard')
-rw-r--r--app-emulation/libcacard/Manifest2
-rw-r--r--app-emulation/libcacard/files/libcacard-2.6.0-simpletlv-test-fix.patch31
-rw-r--r--app-emulation/libcacard/libcacard-2.6.0.ebuild44
-rw-r--r--app-emulation/libcacard/libcacard-2.8.1.ebuild40
-rw-r--r--app-emulation/libcacard/metadata.xml5
5 files changed, 45 insertions, 77 deletions
diff --git a/app-emulation/libcacard/Manifest b/app-emulation/libcacard/Manifest
index 14387566c0ec..58cdf557c643 100644
--- a/app-emulation/libcacard/Manifest
+++ b/app-emulation/libcacard/Manifest
@@ -1 +1 @@
-DIST libcacard-2.6.0.tar.xz 364828 BLAKE2B 3a07243abb91dab05d89bf073fabb4a0ef7e820765066a8d87e72086b88cc726de77d1fdc5118e05ed47077d76ae0a57ff591a2e4e8623c3484c6cbf00cd025e SHA512 d6dfe6fe6cd2711bf8f71edc134a7caf459fc2a9c4f664ab2f1c28cc9ee8efe7a2d5a15c4dc735956638176e07e22416cad5e8e926aa7cab3fa95ded853f5982
+DIST libcacard-2.8.1.tar.xz 396472 BLAKE2B 49b1c0c9184f0a926df85de6146dd31a7127ee5e40a172e3d9e47f33ef4cdef57ee85f34c9c53719b4a8c5a1de695b8936cfcfce141cd558e6d53d215421621b SHA512 6deddd3319dbd74165eeaa2e8ab10de4a6eb111e980edd608801f7fe3c4fa896c9fb239110d17763864887f5eb0b77c03c680d83fd58a3913b48deb5a225ec74
diff --git a/app-emulation/libcacard/files/libcacard-2.6.0-simpletlv-test-fix.patch b/app-emulation/libcacard/files/libcacard-2.6.0-simpletlv-test-fix.patch
deleted file mode 100644
index 40e2a9d21e26..000000000000
--- a/app-emulation/libcacard/files/libcacard-2.6.0-simpletlv-test-fix.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-diff --git a/tests/simpletlv.c b/tests/simpletlv.c
-index cd0cd69c4dfb504a52e3f7314e4a01657377eb68..9ddc5b999f73d56f35f85810479760b301330282 100644
---- a/tests/simpletlv.c
-+++ b/tests/simpletlv.c
-@@ -48,7 +48,7 @@ static void test_length_simple(void)
-
- static void test_length_nested(void)
- {
-- size_t length = 0;
-+ int length = 0;
- unsigned char simple_value[] = "\x12\x14";
- static struct simpletlv_member simple[1] = {
- {0x25, 2, {/*.value = simple_value*/}, SIMPLETLV_TYPE_LEAF}
-@@ -102,7 +102,7 @@ static void test_length_skipped(void)
- static void test_encode_simple(void)
- {
- unsigned char *result = NULL;
-- size_t result_len = 0;
-+ int result_len = 0;
- unsigned char simple_value[] = "\x10\x11";
- unsigned char simple_encoded[] = "\x25\x02\x10\x11";
- unsigned char long_value[256] = "Long data value";
-@@ -168,7 +168,7 @@ static void test_encode_simple(void)
- static void test_encode_nested(void)
- {
- unsigned char *result = NULL;
-- size_t result_len = 0;
-+ int result_len = 0;
- unsigned char simple_value[] = "\x12\x14";
- unsigned char encoded[] = "\x72\x04\x25\x02\x12\x14";
- static struct simpletlv_member simple[1] = {
diff --git a/app-emulation/libcacard/libcacard-2.6.0.ebuild b/app-emulation/libcacard/libcacard-2.6.0.ebuild
deleted file mode 100644
index c196a512a7ca..000000000000
--- a/app-emulation/libcacard/libcacard-2.6.0.ebuild
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-DESCRIPTION="virtual Common Access Card (CAC) library emulator"
-HOMEPAGE="https://www.spice-space.org/"
-SRC_URI="https://www.spice-space.org/download/libcacard/${P}.tar.xz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm ~arm64 ~ia64 ppc ppc64 sparc x86"
-IUSE="+passthrough static-libs"
-
-RDEPEND=">=dev-libs/nss-3.13
- >=dev-libs/glib-2.22
- passthrough? ( >=sys-apps/pcsc-lite-1.8 )"
-DEPEND="${RDEPEND}
- virtual/pkgconfig"
-
-PATCHES=(
- "${FILESDIR}/${P}-simpletlv-test-fix.patch"
- )
-
-src_prepare() {
- default
-
- # remove test requiring SoftHSMv2 which is not in the tree atm
- sed -i \
- -e 's|tests/hwtests$(EXEEXT) \($(am__EXEEXT_1)\)|\1|' \
- Makefile.in || die
-}
-
-src_configure() {
- econf \
- $(use_enable passthrough pcsc) \
- $(use_enable static-libs static)
-}
-
-src_install() {
- default
- dodoc docs/*.txt
- use static-libs || find "${ED}"/usr/ -name 'lib*.la' -delete
-}
diff --git a/app-emulation/libcacard/libcacard-2.8.1.ebuild b/app-emulation/libcacard/libcacard-2.8.1.ebuild
new file mode 100644
index 000000000000..11c365e0c4e9
--- /dev/null
+++ b/app-emulation/libcacard/libcacard-2.8.1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit meson
+
+DESCRIPTION="Virtual Common Access Card (CAC) library emulator"
+HOMEPAGE="https://gitlab.freedesktop.org/spice/libcacard https://www.spice-space.org/"
+SRC_URI="https://www.spice-space.org/download/libcacard/${P}.tar.xz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm ~arm64 ~ia64 ~loong ppc ppc64 ~riscv sparc x86"
+IUSE="+passthrough static-libs test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ >=dev-libs/nss-3.12.8
+ >=dev-libs/glib-2.32
+ passthrough? ( >=sys-apps/pcsc-lite-1.8 )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+src_configure() {
+ local emesonargs=(
+ -Ddefault_library=$(usex static-libs both shared)
+ $(meson_feature passthrough pcsc)
+ $(meson_use !test disable_tests)
+ )
+
+ meson_src_configure
+}
+
+src_install() {
+ meson_src_install
+
+ dodoc docs/*.txt
+}
diff --git a/app-emulation/libcacard/metadata.xml b/app-emulation/libcacard/metadata.xml
index 0fa99318f0a7..1a71034e745b 100644
--- a/app-emulation/libcacard/metadata.xml
+++ b/app-emulation/libcacard/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>virtualization@gentoo.org</email>
@@ -8,4 +8,7 @@
<use>
<flag name="passthrough">Enable smartcard passthrough support via <pkg>sys-apps/pcsc-lite</pkg></flag>
</use>
+ <upstream>
+ <remote-id type="freedesktop-gitlab">spice/libcacard</remote-id>
+ </upstream>
</pkgmetadata>