unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] Add extremetuxracer (Note: needs help!)
@ 2015-04-27  4:42 Christopher Allan Webber
  2015-04-27  5:23 ` 宋文武
  0 siblings, 1 reply; 8+ messages in thread
From: Christopher Allan Webber @ 2015-04-27  4:42 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 665 bytes --]

Hello all!

Can we really and truly claim ourselves to be a GNU/Linux distribution
without the token inclusion of our beloved TuxRacer?  Egads!

Well, I attempted to package it, but I'm running into trouble.  Perhaps
someone here can help?

Here is the problem I run into:
  
  checking for sdl-config... /gnu/store/pvcr6n01ylrj3g9ggwp98bmrzyd0h29q-sdl-1.2.15/bin/sdl-config
  checking for SDL - version >= 1.0.0... yes
  checking for pkg-config... no
  checking for SDLIMAGE... no
  configure: error: SDL_image not found
  phase `configure' failed after 7 seconds

But sdl-image is in the inputs!  What am I doing wrong?

Thanks in advance for the help!
 - Chris


[-- Attachment #2: 0001-gnu-Add-extremetuxracer.patch --]
[-- Type: text/x-diff, Size: 3466 bytes --]

From 59222dbabb1bc68fed4eae22ef2ce580e2219b7b Mon Sep 17 00:00:00 2001
From: Christopher Allan Webber <cwebber@dustycloud.org>
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 | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 192d0db..dfb711b 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -9,6 +9,7 @@
 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
+;;; Copyright © 2015 Christopher Allan Webber <cwebber@dustycloud.org>
 ;;;
 ;;; 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,49 @@ 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)
+    
+    (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)))
+    (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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] Add extremetuxracer (Note: needs help!)
  2015-04-27  4:42 [PATCH] Add extremetuxracer (Note: needs help!) Christopher Allan Webber
@ 2015-04-27  5:23 ` 宋文武
  2015-04-27 13:23   ` Christopher Allan Webber
  0 siblings, 1 reply; 8+ messages in thread
From: 宋文武 @ 2015-04-27  5:23 UTC (permalink / raw)
  To: Christopher Allan Webber, guix-devel

Christopher Allan Webber <cwebber@dustycloud.org> writes:

> Hello all!
>
> Can we really and truly claim ourselves to be a GNU/Linux distribution
> without the token inclusion of our beloved TuxRacer?  Egads!
>
> Well, I attempted to package it, but I'm running into trouble.  Perhaps
> someone here can help?
>
> Here is the problem I run into:
>   
>   checking for sdl-config... /gnu/store/pvcr6n01ylrj3g9ggwp98bmrzyd0h29q-sdl-1.2.15/bin/sdl-config
>   checking for SDL - version >= 1.0.0... yes
>   checking for pkg-config... no
>   checking for SDLIMAGE... no
>   configure: error: SDL_image not found
>   phase `configure' failed after 7 seconds
>
> But sdl-image is in the inputs!  What am I doing wrong?
You need 'pkg-config', so add it to 'native-inputs'.

Look at the 'configure.ac', it contains:

  PKG_CHECK_MODULES([SDLIMAGE], [SDL_image], ...)

That's all I see :-)
> Thanks in advance for the help!
>  - Chris
>
> From 59222dbabb1bc68fed4eae22ef2ce580e2219b7b Mon Sep 17 00:00:00 2001
> From: Christopher Allan Webber <cwebber@dustycloud.org>
> 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 | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 49 insertions(+)
>
> diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
> index 192d0db..dfb711b 100644
> --- a/gnu/packages/games.scm
> +++ b/gnu/packages/games.scm
> @@ -9,6 +9,7 @@
>  ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
>  ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
>  ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
> +;;; Copyright © 2015 Christopher Allan Webber <cwebber@dustycloud.org>
>  ;;;
>  ;;; 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,49 @@ 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)
> +    
> +    (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)))
> +    (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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Add extremetuxracer (Note: needs help!)
  2015-04-27  5:23 ` 宋文武
@ 2015-04-27 13:23   ` Christopher Allan Webber
  2015-04-27 14:18     ` David Thompson
  2015-04-27 14:43     ` 宋文武
  0 siblings, 2 replies; 8+ messages in thread
From: Christopher Allan Webber @ 2015-04-27 13:23 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 3602 bytes --]

宋文武 writes:

> Christopher Allan Webber <cwebber@dustycloud.org> writes:
>
>> Hello all!
>>
>> Can we really and truly claim ourselves to be a GNU/Linux distribution
>> without the token inclusion of our beloved TuxRacer?  Egads!
>>
>> Well, I attempted to package it, but I'm running into trouble.  Perhaps
>> someone here can help?
>>
>> Here is the problem I run into:
>>   
>>   checking for sdl-config... /gnu/store/pvcr6n01ylrj3g9ggwp98bmrzyd0h29q-sdl-1.2.15/bin/sdl-config
>>   checking for SDL - version >= 1.0.0... yes
>>   checking for pkg-config... no
>>   checking for SDLIMAGE... no
>>   configure: error: SDL_image not found
>>   phase `configure' failed after 7 seconds
>>
>> But sdl-image is in the inputs!  What am I doing wrong?
> You need 'pkg-config', so add it to 'native-inputs'.
>
> Look at the 'configure.ac', it contains:
>
>   PKG_CHECK_MODULES([SDLIMAGE], [SDL_image], ...)
>
> That's all I see :-)

