From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56299) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dpvUg-0003cT-Ad for guix-patches@gnu.org; Thu, 07 Sep 2017 08:01:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dpvUU-0004Su-9f for guix-patches@gnu.org; Thu, 07 Sep 2017 08:01:14 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:45215) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dpvUU-0004Sl-6Q for guix-patches@gnu.org; Thu, 07 Sep 2017 08:01:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dpvUT-0003oh-UY for guix-patches@gnu.org; Thu, 07 Sep 2017 08:01:01 -0400 Subject: [bug#28380] [PATCH] gnu: Add godot. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55268) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dpvTT-00038t-Eb for guix-patches@gnu.org; Thu, 07 Sep 2017 08:00:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dpvTO-0003lm-Bv for guix-patches@gnu.org; Thu, 07 Sep 2017 07:59:59 -0400 Received: from mail-lf0-x22a.google.com ([2a00:1450:4010:c07::22a]:33159) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dpvTO-0003lR-0w for guix-patches@gnu.org; Thu, 07 Sep 2017 07:59:54 -0400 Received: by mail-lf0-x22a.google.com with SMTP id c80so1932659lfh.0 for ; Thu, 07 Sep 2017 04:59:52 -0700 (PDT) From: Peter Mikkelsen Date: Thu, 7 Sep 2017 13:59:47 +0200 Message-Id: <20170907115947.19777-1-petermikkelsen10@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: 28380@debbugs.gnu.org * gnu/packages/game-development.scm (godot): New variable. --- gnu/packages/game-development.scm | 105 +++++++++++++++++++++++++++++++++++++- 1 file changed, 104 insertions(+), 1 deletion(-) diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index c8869a494..e04c11d7d 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -10,6 +10,7 @@ ;;; Copyright © 2016, 2017 Julian Graham ;;; Copyright © 2017 Tobias Geerinckx-Rice ;;; Copyright © 2017 Manolis Fragkiskos Ragkousis +;;; Copyright © 2017 Peter Mikkelsen ;;; ;;; 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,104 @@ 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~@ + TryExec=~@*~a/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, feature-packed, multi-platform +2D and 3D open source game engine.") + (license license:expat))) -- 2.14.1