[PATCH 0/3] Add Unknown Horizons and dependencies

  • Done
  • quality assurance status badge
Details
3 participants
  • Arun Isaac
  • Ludovic Courtès
  • Christopher Baines
Owner
unassigned
Submitted by
Christopher Baines
Severity
normal

Debbugs page

Christopher Baines wrote 6 years ago
(address . guix-patches@gnu.org)
8736ibtogp.fsf@cbaines.net
This patch series adds the Unknown Horizons game, and a couple of it's
dependencies.


Christopher Baines (3):
gnu: Add fifechan.
gnu: Add fifengine.
gnu: Add unknown-horizons.

gnu/packages/games.scm | 127 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 127 insertions(+)
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl1Mf+ZfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9XcjbhAAjveyfX7ZIGPJQ7UeNyduDPyF+LqidWw8W89SFCuq6VltKlYfUsTXcw7A
bhrV0i2u2FRPPzruYDMbr1R4OXaLapQmP44pKJF73/wp+9apsBiRJ14gqTRs7BvK
g7EfMHH0g7dZY18xnmplSjJeYdUGAQ4QY+bnyDt3Yet4SyL+Rfh+zjv/K//+LLiC
Lb2pN9+6mrZqSsNckp/+Y+mKyuJ72xvzHsHeJ++RHTp908HrXcKJuWSDxgY8b1tX
MIIOjC7/xadxGMmCueLyFY1EP6EXlc/znQTpEZYgs2zW24xqSIFCtH8sKbb+gOk8
P4SNNqjYcY5tyhj5Xp6KbeNKgl5cyr4J0s1lHwePem33DRFzuRUwCpXsPTLm4Ba4
JU8XtJUFwln4xqgR+FqzVfrQ8xWANBXEvMy27V/HXAtvx4/v6Rqdf4ulNBAZP+8L
z8uUQ+sY8AVlJhgHrQ5A7GKSuD1CgRWW+90PfCTJpVoPMA4ZJ7MOtO9P4XESUGuj
RMQYY1WCQK1n8+mO36+HzrJHuSYJasKvqHvlRHlAPqISnJYVeA4Bm5C4NHlCAw3L
fq20q/NolcTSBx7ZU8FFnb8tDGe+EmdQ1jy+E7xgNaUmcjvwbuxWhcHsKzkyprDm
zmrk/3jUNZbDtm8bf6jr9Q+pSwtTfa+oBxkIOKL7UIzn0QctC8w=
=03I6
-----END PGP SIGNATURE-----

Christopher Baines wrote 6 years ago
[PATCH 3/3] gnu: Add unknown-horizons.
(address . 36978@debbugs.gnu.org)
20190808202352.21748-3-mail@cbaines.net
* gnu/packages/games.scm (unknown-horizons): New variable.
---
gnu/packages/games.scm | 54 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)