Thank you, and you're right!  Shows how little I know about building
traditional packages.  Ah well, Guix is helping me there!

But now I am having a new problem:

  g++ -DHAVE_CONFIG_H -I.   -DETR_DATA_DIR=\"/gnu/store/bhfr0gh4nlna1k7wcy2qm1w4d0gsmwh5-extremetuxracer-0.6.0/share\"  -g -O2 -I/gnu/store/s3myrsqza4nnh4lrhmh51r9vzc4392pm-freetype-2.5.5/include/freetype2 -std=c++11 -MT course.o -MD -MP -MF .deps/course.Tpo -c -o course.o course.cpp
  In file included from bh.h:62:0,
                   from common.h:21,
                   from common.cpp:22:
  /gnu/store/g5xq9m0l5qclk0f47mf6vybrnqav0vmg-sdl-image-1.2.12/include/SDL/SDL_image.h:27:17: fatal error: SDL.h: No such file or directory
   #include "SDL.h"
                   ^
  compilation terminated.
  Makefile:612: recipe for target 'common.o' failed
  make[2]: *** [common.o] Error 1
  make[2]: *** Waiting for unfinished jobs....
  In file included from bh.h:62:0,
                   from course.cpp:22:
  /gnu/store/g5xq9m0l5qclk0f47mf6vybrnqav0vmg-sdl-image-1.2.12/include/SDL/SDL_image.h:27:17: fatal error: SDL.h: No such file or directory
   #include "SDL.h"
                   ^
  compilation terminated.
  Makefile:612: recipe for target 'course.o' failed
  make[2]: *** [course.o] Error 1
  In file included from bh.h:62:0,
                   from audio.h:20,
                   from audio.cpp:21:
  /gnu/store/g5xq9m0l5qclk0f47mf6vybrnqav0vmg-sdl-image-1.2.12/include/SDL/SDL_image.h:27:17: fatal error: SDL.h: No such file or directory
   #include "SDL.h"
                   ^
  compilation terminated.
  Makefile:612: recipe for target 'audio.o' failed
  make[2]: *** [audio.o] Error 1
  In file included from bh.h:62:0,
                   from config_screen.h:20,
                   from config_screen.cpp:42:
  /gnu/store/g5xq9m0l5qclk0f47mf6vybrnqav0vmg-sdl-image-1.2.12/include/SDL/SDL_image.h:27:17: fatal error: SDL.h: No such file or directory
   #include "SDL.h"
                   ^
  compilation terminated.
  Makefile:612: recipe for target 'config_screen.o' failed
  make[2]: *** [config_screen.o] Error 1
  make[2]: Leaving directory '/tmp/nix-build-extremetuxracer-0.6.0.drv-0/etr-0.6.0'
  Makefile:632: recipe for target 'all-recursive' failed
  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!


[-- Attachment #2: 0001-gnu-Add-extremetuxracer.patch --]
[-- Type: text/x-diff, Size: 3511 bytes --]

From 303782c4e62b26dea18e038cc362fb41639a0a3a Mon Sep 17 00:00:00 2001
From: Christopher Allan Webber <cwebber@dustycloud.org>
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 | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 192d0db..cf66fd8 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -9,6 +9,7 @@
 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
+;;; Copyright © 2015 Christopher Allan Webber <cwebber@dustycloud.org>
 ;;;
 ;;; 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,49 @@ 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)))
