From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:58230) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJD2a-0004Cp-P8 for guix-patches@gnu.org; Wed, 24 Apr 2019 04:14:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hJD2Z-0007q8-0N for guix-patches@gnu.org; Wed, 24 Apr 2019 04:14:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41426) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hJD2Y-0007q2-R6 for guix-patches@gnu.org; Wed, 24 Apr 2019 04:14:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hJD2Y-0007GQ-Km for guix-patches@gnu.org; Wed, 24 Apr 2019 04:14:02 -0400 Subject: [bug#35411] [PATCH] Add hedgewars Resent-Message-ID: Received: from eggs.gnu.org ([209.51.188.92]:57733) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJD1l-0003W8-Bl for guix-patches@gnu.org; Wed, 24 Apr 2019 04:13:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hJCof-0003EE-1M for guix-patches@gnu.org; Wed, 24 Apr 2019 03:59:42 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:36361) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hJCoe-0003Cu-NB for guix-patches@gnu.org; Wed, 24 Apr 2019 03:59:40 -0400 Received: from localhost (40-67.ipv4.commingeshautdebit.fr [185.131.40.67]) (Authenticated sender: admin@nicolasgoaziou.fr) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 680BB1C000B for ; Wed, 24 Apr 2019 07:59:38 +0000 (UTC) From: Nicolas Goaziou Date: Wed, 24 Apr 2019 09:59:37 +0200 Message-ID: <87y33zrfyu.fsf@nicolasgoaziou.fr> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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: 35411@debbugs.gnu.org --=-=-= Content-Type: text/plain Hello, The following patch adds hedgewars game. It requires sdl2-net package, which I submitted in a pending patch (see bug#35391). Feedback welcome. Regards, -- Nicolas Goaziou --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-gnu-Add-hedgewars.patch Content-Description: Add hedgewars >From f17328d8810b31653f3007bb4a4950822328a2e5 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Wed, 24 Apr 2019 09:52:52 +0200 Subject: [PATCH] gnu: Add hedgewars. * gnu/packages/games.scm (hedgewars): New variable. --- gnu/packages/games.scm | 104 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index da917e2870..d51ecc60fa 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -6998,3 +6998,107 @@ pursue their favorite interesting flight simulation idea, and last but certainly not least as a fun, realistic, and challenging desktop flight simulator.") (license license:gpl2+))) + +(define-public hedgewars + (package + (name "hedgewars") + (version "0.9.25") + (source (origin + (method hg-fetch) + (uri (hg-reference + (url "https://hg.hedgewars.org/hedgewars/") + (changeset (string-append version "-release")))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "00rckhalhw596x7zpb7rwg9663019xbg1zafcxfnj4x3dg435rl5")))) + (build-system cmake-build-system) + (arguments + ;; XXX: Engine is written 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. + (lambda _ + (delete-file "tests/lua/staticmines.lua") + #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 + ;; following issue: + ;; "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 \\$\\{CLANG_EXECUTABLE\\}\\)") "")) + #t)) + (replace 'check + (lambda _ + (invoke "ctest")))))) + (inputs + `(("clang" ,clang) + ("ffmpeg" ,ffmpeg) + ("freeglut" ,freeglut) + ("ghc" ,ghc) + ("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 + `(("pkg-config" ,pkg-config) + ("qttools" ,qttools))) + (home-page "https://hedgewars.org/") + (synopsis "Funny turn-based artillery game, featuring fighting hedgehogs!") + (description + "Each player controls a team of several hedgehogs. During the course of +the game, players take turns with one of their hedgehogs. They then use +whatever tools and weapons are available to attack and kill the opponents' +hedgehogs, thereby winning the game. + +Hedgehogs may move around the terrain in a variety of ways, normally by +walking and jumping but also by using particular tools such as the ``Rope'' or +``Parachute'', to move to otherwise inaccessible areas. Each turn is +time-limited to ensure that players do not hold up the game with excessive +thinking or moving. A large variety of tools and weapons are available for +players during the game: Grenade, Cluster Bomb, Bazooka, UFO, Homing Bee, +Shotgun, Desert Eagle, Fire Punch, Baseball Bat, Dynamite, Mine, Rope, +Pneumatic pick, Parachute. Most weapons, when used, cause explosions that +deform the terrain, removing circular chunks. + +The landscape is an island floating on a body of water, or a restricted cave +with water at the bottom. A hedgehog dies when it enters the water (either by +falling off the island, or through a hole in the bottom of it), it is thrown +off either side of the arena or when its health is reduced, typically from +contact with explosions, to zero (the damage dealt to the attacked hedgehog or +hedgehogs after a player's or CPU turn is shown only when all movement on the +battlefield has ceased).") + ;; 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:fdl-1.3+ license:public-domain + license:zlib)))) -- 2.21.0 --=-=-=--