diff mbox series

[meta-oe,002/128] pcsc-lite: upgrade 2.0.3 -> 2.5.0

Message ID 20260628081122.178348-2-khem.raj@oss.qualcomm.com
State New
Headers show
Series [meta-filesystems,001/128] ifuse: upgrade 1.2.0 -> 1.2.1 | expand

Commit Message

Khem Raj June 28, 2026, 8:09 a.m. UTC
License-Update: dropped the doc/example pcsc_demo.c entry from the GPLv3 LIC_FILES_CHKSUM list

Switch to the meson build system.

do_package otherwise failed with installed-but-not-shipped files:

  /usr/sysusers.d/pcscd-sysusers.conf
  /usr/lib/systemd/user/pcscd.service
  /usr/lib/systemd/user/pcscd.socket

pcsc-lite installs sysusers.d to systemd's sysusersdir (${libdir}) when
the pkg-config var is found and to ${exec_prefix}/sysusers.d otherwise,
so remove both. Ship the systemd user units by adding
${nonarch_libdir}/systemd/user to FILES:${PN}.

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...{pcsc-lite_2.0.3.bb => pcsc-lite_2.5.0.bb} | 35 +++++++++++++------
 1 file changed, 24 insertions(+), 11 deletions(-)
 rename meta-oe/recipes-support/pcsc-lite/{pcsc-lite_2.0.3.bb => pcsc-lite_2.5.0.bb} (57%)
diff mbox series

Patch

diff --git a/meta-oe/recipes-support/pcsc-lite/pcsc-lite_2.0.3.bb b/meta-oe/recipes-support/pcsc-lite/pcsc-lite_2.5.0.bb
similarity index 57%
rename from meta-oe/recipes-support/pcsc-lite/pcsc-lite_2.0.3.bb
rename to meta-oe/recipes-support/pcsc-lite/pcsc-lite_2.5.0.bb
index 9e3c98bb97..83edca23e0 100644
--- a/meta-oe/recipes-support/pcsc-lite/pcsc-lite_2.0.3.bb
+++ b/meta-oe/recipes-support/pcsc-lite/pcsc-lite_2.5.0.bb
@@ -8,17 +8,17 @@  LICENSE:${PN}-dev = "BSD-3-Clause"
 LICENSE:${PN}-dbg = "BSD-3-Clause & GPL-3.0-or-later"
 LICENSE:${PN}-spy = "GPL-3.0-or-later"
 LICENSE:${PN}-spy-dev = "GPL-3.0-or-later"
-LIC_FILES_CHKSUM = "file://COPYING;md5=628c01ba985ecfa21677f5ee2d5202f6"
+LIC_FILES_CHKSUM = "file://COPYING;md5=9637dc508442c2f458df6444fca97e09"
 DEPENDS = "autoconf-archive-native flex-native"
 
-SRC_URI = "https://pcsclite.apdu.fr/files/${BP}.tar.bz2"
-SRC_URI[sha256sum] = "f42ee9efa489e9ff5d328baefa26f9c515be65021856e78d99ad1f0ead9ec85d"
+SRC_URI = "https://pcsclite.apdu.fr/files/${BP}.tar.xz"
+SRC_URI[sha256sum] = "59b3c4b5be4ab228698edeb5b3ef46ad54ea217e7dd0891372770bb92b55db92"
 
-inherit autotools systemd pkgconfig perlnative
+inherit meson systemd pkgconfig perlnative
 
-EXTRA_OECONF = " \
-    --disable-libusb \
-    --enable-usbdropdir=${libdir}/pcsc/drivers \
+EXTRA_OEMESON = " \
+    -Dlibusb=false \
+    -Dusbdropdir=${libdir}/pcsc/drivers \
 "
 
 S = "${UNPACKDIR}/pcsc-lite-${PV}"
@@ -26,9 +26,9 @@  S = "${UNPACKDIR}/pcsc-lite-${PV}"
 PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd polkit', d)} udev"
 PACKAGECONFIG:class-native ??= ""
 
-PACKAGECONFIG[systemd]  = ",--disable-libsystemd,systemd,"
-PACKAGECONFIG[udev] = "--enable-libudev,--disable-libudev,udev"
-PACKAGECONFIG[polkit] = ",--disable-polkit,polkit"
+PACKAGECONFIG[systemd]  = ",-Dlibsystemd=false,systemd,"
+PACKAGECONFIG[udev] = "-Dlibudev=true,-Dlibudev=false,udev"
+PACKAGECONFIG[polkit] = ",-Dpolkit=false,polkit"
 
 PACKAGES = "${PN} ${PN}-dbg ${PN}-dev ${PN}-lib ${PN}-doc ${PN}-spy ${PN}-spy-dev"
 
@@ -37,11 +37,14 @@  RRECOMMENDS:${PN}:class-native = ""
 RPROVIDES:${PN}:append:class-native = " pcsc-lite-lib-native"
 
 FILES:${PN} = "${sbindir}/pcscd \
-               ${datadir}/polkit-1"
+               ${datadir}/polkit-1 \
+               ${nonarch_libdir}/systemd/user \
+               ${sysconfdir}/default/pcscd"
 FILES:${PN}-lib = "${libdir}/libpcsclite*${SOLIBS}"
 FILES:${PN}-dev = "${includedir} \
                    ${libdir}/pkgconfig \
                    ${libdir}/libpcsclite.la \
+                   ${libdir}/libpcsclite_real.so \
                    ${libdir}/libpcsclite.so"
 
 FILES:${PN}-spy = "${bindir}/pcsc-spy \
@@ -49,6 +52,16 @@  FILES:${PN}-spy = "${bindir}/pcsc-spy \
 FILES:${PN}-spy-dev = "${libdir}/libpcscspy.la \
                        ${libdir}/libpcscspy.so "
 
+do_install:append() {
+    rm -rf ${D}${datadir}/metainfo
+    # pcsc-lite installs pcscd-sysusers.conf into systemd's sysusersdir when
+    # the systemd pkg-config variable is available (${libdir}/sysusers.d),
+    # and falls back to ${exec_prefix}/sysusers.d otherwise. Drop both so the
+    # file is not left unpackaged (installed-vs-shipped QA).
+    rm -rf ${D}${libdir}/sysusers.d
+    rm -rf ${D}${exec_prefix}/sysusers.d
+}
+
 RPROVIDES:${PN} += "${PN}-systemd"
 RREPLACES:${PN} += "${PN}-systemd"
 RCONFLICTS:${PN} += "${PN}-systemd"