From 5a906d8a8a9ff50ed46b5ffc33714b11517e23ca Mon Sep 17 00:00:00 2001 From: Oleg Pykhalov Date: Thu, 11 Jan 2018 01:14:41 +0300 Subject: [PATCH] gnu: Add urho3d. * gnu/packages/game-development.scm (urho3d): New public variable. --- gnu/packages/game-development.scm | 51 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index 0b08b04f5..3c5eae5cd 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -1206,3 +1206,54 @@ related games such as Heretic and Hexen. It comes with a 3d preview mode and a 2D editor view.") (home-page "http://eureka-editor.sourceforge.net/") (license license:gpl2+))) + +(define-public urho3d + (package + (name "urho3d") + (version "1.7") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/urho3d/Urho3D" + "/archive/" version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1im63n9rx8qq1ks6aq6jrl5ikxg87hqhsy06miqc317hpm1iyav5")))) + (build-system cmake-build-system) + (inputs `(("libx11" ,libx11) + ("libxcursor" ,libxcursor) + ("libxext" ,libxext) + ("libxi" ,libxi) + ("libxinerama" ,libxinerama) + ("libxrandr" ,libxrandr) + ("libxrender" ,libxrender) + ("libxscrnsaver" ,libxscrnsaver) + ("mesa" ,mesa) + ("alsa-lib" ,alsa-lib) + ("pulseaudio" ,pulseaudio))) + (arguments + '(#:tests? + #f ; There are no tests + #:phases + (modify-phases %standard-phases + (add-after 'configure 'use-full-library-paths + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "../build/Source/ThirdParty\ +/SDL/include/generated/SDL_config.h" + (("#define SDL_AUDIO_DRIVER_ALSA_DYNAMIC \"libasound\\.so\\.2\"") + (string-append "#define SDL_AUDIO_DRIVER_ALSA_DYNAMIC \"" + (assoc-ref inputs "alsa-lib") + "/lib/libasound.so.2" + "\"")) + (((string-append "#define SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC" + " \"libpulse-simple\\.so\\.0\"")) + (string-append "#define SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC \"" + (assoc-ref inputs "pulseaudio") + "/lib/libpulse-simple.so.0" + "\""))) + #t))))) + (home-page "https://urho3d.github.io/") + (synopsis "Cross-platform 2D and 3D game engine") + (description "This package provides a lightweight, cross-platform 2D and +3D game engine implemented in C++. Inspired by OGRE and Horde3D.") + (license license:expat))) -- 2.15.1