GNU bug report logs - #70235
[PATCH 0/2] Update widelands

Previous Next

Package: guix-patches;

Reported by: Timotej Lazar <timotej.lazar <at> araneo.si>

Date: Sat, 6 Apr 2024 08:43:01 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

To reply to this bug, email your comments to 70235 AT debbugs.gnu.org.
There is no need to reopen the bug first.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to adam.faiz <at> disroot.org, liliana.prikler <at> gmail.com, iyzsong <at> envs.net, guix-patches <at> gnu.org:
bug#70235; Package guix-patches. (Sat, 06 Apr 2024 08:43:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Timotej Lazar <timotej.lazar <at> araneo.si>:
New bug report received and forwarded. Copy sent to adam.faiz <at> disroot.org, liliana.prikler <at> gmail.com, iyzsong <at> envs.net, guix-patches <at> gnu.org. (Sat, 06 Apr 2024 08:43:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Timotej Lazar <timotej.lazar <at> araneo.si>
To: guix-patches <at> gnu.org
Cc: Timotej Lazar <timotej.lazar <at> araneo.si>
Subject: [PATCH 0/2] Update widelands
Date: Sat,  6 Apr 2024 10:37:22 +0200
This updates widelands to the latest version, switches to new package
style and installs the binary and data files in correct locations.

Timotej Lazar (2):
  gnu: widelands: Update to 1.2.
  gnu: widelands: Improve package style.

 gnu/packages/games.scm | 91 ++++++++++++++++++++----------------------
 1 file changed, 44 insertions(+), 47 deletions(-)


base-commit: bfc614397b5f146056bda4b5a8e3a67bd1ca7b23
-- 
2.41.0





Information forwarded to adam.faiz <at> disroot.org, liliana.prikler <at> gmail.com, iyzsong <at> envs.net, guix-patches <at> gnu.org:
bug#70235; Package guix-patches. (Sat, 06 Apr 2024 08:45:02 GMT) Full text and rfc822 format available.

Message #8 received at 70235 <at> debbugs.gnu.org (full text, mbox):

From: Timotej Lazar <timotej.lazar <at> araneo.si>
To: 70235 <at> debbugs.gnu.org
Cc: Timotej Lazar <timotej.lazar <at> araneo.si>
Subject: [PATCH 1/2] gnu: widelands: Update to 1.2.
Date: Sat,  6 Apr 2024 10:44:02 +0200
* gnu/packages/games.scm (widelands): Update to 1.2.
[inputs]: Drop boost, curl.
[native-inputs]: Replace python-wrapper with python.

Change-Id: I1a98739a5da801d3686acf152989c8ce15f16a90
---
 gnu/packages/games.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 6e26a15f56..78aedca434 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -5786,7 +5786,7 @@ (define-public warzone2100
 (define-public widelands
   (package
     (name "widelands")
-    (version "1.1")
+    (version "1.2")
     (source
      (origin
        (method git-fetch)
@@ -5795,7 +5795,7 @@ (define-public widelands
               (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "07wbalwdmml9vdh9nh50svnsw4sdj9nnp32azbss8vzq5mxmzvbx"))
+        (base32 "1m9hn1sh1siggribzsq79k7p0lggdw41ji7zdl6h648cjak9mdsp"))
        (modules '((guix build utils)))
        (snippet
         '(begin
@@ -5830,11 +5830,9 @@ (define-public widelands
     (native-inputs
      `(("gettext" ,gettext-minimal)
        ("pkg-config" ,pkg-config)
-       ("python" ,python-wrapper)))
+       ("python" ,python)))
     (inputs
      `(("asio" ,asio)
-       ("curl" ,curl)
-       ("boost" ,boost)
        ("glew" ,glew)
        ("icu4c" ,icu4c)
        ("libpng" ,libpng)
-- 
2.41.0





Information forwarded to adam.faiz <at> disroot.org, liliana.prikler <at> gmail.com, iyzsong <at> envs.net, guix-patches <at> gnu.org:
bug#70235; Package guix-patches. (Sat, 06 Apr 2024 08:45:02 GMT) Full text and rfc822 format available.

Message #11 received at 70235 <at> debbugs.gnu.org (full text, mbox):

From: Timotej Lazar <timotej.lazar <at> araneo.si>
To: 70235 <at> debbugs.gnu.org
Cc: Timotej Lazar <timotej.lazar <at> araneo.si>
Subject: [PATCH 2/2] gnu: widelands: Improve package style.
Date: Sat,  6 Apr 2024 10:44:03 +0200
* gnu/packages/games.scm (widelands): Use new package style.
[snippet]: Simplify and drop trailing #t.
[arguments]: Use gexps. Tweak #:configure-flags to install the binary in bin/
instead of bin/games/ and data under share/ instead of bin/share/. Modify
'unbundle-fonts phase to not depend on input labels.
[inputs, native-inputs]: Drop input labels.
[home-page]: Drop trailing slash.

Change-Id: I75c535005ad1325ad170205b6e80b1039125619a
---
 gnu/packages/games.scm | 85 +++++++++++++++++++++---------------------
 1 file changed, 42 insertions(+), 43 deletions(-)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 78aedca434..b788c7c774 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -5791,58 +5791,57 @@ (define-public widelands
      (origin
        (method git-fetch)
        (uri (git-reference
-              (url "https://github.com/widelands/widelands")
-              (commit (string-append "v" version))))
+             (url "https://github.com/widelands/widelands")
+             (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
         (base32 "1m9hn1sh1siggribzsq79k7p0lggdw41ji7zdl6h648cjak9mdsp"))
        (modules '((guix build utils)))
        (snippet
-        '(begin
-           (delete-file-recursively "src/third_party/minizip")
-           #t))))
+        #~(delete-file-recursively "src/third_party/minizip"))))
     (build-system cmake-build-system)
     (arguments
-     `(#:configure-flags
-       (let* ((out (assoc-ref %outputs "out"))
-              (share (string-append out "/share")))
-         (list (string-append "-DCMAKE_INSTALL_PREFIX=" out "/bin")
-               (string-append "-DWL_INSTALL_BASEDIR=" share "/widelands")
-               (string-append "-DWL_INSTALL_DATADIR=" share "/widelands")
-               "-DOPTION_BUILD_WEBSITE_TOOLS=OFF"
-               ;; CMakeLists.txt does not handle properly RelWithDebInfo build
-               ;; type.  When used, no game data is installed!
-               "-DCMAKE_BUILD_TYPE=Release"))
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'unbundle-fonts
-           ;; Unbundle fonts already packaged in Guix.  XXX: missing fonts are
-           ;; amiri, Culmus, mmrCensus, Nakula, and Sinhala.
-           (lambda* (#:key inputs #:allow-other-keys)
-             (with-directory-excursion "data/i18n/fonts"
-               (for-each (lambda (font)
-                           (delete-file-recursively font)
-                           (symlink (string-append (assoc-ref inputs font)
-                                                   "/share/fonts/truetype")
-                                    font))
-                         '("DejaVu" "MicroHei")))
-             #t)))))
+     (list
+      #:configure-flags
+      #~(let ((share (string-append #$output "/share/widelands")))
+          (list (string-append "-DCMAKE_INSTALL_PREFIX=" #$output)
+                (string-append "-DWL_INSTALL_BINDIR=" #$output "/bin")
+                (string-append "-DWL_INSTALL_BASEDIR=" share)
+                (string-append "-DWL_INSTALL_DATADIR=" share)
+                "-DOPTION_BUILD_WEBSITE_TOOLS=OFF"
+                ;; CMakeLists.txt does not handle properly RelWithDebInfo build
+                ;; type.  When used, no game data is installed!
+                "-DCMAKE_BUILD_TYPE=Release"))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'unbundle-fonts
+            ;; Unbundle fonts already packaged in Guix.  XXX: missing fonts are
+            ;; amiri, Culmus, mmrCensus, Nakula, and Sinhala.
+            (lambda* (#:key inputs #:allow-other-keys)
+              (for-each
+               (lambda (font)
+                 (let* ((path (string-append "share/fonts/truetype/" (basename font)))
+                        (target (false-if-exception (search-input-file inputs path))))
+                   (when target
+                     (delete-file font)
+                     (symlink target font))))
+               (find-files "data/i18n/fonts" "\\.tt[cf]$")))))))
     (native-inputs
-     `(("gettext" ,gettext-minimal)
-       ("pkg-config" ,pkg-config)
-       ("python" ,python)))
+     (list gettext-minimal pkg-config python))
     (inputs
-     `(("asio" ,asio)
-       ("glew" ,glew)
-       ("icu4c" ,icu4c)
-       ("libpng" ,libpng)
-       ("minizip" ,minizip)
-       ("sdl" ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))
-       ("zlib" ,zlib)
-       ;; Fonts for the ‘unbundle-fonts’ phase.  Case matters in name!
-       ("DejaVu" ,font-dejavu)
-       ("MicroHei" ,font-wqy-microhei)))
-    (home-page "https://www.widelands.org/")
+     (list asio
+           font-dejavu
+           font-wqy-microhei
+           glew
+           icu4c
+           libpng
+           minizip
+           sdl2
+           sdl2-image
+           sdl2-mixer
+           sdl2-ttf
+           zlib))
+    (home-page "https://www.widelands.org")
     (synopsis "Fantasy real-time strategy game")
     (description
      "In Widelands, you are the regent of a small clan.  You start out with
-- 
2.41.0





Reply sent to Christopher Baines <mail <at> cbaines.net>:
You have taken responsibility. (Mon, 15 Apr 2024 09:52:02 GMT) Full text and rfc822 format available.

Notification sent to Timotej Lazar <timotej.lazar <at> araneo.si>:
bug acknowledged by developer. (Mon, 15 Apr 2024 09:52:02 GMT) Full text and rfc822 format available.

Message #16 received at 70235-done <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Timotej Lazar <timotej.lazar <at> araneo.si>
Cc: 宋文武 <iyzsong <at> envs.net>,
 Adam Faiz <adam.faiz <at> disroot.org>, 70235-done <at> debbugs.gnu.org,
 Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Subject: Re: [bug#70235] [PATCH 0/2] Update widelands
Date: Mon, 15 Apr 2024 10:51:29 +0100
[Message part 1 (text/plain, inline)]
Timotej Lazar <timotej.lazar <at> araneo.si> writes:

> This updates widelands to the latest version, switches to new package
> style and installs the binary and data files in correct locations.
>
> Timotej Lazar (2):
>   gnu: widelands: Update to 1.2.
>   gnu: widelands: Improve package style.
>
>  gnu/packages/games.scm | 91 ++++++++++++++++++++----------------------
>  1 file changed, 44 insertions(+), 47 deletions(-)

Looks good to me, I've pushed these patches to master as
84a88f5ed96c8ec5781fc0f428d22380df1b1f14.

Chris
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 19 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.