From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Thompson Subject: [PATCH 2/3] gnu: Add irrlicht. Date: Fri, 5 Sep 2014 14:53:17 -0400 Message-ID: <1409943198-858-2-git-send-email-dthompson2@worcester.edu> References: <1409943198-858-1-git-send-email-dthompson2@worcester.edu> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50453) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPydh-0000wU-DL for guix-devel@gnu.org; Fri, 05 Sep 2014 14:53:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XPydZ-00059D-8X for guix-devel@gnu.org; Fri, 05 Sep 2014 14:53:41 -0400 Received: from na3sys009aog104.obsmtp.com ([74.125.149.73]:56649) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPydZ-000596-1A for guix-devel@gnu.org; Fri, 05 Sep 2014 14:53:33 -0400 Received: by mail-yh0-f42.google.com with SMTP id z6so861459yhz.1 for ; Fri, 05 Sep 2014 11:53:31 -0700 (PDT) In-Reply-To: <1409943198-858-1-git-send-email-dthompson2@worcester.edu> 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+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org * gnu/packages/games.scm (irrlicht): New variable. --- gnu/packages/games.scm | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index e6ef402..86ad436 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -20,6 +20,7 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages games) + #:use-module (srfi srfi-1) #:use-module (guix licenses) #:use-module (guix packages) #:use-module (guix download) @@ -43,6 +44,7 @@ #:use-module (gnu packages texinfo) #:use-module (gnu packages pulseaudio) #:use-module (gnu packages linux) + #:use-module (gnu packages zip) #:use-module (guix build-system gnu) #:use-module (guix build-system cmake)) @@ -353,3 +355,48 @@ through the EFX extension. It also facilitates streaming audio, multi-channel buffers, and audio capture.") (home-page "http://kcat.strangesoft.net/openal.html") (license lgpl2.0+))) + +(define-public irrlicht + (package + (name "irrlicht") + (version "1.8.1") + (source (origin + (method url-fetch) + (uri (string-append + "mirror://sourceforge/irrlicht/Irrlicht%20SDK/" + (string-join (take (string-split version #\.) 2) ".") + "/" version "/irrlicht-" version ".zip")) + (sha256 + (base32 + "0yz9lvsc8aqk8wj4rnpanxrw90gqpwn9w5hxp94r8hnm2q0vjjw1")))) + (build-system gnu-build-system) + (arguments + '(#:phases (alist-cons-after + 'unpack 'fix-build-env + (lambda* (#:key outputs #:allow-other-keys) + (let ((prefix (assoc-ref outputs "out"))) + (substitute* "Makefile" + (("INSTALL_DIR = /usr/local/lib") + (string-append "INSTALL_DIR = " prefix "/lib"))) + ;; The Makefile assumes these directories exist. + (mkdir-p (string-append prefix "/lib")) + (mkdir-p (string-append prefix "/include")))) + (alist-replace + 'unpack + (lambda* (#:key source #:allow-other-keys) + (and (zero? (system* "unzip" source)) + ;; The actual source is buried a few directories deep. + (chdir "irrlicht-1.8.1/source/Irrlicht/"))) + ;; No configure script + (alist-delete 'configure %standard-phases))) + #:tests? #f ; no check target + #:make-flags '("CC=gcc" "sharedlib"))) + (native-inputs + `(("unzip" ,unzip))) + (inputs + `(("mesa" ,mesa))) + (synopsis "3D game engine") + (description + "3D game engine.") + (home-page "http://irrlicht.sourceforge.net/") + (license bsd-3))) -- 2.1.0