Subject: [PATCH] gnu: exiv2: Get rid of reference to GCC.
From: [email-masked]
To: [email-masked]
Cc: 宋文武 <[email-masked]>
Date: Mon, 7 Aug 2023 22:03:03 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

From: 宋文武 <[email-masked]>

This fixes <https://issues.guix.gnu.org/57677>.

* gnu/packages/image.scm (exiv2)[arguments]: Add phase to
remove _GLIBCXX_ASSERTIONS from compiler flags.
---
 gnu/packages/image.scm | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 3336e38852..1dbf3cbdd6 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -1511,6 +1511,12 @@ (define-public exiv2
                                "-DEXIV2_ENABLE_BMFF=ON")
        #:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'patch-gcc-reference
+           (lambda _
+             ;; _GLIBCXX_ASSERTIONS brings reference to GCC.
+             (substitute* "cmake/compilerFlags.cmake"
+               (("add_compile_options[(]-Wp,-D_GLIBCXX_ASSERTIONS[)]")
+                ""))))
          (add-after 'install 'delete-static-libraries
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))

base-commit: 56667ee55cd7f3368cbff169352fe440f4f93da5
-- 
2.41.0