From patchwork Sun Oct 16 21:36:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: non such X-Patchwork-Id: 16566 Received: (qmail 95180 invoked by uid 89); 16 Oct 2016 21:36:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.2 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=AD, economy, a.d, bc X-Spam-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: lists.gnu.org Received: from lists.gnu.org (HELO lists.gnu.org) (208.118.235.17) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 16 Oct 2016 21:36:33 +0000 Received: from localhost ([::1]:57850 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bvt6e-0003Wg-5n for patchwork@sourceware.org; Sun, 16 Oct 2016 17:36:32 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35224) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bvt6W-0003V0-5Q for guix-devel@gnu.org; Sun, 16 Oct 2016 17:36:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bvt6U-0002W3-Rh for guix-devel@gnu.org; Sun, 16 Oct 2016 17:36:24 -0400 Received: from aibo.runbox.com ([91.220.196.211]:48972) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bvt6U-0002Vs-Lt for guix-devel@gnu.org; Sun, 16 Oct 2016 17:36:22 -0400 Received: from [10.9.9.210] (helo=mailfront10.runbox.com) by bars.runbox.com with esmtp (Exim 4.71) (envelope-from ) id 1bvt6T-0008HM-Kt for guix-devel@gnu.org; Sun, 16 Oct 2016 23:36:21 +0200 Received: from x5d83e217.dyn.telefonica.de ([93.131.226.23] helo=localhost) by mailfront10.runbox.com with esmtpsa (uid:892961 ) (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) id 1bvt6L-0004z5-TO; Sun, 16 Oct 2016 23:36:14 +0200 From: ng0 To: guix-devel@gnu.org Subject: [PATCH 2/2] gnu: Add 0ad. Date: Sun, 16 Oct 2016 21:36:06 +0000 Message-Id: <20161016213606.28234-3-ng0@we.make.ritual.n0.is> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20161016213606.28234-1-ng0@we.make.ritual.n0.is> References: <20161016213606.28234-1-ng0@we.make.ritual.n0.is> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 91.220.196.211 X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+patchwork=sourceware.org@gnu.org Sender: "Guix-devel" * gnu/packages/games.scm (0ad): New variable. --- gnu/packages/games.scm | 114 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 03580a3..13119f5 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -56,6 +56,7 @@ #:use-module (gnu packages audio) #:use-module (gnu packages avahi) #:use-module (gnu packages boost) + #:use-module (gnu packages cmake) #:use-module (gnu packages fltk) #:use-module (gnu packages fribidi) #:use-module (gnu packages game-development) @@ -64,6 +65,7 @@ #:use-module (gnu packages gl) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) + #:use-module (gnu packages gnuzilla) #:use-module (gnu packages gperf) #:use-module (gnu packages gtk) #:use-module (gnu packages guile) @@ -73,8 +75,10 @@ #:use-module (gnu packages mp3) #:use-module (gnu packages icu4c) #:use-module (gnu packages image) + #:use-module (gnu packages messaging) #:use-module (gnu packages ncurses) #:use-module (gnu packages netpbm) + #:use-module (gnu packages networking) #:use-module (gnu packages ocaml) #:use-module (gnu packages python) #:use-module (gnu packages readline) @@ -97,6 +101,8 @@ #:use-module (gnu packages xiph) #:use-module (gnu packages curl) #:use-module (gnu packages lua) + #:use-module (gnu packages upnp) + #:use-module (gnu packages wxwidgets) #:use-module (gnu packages video) #:use-module (gnu packages xml) #:use-module (gnu packages tcl) @@ -3040,3 +3046,111 @@ symbols, the game needs graphics to render the non-euclidean world.") ;; license:lppl1.3c TODO: ADD. ;; license:bitstream-vera TODO: ADD. license:cc-by-sa3.0)))) + +(define-public 0ad + (package + (name "0ad") + (version "0.0.20-alpha") + (source + (origin + (method url-fetch) + (uri (string-append + "http://releases.wildfiregames.com/0ad-" + version "-unix-build.tar.xz")) + (file-name (string-append name "-" version ".tar.xz")) + (sha256 + (base32 + "13n61xhjsawda3kl7112la41bqkbqmq4yhr3slydsz856z5xb5m3")))) + (inputs + `(("0ad-data" ,0ad-data) + ("curl" ,curl) + ("enet" ,enet) + ("perl" ,perl) + ("icu4c" ,icu4c) + ("libxml2" ,libxml2) + ("nspr" ,nspr) + ("libpng" ,libpng) + ("sdl2" ,sdl2) + ("miniupnpc" ,miniupnpc) + ("zlib" ,zlib) + ("openjpeg" ,openjpeg) + ("mesa" ,mesa) + ("libx11" ,libx11) + ("libxcursor" ,libxcursor) + ("wxwidgets" ,wxwidgets) + ("gloox" ,gloox) ; lobby + ;; Todo: package it + ;; ("nvidia-texture-tools" ,nvidia-texture-tools) + ("libvorbis" ,libvorbis) + ("openal" ,openal))) + (native-inputs + `(("cmake" ,cmake) + ("pkg-config" ,pkg-config) + ("boost" ,boost) + ("mesa" ,mesa) + ("zip" ,zip) + ("python-2" ,python-2) + ("libsm" ,libsm))) + (build-system gnu-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + ;; We need to use the included premake4. + (add-before 'configure 'build-premake4 + (lambda _ + (setenv "CC" "gcc") + (zero? (system* "make" "-C" + "build/premake/premake4/build/gmake.unix")))) + (replace 'configure + (lambda* _ + (with-directory-excursion "build/premake" + (zero? (system* "premake4/bin/release/premake4" + "--file=premake4.lua" + "--outpath=../workspaces/gcc/" + "--platform=x64" + "--os=linux" + "--with-system-miniupnpc" + "--minimal-flags" ;"--without-nvtt" + "--with-pch" "--with-tests" "--with-audio" + "--atlas" "--with-lobby" "--collada" + ;; TODO: nvidia-texture-tools "--with-system-nvtt" + "gmake"))))) + ;; XXX: 0ad bundles spidermonkey, the tl;dr is that it requires exactly + ;; the bundled version with the applied patches or it can and will + ;; lead to crashes and incompabilities. + ;; However we could replicate this and unbundle it, use a mozjs-0ad + ;; which is kept in sync with what's included in 0ad. + (add-before 'build 'build-bundled-spidermonkey + (lambda* _ + (with-directory-excursion "libraries/source/spidermonkey" + ;; Here we must either unbundle and build this separate + ;; or unpack and run a recursive patch-shebang and repeat + ;; the entire package like we already do in the `mozjs' package. + ;; (system* "tar" "xvf" "mozjs-31.2.0.rc0.tar.bz2") + ;; (chdir "mozjs31" + ;; The following will fail, which is why the part above was started. + (zero? (system* "./build.sh"))))) + (add-before 'build 'build-bundled-fcollada + (lambda _ + (zero? (system* "make" "-C" "libraries/source/fcollada/src")))) + (replace 'build + (lambda _ + (zero? (system* "make" "-C" "build/workspaces/gcc" "verbose=1")))) + (replace 'check + (lambda* _ + (with-directory-excursion "binaries/system" + (zero? (system* "./test" "-libdir" "binaries/system")))))))) + (license (list license:expat + license:cc-by-sa3.0 + license:zlib + license:lgpl2.1 + license:gpl2)) + (home-page "http://play0ad.com") + (description + "0 A.D. is a real-time strategy game. It is a historical war and +economy game focusing on the years between 500 B.C. and 1 B.C. for the +first part, and a planned second part for the years 1 A.D. to 500 A.D. +The game is cross-platform, playable on Windows, OS X, GNU-linux, and +OpenBSD.") + (synopsis "Real-time strategy game with single- and multi-player modes"))) +