From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:45104) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2D0e-0001dS-Rx for guix-patches@gnu.org; Mon, 26 Aug 2019 07:18:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i2D0d-0000Jl-1q for guix-patches@gnu.org; Mon, 26 Aug 2019 07:18:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36868) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i2D0c-0000Is-UP for guix-patches@gnu.org; Mon, 26 Aug 2019 07:18:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i2D0b-0002QH-NB for guix-patches@gnu.org; Mon, 26 Aug 2019 07:18:02 -0400 Subject: [bug#36978] [PATCH 0/3] Add Unknown Horizons and dependencies Resent-Message-ID: From: Arun Isaac In-Reply-To: References: <8736ibtogp.fsf@cbaines.net> <87y2zjzizi.fsf@gnu.org> Date: Mon, 26 Aug 2019 16:47:08 +0530 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Christopher Baines Cc: 36978@debbugs.gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain > 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. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-gnu-Add-fifechan.patch Content-Transfer-Encoding: quoted-printable From=208e0dc413770628873ca2bcca4b1127f1fc4de4fb Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Mon, 26 Aug 2019 16:40:28 +0530 Subject: [PATCH 1/3] gnu: Add fifechan. * gnu/packages/game-development.scm (fifechan): New variable. =2D-- gnu/packages/game-development.scm | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-developm= ent.scm index 7eac935a69..6debaccb85 100644 =2D-- 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 gam= es") + (description "Fifechan is a lightweight cross platform GUI library wri= tten +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 requi= res. +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 inpu= t 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+))) =2D-=20 2.22.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0002-gnu-Add-fifengine.patch Content-Transfer-Encoding: quoted-printable From=201772e12b871aca615652e0e13bda2b11324c472f Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Mon, 26 Aug 2019 16:40:59 +0530 Subject: [PATCH 2/3] gnu: Add fifengine. * gnu/packages/game-development.scm (fifengine): New variable. =2D-- gnu/packages/game-development.scm | 65 +++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-developm= ent.scm index 6debaccb85..808d3d3ade 100644 =2D-- 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 a= ll 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=3D" + (assoc-ref %build-inputs "openal") "/include") + (string-append "-DPYTHON_SITE_PACKAGES=3D" + %output "/lib/python3.7/site-packages") + "-Dbuild-library=3DON") + #:phases + (modify-phases %standard-phases + ;; Run tests after installation so that we can make use of the bu= ilt + ;; 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 filesy= stem +and more. Games utilizing FIFE are programmed through Python scripting la= yer +on top of the base C++ API. Games can be also programmed using the C++ la= yer +directly.") + ;; FIXME: incorrect license + (license license:lgpl2.1+))) =2D-=20 2.22.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0003-gnu-Add-unknown-horizons.patch Content-Transfer-Encoding: quoted-printable From=20cb3f833c38e948d1b45513124a786e81a2f70911 Mon Sep 17 00:00:00 2001 From: Arun Isaac 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. =2D-- gnu/packages/games.scm | 67 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 870becc50b..f49b451bbd 100644 =2D-- 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 eng= ine 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 =3D \\[\\]") + (string-append "options =3D ['" (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 =3D False") + "IS_DEV_VERSION =3D True")) + (invoke "pytest" "tests") + (substitute* "horizons/constants.py" + (("IS_DEV_VERSION =3D True") + "IS_DEV_VERSION =3D False")) + #t))))) + (home-page "http://unknown-horizons.org") + (synopsis "2D realtime strategy simulation game") + (description "Unknown Horizons is a 2D realtime strategy simulation ga= me +with an emphasis on economy and city building. Expand your small settleme= nt +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))) =2D-=20 2.22.0 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----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----- --==-=-=--