unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#35037] [PATCH] Add openclonk
@ 2019-03-29  0:26 Nicolas Goaziou
  2019-03-29  3:18 ` Ricardo Wurmus
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Goaziou @ 2019-03-29  0:26 UTC (permalink / raw)
  To: 35037

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

Hello,

The following patch adds OpenClonk game.

Caveat: due to bad interaction with Wayland, I cannot run this game, but
nkcx on IRC successfully ran it. So I guess the package itself is fine.

Feedback welcome.

Regards,

-- 
Nicolas Goaziou

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: OpenClonk package --]
[-- Type: text/x-diff, Size: 3772 bytes --]

From 5778fc0c37bcf544dbf91ae90fdabf1d3d263ce4 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Date: Fri, 29 Mar 2019 01:22:35 +0100
Subject: [PATCH] gnu: Add openclonk.

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

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 23dbbca4f7..4221d5870d 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -6551,3 +6551,77 @@ a fortress beyond the forbidden swamp.")
 
 (define-public edgar
   (deprecated-package "edgar" the-legend-of-edgar))
+
+(define-public openclonk
+  (package
+    (name "openclonk")
+    (version "8.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://www.openclonk.org/builds/release/" version "/"
+                    "openclonk-" version "-src.tar.bz2"))
+              (sha256
+               (base32
+                "0imkqjp8lww5p0cnqf4k4mb2v682mnsas63qmiz17rspakr7fxik"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f                      ;require Gmock/Gtest
+       #:configure-flags '("-DAudio_TK=OpenAL")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'add-libiberty
+           ;; Build fails upon linking executables without this.
+           (lambda _
+             (substitute* "thirdparty/backward-cpp/BackwardConfig.cmake"
+               (("set\\(LIBBFD_LIBRARIES (.*?)\\)" _ libraries)
+                (string-append "set(LIBBFD_LIBRARIES " libraries " iberty)")))
+             #t))
+         (add-after 'add-libiberty 'lax-freealut-requirement
+           ;; We provide freealut 1.1.0, but pkg-config somehow
+           ;; detects it as 1.0.1.  Force minimal version.
+           (lambda _
+             (substitute* "cmake/FindAudio.cmake"
+               (("freealut>=1.1.0") "freealut>=1.0.1"))
+             #t))
+         (add-after 'lax-freealut-requirement 'fix-directories
+           ;; Prefer "$out/share/openclonk" over
+           ;; "$out/share/games/openclonk". Also install "openclonk"
+           ;; binary in "bin/", not "games/".
+           (lambda _
+             (substitute* "CMakeLists.txt"
+               (("share/games/openclonk") "share/openclonk")
+               (("TARGETS openclonk DESTINATION games")
+                "TARGETS openclonk DESTINATION bin"))
+             #t)))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("freealut" ,freealut)
+       ("freetype" ,freetype)
+       ("glew" ,glew)
+       ("libiberty" ,libiberty)
+       ("libjpeg" ,libjpeg-turbo)
+       ("libogg" ,libogg)
+       ("libpng" ,libpng)
+       ("libvorbis" ,libvorbis)
+       ("libxrandr" ,libxrandr)
+       ("mesa" ,mesa)
+       ("miniupnpc" ,miniupnpc)
+       ("openal" ,openal)
+       ("qtbase" ,qtbase)
+       ("readline" ,readline)
+       ("sdl" ,sdl2)
+       ("tinyxml" ,tinyxml)
+       ("zlib" ,zlib)))
+    (home-page "https://www.openclonk.org/")
+    (synopsis
+     "Multiplayer action game where you control small and nimble humanoids")
+    (description "OpenClonk is a multiplayer-action-tactics-skill game.  It is
+often referred to as a mixture of The Settlers and Worms.  In a simple 2D
+antfarm-style landscape, the player controls his crew of Clonks, small but
+robust humanoid beings.  The game encourages free play but the normal goal is
+to either exploit valuable resources from the earth by building a mine or
+fight each other on an arena-like map.")
+    ;; Software as a whole is licensed under ISC, artwork under CC-by.
+    (license (list license:isc license:cc-by3.0))))
-- 
2.21.0


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

* [bug#35037] [PATCH] Add openclonk
  2019-03-29  0:26 [bug#35037] [PATCH] Add openclonk Nicolas Goaziou
@ 2019-03-29  3:18 ` Ricardo Wurmus
  2019-03-29  4:35   ` bug#35037: " Ricardo Wurmus
  0 siblings, 1 reply; 3+ messages in thread
From: Ricardo Wurmus @ 2019-03-29  3:18 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: 35037


Hi Nicolas,

> The following patch adds OpenClonk game.

This looks good.  I was going to push it when I noticed that the tests
are disabled even though we do have a googletest package.

I’m now building it again with tests enabled and I’ll try to push it
later today.

Thanks!

-- 
Ricardo

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

* bug#35037: [PATCH] Add openclonk
  2019-03-29  3:18 ` Ricardo Wurmus
@ 2019-03-29  4:35   ` Ricardo Wurmus
  0 siblings, 0 replies; 3+ messages in thread
From: Ricardo Wurmus @ 2019-03-29  4:35 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: 35037-done


Ricardo Wurmus <rekado@elephly.net> writes:

> Hi Nicolas,
>
>> The following patch adds OpenClonk game.
>
> This looks good.  I was going to push it when I noticed that the tests
> are disabled even though we do have a googletest package.
>
> I’m now building it again with tests enabled and I’ll try to push it
> later today.

I enabled the tests and pushed it to the “master” branch with commit
4e43e3175e.

--
Ricardo

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

end of thread, other threads:[~2019-03-29  4:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-29  0:26 [bug#35037] [PATCH] Add openclonk Nicolas Goaziou
2019-03-29  3:18 ` Ricardo Wurmus
2019-03-29  4:35   ` bug#35037: " Ricardo Wurmus

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