guix-commits
[Top][All Lists]
Advanced

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

01/04: gnu: Add godot.


From: Ludovic Courtès
Subject: 01/04: gnu: Add godot.
Date: Thu, 14 Sep 2017 08:07:35 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 194b4e7d65137b5b781b3d1c05f4cbd879cd85db
Author: Peter Mikkelsen <address@hidden>
Date:   Thu Sep 7 13:59:47 2017 +0200

    gnu: Add godot.
    
    * gnu/packages/game-development.scm (godot): New variable.
    
    Signed-off-by: Ludovic Courtès <address@hidden>
---
 gnu/packages/game-development.scm | 108 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 107 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/game-development.scm 
b/gnu/packages/game-development.scm
index c8869a4..5633456 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -10,6 +10,7 @@
 ;;; Copyright © 2016, 2017 Julian Graham <address@hidden>
 ;;; Copyright © 2017 Tobias Geerinckx-Rice <address@hidden>
 ;;; Copyright © 2017 Manolis Fragkiskos Ragkousis <address@hidden>
+;;; Copyright © 2017 Peter Mikkelsen <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -73,7 +74,8 @@
   #:use-module (gnu packages xiph)
   #:use-module (gnu packages lua)
   #:use-module (gnu packages mp3)
-  #:use-module (gnu packages xml))
+  #:use-module (gnu packages xml)
+  #:use-module (gnu packages tls))
 
 (define-public bullet
   (package
@@ -1019,3 +1021,107 @@ with its own editor, called OpenMW-CS which allows the 
user to edit or create
 their own original games.")
     (home-page "https://openmw.org";)
     (license license:gpl3)))
+
+(define-public godot
+  (package
+    (name "godot")
+    (version "2.1.4")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append "https://github.com/godotengine/godot/archive/";
+                              version "-stable.tar.gz"))
+              (file-name (string-append name "-" version))
+              (sha256
+               (base32 
"1mz89nafc1m7srbqvy7iagxrxmqvf5hbqi7i0lwaapkx6q0kpkq7"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ; There are no tests
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (add-after 'unpack 'scons-use-env
+           (lambda _
+             ;; Scons does not use the environment variables by default,
+             ;; but this substitution makes it do so.
+             (substitute* "SConstruct"
+               (("env_base = Environment\\(tools=custom_tools\\)")
+                (string-append
+                 "env_base = Environment(tools=custom_tools)\n"
+                 "env_base = Environment(ENV=os.environ)")))
+             #t))
+         (replace 'build
+           (lambda _
+             (zero? (system*
+                     "scons"
+                     "platform=x11"
+                     ;; Avoid using many of the bundled libs.
+                     ;; Note: These options can be found in the SConstruct 
file.
+                     "builtin_freetype=no"
+                     "builtin_glew=no"
+                     "builtin_libmpdec=no"
+                     "builtin_libogg=no"
+                     "builtin_libpng=no"
+                     "builtin_libtheora=no"
+                     "builtin_libvorbis=no"
+                     "builtin_libwebp=no"
+                     "builtin_openssl=no"
+                     "builtin_opus=no"
+                     "builtin_zlib=no"))))
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin")))
+               (with-directory-excursion "bin"
+                 (if (file-exists? "godot.x11.tools.64")
+                     (rename-file "godot.x11.tools.64" "godot")
+                     (rename-file "godot.x11.tools.32" "godot"))
+                 (install-file "godot" bin)))))
+         (add-after 'install 'install-godot-desktop
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (desktop (string-append out "/share/applications"))
+                    (icon-dir (string-append out "/share/pixmaps")))
+               (mkdir-p desktop)
+               (mkdir-p icon-dir)
+               (rename-file "icon.png" "godot.png")
+               (install-file "godot.png" icon-dir)
+               (with-output-to-file
+                   (string-append desktop "/godot.desktop")
+                 (lambda _
+                   (format #t
+                           "[Desktop Entry]~@
+                           Name=godot~@
+                           Comment=The godot game engine~@
+                           Exec=~a/bin/godot~@
+                           address@hidden/bin/godot~@
+                           Icon=godot~@
+                           Type=Application~%"
+                           out)))
+               #t))))))
+    (native-inputs `(("pkg-config" ,pkg-config)
+                     ("scons" ,scons)))
+    (inputs `(("alsa-lib" ,alsa-lib)
+              ("freetype" ,freetype)
+              ("glew" ,glew)
+              ("glu" ,glu)
+              ("libtheora" ,libtheora)
+              ("libvorbis" ,libvorbis)
+              ("libwebp" ,libwebp)
+              ("libx11" ,libx11)
+              ("libxcursor" ,libxcursor)
+              ("libxinerama" ,libxinerama)
+              ("libxrandr" ,libxrandr)
+              ("mesa" ,mesa)
+              ("openssl" ,openssl)
+              ("opusfile" ,opusfile)
+              ("pulseaudio" ,pulseaudio)
+              ("python2" ,python-2)))
+    (home-page "https://godotengine.org/";)
+    (synopsis "Advanced 2D and 3D game engine")
+    (description
+     "Godot is an advanced multi-platform game engine written in C++.  If
+features design tools such as a visual editor, can import 3D models and
+provide high-quality 3D rendering, it contains an animation editor, and can be
+scripted in a Python-like language.")
+    (license license:expat)))



reply via email to

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