diff mbox series

[bug#61360] gnu: gimp: Don't retain reference on GCC.

Message ID 20230208070930.28577-1-iyzsong@envs.net
State New
Headers show
Series [bug#61360] gnu: gimp: Don't retain reference on GCC. | expand

Commit Message

vasilii.smirnov--- via Guix-patches" via Feb. 8, 2023, 7:09 a.m. UTC
From: 宋文武 <iyzsong@member.fsf.org>

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

* gnu/packages/gimp.scm (gimp)[arguments]: Add #:modules and #:phases.
---
 gnu/packages/gimp.scm | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

Christopher Baines March 1, 2023, 9:48 a.m. UTC | #1
iyzsong--- via Guix-patches via <guix-patches@gnu.org> writes:

> From: 宋文武 <iyzsong@member.fsf.org>
>
> Partly fixes <https://issues.guix.gnu.org/57677>.
>
> * gnu/packages/gimp.scm (gimp)[arguments]: Add #:modules and #:phases.
> ---
>  gnu/packages/gimp.scm | 13 +++++++++++++
>  1 file changed, 13 insertions(+)

I don't quite get what's going on here, but it seems good to push.

Thanks,

Chris
宋文武 March 2, 2023, 3:44 a.m. UTC | #2
Christopher Baines <mail@cbaines.net> writes:

> iyzsong--- via Guix-patches via <guix-patches@gnu.org> writes:
>
>> From: 宋文武 <iyzsong@member.fsf.org>
>>
>> Partly fixes <https://issues.guix.gnu.org/57677>.
>>
>> * gnu/packages/gimp.scm (gimp)[arguments]: Add #:modules and #:phases.
>> ---
>>  gnu/packages/gimp.scm | 13 +++++++++++++
>>  1 file changed, 13 insertions(+)
>
> I don't quite get what's going on here, but it seems good to push.
>

Pushed, thank you!
diff mbox series

Patch

diff --git a/gnu/packages/gimp.scm b/gnu/packages/gimp.scm
index beb43f0ae2..69281f98e9 100644
--- a/gnu/packages/gimp.scm
+++ b/gnu/packages/gimp.scm
@@ -302,6 +302,19 @@  (define-public gimp
                "doc"))                  ; 9 MiB of gtk-doc HTML
     (arguments
      (list
+      #:modules `((ice-9 popen)
+                  (ice-9 rdelim)
+                  ,@%gnu-build-system-modules)
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'remove-gcc-reference
+            ;; Avoid reference to GCC.
+            (lambda _
+              (let* ((port (open-input-pipe "gcc -v 2>&1 | tail -n 1"))
+                     (cc-version (read-line port)))
+                (close-pipe port)
+                (substitute* "app/gimp-version.c"
+                  (("CC_VERSION") (string-append "\"" cc-version "\"")))))))
       #:configure-flags
       #~(list (string-append "--with-html-dir=" #$output "/share/gtk-doc/html")