Subject: [PATCH v2 03/10] gnu: zbar: Disable static and qt build.

From: Nicolas Graves <[email-masked]>
Date: Mon, 25 Nov 2024 10:43:52 +0100

* gnu/packages/aidc.scm (zbar): Disable static and qt build.
[build-system]: Switch to glib-or-gtk-build-system.
[arguments]<#:configure-flags>: Add --disable-static.
[inputs]: Replace v4l-utils by v4l-utils-minimal.
---
 gnu/packages/aidc.scm | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/aidc.scm b/gnu/packages/aidc.scm
index 0c1f26495b..dbbab0e22b 100644
--- a/gnu/packages/aidc.scm
+++ b/gnu/packages/aidc.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2018, 2019, 2022 Tobias Geerinckx-Rice <[email-masked]>
 ;;; Copyright © 2019 Guillaume Le Vaillant <[email-masked]>
 ;;; Copyright © 2020 Leo Famulari <[email-masked]>
+;;; Copyright © 2024 Nicolas Graves <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -28,8 +29,10 @@ (define-module (gnu packages aidc)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
+  #:use-module (guix utils)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages elf)
   #:use-module (gnu packages imagemagick)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
@@ -43,7 +46,8 @@ (define-module (gnu packages aidc)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages video)
   #:use-module (guix build-system cmake)
-  #:use-module (guix build-system gnu))
+  #:use-module (guix build-system gnu)
+  #:use-module (guix build-system glib-or-gtk))
 
 (define-public zxing-cpp
   ;; Use the master branch as it includes unreleased build system improvements
@@ -171,6 +175,7 @@ (define-public libdmtx
 C/C++ programs to use its capabilities without restrictions or overhead.")
     (license license:bsd-3)))
 
+;; XXX: qt variant utils are broken: zbarcam-qt fails with segmentation fault.
 (define-public zbar
   (package
     (name "zbar")
@@ -184,11 +189,12 @@ (define-public zbar
          (commit version)))
        (file-name (git-file-name name version))
        (sha256
-        (base32
-         "0rf3i7lx0fqzxsngird6l4d4dnl612nr32rm8sib699qqx67px8n"))))
-    (build-system gnu-build-system)
+        (base32 "0rf3i7lx0fqzxsngird6l4d4dnl612nr32rm8sib699qqx67px8n"))))
+    (build-system glib-or-gtk-build-system)
     (arguments
-     '(#:configure-flags (list "--with-gtk=auto"
+     (list
+      #:configure-flags '(list "--disable-static"
+                               "--with-gtk=auto"
                                "--with-python=auto"
                                (string-append "--with-dbusconfdir="
                                               (assoc-ref %outputs "out")
@@ -209,10 +215,10 @@ (define-public zbar
            libjpeg-turbo
            perl
            python
-           v4l-utils))
+           v4l-utils-minimal))
     (propagated-inputs
      ;; These are in 'requires' field of .pc files.
-     (list glib gtk+ qtbase-5))
+     (list glib gtk+))
     (synopsis "Bar code reader")
     (description
      "ZBar can read barcodes from various sources, such as video streams,
-- 
2.46.0