Skip to content

Commit

Permalink
meson: use uname(1) to get the "architecture"
Browse files Browse the repository at this point in the history
It is not the CPU architecture but the direcory name used in the driver
bundle.
For example "Linux" in /usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so
  • Loading branch information
LudovicRousseau committed May 5, 2024
1 parent b276f95 commit 773be65
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -118,19 +118,19 @@ if systemd_dep.found()
features += 'systemd'
endif

target_system = target_machine.system()
if target_system == 'darwin'
# architecture
r = run_command('uname', check: true)
pcsc_arch = r.stdout().strip()
if pcsc_arch == 'Darwin'
pcsc_arch = 'MacOS'
pcscd_dep += dependency('appleframeworks', modules : ['foundation', 'IOKit'])
pcscd_src += files(['src/hotplug_macosx.c', 'src/dyn_macosx.c'])
conf_data.set_quoted('PCSC_ARCH', 'MacOS')
elif target_system == 'linux'
conf_data.set_quoted('PCSC_ARCH', 'Linux')
elif target_system == 'netbsd'
conf_data.set_quoted('PCSC_ARCH', 'NetBSD')
endif
conf_data.set_quoted('PCSC_ARCH', pcsc_arch)

pcscd_dep += [polkit_dep, systemd_dep]

features += conf_data.get_unquoted('PCSC_ARCH')
features += pcsc_arch
features += target_machine.cpu()
features += 'ipcdir=' + get_option('ipcdir')
features += 'usbdropdir=' + get_option('usbdropdir')
Expand Down

0 comments on commit 773be65

Please sign in to comment.