mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 13:27:09 +02:00
64 lines
2.3 KiB
Diff
64 lines
2.3 KiB
Diff
From ac3d004f793307a89787acdf99e368ffc118d24f Mon Sep 17 00:00:00 2001
|
|
From: knuxify <knuxify@gmail.com>
|
|
Date: Tue, 5 Jul 2022 19:34:24 +0200
|
|
Subject: [PATCH] build, config: Add separate option for enabling smartcard
|
|
support
|
|
|
|
Allows for disabling smartcard support on systems where it is disabled
|
|
in QEMU.
|
|
---
|
|
meson.build | 1 +
|
|
meson_options.txt | 5 +++++
|
|
src/config.vapi | 1 +
|
|
src/vm-configurator.vala | 2 +-
|
|
4 files changed, 8 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/meson.build b/meson.build
|
|
index 876ba9b..f2a95a6 100644
|
|
--- a/meson.build
|
|
+++ b/meson.build
|
|
@@ -37,6 +37,7 @@ conf.set_quoted ('DATADIR', data_dir)
|
|
conf.set_quoted ('CACHEDIR', '/var/cache')
|
|
conf.set_quoted ('LOCALEDIR', locale_dir)
|
|
conf.set10 ('UEFI_INSTALLS_SUPPORTED', get_option ('uefi'))
|
|
+conf.set10 ('SMARTCARD_SUPPORTED', get_option ('smartcard'))
|
|
conf.set('PACKAGE_BUGREPORT', '"http://gitlab.gnome.org/gnome/gnome-boxes/issues"')
|
|
|
|
if get_option ('profile') == 'development'
|
|
diff --git a/meson_options.txt b/meson_options.txt
|
|
index 1f04644..88755ed 100644
|
|
--- a/meson_options.txt
|
|
+++ b/meson_options.txt
|
|
@@ -30,3 +30,8 @@ option ('uefi',
|
|
type: 'boolean',
|
|
value: true,
|
|
description: 'Allow installing operating systems with UEFI')
|
|
+
|
|
+option ('smartcard',
|
|
+ type: 'boolean',
|
|
+ value: true,
|
|
+ description: 'Whether to enable smartcard support or not')
|
|
diff --git a/src/config.vapi b/src/config.vapi
|
|
index f6144e5..1aef8d9 100644
|
|
--- a/src/config.vapi
|
|
+++ b/src/config.vapi
|
|
@@ -15,4 +15,5 @@ namespace Config {
|
|
public const string NAME_SUFFIX;
|
|
public const string VERSION;
|
|
public const bool UEFI_INSTALLS_SUPPORTED;
|
|
+ public const bool SMARTCARD_SUPPORTED;
|
|
}
|
|
diff --git a/src/vm-configurator.vala b/src/vm-configurator.vala
|
|
index 0d80433..43b36c8 100644
|
|
--- a/src/vm-configurator.vala
|
|
+++ b/src/vm-configurator.vala
|
|
@@ -87,7 +87,7 @@ public static Domain create_domain_config (InstallerMedia install_media, string
|
|
domain.add_device (create_graphics_device());
|
|
add_usb_support (domain, install_media);
|
|
|
|
- if (!App.is_running_in_flatpak ())
|
|
+ if (Config.SMARTCARD_SUPPORTED && !App.is_running_in_flatpak ())
|
|
add_smartcard_support (domain);
|
|
|
|
set_video_config (domain, install_media);
|