~ruther/guix-local

96f3df23b7f8f133268d3dc698cd0c2ed1f72e58 — Romain GARBAGE 4 months ago 12197aa
gnu: dlib: Fix broken package.

This is a follow-of of commit 830562e5cdb6c244f39c3168b4649c1144099450.

* gnu/packages/machine-learning.scm (dlib)[arguments]: Replace unquote with
ungexp. Improve style. Fix failing tests with GCC 14.

Change-Id: Ida95405b026893bae26af39cbfc4a0457e2d232c
Signed-off-by: Andreas Enge <andreas@enge.fr>
1 files changed, 15 insertions(+), 4 deletions(-)

M gnu/packages/machine-learning.scm
M gnu/packages/machine-learning.scm => gnu/packages/machine-learning.scm +15 -4
@@ 32,6 32,7 @@
;;; Copyright © 2025 Lapearldot <lapearldot@disroot.org>
;;; Copyright © 2025 Cayetano Santos <csantosb@inventati.org>
;;; Copyright © 2025 Janneke Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2025 Romain Garbage <romain.garbage@inria.fr>
;;;
;;; This file is part of GNU Guix.
;;;


@@ 2031,14 2032,13 @@ than 8 bits, and at the end only some significant 8 bits are kept.")
              ;; config.h recommends explicitly enabling or disabling asserts
              ;; when building as a shared library. By default neither is set.
              (substitute* "dlib/config.h"
                (("^//#define DLIB_DISABLE_ASSERTS") "#define DLIB_DISABLE_ASSERTS"))
              #t))
                (("^//#define DLIB_DISABLE_ASSERTS") "#define DLIB_DISABLE_ASSERTS"))))
          (add-after 'disable-asserts 'disable-failing-tests
            (lambda _
              ;; One test times out on MIPS, so we need to disable it.
              ;; Others are flaky on some platforms.
              (let* ((system ,(or (%current-target-system)
                                  (%current-system)))
              (let* ((system #$(or (%current-target-system)
                                   (%current-system)))
                     (disabled-tests (cond
                                      ((string-prefix? "mips64" system)
                                       '("object_detector" ; timeout


@@ 2053,6 2053,17 @@ than 8 bits, and at the end only some significant 8 bits are kept.")
                   (substitute* "dlib/test/makefile"
                     (((string-append "SRC \\+= " test "\\.cpp")) "")))
                 disabled-tests))))
          (add-before 'configure 'fix-test-build-error-with-gcc-14.3
            (lambda _
              (substitute* "dlib/test/CMakeLists.txt"
                ;; Some flags are activated specifically for GCC 14.0 but they
                ;; are needed for current GCC version (14.3.0). Let's assume
                ;; they are needed for the 14.x branch.
                (("14\\.0\\.1")
                 "14.99")
                ;; Tests use deprecated functions from ffmpeg.
                (("-Werror\\)")
                 "-Werror -Wno-error=deprecated-declarations)"))))
          (replace 'check
            (lambda _
              ;; XXX: This causes a rebuild--however, trying to run the tests