diff mbox series

[bug#63682,2/2] gnu: warzone2100: Rewrite package arguments to G-expressions.

Message ID e48b0e1d10192d62c83211815574969fd0a63079.1684934823.git.iyzsong@member.fsf.org
State New
Headers show
Series [bug#63682,1/2] gnu: warzone2100: Update to 4.3.5. | expand

Commit Message

reepca--- via Guix-patches via May 24, 2023, 1:38 p.m. UTC
From: 宋文武 <iyzsong@member.fsf.org>

* gnu/packages/games.scm (warzone2100)[arguments]: Convert to list of
G-expressions.
---
 gnu/packages/games.scm | 47 +++++++++++++++++++++---------------------
 1 file changed, 23 insertions(+), 24 deletions(-)

Comments

Liliana Marie Prikler May 24, 2023, 4:47 p.m. UTC | #1
Am Mittwoch, dem 24.05.2023 um 21:38 +0800 schrieb iyzsong@envs.net:
> From: 宋文武 <iyzsong@member.fsf.org>
> 
> * gnu/packages/games.scm (warzone2100)[arguments]: Convert to list of
> G-expressions.
> ---
>  gnu/packages/games.scm | 47 +++++++++++++++++++++-------------------
> --
>  1 file changed, 23 insertions(+), 24 deletions(-)
> 
> diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
> index eb3e0eb842..86382f7080 100644
> --- a/gnu/packages/games.scm
> +++ b/gnu/packages/games.scm
> @@ -5414,30 +5414,29 @@ (define-public warzone2100
>               #t))))
>      (build-system cmake-build-system)
>      (arguments
> -     `(#:configure-flags '("-DWZ_DISTRIBUTOR=Guix"
> -                           "-DWZ_ENABLE_BACKEND_VULKAN=off"
> -                           "-DENABLE_DISCORD=off")
> -       #:tests? #f ; TODO: Tests seem to be broken, configure.ac is
> missing.
> -       #:phases
> -       (modify-phases %standard-phases
> -         (add-after 'unpack 'fix-utfcpp-include
> -           (lambda _
> -             (substitute* "lib/framework/wzstring.cpp"
> -               (("<utfcpp/source/utf8.h>") "<utf8.h>"))
> -             #t))
> -         (add-after 'unpack 'link-tests-with-qt
> -           (lambda _
> -             (substitute* "tests/Makefile.am"
> -               (("(framework_linktest_LDADD|maptest_LDADD) = "
> prefix)
> -                (string-append prefix "$(QT5_LIBS) ")))
> -             #t))
> -         (add-after 'unpack 'fix-ivis-linktest
> -           (lambda _
> -             (substitute* "tests/ivis_linktest.cpp"
> -               (("iV_DrawTextRotated.*;")
> -                (string-append "iV_DrawTextRotated(\"Press ESC to
> exit.\", "
> -                               "100, 100, 0.0f, font_regular);")))
> -             #t)))))
> +     (list #:configure-flags #~'("-DWZ_DISTRIBUTOR=Guix"
> +                                 "-DWZ_ENABLE_BACKEND_VULKAN=off"
> +                                 "-DENABLE_DISCORD=off")
> +           #:tests? #f ; TODO: Tests seem to be broken, configure.ac
> is missing.
> +           #:phases #~(modify-phases %standard-phases
> +                        (add-after 'unpack 'fix-utfcpp-include
> +                          (lambda _
> +                            (substitute*
> "lib/framework/wzstring.cpp"
> +                              (("<utfcpp/source/utf8.h>")
> +                               "<utf8.h>"))))
> +                        (add-after 'unpack 'link-tests-with-qt
> +                          (lambda _
> +                            (substitute* "tests/Makefile.am"
> +                             
> (("(framework_linktest_LDADD|maptest_LDADD) = "
> +                                prefix)
> +                               (string-append prefix "$(QT5_LIBS)
> ")))))
> +                        (add-after 'unpack 'fix-ivis-linktest
> +                          (lambda _
> +                            (substitute* "tests/ivis_linktest.cpp"
> +                              (("iV_DrawTextRotated.*;")
> +                               (string-append
> +                                "iV_DrawTextRotated(\"Press ESC to
> exit.\", "
> +                                "100, 100, 0.0f,
> font_regular);"))))))))
>      (native-inputs (list asciidoc
>                       ruby-asciidoctor
>                       gettext-minimal
Maybe add a newline after #:phases for horizontal real estate. 
Otherwise LGTM but untested.

Cheers
宋文武 May 30, 2023, 10:46 a.m. UTC | #2
> Maybe add a newline after #:phases for horizontal real estate. 
> Otherwise LGTM but untested.

Done, thank you for review!
diff mbox series

Patch

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index eb3e0eb842..86382f7080 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -5414,30 +5414,29 @@  (define-public warzone2100
              #t))))
     (build-system cmake-build-system)
     (arguments
-     `(#:configure-flags '("-DWZ_DISTRIBUTOR=Guix"
-                           "-DWZ_ENABLE_BACKEND_VULKAN=off"
-                           "-DENABLE_DISCORD=off")
-       #:tests? #f ; TODO: Tests seem to be broken, configure.ac is missing.
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'fix-utfcpp-include
-           (lambda _
-             (substitute* "lib/framework/wzstring.cpp"
-               (("<utfcpp/source/utf8.h>") "<utf8.h>"))
-             #t))
-         (add-after 'unpack 'link-tests-with-qt
-           (lambda _
-             (substitute* "tests/Makefile.am"
-               (("(framework_linktest_LDADD|maptest_LDADD) = " prefix)
-                (string-append prefix "$(QT5_LIBS) ")))
-             #t))
-         (add-after 'unpack 'fix-ivis-linktest
-           (lambda _
-             (substitute* "tests/ivis_linktest.cpp"
-               (("iV_DrawTextRotated.*;")
-                (string-append "iV_DrawTextRotated(\"Press ESC to exit.\", "
-                               "100, 100, 0.0f, font_regular);")))
-             #t)))))
+     (list #:configure-flags #~'("-DWZ_DISTRIBUTOR=Guix"
+                                 "-DWZ_ENABLE_BACKEND_VULKAN=off"
+                                 "-DENABLE_DISCORD=off")
+           #:tests? #f ; TODO: Tests seem to be broken, configure.ac is missing.
+           #:phases #~(modify-phases %standard-phases
+                        (add-after 'unpack 'fix-utfcpp-include
+                          (lambda _
+                            (substitute* "lib/framework/wzstring.cpp"
+                              (("<utfcpp/source/utf8.h>")
+                               "<utf8.h>"))))
+                        (add-after 'unpack 'link-tests-with-qt
+                          (lambda _
+                            (substitute* "tests/Makefile.am"
+                              (("(framework_linktest_LDADD|maptest_LDADD) = "
+                                prefix)
+                               (string-append prefix "$(QT5_LIBS) ")))))
+                        (add-after 'unpack 'fix-ivis-linktest
+                          (lambda _
+                            (substitute* "tests/ivis_linktest.cpp"
+                              (("iV_DrawTextRotated.*;")
+                               (string-append
+                                "iV_DrawTextRotated(\"Press ESC to exit.\", "
+                                "100, 100, 0.0f, font_regular);"))))))))
     (native-inputs (list asciidoc
                      ruby-asciidoctor
                      gettext-minimal