+    (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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] Add extremetuxracer (Note: needs help!)
  2015-04-27 13:23   ` Christopher Allan Webber
@ 2015-04-27 14:18     ` David Thompson
  2015-04-27 14:43     ` 宋文武
  1 sibling, 0 replies; 8+ messages in thread
From: David Thompson @ 2015-04-27 14:18 UTC (permalink / raw)
  To: Christopher Allan Webber, 宋文武; +Cc: guix-devel

Christopher Allan Webber <cwebber@dustycloud.org> writes:

> But now I am having a new problem:
>
>   g++ -DHAVE_CONFIG_H -I.   -DETR_DATA_DIR=\"/gnu/store/bhfr0gh4nlna1k7wcy2qm1w4d0gsmwh5-extremetuxracer-0.6.0/share\"  -g -O2 -I/gnu/store/s3myrsqza4nnh4lrhmh51r9vzc4392pm-freetype-2.5.5/include/freetype2 -std=c++11 -MT course.o -MD -MP -MF .deps/course.Tpo -c -o course.o course.cpp
>   In file included from bh.h:62:0,
>                    from common.h:21,
>                    from common.cpp:22:
>   /gnu/store/g5xq9m0l5qclk0f47mf6vybrnqav0vmg-sdl-image-1.2.12/include/SDL/SDL_image.h:27:17: fatal error: SDL.h: No such file or directory
>    #include "SDL.h"

[snip]

> sdl is an input, so I don't know what's going on...

The problem here is that the SDL header file is actually in
/include/SDL/SDL.h.  So, "SDL.h" should be "SDL/SDL.h".  To fix this,
you could add a phase to patch the source appropriately, or add a make
flag (#:make-flags in the 'arguments' package field) that adds
'(string-append (assoc-ref %build-inputs "sdl") "/include/SDL")' to the
include path.

Good luck!

-- 
David Thompson
Web Developer - Free Software Foundation - http://fsf.org
GPG Key: 0FF1D807
Support the FSF: https://fsf.org/donate

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Add extremetuxracer (Note: needs help!)
  2015-04-27 13:23   ` Christopher Allan Webber
  2015-04-27 14:18     ` David Thompson
@ 2015-04-27 14:43     ` 宋文武
  2015-04-27 16:23       ` Christopher Allan Webber
  1 sibling, 1 reply; 8+ messages in thread
From: 宋文武 @ 2015-04-27 14:43 UTC (permalink / raw)
  To: Christopher Allan Webber; +Cc: guix-devel

Christopher Allan Webber <cwebber@dustycloud.org> writes:

> 宋文武 writes:
>
>> Christopher Allan Webber <cwebber@dustycloud.org> writes:
>>
>>> Hello all!
>>>
>>> Can we really and truly claim ourselves to be a GNU/Linux distribution
>>> without the token inclusion of our beloved TuxRacer?  Egads!
>>>
>>> Well, I attempted to package it, but I'm running into trouble.  Perhaps
>>> someone here can help?
>>>
>>> Here is the problem I run into:
>>>   
>>>   checking for sdl-config... /gnu/store/pvcr6n01ylrj3g9ggwp98bmrzyd0h29q-sdl-1.2.15/bin/sdl-config
>>>   checking for SDL - version >= 1.0.0... yes
>>>   checking for pkg-config... no
>>>   checking for SDLIMAGE... no
>>>   configure: error: SDL_image not found
>>>   phase `configure' failed after 7 seconds
>>>
>>> But sdl-image is in the inputs!  What am I doing wrong?
>> You need 'pkg-config', so add it to 'native-inputs'.
>>
>> Look at the 'configure.ac', it contains:
>>
>>   PKG_CHECK_MODULES([SDLIMAGE], [SDL_image], ...)
>>
>> That's all I see :-)
>
> Thank you, and you're right!  Shows how little I know about building
> traditional packages.  Ah well, Guix is helping me there!
>
> But now I am having a new problem:
>
>   g++ -DHAVE_CONFIG_H -I.   -DETR_DATA_DIR=\"/gnu/store/bhfr0gh4nlna1k7wcy2qm1w4d0gsmwh5-extremetuxracer-0.6.0/share\"  -g -O2 -I/gnu/store/s3myrsqza4nnh4lrhmh51r9vzc4392pm-freetype-2.5.5/include/freetype2 -std=c++11 -MT course.o -MD -MP -MF .deps/course.Tpo -c -o course.o course.cpp
>   In file included from bh.h:62:0,
>                    from common.h:21,
>                    from common.cpp:22:
>   /gnu/store/g5xq9m0l5qclk0f47mf6vybrnqav0vmg-sdl-image-1.2.12/include/SDL/SDL_image.h:27:17: fatal error: SDL.h: No such file or directory
>    #include "SDL.h"
>                    ^
>   compilation terminated.
>   Makefile:612: recipe for target 'common.o' failed
>   make[2]: *** [common.o] Error 1
>   make[2]: *** Waiting for unfinished jobs....
>   In file included from bh.h:62:0,
>                    from course.cpp:22:
>   /gnu/store/g5xq9m0l5qclk0f47mf6vybrnqav0vmg-sdl-image-1.2.12/include/SDL/SDL_image.h:27:17: fatal error: SDL.h: No such file or directory
>    #include "SDL.h"
>                    ^
>   compilation terminated.
>   Makefile:612: recipe for target 'course.o' failed
>   make[2]: *** [course.o] Error 1
>   In file included from bh.h:62:0,
>                    from audio.h:20,
>                    from audio.cpp:21:
>   /gnu/store/g5xq9m0l5qclk0f47mf6vybrnqav0vmg-sdl-image-1.2.12/include/SDL/SDL_image.h:27:17: fatal error: SDL.h: No such file or directory
>    #include "SDL.h"
>                    ^
>   compilation terminated.
>   Makefile:612: recipe for target 'audio.o' failed
>   make[2]: *** [audio.o] Error 1
>   In file included from bh.h:62:0,
>                    from config_screen.h:20,
>                    from config_screen.cpp:42:
>   /gnu/store/g5xq9m0l5qclk0f47mf6vybrnqav0vmg-sdl-image-1.2.12/include/SDL/SDL_image.h:27:17: fatal error: SDL.h: No such file or directory
>    #include "SDL.h"
>                    ^
>   compilation terminated.
>   Makefile:612: recipe for target 'config_screen.o' failed
>   make[2]: *** [config_screen.o] Error 1
>   make[2]: Leaving directory '/tmp/nix-build-extremetuxracer-0.6.0.drv-0/etr-0.6.0'
>   Makefile:632: recipe for target 'all-recursive' failed
>   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 :-)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Add extremetuxracer (Note: needs help!)
  2015-04-27 14:43     ` 宋文武
@ 2015-04-27 16:23       ` Christopher Allan Webber
  2015-04-27 16:40         ` Christopher Allan Webber
  0 siblings, 1 reply; 8+ messages in thread
From: Christopher Allan Webber @ 2015-04-27 16:23 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 985 bytes --]

宋文武 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


[-- Attachment #2: 0001-gnu-Add-extremetuxracer.patch --]
[-- Type: text/x-diff, Size: 3762 bytes --]

From fdc2529e2e42a0168ff1221b859ef677686618d2 Mon Sep 17 00:00:00 2001
From: Christopher Allan Webber <cwebber@dustycloud.org>
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 <mhw@netris.org>
 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
+;;; Copyright © 2015 Christopher Allan Webber <cwebber@dustycloud.org>
 ;;;
 ;;; 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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] Add extremetuxracer (Note: needs help!)
  2015-04-27 16:23       ` Christopher Allan Webber
