From: ng0 <ng0@libertad.pw>
To: guix-devel@gnu.org
Cc: ng0 <ng0@we.make.ritual.n0.is>
Subject: [PATCH 3/3] gnu: Add 0ad.
Date: Fri, 30 Dec 2016 18:04:50 +0000 [thread overview]
Message-ID: <20161230180450.23500-4-ng0@libertad.pw> (raw)
In-Reply-To: <20161230180450.23500-1-ng0@libertad.pw>
From: ng0 <ng0@we.make.ritual.n0.is>
* gnu/packages/games.scm (0ad): New variable.
---
gnu/packages/games.scm | 147 ++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 146 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 69c72a55f..dba021619 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -17,7 +17,7 @@
;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
;;; Copyright © 2016 Rodger Fox <thylakoid@openmailbox.org>
;;; Copyright © 2016 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
-;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
+;;; Copyright © 2016, 2017 ng0 <ng0@libertad.pw>
;;; Copyright © 2016 Albin Söderqvist <albin@fripost.org>
;;; Copyright © 2016 Kei Kebreau <kei@openmailbox.org>
;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
@@ -57,6 +57,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)
@@ -65,6 +66,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)
@@ -74,8 +76,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)
@@ -98,12 +102,15 @@
#: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)
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages tls)
#:use-module (gnu packages pcre)
+ #:use-module (gnu packages ruby)
#:use-module (guix build-system gnu)
#:use-module (guix build-system haskell)
#:use-module (guix build-system python)
@@ -3114,3 +3121,141 @@ for Un*x systems with X11.")
;; license:lppl1.3c TODO: ADD.
;; license:bitstream-vera TODO: ADD.
license:cc-by-sa3.0))))
+
+(define-public 0ad
+ (package
+ (name "0ad")
+ (version "0.0.21-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
+ "1kw3hqnr737ipx4f03khz3hvsh3ha7r8iy9njppk2faa53j27gln"))))
+ (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
+ ("mozjs-38" ,mozjs-38)
+ ;; TODO: ("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)
+ ("python" ,python)
+ ("ruby" ,ruby)
+ ("bash" ,bash)
+ ("libsm" ,libsm)))
+ (build-system gnu-build-system)
+ ;; NOTE:
+ ;; FIX MOZJS build:
+ ;; lrwxrwxrwx 2 root root 79 Jan 1 1970 /gnu/store/xzq971blmjazq7bc267wcgna3bjw15js-mozjs-38.2.1.rc0/include/mozjs-/js/RequiredDefines.h -> /tmp/guix-build-mozjs-38.2.1.rc0.drv-0/mozjs-38.0.0/js/public/RequiredDefines.h
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'create-/bin/sh-symlink
+ (lambda _
+ ;; The build system creates files during build which expect
+ ;; /bin/sh to exist (shebang).
+ (let ((bash (string-append (assoc-ref %build-inputs "bash")
+ "/bin/sh")))
+ ;;(symlink bash (string-append (assoc-ref %outputs "out")
+ ;; "/bin/sh"))
+ (substitute* "build/premake/premake4/src/actions/xcode/xcode_common.lua"
+ (("/bin/sh") bash))
+ (substitute* "build/premake/premake4/src/host/scripts.c"
+ (("/bin/sh") bash))
+ (substitute* "build/premake/premake4/tests/actions/xcode/test_xcode_project.lua"
+ (("/bin/sh") bash)))))
+ ;; (add-after 'unpack 'add-mozjs-to-pkgpath
+ ;; (lambda _
+ ;; (setenv "PKG_CONFIG_PATH"
+ ;; (string-append (getenv "PKG_CONFIG_PATH") ":"
+ ;; (assoc-ref %build-inputs "mozjs-38")
+ ;; "/lib/pkgconfig"))))
+ (add-after 'unpack 'use-mozjs
+ (lambda _
+ (substitute* "build/premake/extern_libs4.lua"
+ (("mozjs-38") "js"))))
+ (add-after 'unpack 'delete-bundles
+ (lambda _
+ (delete-file-recursively "libraries/source/spidermonkey")))
+ (add-after 'unpack 'reset-defaults
+ (lambda _
+ (substitute* "build/premake/premake4/build/gmake.unix/Premake4.make"
+ (("-Wall -Os") "-Wall")
+ (("CFLAGS += $(CPPFLAGS) -Wall")
+ "CFLAGS += $(CFLAGS) $(CPPFLAGS) -Wall")
+ (("CXXFLAGS += $(CPPFLAGS) -Wall -g")
+ "CXXFLAGS += $(CXXFLAGS) $(CPPFLAGS) -Wall"))))
+ ;; 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"
+ "--with-system-mozjs38"
+ "--minimal-flags"
+ ;; TODO: "--without-nvtt"
+ "--with-pch" "--with-tests" "--with-audio"
+ ;;"--enable-atlas"
+ "--atlas"
+ "--with-lobby" "--enable-collada"
+ ;; TODO: "--with-system-nvtt"
+ "gmake")))))
+ ;; XXX: 0ad bundles spidermonkey, it requires exactly
+ ;; the bundled version with the applied patches or something
+ ;; similar, see README.
+ (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"))))))))
+ (home-page "http://play0ad.com")
+ (synopsis "Real-time strategy game with single- and multi-player modes")
+ (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.")
+ (license (list license:expat
+ license:cc-by-sa3.0
+ license:zlib
+ license:lgpl2.1
+ license:gpl2))))
--
2.11.0
next prev parent reply other threads:[~2016-12-30 18:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-30 18:04 Mozilla help needed - 0ad, or: how to pass the version to mozjs-38? ng0
2016-12-30 18:04 ` [PATCH 1/3] gnu: Add mozjs-38 ng0
2016-12-30 18:04 ` [PATCH 2/3] gnu: Add 0ad-data ng0
2016-12-30 18:04 ` ng0 [this message]
2017-01-06 14:45 ` Mozilla help needed - 0ad, or: how to pass the version to mozjs-38? ng0
2017-01-06 17:49 ` Maxim Cournoyer
2017-01-06 20:44 ` ng0
2017-01-22 10:17 ` Ricardo Wurmus
2017-01-22 10:50 ` ng0
2017-01-22 11:04 ` ng0
2017-01-22 11:36 ` Ricardo Wurmus
-- strict thread matches above, loose matches on Subject: below --
2016-12-23 21:15 0ad ng0
2016-12-23 21:15 ` [PATCH 3/3] gnu: Add 0ad ng0
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161230180450.23500-4-ng0@libertad.pw \
--to=ng0@libertad.pw \
--cc=guix-devel@gnu.org \
--cc=ng0@we.make.ritual.n0.is \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).