guix-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Add extremetuxracer (Note: needs help!)


From: Christopher Allan Webber
Subject: Re: [PATCH] Add extremetuxracer (Note: needs help!)
Date: Mon, 27 Apr 2015 11:23:18 -0500

宋文武 writes:

>>   make[1]: *** [all-recursive] Error 1
>>   make[1]: Leaving directory 
>> '/tmp/nix-build-extremetuxracer-0.6.0.drv-0/etr-0.6.0'
>>   Makefile:457: recipe for target 'all' failed
>>   make: *** [all] Error 2
>>
>> sdl is an input, so I don't know what's going on...
>>
>> Sorry!  I thought this one was going to be an easy package that I
>> wouldn't need much help on!
> oops, I take a deep look.  It turn out that
> this package set the flags (for SDL, etc.) as 'CFLAGS',
> but it only use 'CXXFLAGS' (only have freetype) when compile cpp files.
> I think we can patch the Makefile after 'configure' phase, by:
>
>   (substitute* "Makefile"
>     (("CXXFLAGS =") "CXXFLAGS = ${CFLAGS)"))
>
> And better, ask upstream for a real fix :-)

Spot on!  (Well mostly!  ${CFLAGS} not ${CFLAGS), I was confused for a
minute :))  But this was exactly what was needed!  We now have a working
(extreme) tuxracer!

We're a REAL distro now!
 - cwebb

>From fdc2529e2e42a0168ff1221b859ef677686618d2 Mon Sep 17 00:00:00 2001
From: Christopher Allan Webber <address@hidden>
Date: Sun, 26 Apr 2015 23:40:40 -0500
Subject: [PATCH] gnu: Add extremetuxracer

* gnu/packages/games.scm (extremetuxracer): New variable.
---
 gnu/packages/games.scm | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 192d0db..16a71fe 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -9,6 +9,7 @@
 ;;; Copyright © 2014 Mark H Weaver <address@hidden>
 ;;; Copyright © 2015 Andreas Enge <address@hidden>
 ;;; Copyright © 2015 David Hashe <address@hidden>
+;;; Copyright © 2015 Christopher Allan Webber <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -42,6 +43,7 @@
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages libcanberra)
+  #:use-module (gnu packages libunwind)
   #:use-module (gnu packages image)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages python)
@@ -65,6 +67,7 @@
   #:use-module (gnu packages lua)
   #:use-module (gnu packages video)
   #:use-module (gnu packages xml)
+  #:use-module (gnu packages tcl)
   #:use-module (guix build-system trivial)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system cmake)
@@ -822,3 +825,57 @@ interfaces or even in Emacs.  It supports the standard 
game storage format
 Modem Protocol).")
     (home-page "http://www.gnu.org/software/gnugo/";)
     (license license:gpl3+)))
+
+(define-public extremetuxracer
+  (package
+    (name "extremetuxracer")
+    (version "0.6.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    
"http://downloads.sourceforge.net/project/extremetuxracer/releases/";
+                    version
+                    "/etr-" version ".tar.xz"))
+              (sha256
+               (base32
+                "0fl9pwkywqnsmgr6plfj9zb05xrdnl5xb2hcmbjk7ap9l4cjfca4"))))
+    (build-system gnu-build-system)
+    (native-inputs `(("pkg-config" ,pkg-config)))
+    (inputs `(("freetype" ,freetype)
+              ("mesa" ,mesa)
+              ("glu" ,glu)
+              ("libice" ,libice)
+              ("libpng" ,libpng)
+              ("sdl" ,sdl)
+              ("sdl-mixer" ,sdl-mixer)
+              ("sdl-image" ,sdl-image)
+              ("libsm" ,libsm)
+              ("libunwind" ,libunwind)
+              ("libx11" ,libx11)
+              ("libxext" ,libxext)
+              ("libxi" ,libxi)
+              ("libxmu" ,libxmu)
+              ("libxt" ,libxt)
+              ("tcl" ,tcl)
+              ("zlib" ,zlib)))
+    (arguments
+     '(#:phases
+       (alist-cons-after
+        'configure 'patch-makefile-shebangs
+        (lambda _
+          (substitute* "Makefile"
+            (("CXXFLAGS =") "CXXFLAGS = ${CFLAGS}")))
+        %standard-phases)))
+    (synopsis "High speed arctic racing game based on Tux Racer")
+    ;; Snarfed straight from Debian
+    (description "Extreme Tux Racer, or etracer as it is called for short, is
+a simple OpenGL racing game featuring Tux, the Linux mascot.  The goal of the
+game is to slide down a snow- and ice-covered mountain as quickly as possible,
+avoiding the trees and rocks that will slow you down.
+
+Collect herrings and other goodies while sliding down the hill, but avoid fish
+bones.
+
+This game is based on the GPL version of the famous game TuxRacer.")
+    (home-page "http://sourceforge.net/projects/extremetuxracer/";)
+    (license license:gpl2+)))
-- 
2.1.4


reply via email to

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