@ 2015-04-27 16:40         ` Christopher Allan Webber
  2015-04-27 18:14           ` David Thompson
  0 siblings, 1 reply; 8+ messages in thread
From: Christopher Allan Webber @ 2015-04-27 16:40 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1124 bytes --]

Christopher Allan Webber writes:

> 宋文武 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

Okay, Dave Thompson pointed out I should use modify-phases.  Done!


[-- Attachment #2: 0001-gnu-Add-extremetuxracer.patch --]
[-- Type: text/x-diff, Size: 3789 bytes --]

From fce4cb6603ebb390904f09fdd1959bb6cddd8024 Mon Sep 17 00:00:00 2001
From: Christopher Allan Webber <cwebber@dustycloud.org>
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 | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 192d0db..fb551d1 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -9,6 +9,7 @@
 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
+;;; Copyright © 2015 Christopher Allan Webber <cwebber@dustycloud.org>
 ;;;
 ;;; 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,56 @@ 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
+       (modify-phases %standard-phases
+         (add-after 'configure 'patch-makefile
+                    (lambda _
+                      (substitute* "Makefile"
+                        (("CXXFLAGS =") "CXXFLAGS = ${CFLAGS}")))))))
+    (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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] Add extremetuxracer (Note: needs help!)
  2015-04-27 16:40         ` Christopher Allan Webber
@ 2015-04-27 18:14           ` David Thompson
  0 siblings, 0 replies; 8+ messages in thread
From: David Thompson @ 2015-04-27 18:14 UTC (permalink / raw)
  To: Christopher Allan Webber, 宋文武; +Cc: guix-devel

Christopher Allan Webber <cwebber@dustycloud.org> writes:

> Christopher Allan Webber writes:
>
>> 宋文武 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
>
> Okay, Dave Thompson pointed out I should use modify-phases.  Done!

Pushed.  Thanks!

-- 
David Thompson
Web Developer - Free Software Foundation - http://fsf.org
GPG Key: 0FF1D807
Support the FSF: https://fsf.org/donate

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-04-27 18:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-27  4:42 [PATCH] Add extremetuxracer (Note: needs help!) Christopher Allan Webber
2015-04-27  5:23 ` 宋文武
2015-04-27 13:23   ` Christopher Allan Webber
2015-04-27 14:18     ` David Thompson
2015-04-27 14:43     ` 宋文武
2015-04-27 16:23       ` Christopher Allan Webber
2015-04-27 16:40         ` Christopher Allan Webber
2015-04-27 18:14           ` David Thompson

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).