guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: Add hedgewars.


From: guix-commits
Subject: 01/01: gnu: Add hedgewars.
Date: Mon, 29 Apr 2019 08:38:34 -0400 (EDT)

ngz pushed a commit to branch master
in repository guix.

commit a3d4a631fed40c2ddfe41a700dde287458669ca4
Author: Nicolas Goaziou <address@hidden>
Date:   Wed Apr 24 09:52:52 2019 +0200

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

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index e6eb30c..8215109 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -7042,3 +7042,89 @@ simulator.")
 explode.  It is a true multiplayer game; you cannot play this alone.  You can
 play with up to four players simultaneously.  It has network support.")
     (license license:gpl2+)))
+
+(define-public hedgewars
+  (package
+    (name "hedgewars")
+    (version "0.9.25")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append 
"https://www.hedgewars.org/download/releases/";
+                                  "hedgewars-src-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "08x7fqpy0hpnbfq2k06g522xayi7s53bca819zfhalvqnqs76pdk"))))
+    (build-system cmake-build-system)
+    (arguments
+     ;; XXX: Engine is built as Pascal source code, requiring Free Pascal
+     ;; Compiler, which we haven't packaged yet.  With the flag below, we use
+     ;; a Pascal to C translator and Clang instead.
+     `(#:configure-flags (list "-DBUILD_ENGINE_C=ON")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'remove-failing-test
+           ;; XXX: Remove single failing test.  Note: it is marked
+           ;; a "non-critical" test.
+           (lambda _
+             (delete-file-recursively "tests/lua_noncritical")
+             #t))
+         (add-after 'unpack 'fix-compiler
+           ;; XXX: Flag BUILD_ENGINE_C, as set above, implies using Clang to
+           ;; compile files.  However, using `clang' globally leads to the
+           ;; error: qtbase-5.11.3/include/qt5/QtCore/qglobal.h:45:12: fatal
+           ;; error: 'type_traits' file not found.
+           ;;
+           ;; Therefore, we make sure to use `c++' everywhere but in the
+           ;; engine.
+           (lambda _
+             (substitute* "project_files/hwc/CMakeLists.txt"
+               (("find_package\\(SDL2_ttf 2 REQUIRED\\)" all)
+                (string-append all "\n"
+                               "set(CMAKE_C_COMPILER ${CLANG_EXECUTABLE})\n"
+                               "set(CMAKE_CXX_COMPILER ${CLANG_EXECUTABLE})")))
+             (substitute* "CMakeLists.txt"
+               (("set\\(CMAKE_C(XX)?_COMPILER" all) (string-append "#" all)))
+             #t))
+         (replace 'check
+           (lambda _
+             (invoke "ctest"))))))
+    (inputs
+     `(("ffmpeg" ,ffmpeg)
+       ("freeglut" ,freeglut)
+       ("ghc-entropy" ,ghc-entropy)
+       ("ghc-hslogger" ,ghc-hslogger)
+       ("ghc-network" ,ghc-network)
+       ("ghc-random" ,ghc-random)
+       ("ghc-regex-tdfa" ,ghc-regex-tdfa)
+       ("ghc-sandi" ,ghc-sandi)
+       ("ghc-sha" ,ghc-sha)
+       ("ghc-utf8-string" ,ghc-utf8-string)
+       ("ghc-vector" ,ghc-vector)
+       ("ghc-zlib" ,ghc-zlib)
+       ("glew" ,glew)
+       ("libpng" ,libpng)
+       ("lua" ,lua-5.1)
+       ("physfs" ,physfs)
+       ("qtbase" ,qtbase)
+       ("sdl" ,(sdl-union
+                (list sdl2 sdl2-mixer sdl2-net sdl2-ttf sdl2-image)))))
+    (native-inputs
+     `(("clang" ,clang)
+       ("ghc" ,ghc)
+       ("pkg-config" ,pkg-config)
+       ("qttools" ,qttools)))
+    (home-page "https://hedgewars.org/";)
+    (synopsis "Turn-based artillery game featuring fighting hedgehogs")
+    (description
+     "Hedgewars is a turn based strategy, artillery, action and comedy game,
+featuring the antics of pink hedgehogs with attitude as they battle from the
+depths of hell to the depths of space.
+
+As commander, it's your job to assemble your crack team of hedgehog soldiers
+and bring the war to your enemy.")
+    ;; Software as a whole is licensed under GPL-2 terms.  Artwork and
+    ;; scripts are distributed under various terms.
+    (license (list license:gpl2
+                   license:bsd-2 license:bsd-3 license:cc-by3.0 license:cc0
+                   license:expat license:fdl1.3+ license:public-domain
+                   license:zlib))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]