unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#40035] Add widelands game
@ 2020-03-12  4:29 Alberto EFG
  2020-03-12 14:31 ` Nicolas Goaziou
  2020-06-19 12:30 ` [bug#40035] " Tobias Geerinckx-Rice via Guix-patches via
  0 siblings, 2 replies; 15+ messages in thread
From: Alberto EFG @ 2020-03-12  4:29 UTC (permalink / raw)
  To: 40035

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

Hello.

This is my first patch. I hope everything is correct, but I know there
might be some mistakes. Pleaste let me know.

 guix lint - I ran it and I think I have no errors now.
 guix size - Around 1.4 gb. I am not sure what to do
 guix refresh --list-dependent - Nothing is dependent

Building in my platform (x86_64) works 

Building with qemu -
    armhf   - not working
    aarch64 - working
    i68     - working
    x86_64  - working


[-- Attachment #2: 0001-gnu-Add-widelands.patch --]
[-- Type: text/x-patch, Size: 2735 bytes --]

From a58ad8525f0293abbc7fd0b93214c40940b7870b Mon Sep 17 00:00:00 2001
From: Alberto Eleuterio Flores Guerrero <barbanegra+guix@posteo.mx>
Date: Wed, 11 Mar 2020 21:50:14 -0600
Subject: [PATCH] gnu: Add widelands.

* gnu/packages/games.scm (widelands): New variable.
---
 gnu/packages/games.scm | 46 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 322e309591..020d31bb70 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -46,6 +46,7 @@
 ;;; Copyright © 2019, 2020 Timotej Lazar <timotej.lazar@araneo.si>
 ;;; Copyright © 2019 Josh Holland <josh@inv.alid.pw>
 ;;; Copyright © 2017, 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
+;;; Copyright © 2020 Alberto Eleuterio Flores Guerrero <barbanegra+guix@posteo.mx>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -10157,3 +10158,48 @@ best human chess grandmasters.  It can be used with UCI-compatible GUIs like
 ChessX.")
     (home-page "https://stockfishchess.org/")
     (license license:gpl3+)))