Toggle diff (67 lines)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index f05efdd8a5..fa6b1f689b 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -2265,6 +2265,60 @@ against each other or just trying to beat the computer; single-player mode is
also available.")
(license license:gpl3+)))
+(define-public unknown-horizons
+ (package
+ (name "unknown-horizons")
+ (version "2019.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://codeload.github.com/unknown-horizons/"
+ "unknown-horizons/tar.gz/" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1n747p7h0qp48szgp262swg0xh8kxy1bw8ag1qczs4i26hyzs5x4"))))
+ (build-system python-build-system)
+ (arguments
+ '(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'set-HOME
+ (lambda _
+ (setenv "HOME" "/tmp")))
+ (add-after 'build 'build-extra
+ (lambda _
+ (invoke "python3" "./setup.py" "build_i18n")
+ (invoke "python3" "horizons/engine/generate_atlases.py" "2048")
+ #t))
+ (add-after 'install 'patch
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (substitute* (string-append out "/bin/unknown-horizons")
+ (("os\\.chdir\\(get\\_content\\_dir\\_parent_path\\(\\)\\)")
+ (string-append "os.chdir(\""
+ (assoc-ref outputs "out")
+ "/share/unknown-horizons\")"))))
+ #t)))))
+ (inputs
+ `(("fifengine" ,fifengine)
+ ("python:tk" ,python "tk")
+ ("python-pillow" ,python-pillow)
+ ("python-pyyaml" ,python-pyyaml)))
+ (home-page "http://unknown-horizons.org/")
+ (synopsis "Isometric realtime strategy, economy and city building simulation")
+ (description
+ "Unknown Horizons is a 2D realtime strategy simulation with an emphasis
+on economy and city building. Expand your small settlement to a strong and
+wealthy colony, collect taxes and supply your inhabitants with valuable
+goods. Increase your power with a well balanced economy and with strategic
+trade and diplomacy.")
+ (license (list
+ license:gpl2+ ; Covers code
+ license:expat ; tests/dummy.py, ext/polib.py
+ license:cc-by-sa3.0 ; Covers some media content
+ license:cc-by3.0 ; Covers some media content
+ license:bsd-3)))) ; horizons/ext/speaklater.py
+
(define-public gnujump
(package
(name "gnujump")
--
2.22.0
Christopher Baines wrote 6 years ago
[PATCH 1/3] gnu: Add fifechan.
(address . 36978@debbugs.gnu.org)
20190808202352.21748-1-mail@cbaines.net
* gnu/packages/games.scm (fifechan): New variable.
---
gnu/packages/games.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)

Toggle diff (40 lines)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 92df556970..8ee0ef94b3 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -2033,6 +2033,33 @@ some of the restrictions in the venerable Z-machine format. This is the
reference interpreter, using the Glk API.")
(license license:expat)))
+(define-public fifechan
+ (package
+ (name "fifechan")
+ (version "0.1.5")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://codeload.github.com/fifengine/"
+ "fifechan/tar.gz/" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0wxs9vz5x9y8chghd8vp7vfk089lfb0qnzggi17zrqkrngs5zgi9"))))
+ (build-system cmake-build-system)
+ (inputs
+ `(("sdl2" ,sdl2)
+ ("sdl2-image" ,sdl2-image)
+ ("mesa" ,mesa)))
+ (arguments
+ '(#:tests? #f))
+ (home-page "https://fifengine.github.io/fifechan/")
+ (synopsis "Cross platform GUI library designed for games")
+ (description
+ "Fifechan is a lightweight cross platform GUI library written in C++
+specifically designed for games. It has a built in set of extendable GUI
+Widgets, and allows users to create more.")
+ (license license:lgpl2.1+)))
+
(define-public fizmo
(package
(name "fizmo")
--
2.22.0
Christopher Baines wrote 6 years ago
[PATCH 2/3] gnu: Add fifengine.
(address . 36978@debbugs.gnu.org)
20190808202352.21748-2-mail@cbaines.net
* gnu/packcages/games.scm (fifengine): New variable.
---
gnu/packages/games.scm | 46 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)

Toggle diff (59 lines)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 8ee0ef94b3..f05efdd8a5 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -2060,6 +2060,52 @@ specifically designed for games. It has a built in set of extendable GUI
Widgets, and allows users to create more.")
(license license:lgpl2.1+)))
+(define-public fifengine
+ (package
+ (name "fifengine")
+ (version "0.4.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://codeload.github.com/fifengine/"
+ "fifengine/tar.gz/" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1y4grw25cq5iqlg05rnbyxw1njl11ypidnlsm3qy4sm3xxdvb0p8"))))
+ (build-system cmake-build-system)
+ (arguments
+ '(#:tests? #f
+ #:configure-flags
+ (list
+ (string-append "-DOPENALSOFT_INCLUDE_DIR="
+ (assoc-ref %build-inputs "openal")
+ "/include/AL")
+ (string-append "-DPYTHON_SITE_PACKAGES="
+ (assoc-ref %outputs "out")
+ "/lib/python3.7/site-packages"))))
+ (inputs
+ `(("sdl2" ,sdl2)
+ ("sdl2-image" ,sdl2-image)
+ ("sdl2-ttf" ,sdl2-ttf)
+ ("tinyxml" ,tinyxml)
+ ("openal" ,openal)
+ ("libogg" ,libogg)
+ ("glew" ,glew)
+ ("libvorbis" ,libvorbis)
+ ("boost" ,boost)
+ ("fifechan" ,fifechan)
+ ("swig" ,swig)
+ ("python" ,python)))
+ (propagated-inputs
+ `(("python-future" ,python-future)))
+ (home-page "https://www.fifengine.net/")
+ (synopsis "FIFE is a multi-platform isometric game engine written in C++")
+ (description
+ "@acronym{FIFE, Flexible Isometric Free Engine} is a multi-platform
+isometric game engine. Python bindings are included allowing users to create
+games using Python as well as C++.")
+ (license license:lgpl2.1+)))
+
(define-public fizmo
(package
(name "fizmo")
--
2.22.0
Ludovic Courtès wrote 6 years ago
Re: [bug#36978] [PATCH 0/3] Add Unknown Horizons and dependencies
(name . Christopher Baines)(address . mail@cbaines.net)(address . 36978@debbugs.gnu.org)
87y2zjzizi.fsf@gnu.org
Hi Chris,

Christopher Baines <mail@cbaines.net> skribis:

Toggle quote (3 lines)
> This patch series adds the Unknown Horizons game, and a couple of it's
> dependencies.

Looks all good to me! :-)

Ludo’.
Arun Isaac wrote 6 years ago
(name . Christopher Baines)(address . mail@cbaines.net)
cu78srhlqsd.fsf@systemreboot.net
Toggle quote (5 lines)
>> This patch series adds the Unknown Horizons game, and a couple of it's
>> dependencies.
>
> Looks all good to me! :-)

fifengine and unknown-horizons do have tests, though. Could you try
packaging them?
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEf3MDQ/Lwnzx3v3nTLiXui2GAK7MFAl1iJiIACgkQLiXui2GA
K7OFXAf+KmxXnd97VMqJ051TKdrv7uoKlbPeEwNo3DmICu1ARWQ1AdtLQNsj+9T4
dk+2xaIyEidAb+L5VzJ9rMBl4/x/bjTeQtQP2QF3HGitiWiR0+GGQg0uJS/Q7jVK
M2sZsp4wxggIEAoLQd1tG3z0juJHUqNjhErmJBPVm+yxJ6GADPVAtBxuYXnLVAs4
XrLTSWTtBxjO3ccMek4hY4zPWJfVybXArFhbUdL4yDLP9k7uZIAagIuKUqUnQRZq
yy9DExmo8hW29lzBKUx7OqmU8NA628ZRw+DTFaEsYfPN91nLKchsRC5TvcbuJ025
E/meKeQVXAEx5u79wSGrm5aLTyvfBg==
=gfJK
-----END PGP SIGNATURE-----

Arun Isaac wrote 6 years ago
(name . Christopher Baines)(address . mail@cbaines.net)
cu75zmkkwgb.fsf@systemreboot.net
Toggle quote (3 lines)
> fifengine and unknown-horizons do have tests, though. Could you try
> packaging them?

I had some WIP on packaging unknown-horizons and dependencies. I have
attached my unfinished patches. Perhaps that could be of some use to
you.
From 8e0dc413770628873ca2bcca4b1127f1fc4de4fb Mon Sep 17 00:00:00 2001
From: Arun Isaac <arunisaac@systemreboot.net>
Date: Mon, 26 Aug 2019 16:40:28 +0530
Subject: [PATCH 1/3] gnu: Add fifechan.

* gnu/packages/game-development.scm (fifechan): New variable.
---
gnu/packages/game-development.scm | 35 +++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)

Toggle diff (52 lines)
diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 7eac935a69..6debaccb85 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -80,6 +80,7 @@
#:use-module (gnu packages qt)
#:use-module (gnu packages sdl)
#:use-module (gnu packages stb)
+ #:use-module (gnu packages swig)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages tls)
#:use-module (gnu packages video)
@@ -1539,3 +1540,37 @@ projects.")
hardware from multiple vendors without requiring that applications have
specific knowledge of the hardware they are targeting.")
(license license:bsd-3)))
+
+(define-public fifechan
+ (package
+ (name "fifechan")
+ (version "0.1.5")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/fifengine/fifechan")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0hd34b9crs2hv0rxmvhn0m73q9ss4rxj2vq6ba2x01vqy1hrjfcg"))))
+ (build-system cmake-build-system)
+ (inputs
+ `(("sdl2-image" ,sdl2-image)))
+ (arguments
+ `(#:tests? #f))
+ (home-page "https://fifengine.github.io/fifechan/")
+ (synopsis "Lightweight cross platform GUI library specifically for games")
+ (description "Fifechan is a lightweight cross platform GUI library written
+in C++ specifically designed for games. It has a small yet powerful built in
+set of extendable GUI Widgets allowing users to create virtually unlimited
+types of widgets. Fifechan supports rendering in SDL, OpenGL, or Allegro out
+of the box or it can be adapted to use any rendering engine the user requires.
+Events are pushed to Fifechan which allows users to use any input library they
+wish or they could use the built in input handling through either SDL input or
+Allegro input. The primary goal for Fifechan is to keep it extendable,
+lightweight and still be powerful enough to use in all types of games out of
+the box.")
+ ;; FIXME: incorrect
+ (license license:lgpl2.1+)))
--
2.22.0
From 1772e12b871aca615652e0e13bda2b11324c472f Mon Sep 17 00:00:00 2001
From: Arun Isaac <arunisaac@systemreboot.net>
Date: Mon, 26 Aug 2019 16:40:59 +0530
Subject: [PATCH 2/3] gnu: Add fifengine.

* gnu/packages/game-development.scm (fifengine): New variable.
---
gnu/packages/game-development.scm | 65 +++++++++++++++++++++++++++++++
1 file changed, 65 insertions(+)

Toggle diff (75 lines)
diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 6debaccb85..808d3d3ade 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -1574,3 +1574,68 @@ lightweight and still be powerful enough to use in all types of games out of
the box.")
;; FIXME: incorrect
(license license:lgpl2.1+)))
+
+(define-public fifengine
+ (package
+ (name "fifengine")
+ (version "0.4.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/fifengine/fifengine")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0vi84daj8jmhqq9lhsc3qjbmp0r2askzlzr1iv1iwn8i2qircil4"))))
+ (build-system cmake-build-system)
+ (inputs
+ `(("boost" ,boost)
+ ("fifechan" ,fifechan)
+ ("glew" ,glew)
+ ("libvorbis" ,libvorbis)
+ ("openal" ,openal)
+ ("python" ,python)
+ ("sdl-union" ,(sdl-union (list sdl2 sdl2-image sdl2-ttf)))
+ ("tinyxml" ,tinyxml)))
+ (native-inputs
+ `(("python" ,python)
+ ("swig" ,swig)
+ ("xvfb" ,xorg-server)))
+ (arguments
+ `(#:configure-flags
+ (list (string-append "-DOPENALSOFT_INCLUDE_DIR="
+ (assoc-ref %build-inputs "openal") "/include")
+ (string-append "-DPYTHON_SITE_PACKAGES="
+ %output "/lib/python3.7/site-packages")
+ "-Dbuild-library=ON")
+ #:phases
+ (modify-phases %standard-phases
+ ;; Run tests after installation so that we can make use of the built
+ ;; python modules.
+ (delete 'check)
+ (add-after 'install 'check
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Set PYTHONPATH so that python finds the installed modules.
+ (setenv "PYTHONPATH"
+ (string-append (getenv "PYTHONPATH") ":"
+ (assoc-ref outputs "out")
+ "/lib/python3.7/site-packages"))
+ ;; The tests require an X server.
+ (system "Xvfb :1 &")
+ (setenv "DISPLAY" ":1")
+ (setenv "XDG_RUNTIME_DIR" "/tmp")
+ ;; Run tests
+ (chdir "../source")
+ (invoke "python3" "run_tests.py" "-a"))))))
+ (home-page "https://www.fifengine.net/")
+ (synopsis "Cross platform game engine")
+ (description "FIFE is a cross-platform game engine. It features
+hardware-accelerated 2D graphics, integrated GUI, audio support, lighting, map
+editor supporting top-down and isometric maps, pathfinding, virtual filesystem
+and more. Games utilizing FIFE are programmed through Python scripting layer
+on top of the base C++ API. Games can be also programmed using the C++ layer
+directly.")
+ ;; FIXME: incorrect license
+ (license license:lgpl2.1+)))
--
2.22.0
From cb3f833c38e948d1b45513124a786e81a2f70911 Mon Sep 17 00:00:00 2001
From: Arun Isaac <arunisaac@systemreboot.net>
Date: Mon, 26 Aug 2019 16:41:45 +0530
Subject: [PATCH 3/3] gnu: Add unknown-horizons.

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

Toggle diff (77 lines)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 870becc50b..f49b451bbd 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -7637,3 +7637,70 @@ remake of that series or any other game.")
the AlphaGo Zero paper. The current best network weights file for the engine
can be downloaded from @url{https://zero.sjeng.org/best-network}.")
(license license:gpl3+)))
+
+(define-public unknown-horizons
+ (package
+ (name "unknown-horizons")
+ (version "2019.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/unknown-horizons/unknown-horizons")
+ (commit version)))
+ (sha256
+ (base32
+ "1khq9ajwi0fmphsjpa024v1px47mcjzvvx2vnrpz1fkis34y83h0"))))
+ (build-system python-build-system)
+ (inputs
+ `(("fifengine" ,fifengine)
+ ("python:tk" ,python "tk")
+ ("python-future" ,python-future)
+ ("python-pyyaml" ,python-pyyaml)))
+ (native-inputs
+ `(("intltool" ,intltool)
+ ;; required during the generate-atlases phase
+ ("python-pillow" ,python-pillow)
+
+ ;; required for tests
+ ("python-greenlet" ,python-greenlet)
+ ("python-polib" ,python-polib)
+ ("python-pytest" ,python-pytest)
+ ("python-pytest-mock" ,python-pytest-mock)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (substitute* "run_uh.py"
+ (("options = \\[\\]")
+ (string-append "options = ['" (assoc-ref outputs "out")
+ "/share/unknown-horizons']")))
+ #t))
+ (add-before 'build 'set-home
+ (lambda _
+ (setenv "HOME" "/tmp")
+ #t))
+ (add-before 'build 'generate-atlases
+ (lambda _
+ (invoke "python3" "horizons/engine/generate_atlases.py" "2048")))
+ ;; TODO: Run gui tests as well
+ (replace 'check
+ (lambda _
+ (substitute* "horizons/constants.py"
+ (("IS_DEV_VERSION = False")
+ "IS_DEV_VERSION = True"))
+ (invoke "pytest" "tests")
+ (substitute* "horizons/constants.py"
+ (("IS_DEV_VERSION = True")
+ "IS_DEV_VERSION = False"))
+ #t)))))
+ (home-page "http://unknown-horizons.org")
+ (synopsis "2D realtime strategy simulation game")
+ (description "Unknown Horizons is a 2D realtime strategy simulation game
+with an emphasis on economy and city building. Expand your small settlement
+to a strong and wealthy colony, collect taxes and supply your inhabitants with
+valuable goods. Increase your power with a well balanced economy and with
+strategic trade and diplomacy.")
+ ;; FIXME: fix license
+ (license license:gpl2)))
--
2.22.0
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEf3MDQ/Lwnzx3v3nTLiXui2GAK7MFAl1jv7QACgkQLiXui2GA
K7M4pwf/YNw+q2aqcVIzrVUlwYWtGl+ypqLS5OnrHRFOTGXvsU+k4/ee7p7DwC8n
i/e4tYAPFqhjMNJ8uxCv7Fw5wUEQsAsO0Ogd6xEEqh2vlNwlhiHjg4UOr6wR6FIr
OSNwY8M4/dqa4itsh5da5e5pDl1O+caMp77D8Pz7hll+u1wQtVJeoJAqBEofTD83
lmnPKQP7EsEeSFPQu0gAaHT+r41wyzBpDzdvI5s1B3HNdNO2e5jp5uq66LNQImsx
NYuqOsuwqksgnk8K2d19dnZslEb3I3mASfRshMsYpJa+/NJe/SZIWRfLvq6pr4Mt
AvzNHMKe+1juQj9KuZq0mX7qOhuAkA==
=z6rD
-----END PGP SIGNATURE-----

Ludovic Courtès wrote 6 years ago
(name . Arun Isaac)(address . arunisaac@systemreboot.net)
877e6sb25e.fsf@gnu.org
Hello Arun,

Arun Isaac <arunisaac@systemreboot.net> skribis:

Toggle quote (4 lines)
> I had some WIP on packaging unknown-horizons and dependencies. I have
> attached my unfinished patches. Perhaps that could be of some use to
> you.

Neat! I think Chris or you should definitely merge both patch sets so
we can go ahead.

Thanks,
Ludo’.
Christopher Baines wrote 5 years ago
[PATCH v2 2/3] gnu: Add fifengine.
(address . 36978@debbugs.gnu.org)
20191006181818.18333-2-mail@cbaines.net
* gnu/packcages/games.scm (fifengine): New variable.
---
gnu/packages/games.scm | 93 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 93 insertions(+)

Toggle diff (106 lines)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index ebd21fb501..0ebf262126 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -2054,6 +2054,99 @@ specifically designed for games. It has a built in set of extendable GUI
Widgets, and allows users to create more.")
(license license:lgpl2.1+)))
+(define-public fifengine
+ (package
+ (name "fifengine")
+ (version "0.4.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://codeload.github.com/fifengine/"
+ "fifengine/tar.gz/" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1y4grw25cq5iqlg05rnbyxw1njl11ypidnlsm3qy4sm3xxdvb0p8"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:tests? #f ; TODO The test running fails to run some tests.
+ #:modules ((srfi srfi-1)
+ (guix build cmake-build-system)
+ (guix build utils))
+ #:configure-flags
+ (list
+ (string-append "-DOPENALSOFT_INCLUDE_DIR="
+ (assoc-ref %build-inputs "openal")
+ "/include/AL")
+ (string-append "-DPYTHON_SITE_PACKAGES="
+ (assoc-ref %outputs "out")
+ "/lib/python3.7/site-packages"))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-run_tests.py
+ (lambda _
+ ;; Patch the test runner to exit with a status of 1 if any test
+ ;; fails, to allow detecting failures.
+ (substitute* "run_tests.py"
+ (("ERROR\\. One or more tests failed!'\\)")
+ "ERROR. One or more tests failed!')
+\t\texit(1)"))
+ #t))
+ ;; Run tests after installation so that we can make use of the built
+ ;; python modules.
+ (delete 'check)
+ (add-after 'install 'check
+ (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+ (define python-version
+ (let* ((version (last (string-split
+ (assoc-ref inputs "python")
+ #\-)))
+ (components (string-split version #\.))
+ (major+minor (take components 2)))
+ (string-join major+minor ".")))
+
+ (when tests?
+ ;; Set PYTHONPATH so that python finds the installed modules.
+ (setenv "PYTHONPATH"
+ (string-append (getenv "PYTHONPATH") ":"
+ (assoc-ref outputs "out")
+ "/lib/python"
+ python-version
+ "/site-packages"))
+ ;; The tests require an X server.
+ (system "Xvfb :1 &")
+ (setenv "DISPLAY" ":1")
+ (setenv "XDG_RUNTIME_DIR" "/tmp")
+ ;; Run tests
+ (chdir ,(string-append "../" name "-" version))
+ (invoke "python3" "run_tests.py" "-a"))
+ #t)))))
+ (inputs
+ `(("sdl2" ,sdl2)
+ ("sdl2-image" ,sdl2-image)
+ ("sdl2-ttf" ,sdl2-ttf)
+ ("tinyxml" ,tinyxml)
+ ("openal" ,openal)
+ ("libogg" ,libogg)
+ ("glew" ,glew)
+ ("libvorbis" ,libvorbis)
+ ("boost" ,boost)
+ ("fifechan" ,fifechan)
+ ("swig" ,swig)
+ ("python" ,python)))
+ (native-inputs
+ `(("python" ,python)
+ ("swig" ,swig)
+ ("xvfb" ,xorg-server)))
+ (propagated-inputs
+ `(("python-future" ,python-future)))
+ (home-page "https://www.fifengine.net/")
+ (synopsis "FIFE is a multi-platform isometric game engine written in C++")
+ (description
+ "@acronym{FIFE, Flexible Isometric Free Engine} is a multi-platform
+isometric game engine. Python bindings are included allowing users to create
+games using Python as well as C++.")
+ (license license:lgpl2.1+)))
+
(define-public fizmo
(package
(name "fizmo")
--
2.23.0
Christopher Baines wrote 5 years ago
[PATCH v2 3/3] gnu: Add unknown-horizons.
(address . 36978@debbugs.gnu.org)
20191006181818.18333-3-mail@cbaines.net
* gnu/packages/games.scm (unknown-horizons): New variable.
---
gnu/packages/games.scm | 73 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 73 insertions(+)

Toggle diff (86 lines)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 0ebf262126..055ba216a3 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -2306,6 +2306,79 @@ against each other or just trying to beat the computer; single-player mode is
also available.")
(license license:gpl3+)))
+(define-public unknown-horizons
+ (package
+ (name "unknown-horizons")
+ (version "2019.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://codeload.github.com/unknown-horizons/"
+ "unknown-horizons/tar.gz/" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1n747p7h0qp48szgp262swg0xh8kxy1bw8ag1qczs4i26hyzs5x4"))))
+ (build-system python-build-system)
+ (arguments
+ '(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'set-HOME
+ (lambda _
+ (setenv "HOME" "/tmp")))
+ (add-after 'build 'build-extra
+ (lambda _
+ (invoke "python3" "./setup.py" "build_i18n")
+ (invoke "python3" "horizons/engine/generate_atlases.py" "2048")
+ #t))
+ (add-after 'install 'patch
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (substitute* (string-append out "/bin/unknown-horizons")
+ (("os\\.chdir\\(get\\_content\\_dir\\_parent_path\\(\\)\\)")
+ (string-append "os.chdir(\""
+ (assoc-ref outputs "out")
+ "/share/unknown-horizons\")"))))
+ #t))
+ ;; TODO: Run GUI tests as well
+ (replace 'check
+ (lambda _
+ (substitute* "horizons/constants.py"
+ (("IS_DEV_VERSION = False")
+ "IS_DEV_VERSION = True"))
+ (invoke "pytest" "tests")
+ (substitute* "horizons/constants.py"
+ (("IS_DEV_VERSION = True")
+ "IS_DEV_VERSION = False"))
+ #t)))))
+ (inputs
+ `(("fifengine" ,fifengine)
+ ("python:tk" ,python "tk")
+ ("python-pillow" ,python-pillow)
+ ("python-pyyaml" ,python-pyyaml)))
+ (native-inputs
+ `(("intltool" ,intltool)
+
+ ;; Required for tests
+ ("python-greenlet" ,python-greenlet)
+ ("python-polib" ,python-polib)
+ ("python-pytest" ,python-pytest)
+ ("python-pytest-mock" ,python-pytest-mock)))
+ (home-page "http://unknown-horizons.org/")
+ (synopsis "Isometric realtime strategy, economy and city building simulation")
+ (description
+ "Unknown Horizons is a 2D realtime strategy simulation with an emphasis
+on economy and city building. Expand your small settlement to a strong and
+wealthy colony, collect taxes and supply your inhabitants with valuable
+goods. Increase your power with a well balanced economy and with strategic
+trade and diplomacy.")
+ (license (list
+ license:gpl2+ ; Covers code
+ license:expat ; tests/dummy.py, ext/polib.py
+ license:cc-by-sa3.0 ; Covers some media content
+ license:cc-by3.0 ; Covers some media content
+ license:bsd-3)))) ; horizons/ext/speaklater.py
+
(define-public gnujump
(package
(name "gnujump")
--
2.23.0
Christopher Baines wrote 5 years ago
[PATCH v2 1/3] gnu: Add fifechan.
(address . 36978@debbugs.gnu.org)
20191006181818.18333-1-mail@cbaines.net
* gnu/packages/games.scm (fifechan): New variable.
---
gnu/packages/games.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)

Toggle diff (40 lines)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index c0d8ce9c71..ebd21fb501 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -2027,6 +2027,33 @@ some of the restrictions in the venerable Z-machine format. This is the
reference interpreter, using the Glk API.")
(license license:expat)))
+(define-public fifechan
+ (package
+ (name "fifechan")
+ (version "0.1.5")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://codeload.github.com/fifengine/"
+ "fifechan/tar.gz/" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0wxs9vz5x9y8chghd8vp7vfk089lfb0qnzggi17zrqkrngs5zgi9"))))
+ (build-system cmake-build-system)
+ (inputs
+ `(("sdl2" ,sdl2)
+ ("sdl2-image" ,sdl2-image)
+ ("mesa" ,mesa)))
+ (arguments
+ '(#:tests? #f)) ; No included tests
+ (home-page "https://fifengine.github.io/fifechan/")
+ (synopsis "Cross platform GUI library specifically for games")
+ (description
+ "Fifechan is a lightweight cross platform GUI library written in C++
+specifically designed for games. It has a built in set of extendable GUI
+Widgets, and allows users to create more.")
+ (license license:lgpl2.1+)))
+
(define-public fizmo
(package
(name "fizmo")
--
2.23.0
Christopher Baines wrote 5 years ago
Re: [bug#36978] [PATCH 0/3] Add Unknown Horizons and dependencies
(name . Arun Isaac)(address . arunisaac@systemreboot.net)
87d0f9ag87.fsf@cbaines.net
Arun Isaac <arunisaac@systemreboot.net> writes:

Toggle quote (8 lines)
>>> This patch series adds the Unknown Horizons game, and a couple of it's
>>> dependencies.
>>
>> Looks all good to me! :-)
>
> fifengine and unknown-horizons do have tests, though. Could you try
> packaging them?

Thanks for taking a look Arun. I've finally got around to looking at
this again.

Thanks for sending over your patches, I've gone through them and tried
to merge the two sets of patches together.

The unknown-horizons tests seem fine, but the fifengine tests don't all
seem to run, so I've left them disabled. I don't really get what the
test runner is doing.
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl2aMFhfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9XeANBAAi2oLw+PCK2cy4rjeGN7l0ibzWZWVYtdxTg0mDKxiaSsTdKad+7Xn6l8U
Inj/JDwQcuhAiWeYYhy9ytIw2EfYTihpumDQ2Hv+sh7ZejHYUud2iK9BSD4jyfD6
twefFCIOPfsHjxvu22zIrJ3Wx9rFnkizvQOJ+k15I3LxOIcpSr63N9MH81tcj/Ld
GxAFel10dSfELrebCJSSv5iGYBzNp+5ZXLMxK4ypd1v9s8Ab5mzLVpEFUBqr5rwb
avulKKNLlnk7i+/TuPrObzoqbmvQlRsEGtUU7qng8i4cJtXSZSRjWeOdqlugyOS8
mpNrMJuSdjKFjQskV6jgLTz6zduE2+CX2EpghvEbiXmiXmOm2+sc3Lkhx/giAIOg
FM2dfBVlQ6RGnrlvcwt7ZkR8cX77Tt8g9nh3poBWHmmR+L1DBZscnVkFho9QR0Zc
JRQ624xbbTEjOsHA7pRZ8DXR8BC6j0pJnHVGmx/MEBhOTNg3cnu86iw/g4dn1pE6
rHOH5/Zjz9zaUSluM1mhqaowMzkPiz7GG4iuIgCCKz1SAjGCsJJ+T4Vqm3QwPYRX
McGRVa8JfIVUKSfxOLvPv6zV4FpCMPKY1V/LvETmm5qUjI1DQF7ZYc/5Si5mn16M
n5Ss2Esu/ZQFcVhFnoRbF/J23EGdAlbB1rnpRbUFpG+ajq8qOsY=
=GwR0
-----END PGP SIGNATURE-----

Arun Isaac wrote 5 years ago
(name . Christopher Baines)(address . mail@cbaines.net)
cu7imp0fe36.fsf@systemreboot.net
Toggle quote (4 lines)
> The unknown-horizons tests seem fine, but the fifengine tests don't all
> seem to run, so I've left them disabled. I don't really get what the
> test runner is doing.

Neither did I manage to completely figure out the fifengine tests. Hence
my incomplete patches. Please feel free to push without the tests or
with any other appropriate comments.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEf3MDQ/Lwnzx3v3nTLiXui2GAK7MFAl2bq+4ACgkQLiXui2GA
K7Nz+QgAtiTj1aoEfl+v4Z7QVSRTNST0/JNUZd/XlKpWhv2RlG2duepSxEKGd1Ej
4WIFSeeWfYvZbgNCzgl4IuRnkOTBSvgl9lIYamIDncvJ26B2afbh04jco+RJJyNW
fDWjdFkpx6zxEfINPeHs28Rk9LTfgNuB8SpVYMJlGudmQVkghtCNmnVMnwkba1h9
ChJtBNmGW1RicpV5zaVfgItIyg+D95WLRf+UO2mHFZvIYmK2qxJun7fbk8Yybmee
suzACixclk6PoQjuaV5kpXc/CMTvuy+UdMqFohSbDNZjtkVW+99nolB3oHUJniKi
LIpVBP/YkQgajBqF/kXbJpYLn1D1ug==
=Z00q
-----END PGP SIGNATURE-----

Christopher Baines wrote 5 years ago
(address . 36978-done@debbugs.gnu.org)
87v9szf5gd.fsf@cbaines.net
Arun Isaac <arunisaac@systemreboot.net> writes:

Toggle quote (8 lines)
>> The unknown-horizons tests seem fine, but the fifengine tests don't all
>> seem to run, so I've left them disabled. I don't really get what the
>> test runner is doing.
>
> Neither did I manage to completely figure out the fifengine tests. Hence
> my incomplete patches. Please feel free to push without the tests or
> with any other appropriate comments.

Ok, cool. I've pushed the patches now as
a1c1943b7c49dfb6aef9a98b2cbce0d31cbed08b.

Now I just need to work out how to play the game!

Thanks,

Chris
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl2c16JfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9XcIJA/+LVU8OXuL93ql7TvfNu2Q7iIrMhfzXm2Y5Bk0roqMBrS+KTd+DyrH197I
VcW1rw9j3rxfkAj8c/msnqlnErbTdYw6xk5jcxVMqb2zCrMLCUJA8HTML+d5Qaau
m+S6+kMJKeptDcUBuFqsbIyhEGQ/jptewYvQNDZHojP9l5sRwAnMMR3zYVOzNDEo
krAmPH3L8B8lVZBbf/elBMLgtAseVQqpq8BwZt138IHshaXkbZshE+Coj+C5FcN0
e6vmZPBN6ohSPAkU5jbt3gMSvIl4UncvFjxoSgouMf148j2larcJAoycuyMS5jOd
pL0nKlMkw7kvsYnXMVQdSsqETJyRzBwQElXU6ewwh8mXf2eftmOy15BnUfhDJEIG
q3EZU1ghR7V3ytSgEaK/BNfdYsMNv0C4nPfYgLyL9MnSEq8AlSBlx7hrJvIIeha+
yWahHcWZ59KIf2Ks+B0cROFZ0OBecNKxZ8GjyX01lfDwROWglli4f6668iQhD74/
fIU+BN8R5enrlYV9/2oQ8hiqro3f2kKAKjnJH8MxNQtnGxybxxoEmI3Gdx1v5AUt
i3RY3zw1wD4Q4o3+IxRWUO4P3Y7/Zk62/xDp8ThEq9Q2xxcrAAlstVBbrw16G/E0
eUgxO9iW+XB5kqlFz6Zrr6ygzXr/oLpmQ1ydC+q98Ncoq236sqs=
=0/0x
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 36978@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 36978
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help