unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#70235] [PATCH 0/2] Update widelands
@ 2024-04-06  8:37 Timotej Lazar
  2024-04-06  8:44 ` [bug#70235] [PATCH 1/2] gnu: widelands: Update to 1.2 Timotej Lazar
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Timotej Lazar @ 2024-04-06  8:37 UTC (permalink / raw)
  To: 70235
  Cc: Timotej Lazar, Adam Faiz, Liliana Marie Prikler,
	宋文武

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





^ permalink raw reply	[flat|nested] 4+ messages in thread

* [bug#70235] [PATCH 1/2] gnu: widelands: Update to 1.2.
  2024-04-06  8:37 [bug#70235] [PATCH 0/2] Update widelands Timotej Lazar
@ 2024-04-06  8:44 ` Timotej Lazar
  2024-04-06  8:44 ` [bug#70235] [PATCH 2/2] gnu: widelands: Improve package style Timotej Lazar
  2024-04-15  9:51 ` bug#70235: [PATCH 0/2] Update widelands Christopher Baines
  2 siblings, 0 replies; 4+ messages in thread
From: Timotej Lazar @ 2024-04-06  8:44 UTC (permalink / raw)
  To: 70235
  Cc: Timotej Lazar, Adam Faiz, Liliana Marie Prikler,
	宋文武

* 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





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#70235] [PATCH 2/2] gnu: widelands: Improve package style.
  2024-04-06  8:37 [bug#70235] [PATCH 0/2] Update widelands Timotej Lazar
  2024-04-06  8:44 ` [bug#70235] [PATCH 1/2] gnu: widelands: Update to 1.2 Timotej Lazar
@ 2024-04-06  8:44 ` Timotej Lazar
  2024-04-15  9:51 ` bug#70235: [PATCH 0/2] Update widelands Christopher Baines
  2 siblings, 0 replies; 4+ messages in thread
From: Timotej Lazar @ 2024-04-06  8:44 UTC (permalink / raw)
  To: 70235
  Cc: Timotej Lazar, Adam Faiz, Liliana Marie Prikler,
	宋文武

* 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





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#70235: [PATCH 0/2] Update widelands
  2024-04-06  8:37 [bug#70235] [PATCH 0/2] Update widelands Timotej Lazar
  2024-04-06  8:44 ` [bug#70235] [PATCH 1/2] gnu: widelands: Update to 1.2 Timotej Lazar
  2024-04-06  8:44 ` [bug#70235] [PATCH 2/2] gnu: widelands: Improve package style Timotej Lazar
@ 2024-04-15  9:51 ` Christopher Baines
  2 siblings, 0 replies; 4+ messages in thread
From: Christopher Baines @ 2024-04-15  9:51 UTC (permalink / raw)
  To: Timotej Lazar
  Cc: 宋文武, Adam Faiz, 70235-done,
	Liliana Marie Prikler

[-- Attachment #1: Type: text/plain, Size: 527 bytes --]

Timotej Lazar <timotej.lazar@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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-04-15  9:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-06  8:37 [bug#70235] [PATCH 0/2] Update widelands Timotej Lazar
2024-04-06  8:44 ` [bug#70235] [PATCH 1/2] gnu: widelands: Update to 1.2 Timotej Lazar
2024-04-06  8:44 ` [bug#70235] [PATCH 2/2] gnu: widelands: Improve package style Timotej Lazar
2024-04-15  9:51 ` bug#70235: [PATCH 0/2] Update widelands Christopher Baines

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).