+
+(define-public widelands
+  (let ((commit "d9513d413f2558f9ef6f033a7685bf9881fbdbb3")
+	(revision "1"))
+    (package
+     (name "widelands")
+     (version (git-version "20" revision commit))
+     (source (origin
+	      (method git-fetch)
+	      (uri (git-reference
+		    (url "https://github.com/widelands/widelands.git")
+		    (commit commit)))
+	      (file-name (git-file-name name version))
+	      (sha256
+	       (base32 "0rsm25kb60xfvib8xk2hcqbppcyjgaiax1rpxxn6vlwrx68nndqp"))))
+     (build-system cmake-build-system)
+     (arguments
+      `(#:tests? #f
+	#:configure-flags
+	(let* ((out (assoc-ref %outputs "out"))
+	       (share (string-append out "/share")))
+	  (list    "-DCMAKE_BUILD_TYPE=Release"
+		   (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"))))
+     (inputs
+      `(("sdl" ,(sdl-union (list sdl2
+				 sdl2-image
+				 sdl2-mixer
+				 sdl2-ttf)))
+	("gettext" ,gettext-minimal)
+        ("icu4c" ,icu4c)
+	("libpng" ,libpng)
+	("zlib" ,zlib)
+	("boost" ,boost)
+	("python" ,python)
+	("glew" ,glew)))
+     (synopsis "Real-time strategy game")
+     (description
+      "Widelands is a free, open source real-time strategy game with
+ singleplayer campaigns and a multiplayer mode.  The game was inspired
+ by Settlers II but has significantly more variety and depth to it.  ")
+     (home-page "https://www.widelands.org/")
+     (license license:gpl2+))))
-- 
2.25.1


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

* [bug#40035] Add widelands game
  2020-03-12  4:29 [bug#40035] Add widelands game Alberto EFG
@ 2020-03-12 14:31 ` Nicolas Goaziou
  2020-03-13  3:14   ` Alberto EFG
  2020-06-19 12:30 ` [bug#40035] " Tobias Geerinckx-Rice via Guix-patches via
  1 sibling, 1 reply; 15+ messages in thread
From: Nicolas Goaziou @ 2020-03-12 14:31 UTC (permalink / raw)
  To: Alberto EFG; +Cc: 40035

Hello,

Alberto EFG <albertoefg@posteo.mx> writes:

> This is my first patch.

Thank you, and congratulations!

> +(define-public widelands
> +  (let ((commit "d9513d413f2558f9ef6f033a7685bf9881fbdbb3")
> +	(revision "1"))

I suggest to add a comment explaining why we rely on a commit, and, if
that makes sense, why this particular one, e.g., "No official release."

> +    (package
> +     (name "widelands")
> +     (version (git-version "20" revision commit))

Where is this "20" coming from?

> +     (source (origin

Nitpick: I suggest to move `origin' to a line on its own.

> +     (arguments
> +      `(#:tests? #f

Why are the tests disabled? We usually provide a comment when disabling
tests.

> +	#:configure-flags
> +	(let* ((out (assoc-ref %outputs "out"))
> +	       (share (string-append out "/share")))
> +	  (list    "-DCMAKE_BUILD_TYPE=Release"
> +		   (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"))))
> +     (inputs
> +      `(("sdl" ,(sdl-union (list sdl2
> +				 sdl2-image
> +				 sdl2-mixer
> +				 sdl2-ttf)))

Nitpick: all can go into a single line.

> +	("gettext" ,gettext-minimal)

This probably belongs to `native-inputs' not `inputs'.

> +        ("icu4c" ,icu4c)

Indentation is off here.

> +	("libpng" ,libpng)
> +	("zlib" ,zlib)
> +	("boost" ,boost)
> +	("python" ,python)

This one may also be a native input. Could you check?

> +	("glew" ,glew)))

Could you re-order inputs alphabetically?

> +     (synopsis "Real-time strategy game")

It is a bit terse. Debian uses the slightly more accurate:

  "Fantasy real-time strategy game"

Maybe it is worth mentioning. Or better, something like:

   "Fantasy real-time strategy game with singleplayer campaigns and multiplayer mode"

It could make sense since in the description I suggest below, there is
no reference to campaigns nor multiplayer.

> +     (description
> +      "Widelands is a free, open source real-time strategy game with

You can remove "free" and "open source". All is free in Guix!

> + singleplayer campaigns and a multiplayer mode.  The game was inspired
> + by Settlers II but has significantly more variety and depth to it.  ")

Mind the spurious spaces at the end.

Again, Debian uses:

    Widelands is a strategy game aiming for gameplay similar to Settlers II by
    BlueByte.

    In this game, you start out on a small piece of land with nothing more than
    a few of useful resources.  Using those, you can build yourself an empire
    with many thousands of inhabitants.  On your way towards this goal, you will
    have to build up an economic infrastructure, explore the lands around you
    and face enemies who are trying to rule the world just like you do.

Would it be better to use it?

> +     (home-page "https://www.widelands.org/")

Nitpick: home-page is usually located above synopsis. I don't know if
there's a strong rule about it, tho.

> +     (license license:gpl2+))))

You are missing out some licenses (CC-based) from the assets in the
game. Could you add them too?

Could you send an updated patch?

Regards,

-- 
Nicolas Goaziou

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

* [bug#40035] Add widelands game
  2020-03-12 14:31 ` Nicolas Goaziou
@ 2020-03-13  3:14   ` Alberto EFG
  2020-03-13  8:16     ` Nicolas Goaziou
  0 siblings, 1 reply; 15+ messages in thread
From: Alberto EFG @ 2020-03-13  3:14 UTC (permalink / raw)
  To: 40035

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


I added all the changes. The synopsis is slightly different than
requested, because of character length.


[-- Attachment #2: 0001-gnu-Add-widelands.patch --]
[-- Type: text/x-patch, Size: 3248 bytes --]

From f8b1cf1bbfe49ab9ae683a89bbeda23b363689fa Mon Sep 17 00:00:00 2001
From: Alberto Eleuterio Flores Guerrero <barbanegra+guix@posteo.mx>
Date: Wed, 11 Mar 2020 21:50:14 -0600
Subject: [PATCH] gnu: Add widelands.

* gnu/packages/games.scm (widelands): New variable.
---
 gnu/packages/games.scm | 53 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 322e309591..eb61341794 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -46,6 +46,7 @@
 ;;; Copyright © 2019, 2020 Timotej Lazar <timotej.lazar@araneo.si>
 ;;; Copyright © 2019 Josh Holland <josh@inv.alid.pw>
 ;;; Copyright © 2017, 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
+;;; Copyright © 2020 Alberto Eleuterio Flores Guerrero <barbanegra+guix@posteo.mx>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -10157,3 +10158,55 @@ best human chess grandmasters.  It can be used with UCI-compatible GUIs like
 ChessX.")
     (home-page "https://stockfishchess.org/")
     (license license:gpl3+)))
+
+(define-public widelands
+  (package
+    (name "widelands")
+    (version "20")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://launchpad.net/widelands/build20/build20/+download/"
+                           name "-build" version ".tar.bz2"))
+       (sha256
+        (base32 "1cmwfwk7j6yi2pwmm4rm57s23sdzasqf53nx6567sdagqyc4sn9q"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:configure-flags
+       (let* ((out (assoc-ref %outputs "out"))
+              (share (string-append out "/share")))
+         (list    "-DCMAKE_BUILD_TYPE=Release"
+                  (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"))))
+    (native-inputs
+     `(("gettext" ,gettext-minimal)
+       ("python" ,python)))
+    (inputs
+     `(("boost" ,boost)
+       ("glew" ,glew)
+       ("icu4c" ,icu4c)
+       ("libpng" ,libpng)
+       ("sdl" ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))
+       ("zlib" ,zlib)))
+    (home-page "https://www.widelands.org/")
+    (synopsis "Real-time strategy game with singleplayer campaigns and
+ multiplayer mode")
+    (description
+     "Widelands is a strategy game aiming for gameplay similar to Settlers II by
+    BlueByte.
+
+    In this game, you start out on a small piece of land with nothing more than
+    a few of useful resources.  Using those, you can build yourself an empire
+    with many thousands of inhabitants.  On your way towards this goal, you will
+    have to build up an economic infrastructure, explore the lands around you
+    and face enemies who are trying to rule the world just like you do.")
+    (license (list
+              license:gpl2+
+              license:gpl3+
+              license:expat
+              license:zlib
+              license:silofl1.1
+              license:asl2.0
+              license:cc-by-sa3.0))))
-- 
2.25.1


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

* [bug#40035] Add widelands game
  2020-03-13  3:14   ` Alberto EFG
@ 2020-03-13  8:16     ` Nicolas Goaziou
  2020-06-18 21:22       ` Nicolas Goaziou
  0 siblings, 1 reply; 15+ messages in thread
From: Nicolas Goaziou @ 2020-03-13  8:16 UTC (permalink / raw)
  To: Alberto EFG; +Cc: 40035

Hello,

Alberto EFG <albertoefg@posteo.mx> writes:

> I added all the changes. The synopsis is slightly different than
> requested, because of character length.

Thanks!

> +(define-public widelands
> +  (package
> +    (name "widelands")
> +    (version "20")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (string-append "https://launchpad.net/widelands/build20/build20/+download/"
> +                           name "-build" version ".tar.bz2"))

I suggest to use version everywhere in the `uri' string:

  (string-append "https://launchpad.net/widelands/build" version "/build" version "/" ...)

> +    (description
> +     "Widelands is a strategy game aiming for gameplay similar to Settlers II by
> +    BlueByte.
> +
> +    In this game, you start out on a small piece of land with nothing more than
> +    a few of useful resources.  Using those, you can build yourself an empire
> +    with many thousands of inhabitants.  On your way towards this goal, you will
> +    have to build up an economic infrastructure, explore the lands around you
> +    and face enemies who are trying to rule the world just like you do.")

The description should not be indented.

> +    (license (list
> +              license:gpl2+
> +              license:gpl3+
> +              license:expat
> +              license:zlib
> +              license:silofl1.1
> +              license:asl2.0
> +              license:cc-by-sa3.0))))

I suggest to add a comment explaining that the software, as a whole, is
gpl2+, but assets are released under various licenses.

BTW, the source ships with "minizip" and "gettext" in "src/third_party".
Could you try unbundling them and use the ones provided by Guix?

Otherwise, LGTM!

Regards,

-- 
Nicolas Goaziou

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

* [bug#40035] Add widelands game
  2020-03-13  8:16     ` Nicolas Goaziou
@ 2020-06-18 21:22       ` Nicolas Goaziou
  2020-06-18 22:58         ` Jonathan Brielmaier
  2020-06-19 12:09         ` Tobias Geerinckx-Rice via Guix-patches via
  0 siblings, 2 replies; 15+ messages in thread
From: Nicolas Goaziou @ 2020-06-18 21:22 UTC (permalink / raw)
  To: Alberto EFG; +Cc: 40035

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

Hello,

I integrated the previous suggestions. I am not sure about the version
string. Upstream seems to use "build-20", and most distributions use
"20", some use "build20" or "b20". I used "build20" because it makes it
easier to build the download URL.

I'm sending the updated patch for review.

Regards,
-- 
Nicolas Goaziou

[-- Attachment #2: Add widelands --]
[-- Type: text/x-diff, Size: 11768 bytes --]

From 186efb0ba86c431e57d535968450bdfd30c1fc43 Mon Sep 17 00:00:00 2001
From: Alberto Eleuterio Flores Guerrero <barbanegra+guix@posteo.mx>
Date: Wed, 17 Jun 2020 11:45:17 +0200
Subject: [PATCH] gnu: Add widelands.

* gnu/local.mk (widelands): New variable.
* gnu/packages/patches/widelands-system-wide_minizip.patch: New file.
(dist_patch_DATA): Register file above.

Co-authored-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
---
 gnu/local.mk                                  |   1 +
 gnu/packages/games.scm                        |  98 +++++++++++
 .../widelands-system-wide_minizip.patch       | 153 ++++++++++++++++++
 3 files changed, 252 insertions(+)
 create mode 100644 gnu/packages/patches/widelands-system-wide_minizip.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index fd3cc88af5..b9cd455fa0 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1592,6 +1592,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/wicd-get-selected-profile-fix.patch	\
   %D%/packages/patches/wicd-urwid-1.3.patch			\
   %D%/packages/patches/wicd-wpa2-ttls.patch			\
+  %D%/packages/patches/widelands-system-wide_minizip.patch	\
   %D%/packages/patches/wmctrl-64-fix.patch			\
   %D%/packages/patches/wmfire-update-for-new-gdk-versions.patch	\
   %D%/packages/patches/wordnet-CVE-2008-2149.patch			\
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 39669ba1c9..f121d7f5c3 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -4018,6 +4018,104 @@ tactics.")
                    license:gpl2+
                    license:lgpl2.1+))))
 
+(define-public widelands
+  (package
+    (name "widelands")
+    (version "build20")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://launchpad.net/widelands/"
+                           version "/" version "/+download/"
+                           "widelands-" version ".tar.bz2"))
+       (sha256
+        (base32 "1cmwfwk7j6yi2pwmm4rm57s23sdzasqf53nx6567sdagqyc4sn9q"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           (delete-file-recursively "src/third_party/minizip")
+           #t))
+       (patches
+        ;; Use system Minizip.  This is discussed updstream at
+        ;; <https://github.com/widelands/widelands/issues/399>.
+        (search-patches "widelands-system-wide_minizip.patch"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:configure-flags
+       (let* ((out (assoc-ref %outputs "out"))
+              (share (string-append out "/share")))
+         (list "-DCMAKE_BUILD_TYPE=Release"
+               (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"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'install-desktop-file-and-icons
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((share (string-append (assoc-ref outputs "out") "/share"))
+                    (applications (string-append share "/applications"))
+                    (icons (string-append share "/icons/hicolor")))
+               ;; Create desktop entry.
+               (mkdir-p applications)
+               (copy-file "debian/org.widelands.widelands.desktop"
+                          (string-append applications "/widelands.desktop"))
+               ;; Install icons.
+               (for-each (lambda (size)
+                           (let* ((dim (string-append size "x" size))
+                                  (apps (string-append icons "/" dim "/apps")))
+                             (mkdir-p apps)
+                             (copy-file (string-append "data/images/logos"
+                                                       "/wl-ico-" size ".png")
+                                        (string-append apps "/widelands.png"))))
+                         '("16" "32" "48" "64" "128"))
+               #t)))
+         (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)))))
+    (native-inputs
+     `(("gettext" ,gettext-minimal)
+       ("python" ,python-wrapper)))
+    (inputs
+     `(("boost" ,boost)
+       ("DejaVu" ,font-dejavu)          ;case matters in name
+       ("glew" ,glew)
+       ("icu4c" ,icu4c)
+       ("libpng" ,libpng)
+       ("MicroHei" ,font-wqy-microhei)  ;case matters in name
+       ("minizip" ,minizip)
+       ("sdl" ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))
+       ("zlib" ,zlib)))
+    (home-page "https://www.widelands.org/")
+    (synopsis "Fantasy real-time strategy game")
+    (description
+     "Widelands is a real-time strategy game with singleplayer campaigns and
+multiplayer mode, aiming for gameplay similar to Settlers II by BlueByte.
+
+In this game, you start out on a small piece of land with nothing more than
+a few of useful resources.  Using those, you can build yourself an empire with
+many thousands of inhabitants.  On your way towards this goal, you will have
+to build up an economic infrastructure, explore the lands around you and face
+enemies who are trying to rule the world just like you do.")
+    ;; Game is released as GPL2+.  Some parts, e.g., art, are released under
+    ;; different licenses.
+    (license (list license:gpl2+
+                   license:gpl3+
+                   license:expat
+                   license:zlib
+                   license:silofl1.1
+                   license:asl2.0
+                   license:cc-by-sa3.0))))
+
 (define-public starfighter
   (package
     (name "starfighter")
diff --git a/gnu/packages/patches/widelands-system-wide_minizip.patch b/gnu/packages/patches/widelands-system-wide_minizip.patch
new file mode 100644
index 0000000000..1fac0d5396
--- /dev/null
+++ b/gnu/packages/patches/widelands-system-wide_minizip.patch
@@ -0,0 +1,153 @@
+Description: use the system-wide minizip instead of the embeeded one if found.
+Forwarded-Upstream: It was provided by upstream: http://bazaar.launchpad.net/~widelands-dev/widelands/b19-debian/revision/8147
+ .
+ Thanks to Fòram na Gàidhlig for the patch.
+ 
+I just added this line to make its use easier:
+  set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_HOME_DIRECTORY}/Modules)
+
+=== modified file 'CMakeLists.txt'
+---
+ CMakeLists.txt                     |    3 +++
+ Modules/FindMinizip.cmake          |   37 +++++++++++++++++++++++++++++++++++++
+ cmake/WlFunctions.cmake            |    7 +++++++
+ src/io/CMakeLists.txt              |    2 +-
+ src/third_party/CMakeLists.txt     |   20 +++++++++++---------
+ src/third_party/minizip/README.txt |    4 ++++
+ 6 files changed, 63 insertions(+), 10 deletions(-)
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -43,6 +43,7 @@
+ endif(POLICY CMP0074)
+ 
+ include("${CMAKE_SOURCE_DIR}/cmake/WlFunctions.cmake")
++set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_HOME_DIRECTORY}/Modules)
+ 
+ option(OPTION_USE_GLBINDING "Use glbinding instead of GLEW" OFF)
+ option(OPTION_GLEW_STATIC "Use static GLEW Library" OFF)
+@@ -105,6 +106,8 @@
+ find_package(SDL2_ttf REQUIRED)
+ find_package(ZLIB REQUIRED)
+ find_package(ICU REQUIRED)
++find_package(Minizip)
++
+ if(OPTION_USE_GLBINDING)
+   find_package(glbinding REQUIRED)
+ else()
+--- /dev/null
++++ b/Modules/FindMinizip.cmake
+@@ -0,0 +1,37 @@
++# - Try to find Minizip
++# Once done this will define
++#  
++#  MINIZIP_FOUND        - system has MINIZIP
++#  MINIZIP_INCLUDE_DIR  - the MINIZIP include directory
++#  MINIZIP_LIBRARY_DIR  - where the libraries are
++#  MINIZIP_LIBRARY      - Link these to use MINIZIP
++#   
++
++IF (MINIZIP_INCLUDE_DIR)
++  # Already in cache, be silent
++  SET(MINIZIP_FIND_QUIETLY TRUE)
++ENDIF (MINIZIP_INCLUDE_DIR)
++
++FIND_PATH( MINIZIP_INCLUDE_DIR 
++	  NAMES zip.h unzip.h ioapi.h
++	  PATHS /usr/local/include /usr/include
++	  PATH_SUFFIXES minizip/ )
++SET( MINIZIP_NAMES minizip MINIZIP )
++FIND_LIBRARY( MINIZIP_LIBRARY
++	      NAMES ${MINIZIP_NAMES}
++	      PATHS /usr/lib /usr/local/lib )
++
++GET_FILENAME_COMPONENT( MINIZIP_LIBRARY_DIR ${MINIZIP_LIBRARY} PATH )
++
++IF (MINIZIP_INCLUDE_DIR AND MINIZIP_LIBRARY)
++   SET(MINIZIP_FOUND TRUE)
++   SET(MINIZIP_LIBRARY_DIR ${MINIZIP_LIBRARY} )
++   IF (NOT MINIZIP_FIND_QUIETLY)
++     MESSAGE (STATUS "Found Minizip: ${MINIZIP_LIBRARY} ${MINIZIP_INCLUDE_DIR}")
++   ENDIF (NOT MINIZIP_FIND_QUIETLY)
++ELSE (MINIZIP_INCLUDE_DIR AND MINIZIP_LIBRARY)
++   SET( MINIZIP_FOUND FALSE )
++   SET( MINIZIP_LIBRARY_DIR )
++   SET( MINIZIP_EXTRA_DEFINITIONS )
++ENDIF (MINIZIP_INCLUDE_DIR AND MINIZIP_LIBRARY)
++
+--- a/cmake/WlFunctions.cmake
++++ b/cmake/WlFunctions.cmake
+@@ -81,6 +81,14 @@
+   if(ARG_USES_ZLIB)
+     wl_include_system_directories(${NAME} ${ZLIB_INCLUDE_DIRS})
+     target_link_libraries(${NAME} ${ZLIB_LIBRARY})
++    if (MINIZIP_FOUND)
++      wl_include_system_directories(${NAME}  ${MINIZIP_INCLUDE_DIR})
++      target_link_libraries(${NAME}  ${MINIZIP_LIBRARY})
++      target_compile_definitions(${NAME} PUBLIC -DHAVE_SYSTEM_MINIZIP)
++    else(MINIZIP_FOUND)
++      target_link_libraries(${NAME}  third_party_minizip)
++      message(FATAL_ERROR "You are using widelands-bundled minizip sources. Please install your distribution's minizip dev library or urge your distribution maintainer to include the minizip library in your package repository. Thank you.")
++    endif(MINIZIP_FOUND)
+   endif()
+ 
+   # OpenGL and GLEW are one thing for us. If you use the one, you also use the
+--- a/src/third_party/CMakeLists.txt
++++ b/src/third_party/CMakeLists.txt
+@@ -1,12 +1,14 @@
+-wl_library(third_party_minizip
+-  THIRD_PARTY
+-  SRCS
+-    minizip/ioapi.h
+-    minizip/unzip.cc
+-    minizip/unzip.h
+-    minizip/zip.h
+-  USES_ZLIB
+-)
++if(NOT MINIZIP_FOUND)
++  wl_library(third_party_minizip
++    THIRD_PARTY
++    SRCS
++      ioapi.h
++      unzip.cc
++      unzip.h
++      zip.h
++    USES_ZLIB
++  )
++endif(NOT MINIZIP_FOUND)
+ 
+ wl_library(third_party_eris
+   THIRD_PARTY
+--- a/src/io/filesystem/CMakeLists.txt
++++ b/src/io/filesystem/CMakeLists.txt
+@@ -12,6 +12,7 @@
+     zip_exceptions.h
+     zip_filesystem.cc
+     zip_filesystem.h
++  USES_ZLIB
+   DEPENDS
+     base_exceptions
+     base_i18n
+@@ -19,5 +20,4 @@
+     base_macros
+     graphic_text_layout
+     io_stream
+-    third_party_minizip
+ )
+--- a/src/io/filesystem/zip_filesystem.h
++++ b/src/io/filesystem/zip_filesystem.h
+@@ -28,8 +28,14 @@
+ #include "io/filesystem/filesystem.h"
+ #include "io/streamread.h"
+ #include "io/streamwrite.h"
++
++#ifndef HAVE_SYSTEM_MINIZIP
+ #include "third_party/minizip/unzip.h"
+ #include "third_party/minizip/zip.h"
++#else
++#include <minizip/unzip.h>
++#include <minizip/zip.h>
++#endif
+ 
+ class ZipFilesystem : public FileSystem {
+ public:
-- 
2.26.2


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

* [bug#40035] Add widelands game
  2020-06-18 21:22       ` Nicolas Goaziou
@ 2020-06-18 22:58         ` Jonathan Brielmaier
  2020-06-19  7:01           ` Nicolas Goaziou
  2020-06-21  6:33           ` Efraim Flashner
  2020-06-19 12:09         ` Tobias Geerinckx-Rice via Guix-patches via
  1 sibling, 2 replies; 15+ messages in thread
From: Jonathan Brielmaier @ 2020-06-18 22:58 UTC (permalink / raw)
  To: Nicolas Goaziou, Alberto EFG; +Cc: 40035

On 18.06.20 23:22, Nicolas Goaziou wrote:
> Hello,
>
> I integrated the previous suggestions. I am not sure about the version
> string. Upstream seems to use "build-20", and most distributions use
> "20", some use "build20" or "b20". I used "build20" because it makes it
> easier to build the download URL.

Couldn't we just use the most recent tag on Github?
https://github.com/widelands/widelands/releases/tag/bzr9203

> +    (home-page "https://www.widelands.org/")
> +    (synopsis "Fantasy real-time strategy game")
> +    (description
> +     "Widelands is a real-time strategy game with singleplayer campaigns and
> +multiplayer mode, aiming for gameplay similar to Settlers II by BlueByte.
> +
> +In this game, you start out on a small piece of land with nothing more than
> +a few of useful resources.  Using those, you can build yourself an empire with
> +many thousands of inhabitants.  On your way towards this goal, you will have
> +to build up an economic infrastructure, explore the lands around you and face
> +enemies who are trying to rule the world just like you do.")

Are we allowed to just copy descriptions from Debian packages? Is this
license compatible?




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

* [bug#40035] Add widelands game
  2020-06-18 22:58         ` Jonathan Brielmaier
@ 2020-06-19  7:01           ` Nicolas Goaziou
  2020-06-21  6:33           ` Efraim Flashner
  1 sibling, 0 replies; 15+ messages in thread
From: Nicolas Goaziou @ 2020-06-19  7:01 UTC (permalink / raw)
  To: Jonathan Brielmaier; +Cc: Alberto EFG, 40035

Hello,

Jonathan Brielmaier <jonathan.brielmaier@web.de> writes:

> On 18.06.20 23:22, Nicolas Goaziou wrote:
>> Hello,
>>
>> I integrated the previous suggestions. I am not sure about the version
>> string. Upstream seems to use "build-20", and most distributions use
>> "20", some use "build20" or "b20". I used "build20" because it makes it
>> easier to build the download URL.
>
> Couldn't we just use the most recent tag on Github?
> https://github.com/widelands/widelands/releases/tag/bzr9203

Despite its name, "build-20" is the official stable release. OTOH,
I don't know what "bzr9203" is.

Considering the game is still under active development, I think we
should stick to the stable release.

>> +    (description
>> +     "Widelands is a real-time strategy game with singleplayer campaigns and
>> +multiplayer mode, aiming for gameplay similar to Settlers II by BlueByte.
>> +
>> +In this game, you start out on a small piece of land with nothing more than
>> +a few of useful resources.  Using those, you can build yourself an empire with
>> +many thousands of inhabitants.  On your way towards this goal, you will have
>> +to build up an economic infrastructure, explore the lands around you and face
>> +enemies who are trying to rule the world just like you do.")
>
> Are we allowed to just copy descriptions from Debian packages? Is this
> license compatible?

Good question. I think copying Debian's description is fine, although it
may be nicer to add a comment explaining where it was "borrowed". But
I am also curious to know what other developers think about it.

In the current case, however, I think Debian's description is more or
a less a glorified rewording of the documentation. IOW, I don't think
there is anything to claim authorship on.

We can change it nonetheless. What about the following excerpt from
upstream?

    In Widelands, you are the regent of a small clan. You start out with
    nothing but your headquarters, where all your resources are stored.

    In the course of the game, you will build an ever growing
    settlement. Every member of your clan will do his or her part to
    produce more resources---wood, food, iron, gold and more---to
    further this growth. The economic network is complex and different
    in the four tribes (Barbarians, Empire, Atlanteans, and Frisians).

    As you are not alone in the world, you will meet other clans sooner or
    later. Some of them may be friendly and you may eventually trade with
    them. However, if you want to rule the world, you will have to train
    soldiers and fight.

    Widelands offers single-player mode with different campaigns; the
    campaigns all tell stories of tribes and their struggle in the Widelands
    universe! However, settling really starts when you unite with friends
    over the Internet or LAN to build up new empires together---or to crush
    each other in the dusts of war. Widelands also offers an Artificial
    Intelligence to challenge you.


Thank you for the review,

Regards,
-- 
Nicolas Goaziou




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

* [bug#40035] Add widelands game
  2020-06-18 21:22       ` Nicolas Goaziou
  2020-06-18 22:58         ` Jonathan Brielmaier
@ 2020-06-19 12:09         ` Tobias Geerinckx-Rice via Guix-patches via
  2020-06-19 18:59           ` Nicolas Goaziou
  1 sibling, 1 reply; 15+ messages in thread
From: Tobias Geerinckx-Rice via Guix-patches via @ 2020-06-19 12:09 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: albertoefg, 40035

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

Alberto, Nicolas,

Nicolas Goaziou 写道:
> I integrated the previous suggestions. I am not sure about the 
> version
> string. Upstream seems to use "build-20", and most distributions 
> use
> "20", some use "build20" or "b20". I used "build20" because it 
> makes it
> easier to build the download URL.

Does ‘build’ mean beta or (stable) preview here?  Then we should 
append ‘0.0.0-’ or similar, like we do for git snapshots, to the 
front in case upstream releases a 1.x at some point.

Otherwise, ‘20’'s fine, really.

> I'm sending the updated patch for review.

Thank you both!  I'm building it now.

> +       (patches
> +        ;; Use system Minizip.  This is discussed updstream at
> +        ;; <https://github.com/widelands/widelands/issues/399>.
> +        (search-patches 
> "widelands-system-wide_minizip.patch"))))

Minor typo (‘embeeded’).  Are you the ‘I’ in the patch?  Is it 
pending upstream application?  If so, a link to the upstream bug 
report/commit would be nice.

> +         (list "-DCMAKE_BUILD_TYPE=Release"

Why not the default RelWithDebInfo?  Please note in a comment.

> +       ("DejaVu" ,font-dejavu)          ;case matters in name
[…]
> +       ("MicroHei" ,font-wqy-microhei)  ;case matters in name

Mkay I guess.  No point in a codebase chock-full of repetitive 
alists if we're not going to take advantage of it once in a while 
:-)

I'd put both at the end with a single

  ;; Fonts for the ‘unbundle-fonts’ phase.  Case matters in name!

comment.

> +       ("minizip" ,minizip)
> +       ("sdl" ,(sdl-union (list sdl2 sdl2-image sdl2-mixer 
> sdl2-ttf)))
> +       ("zlib" ,zlib)))
> +    (home-page "https://www.widelands.org/")
> +    (synopsis "Fantasy real-time strategy game")
> +    (description
> +     "Widelands is a real-time strategy game with singleplayer 
> campaigns and
> +multiplayer mode, aiming for gameplay similar to Settlers II by 
> BlueByte.
> +
> +In this game, you start out on a small piece of land with 
> nothing more than
> +a few of useful resources.  Using those, you can build yourself 
> an empire with
> +many thousands of inhabitants.  On your way towards this goal, 
> you will have
> +to build up an economic infrastructure, explore the lands 
> around you and face
> +enemies who are trying to rule the world just like you do.")

I think Debian(-derived) descriptions are OK but I prefer 
yours/upstream's anyway.

> +    ;; Game is released as GPL2+.  Some parts, e.g., art, are 
> released under
> +    ;; different licenses.

At least Culmus and Sinhala are GPL2-only.  The title screen also 
says ‘GNU General Public License V2.0’.

> +    (license (list license:gpl2+
> +                   license:gpl3+

Which parts are gpl3+?  That sounds problematic.

> +                   license:expat
> +                   license:zlib
> +                   license:silofl1.1
> +                   license:asl2.0
> +                   license:cc-by-sa3.0))))

It's built now, I will test it extensively on the bus…

Thanks!

T G-R

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

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

* [bug#40035] Add widelands game
  2020-03-12  4:29 [bug#40035] Add widelands game Alberto EFG
  2020-03-12 14:31 ` Nicolas Goaziou
@ 2020-06-19 12:30 ` Tobias Geerinckx-Rice via Guix-patches via
  1 sibling, 0 replies; 15+ messages in thread
From: Tobias Geerinckx-Rice via Guix-patches via @ 2020-06-19 12:30 UTC (permalink / raw)
  To: Alberto EFG; +Cc: 40035

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

Alberto,

Alberto EFG 写道:
>  guix size - Around 1.4 gb. I am not sure what to do

You don't need to do anything.  Games like these are expected to 
be biggish, and people tend not to mind because, well, they're 
games.

95% of people (if not more) who play widelands already have almost 
all of its dependencies installed already, for their desktop. 
‘guix size’ is the absolute worst case.

There are some large dependencies that probably aren't used by the 
game itself:

  $ guix graph --path widelands ghostscript-with-cups
  # read each newline as ‘depends on’:
  widelands@build20
  sdl-union@1.2.15
  sdl2@2.0.12
  fcitx@4.2.9.7
  gtk+@2.24.32
  cups@2.3.3
  cups-filters@1.27.4
  ghostscript-with-cups@9.52

but that's nothing you need to can fix in widelands itself.

>  guix refresh --list-dependent - Nothing is dependent

This command lists the number of other packages that depend on 
your package.  It's useful mainly for updates.

For a new package the number will always be 0 — unless you created 
a dependency yourself.  That would require modifying an existing 
package which you didn't do.

Kind regards,

T G-R

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

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

* [bug#40035] Add widelands game
  2020-06-19 12:09         ` Tobias Geerinckx-Rice via Guix-patches via
@ 2020-06-19 18:59           ` Nicolas Goaziou
  2020-06-19 20:46             ` Nicolas Goaziou
  2020-06-19 21:14             ` Tobias Geerinckx-Rice via Guix-patches via
  0 siblings, 2 replies; 15+ messages in thread
From: Nicolas Goaziou @ 2020-06-19 18:59 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: Alberto EFG, 40035

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

Hello,

Tobias Geerinckx-Rice <me@tobias.gr> writes:

> Otherwise, ‘20’'s fine, really.

Fair enough.

>> +        ;; Use system Minizip.  This is discussed updstream at
>> +        ;; <https://github.com/widelands/widelands/issues/399>.
>> +        (search-patches "widelands-system-wide_minizip.patch"))))
>
> Minor typo (‘embeeded’).  Are you the ‘I’ in the patch?  Is it pending
> upstream application?  If so, a link to the upstream bug report/commit
> would be nice.

Typo fixed. I'm not the "I" in the patch. It is shipped in "debian/"
subdir. I mentioned it in a comment.

>> +         (list "-DCMAKE_BUILD_TYPE=Release"
>
> Why not the default RelWithDebInfo?  Please note in a comment.

I don't know. It seems to build fine without it, so I removed it.

> I'd put both at the end with a single
>
>  ;; Fonts for the ‘unbundle-fonts’ phase.  Case matters in name!

OK.

> I think Debian(-derived) descriptions are OK but I prefer
> yours/upstream's anyway.

I used upstream's.

>> +    ;; Game is released as GPL2+.  Some parts, e.g., art, are
>> released under
>> +    ;; different licenses.
>
> At least Culmus and Sinhala are GPL2-only.  

Are you sure? For example, I see GPL2 for Culmus, but it doesn't mention
"only" anywhere. Also, Debian's copyright file considers it GPL2+.

> The title screen also says
> ‘GNU General Public License V2.0’.

Source code is definitely GPL2+. I think Debian has a patch to fix the
title screen.

>> +    (license (list license:gpl2+
>> +                   license:gpl3+
>
> Which parts are gpl3+?  That sounds problematic.

None. That was probably an oversight.

>> +                   license:expat
>> +                   license:zlib
>> +                   license:silofl1.1
>> +                   license:asl2.0
>> +                   license:cc-by-sa3.0))))

I also removed zlib (minizip) and asl2.0 (microhei).

Thanks for the review. V3 attached.

Regards,
-- 
Nicolas Goaziou

[-- Attachment #2: Add widelands --]
[-- Type: text/x-diff, Size: 12371 bytes --]

From fa7351a369a0fd249d28ad97a55a28d29f38ee22 Mon Sep 17 00:00:00 2001
From: Alberto Eleuterio Flores Guerrero <barbanegra+guix@posteo.mx>
Date: Wed, 17 Jun 2020 11:45:17 +0200
Subject: [PATCH v3] gnu: Add widelands.

* gnu/local.mk (widelands): New variable.
* gnu/packages/patches/widelands-system-wide_minizip.patch: New file.
(dist_patch_DATA): Register file above.

Co-authored-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
---
 gnu/local.mk                                  |   1 +
 gnu/packages/games.scm                        | 106 ++++++++++++
 .../widelands-system-wide_minizip.patch       | 153 ++++++++++++++++++
 3 files changed, 260 insertions(+)
 create mode 100644 gnu/packages/patches/widelands-system-wide_minizip.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index fd3cc88af5..b9cd455fa0 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1592,6 +1592,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/wicd-get-selected-profile-fix.patch	\
   %D%/packages/patches/wicd-urwid-1.3.patch			\
   %D%/packages/patches/wicd-wpa2-ttls.patch			\
+  %D%/packages/patches/widelands-system-wide_minizip.patch	\
   %D%/packages/patches/wmctrl-64-fix.patch			\
   %D%/packages/patches/wmfire-update-for-new-gdk-versions.patch	\
   %D%/packages/patches/wordnet-CVE-2008-2149.patch			\
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 39669ba1c9..2d1c2a4e6d 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -4018,6 +4018,112 @@ tactics.")
                    license:gpl2+
                    license:lgpl2.1+))))
 
+(define-public widelands
+  (package
+    (name "widelands")
+    (version "20")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://launchpad.net/widelands/"
+                           "build" version "/build" version "/+download/"
+                           "widelands-build" version ".tar.bz2"))
+       (sha256
+        (base32 "1cmwfwk7j6yi2pwmm4rm57s23sdzasqf53nx6567sdagqyc4sn9q"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           (delete-file-recursively "src/third_party/minizip")
+           #t))
+       (patches
+        ;; Use system Minizip.  Following patch is included in "debian/"
+        ;; sub-directory.  This discussed upstream at
+        ;; <https://github.com/widelands/widelands/issues/399>.
+        (search-patches "widelands-system-wide_minizip.patch"))))
+    (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"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'install-desktop-file-and-icons
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((share (string-append (assoc-ref outputs "out") "/share"))
+                    (applications (string-append share "/applications"))
+                    (icons (string-append share "/icons/hicolor")))
+               ;; Move desktop entry.
+               (mkdir-p applications)
+               (copy-file "debian/org.widelands.widelands.desktop"
+                          (string-append applications "/widelands.desktop"))
+               ;; Install icons.
+               (for-each (lambda (size)
+                           (let* ((dim (string-append size "x" size))
+                                  (apps (string-append icons "/" dim "/apps")))
+                             (mkdir-p apps)
+                             (copy-file (string-append "data/images/logos"
+                                                       "/wl-ico-" size ".png")
+                                        (string-append apps "/widelands.png"))))
+                         '("16" "32" "48" "64" "128"))
+               #t)))
+         (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)))))
+    (native-inputs
+     `(("gettext" ,gettext-minimal)
+       ("python" ,python-wrapper)))
+    (inputs
+     `(("boost" ,boost)
+       ("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/")
+    (synopsis "Fantasy real-time strategy game")
+    (description
+     "In Widelands, you are the regent of a small clan.  You start out with
+nothing but your headquarters, where all your resources are stored.
+
+In the course of the game, you will build an ever growing settlement.  Every
+member of your clan will do his or her part to produce more resources---wood,
+food, iron, gold and more---to further this growth.  The economic network is
+complex and different in the four tribes (Barbarians, Empire, Atlanteans, and
+Frisians).
+
+As you are not alone in the world, you will meet other clans sooner or later.
+Some of them may be friendly and you may eventually trade with them.  However,
+if you want to rule the world, you will have to train soldiers and fight.
+
+Widelands offers single-player mode with different campaigns; the campaigns
+all tell stories of tribes and their struggle in the Widelands universe!
+However, settling really starts when you unite with friends over the Internet
+or LAN to build up new empires together---or to crush each other in the dusts
+of war.  Widelands also offers an Artificial Intelligence to challenge you.")
+    ;; Game is released as GPL2+.  Some parts, e.g., art, are released under
+    ;; different licenses.
+    (license (list license:gpl2+
+                   license:expat           ;src/third_party/eris
+                   license:silofl1.1       ;Widelands.ttf
+                   license:cc-by-sa3.0)))) ;some music files
+
 (define-public starfighter
   (package
     (name "starfighter")
diff --git a/gnu/packages/patches/widelands-system-wide_minizip.patch b/gnu/packages/patches/widelands-system-wide_minizip.patch
new file mode 100644
index 0000000000..1fac0d5396
--- /dev/null
+++ b/gnu/packages/patches/widelands-system-wide_minizip.patch
@@ -0,0 +1,153 @@
+Description: use the system-wide minizip instead of the embeeded one if found.
+Forwarded-Upstream: It was provided by upstream: http://bazaar.launchpad.net/~widelands-dev/widelands/b19-debian/revision/8147
+ .
+ Thanks to Fòram na Gàidhlig for the patch.
+ 
+I just added this line to make its use easier:
+  set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_HOME_DIRECTORY}/Modules)
+
+=== modified file 'CMakeLists.txt'
+---
+ CMakeLists.txt                     |    3 +++
+ Modules/FindMinizip.cmake          |   37 +++++++++++++++++++++++++++++++++++++
+ cmake/WlFunctions.cmake            |    7 +++++++
+ src/io/CMakeLists.txt              |    2 +-
+ src/third_party/CMakeLists.txt     |   20 +++++++++++---------
+ src/third_party/minizip/README.txt |    4 ++++
+ 6 files changed, 63 insertions(+), 10 deletions(-)
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -43,6 +43,7 @@
+ endif(POLICY CMP0074)
+ 
+ include("${CMAKE_SOURCE_DIR}/cmake/WlFunctions.cmake")
++set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_HOME_DIRECTORY}/Modules)
+ 
+ option(OPTION_USE_GLBINDING "Use glbinding instead of GLEW" OFF)
+ option(OPTION_GLEW_STATIC "Use static GLEW Library" OFF)
+@@ -105,6 +106,8 @@
+ find_package(SDL2_ttf REQUIRED)
+ find_package(ZLIB REQUIRED)
+ find_package(ICU REQUIRED)
++find_package(Minizip)
++
+ if(OPTION_USE_GLBINDING)
+   find_package(glbinding REQUIRED)
+ else()
+--- /dev/null
++++ b/Modules/FindMinizip.cmake
+@@ -0,0 +1,37 @@
++# - Try to find Minizip
++# Once done this will define
++#  
++#  MINIZIP_FOUND        - system has MINIZIP
++#  MINIZIP_INCLUDE_DIR  - the MINIZIP include directory
++#  MINIZIP_LIBRARY_DIR  - where the libraries are
++#  MINIZIP_LIBRARY      - Link these to use MINIZIP
++#   
++
++IF (MINIZIP_INCLUDE_DIR)
++  # Already in cache, be silent
++  SET(MINIZIP_FIND_QUIETLY TRUE)
++ENDIF (MINIZIP_INCLUDE_DIR)
++
++FIND_PATH( MINIZIP_INCLUDE_DIR 
++	  NAMES zip.h unzip.h ioapi.h
++	  PATHS /usr/local/include /usr/include
++	  PATH_SUFFIXES minizip/ )
++SET( MINIZIP_NAMES minizip MINIZIP )
++FIND_LIBRARY( MINIZIP_LIBRARY
++	      NAMES ${MINIZIP_NAMES}
++	      PATHS /usr/lib /usr/local/lib )
++
++GET_FILENAME_COMPONENT( MINIZIP_LIBRARY_DIR ${MINIZIP_LIBRARY} PATH )
++
++IF (MINIZIP_INCLUDE_DIR AND MINIZIP_LIBRARY)
++   SET(MINIZIP_FOUND TRUE)
++   SET(MINIZIP_LIBRARY_DIR ${MINIZIP_LIBRARY} )
++   IF (NOT MINIZIP_FIND_QUIETLY)
++     MESSAGE (STATUS "Found Minizip: ${MINIZIP_LIBRARY} ${MINIZIP_INCLUDE_DIR}")
++   ENDIF (NOT MINIZIP_FIND_QUIETLY)
++ELSE (MINIZIP_INCLUDE_DIR AND MINIZIP_LIBRARY)
++   SET( MINIZIP_FOUND FALSE )
++   SET( MINIZIP_LIBRARY_DIR )
++   SET( MINIZIP_EXTRA_DEFINITIONS )
++ENDIF (MINIZIP_INCLUDE_DIR AND MINIZIP_LIBRARY)
++
+--- a/cmake/WlFunctions.cmake
++++ b/cmake/WlFunctions.cmake
+@@ -81,6 +81,14 @@
+   if(ARG_USES_ZLIB)
+     wl_include_system_directories(${NAME} ${ZLIB_INCLUDE_DIRS})
+     target_link_libraries(${NAME} ${ZLIB_LIBRARY})
++    if (MINIZIP_FOUND)
++      wl_include_system_directories(${NAME}  ${MINIZIP_INCLUDE_DIR})
++      target_link_libraries(${NAME}  ${MINIZIP_LIBRARY})
++      target_compile_definitions(${NAME} PUBLIC -DHAVE_SYSTEM_MINIZIP)
++    else(MINIZIP_FOUND)
++      target_link_libraries(${NAME}  third_party_minizip)
++      message(FATAL_ERROR "You are using widelands-bundled minizip sources. Please install your distribution's minizip dev library or urge your distribution maintainer to include the minizip library in your package repository. Thank you.")
++    endif(MINIZIP_FOUND)
+   endif()
+ 
+   # OpenGL and GLEW are one thing for us. If you use the one, you also use the
+--- a/src/third_party/CMakeLists.txt
++++ b/src/third_party/CMakeLists.txt
+@@ -1,12 +1,14 @@
+-wl_library(third_party_minizip
+-  THIRD_PARTY
+-  SRCS
+-    minizip/ioapi.h
+-    minizip/unzip.cc
+-    minizip/unzip.h
+-    minizip/zip.h
+-  USES_ZLIB
+-)
++if(NOT MINIZIP_FOUND)
++  wl_library(third_party_minizip
++    THIRD_PARTY
++    SRCS
++      ioapi.h
++      unzip.cc
++      unzip.h
++      zip.h
++    USES_ZLIB
++  )
++endif(NOT MINIZIP_FOUND)
+ 
+ wl_library(third_party_eris
+   THIRD_PARTY
+--- a/src/io/filesystem/CMakeLists.txt
++++ b/src/io/filesystem/CMakeLists.txt
+@@ -12,6 +12,7 @@
+     zip_exceptions.h
+     zip_filesystem.cc
+     zip_filesystem.h
++  USES_ZLIB
+   DEPENDS
+     base_exceptions
+     base_i18n
+@@ -19,5 +20,4 @@
+     base_macros
+     graphic_text_layout
+     io_stream
+-    third_party_minizip
+ )
+--- a/src/io/filesystem/zip_filesystem.h
++++ b/src/io/filesystem/zip_filesystem.h
+@@ -28,8 +28,14 @@
+ #include "io/filesystem/filesystem.h"
+ #include "io/streamread.h"
+ #include "io/streamwrite.h"
++
++#ifndef HAVE_SYSTEM_MINIZIP
+ #include "third_party/minizip/unzip.h"
+ #include "third_party/minizip/zip.h"
++#else
++#include <minizip/unzip.h>
++#include <minizip/zip.h>
++#endif
+ 
+ class ZipFilesystem : public FileSystem {
+ public:
-- 
2.26.2


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

* [bug#40035] Add widelands game
  2020-06-19 18:59           ` Nicolas Goaziou
@ 2020-06-19 20:46             ` Nicolas Goaziou
  2020-06-19 21:14             ` Tobias Geerinckx-Rice via Guix-patches via
  1 sibling, 0 replies; 15+ messages in thread
From: Nicolas Goaziou @ 2020-06-19 20:46 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: Alberto EFG, 40035

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

Correcting myself,

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Tobias Geerinckx-Rice <me@tobias.gr> writes:

>> Why not the default RelWithDebInfo?  Please note in a comment.
>
> I don't know. It seems to build fine without it, so I removed it.

It builds, but doesn't run properly with RelWithDebInfo. Indeed, no game
data is installed when using this build type.

Time for a v4.

[-- Attachment #2: Add widelands --]
[-- Type: text/x-diff, Size: 12567 bytes --]

From 9427f07a83381613344053d6f496474ae6bbe09c Mon Sep 17 00:00:00 2001
From: Alberto Eleuterio Flores Guerrero <barbanegra+guix@posteo.mx>
Date: Wed, 17 Jun 2020 11:45:17 +0200
Subject: [PATCH v4] gnu: Add widelands.

* gnu/local.mk (widelands): New variable.
* gnu/packages/patches/widelands-system-wide_minizip.patch: New file.
(dist_patch_DATA): Register file above.

Co-authored-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
---
 gnu/local.mk                                  |   1 +
 gnu/packages/games.scm                        | 109 +++++++++++++
 .../widelands-system-wide_minizip.patch       | 153 ++++++++++++++++++
 3 files changed, 263 insertions(+)
 create mode 100644 gnu/packages/patches/widelands-system-wide_minizip.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index fd3cc88af5..b9cd455fa0 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1592,6 +1592,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/wicd-get-selected-profile-fix.patch	\
   %D%/packages/patches/wicd-urwid-1.3.patch			\
   %D%/packages/patches/wicd-wpa2-ttls.patch			\
+  %D%/packages/patches/widelands-system-wide_minizip.patch	\
   %D%/packages/patches/wmctrl-64-fix.patch			\
   %D%/packages/patches/wmfire-update-for-new-gdk-versions.patch	\
   %D%/packages/patches/wordnet-CVE-2008-2149.patch			\
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 39669ba1c9..9407966151 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -4018,6 +4018,115 @@ tactics.")
                    license:gpl2+
                    license:lgpl2.1+))))
 
+(define-public widelands
+  (package
+    (name "widelands")
+    (version "20")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://launchpad.net/widelands/"
+                           "build" version "/build" version "/+download/"
+                           "widelands-build" version ".tar.bz2"))
+       (sha256
+        (base32 "1cmwfwk7j6yi2pwmm4rm57s23sdzasqf53nx6567sdagqyc4sn9q"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           (delete-file-recursively "src/third_party/minizip")
+           #t))
+       (patches
+        ;; Use system Minizip.  Following patch is included in "debian/"
+        ;; sub-directory.  This is discussed upstream at
+        ;; <https://github.com/widelands/widelands/issues/399>.
+        (search-patches "widelands-system-wide_minizip.patch"))))
+    (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")
+               ;; CMakeLists.txt does not handle properly RelWithDebInfo build
+               ;; type.  When used, no game data is installed!
+               "-DCMAKE_BUILD_TYPE=Release"
+               "-DOPTION_BUILD_WEBSITE_TOOLS=OFF"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'install-desktop-file-and-icons
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((share (string-append (assoc-ref outputs "out") "/share"))
+                    (applications (string-append share "/applications"))
+                    (icons (string-append share "/icons/hicolor")))
+               ;; Move desktop entry.
+               (mkdir-p applications)
+               (copy-file "debian/org.widelands.widelands.desktop"
+                          (string-append applications "/widelands.desktop"))
+               ;; Install icons.
+               (for-each (lambda (size)
+                           (let* ((dim (string-append size "x" size))
+                                  (apps (string-append icons "/" dim "/apps")))
+                             (mkdir-p apps)
+                             (copy-file (string-append "data/images/logos"
+                                                       "/wl-ico-" size ".png")
+                                        (string-append apps "/widelands.png"))))
+                         '("16" "32" "48" "64" "128"))
+               #t)))
+         (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)))))
+    (native-inputs
+     `(("gettext" ,gettext-minimal)
+       ("python" ,python-wrapper)))
+    (inputs
+     `(("boost" ,boost)
+       ("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/")
+    (synopsis "Fantasy real-time strategy game")
+    (description
+     "In Widelands, you are the regent of a small clan.  You start out with
+nothing but your headquarters, where all your resources are stored.
+
+In the course of the game, you will build an ever growing settlement.  Every
+member of your clan will do his or her part to produce more resources---wood,
+food, iron, gold and more---to further this growth.  The economic network is
+complex and different in the four tribes (Barbarians, Empire, Atlanteans, and
+Frisians).
+
+As you are not alone in the world, you will meet other clans sooner or later.
+Some of them may be friendly and you may eventually trade with them.  However,
+if you want to rule the world, you will have to train soldiers and fight.
+
+Widelands offers single-player mode with different campaigns; the campaigns
+all tell stories of tribes and their struggle in the Widelands universe!
+However, settling really starts when you unite with friends over the Internet
+or LAN to build up new empires together---or to crush each other in the dusts
+of war.  Widelands also offers an Artificial Intelligence to challenge you.")
+    ;; Game is released as GPL2+.  Some parts, e.g., art, are released under
+    ;; different licenses.
+    (license (list license:gpl2+
+                   license:expat           ;src/third_party/eris
+                   license:silofl1.1       ;Widelands.ttf
+                   license:cc-by-sa3.0)))) ;some music files
+
 (define-public starfighter
   (package
     (name "starfighter")
diff --git a/gnu/packages/patches/widelands-system-wide_minizip.patch b/gnu/packages/patches/widelands-system-wide_minizip.patch
new file mode 100644
index 0000000000..1fac0d5396
--- /dev/null
+++ b/gnu/packages/patches/widelands-system-wide_minizip.patch
@@ -0,0 +1,153 @@
+Description: use the system-wide minizip instead of the embeeded one if found.
+Forwarded-Upstream: It was provided by upstream: http://bazaar.launchpad.net/~widelands-dev/widelands/b19-debian/revision/8147
+ .
+ Thanks to Fòram na Gàidhlig for the patch.
+ 
+I just added this line to make its use easier:
+  set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_HOME_DIRECTORY}/Modules)
+
+=== modified file 'CMakeLists.txt'
+---
+ CMakeLists.txt                     |    3 +++
+ Modules/FindMinizip.cmake          |   37 +++++++++++++++++++++++++++++++++++++
+ cmake/WlFunctions.cmake            |    7 +++++++
+ src/io/CMakeLists.txt              |    2 +-
+ src/third_party/CMakeLists.txt     |   20 +++++++++++---------
+ src/third_party/minizip/README.txt |    4 ++++
+ 6 files changed, 63 insertions(+), 10 deletions(-)
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -43,6 +43,7 @@
+ endif(POLICY CMP0074)
+ 
+ include("${CMAKE_SOURCE_DIR}/cmake/WlFunctions.cmake")
++set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_HOME_DIRECTORY}/Modules)
+ 
+ option(OPTION_USE_GLBINDING "Use glbinding instead of GLEW" OFF)
+ option(OPTION_GLEW_STATIC "Use static GLEW Library" OFF)
+@@ -105,6 +106,8 @@
+ find_package(SDL2_ttf REQUIRED)
+ find_package(ZLIB REQUIRED)
+ find_package(ICU REQUIRED)
++find_package(Minizip)
++
+ if(OPTION_USE_GLBINDING)
+   find_package(glbinding REQUIRED)
+ else()
+--- /dev/null
++++ b/Modules/FindMinizip.cmake
+@@ -0,0 +1,37 @@
++# - Try to find Minizip
++# Once done this will define
++#  
++#  MINIZIP_FOUND        - system has MINIZIP
++#  MINIZIP_INCLUDE_DIR  - the MINIZIP include directory
++#  MINIZIP_LIBRARY_DIR  - where the libraries are
++#  MINIZIP_LIBRARY      - Link these to use MINIZIP
++#   
++
++IF (MINIZIP_INCLUDE_DIR)
++  # Already in cache, be silent
++  SET(MINIZIP_FIND_QUIETLY TRUE)
++ENDIF (MINIZIP_INCLUDE_DIR)
++
++FIND_PATH( MINIZIP_INCLUDE_DIR 
++	  NAMES zip.h unzip.h ioapi.h
++	  PATHS /usr/local/include /usr/include
++	  PATH_SUFFIXES minizip/ )
++SET( MINIZIP_NAMES minizip MINIZIP )
++FIND_LIBRARY( MINIZIP_LIBRARY
++	      NAMES ${MINIZIP_NAMES}
++	      PATHS /usr/lib /usr/local/lib )
++
++GET_FILENAME_COMPONENT( MINIZIP_LIBRARY_DIR ${MINIZIP_LIBRARY} PATH )
++
++IF (MINIZIP_INCLUDE_DIR AND MINIZIP_LIBRARY)
++   SET(MINIZIP_FOUND TRUE)
++   SET(MINIZIP_LIBRARY_DIR ${MINIZIP_LIBRARY} )
++   IF (NOT MINIZIP_FIND_QUIETLY)
++     MESSAGE (STATUS "Found Minizip: ${MINIZIP_LIBRARY} ${MINIZIP_INCLUDE_DIR}")
++   ENDIF (NOT MINIZIP_FIND_QUIETLY)
++ELSE (MINIZIP_INCLUDE_DIR AND MINIZIP_LIBRARY)
++   SET( MINIZIP_FOUND FALSE )
++   SET( MINIZIP_LIBRARY_DIR )
++   SET( MINIZIP_EXTRA_DEFINITIONS )
++ENDIF (MINIZIP_INCLUDE_DIR AND MINIZIP_LIBRARY)
++
+--- a/cmake/WlFunctions.cmake
++++ b/cmake/WlFunctions.cmake
+@@ -81,6 +81,14 @@
+   if(ARG_USES_ZLIB)
+     wl_include_system_directories(${NAME} ${ZLIB_INCLUDE_DIRS})
+     target_link_libraries(${NAME} ${ZLIB_LIBRARY})
++    if (MINIZIP_FOUND)
++      wl_include_system_directories(${NAME}  ${MINIZIP_INCLUDE_DIR})
++      target_link_libraries(${NAME}  ${MINIZIP_LIBRARY})
++      target_compile_definitions(${NAME} PUBLIC -DHAVE_SYSTEM_MINIZIP)
++    else(MINIZIP_FOUND)
++      target_link_libraries(${NAME}  third_party_minizip)
++      message(FATAL_ERROR "You are using widelands-bundled minizip sources. Please install your distribution's minizip dev library or urge your distribution maintainer to include the minizip library in your package repository. Thank you.")
++    endif(MINIZIP_FOUND)
+   endif()
+ 
+   # OpenGL and GLEW are one thing for us. If you use the one, you also use the
+--- a/src/third_party/CMakeLists.txt
++++ b/src/third_party/CMakeLists.txt
+@@ -1,12 +1,14 @@
+-wl_library(third_party_minizip
+-  THIRD_PARTY
+-  SRCS
+-    minizip/ioapi.h
+-    minizip/unzip.cc
+-    minizip/unzip.h
+-    minizip/zip.h
+-  USES_ZLIB
+-)
++if(NOT MINIZIP_FOUND)
++  wl_library(third_party_minizip
++    THIRD_PARTY
++    SRCS
++      ioapi.h
++      unzip.cc
++      unzip.h
++      zip.h
++    USES_ZLIB
++  )
++endif(NOT MINIZIP_FOUND)
+ 
+ wl_library(third_party_eris
+   THIRD_PARTY
+--- a/src/io/filesystem/CMakeLists.txt
++++ b/src/io/filesystem/CMakeLists.txt
+@@ -12,6 +12,7 @@
+     zip_exceptions.h
+     zip_filesystem.cc
+     zip_filesystem.h
++  USES_ZLIB
+   DEPENDS
+     base_exceptions
+     base_i18n
+@@ -19,5 +20,4 @@
+     base_macros
+     graphic_text_layout
+     io_stream
+-    third_party_minizip
+ )
+--- a/src/io/filesystem/zip_filesystem.h
++++ b/src/io/filesystem/zip_filesystem.h
+@@ -28,8 +28,14 @@
+ #include "io/filesystem/filesystem.h"
+ #include "io/streamread.h"
+ #include "io/streamwrite.h"
++
++#ifndef HAVE_SYSTEM_MINIZIP
+ #include "third_party/minizip/unzip.h"
+ #include "third_party/minizip/zip.h"
++#else
++#include <minizip/unzip.h>
++#include <minizip/zip.h>
++#endif
+ 
+ class ZipFilesystem : public FileSystem {
+ public:
-- 
2.26.2


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

* [bug#40035] Add widelands game
  2020-06-19 18:59           ` Nicolas Goaziou
  2020-06-19 20:46             ` Nicolas Goaziou
@ 2020-06-19 21:14             ` Tobias Geerinckx-Rice via Guix-patches via
  2020-06-19 21:55               ` Nicolas Goaziou
  1 sibling, 1 reply; 15+ messages in thread
From: Tobias Geerinckx-Rice via Guix-patches via @ 2020-06-19 21:14 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Alberto EFG, 40035

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

Nicolas,

Thanks, I got slaughtered by Barbarians on the bus >:-(

Nicolas Goaziou 写道:
> It is shipped in "debian/" subdir. I mentioned it in a comment.

I don't get it: there's a debian/ subdir in the tarball.  It does 
not contain this patch.  It's not here[0] either.  I'm not 
familiar enough with Widelands/Debian packaging to know where else 
to look.  It's not the end of the world though.  It'll be gone by 
the next build.

> Are you sure? For example, I see GPL2 for Culmus, but it doesn't 
> mention
> "only" anywhere.

From data/i18n/fonts/Culmus/TaameyFrankCLM-Bold.ttf (yes, I opened 
the TTF file in ‘less’, shoot me):

  Distributed under the terms of GNU General Public License
  version 2(http://www.gnu.org/licenses/gpl.html).

So GPL2-only.

> Also, Debian's copyright file considers it GPL2+.

Quite the opposite[1]:

  Files: data/i18n/fonts/Culmus/*
  Copyright: 2010 by Yoram Gnat (gyoramg@users.sourceforge.net).
  License: GPL-2

I'm not lawyerly enough to know if the combined work can be 
distributed as GPL2+.  I don't see how.  I'd love to be proved 
wrong!

Kind regards,

T G-R

[0]: https://github.com/widelands/widelands/tree/master/debian
[1]: 
https://metadata.ftp-master.debian.org/changelogs//main/w/widelands/widelands_20-2_copyright

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

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

* [bug#40035] Add widelands game
  2020-06-19 21:14             ` Tobias Geerinckx-Rice via Guix-patches via
@ 2020-06-19 21:55               ` Nicolas Goaziou
  2020-06-30 15:50                 ` bug#40035: " Nicolas Goaziou
  0 siblings, 1 reply; 15+ messages in thread
From: Nicolas Goaziou @ 2020-06-19 21:55 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: Alberto EFG, 40035

Tobias Geerinckx-Rice <me@tobias.gr> writes:

> I don't get it: there's a debian/ subdir in the tarball.  It does not
> contain this patch.  It's not here[0] either.  I'm not familiar enough
> with Widelands/Debian packaging to know where else to look.  It's not
> the end of the world though.  It'll be gone by the next build.

I was confused. The patch comes from Debian's package[¹], not from
upstream.

>> Also, Debian's copyright file considers it GPL2+.
>
> Quite the opposite[1]:
>
>  Files: data/i18n/fonts/Culmus/*
>  Copyright: 2010 by Yoram Gnat (gyoramg@users.sourceforge.net).
>  License: GPL-2

Oh! You're right.

> I'm not lawyerly enough to know if the combined work can be
> distributed as GPL2+.  I don't see how.  I'd love to be proved wrong!

Debian does it nonetheless[²].


[¹]  https://salsa.debian.org/games-team/widelands/-/tree/master/debian/patches

[²]  https://salsa.debian.org/games-team/widelands/-/blob/master/debian/copyright

Regards,




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

* [bug#40035] Add widelands game
  2020-06-18 22:58         ` Jonathan Brielmaier
  2020-06-19  7:01           ` Nicolas Goaziou
@ 2020-06-21  6:33           ` Efraim Flashner
  1 sibling, 0 replies; 15+ messages in thread
From: Efraim Flashner @ 2020-06-21  6:33 UTC (permalink / raw)
  To: Jonathan Brielmaier; +Cc: Alberto EFG, Nicolas Goaziou, 40035

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

On Fri, Jun 19, 2020 at 12:58:02AM +0200, Jonathan Brielmaier wrote:
> On 18.06.20 23:22, Nicolas Goaziou wrote:
> > Hello,
> >
> > I integrated the previous suggestions. I am not sure about the version
> > string. Upstream seems to use "build-20", and most distributions use
> > "20", some use "build20" or "b20". I used "build20" because it makes it
> > easier to build the download URL.
> 
> Couldn't we just use the most recent tag on Github?
> https://github.com/widelands/widelands/releases/tag/bzr9203
> 
> > +    (home-page "https://www.widelands.org/")
> > +    (synopsis "Fantasy real-time strategy game")
> > +    (description
> > +     "Widelands is a real-time strategy game with singleplayer campaigns and
> > +multiplayer mode, aiming for gameplay similar to Settlers II by BlueByte.
> > +
> > +In this game, you start out on a small piece of land with nothing more than
> > +a few of useful resources.  Using those, you can build yourself an empire with
> > +many thousands of inhabitants.  On your way towards this goal, you will have
> > +to build up an economic infrastructure, explore the lands around you and face
> > +enemies who are trying to rule the world just like you do.")
> 
> Are we allowed to just copy descriptions from Debian packages? Is this
> license compatible?

We do sometimes just grab the license from Debian. Sometimes it's just
more convenient when a description is missing or is marketing speak.
Infact, for widelands, the description as they've written is under the
GPL2+
https://sources.debian.org/src/widelands/1:20-2/debian/copyright/#L65

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

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

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

* bug#40035: Add widelands game
  2020-06-19 21:55               ` Nicolas Goaziou
@ 2020-06-30 15:50                 ` Nicolas Goaziou
  0 siblings, 0 replies; 15+ messages in thread
From: Nicolas Goaziou @ 2020-06-30 15:50 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: Alberto EFG, 40035-done

Hello,

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

>> I'm not lawyerly enough to know if the combined work can be
>> distributed as GPL2+.  I don't see how.  I'd love to be proved wrong!
>
> Debian does it nonetheless[²].

Since there was no further comment, I pushed widelands. We can always
reconsider the license later. 

Thank you for the feedback, and to Alberto for writing the patch in the
first place.

Regards,
-- 
Nicolas Goaziou




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

end of thread, other threads:[~2020-06-30 15:51 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-12  4:29 [bug#40035] Add widelands game Alberto EFG
2020-03-12 14:31 ` Nicolas Goaziou
2020-03-13  3:14   ` Alberto EFG
2020-03-13  8:16     ` Nicolas Goaziou
2020-06-18 21:22       ` Nicolas Goaziou
2020-06-18 22:58         ` Jonathan Brielmaier
2020-06-19  7:01           ` Nicolas Goaziou
2020-06-21  6:33           ` Efraim Flashner
2020-06-19 12:09         ` Tobias Geerinckx-Rice via Guix-patches via
2020-06-19 18:59           ` Nicolas Goaziou
2020-06-19 20:46             ` Nicolas Goaziou
2020-06-19 21:14             ` Tobias Geerinckx-Rice via Guix-patches via
2020-06-19 21:55               ` Nicolas Goaziou
2020-06-30 15:50                 ` bug#40035: " Nicolas Goaziou
2020-06-19 12:30 ` [bug#40035] " Tobias Geerinckx-Rice via Guix-patches via

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).