unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Add pingus
@ 2014-06-13  5:59 Eric Bavier
  2014-06-13  8:49 ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Bavier @ 2014-06-13  5:59 UTC (permalink / raw)
  To: Guix-devel

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

My son and I like to play this game together, so I thought it'd be nice
to get it into Guix.


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

From 5a1ebda6264c52417c1deee9afdf75e0a97428f8 Mon Sep 17 00:00:00 2001
From: Eric Bavier <bavier@member.fsf.org>
Date: Thu, 12 Jun 2014 23:54:44 -0500
Subject: [PATCH] gnu: Add pingus.

* gnu/packages/games.scm (pingus): New variable.
* gnu/packages/patches/pingus-sdl-libs-config.patch: New patch.
* gnu-system.am (dist_patch_DATA): Add it.
---
 gnu-system.am                                     |    1 +
 gnu/packages/games.scm                            |   46 +++++++++++++++++++++
 gnu/packages/patches/pingus-sdl-libs-config.patch |   21 ++++++++++
 3 files changed, 68 insertions(+)
 create mode 100644 gnu/packages/patches/pingus-sdl-libs-config.patch

diff --git a/gnu-system.am b/gnu-system.am
index c5331fa..14c7b04 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -337,6 +337,7 @@ dist_patch_DATA =						\
   gnu/packages/patches/perl-no-sys-dirs.patch			\
   gnu/packages/patches/perl-tk-x11-discover.patch		\
   gnu/packages/patches/petsc-fix-threadcomm.patch		\
+  gnu/packages/patches/pingus-sdl-libs-config.patch		\
   gnu/packages/patches/plotutils-libpng-jmpbuf.patch		\
   gnu/packages/patches/procps-make-3.82.patch			\
   gnu/packages/patches/pybugz-encode-error.patch		\
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 0e5616c..f5af352 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013 John Darrington <jmd@gnu.org>
 ;;; Copyright © 2014 David Thompson <dthompson2@worcester.edu>
+;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -21,6 +22,8 @@
   #:use-module (guix licenses)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages boost)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
@@ -28,6 +31,7 @@
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages libcanberra)
+  #:use-module (gnu packages libpng)
   #:use-module (gnu packages python)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages xorg)
@@ -158,3 +162,45 @@ expelled by the Catholic Church out of the Languedoc region in France.  One of
 them, called Jean Raymond, found an old church in which to hide, not knowing
 that beneath its ruins lay buried an ancient evil.")
     (license gpl3+)))
+
+(define-public pingus
+  (package
+    (name "pingus")
+    (version "0.7.6")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "http://pingus.googlecode.com/files/pingus-"
+                           version ".tar.bz2"))
+       (sha256
+        (base32
+         "0q34d2k6anzqvb0mf67x85q92lfx9jr71ry13dlp47jx0x9i573m"))
+       (patches (list (search-patch "pingus-sdl-libs-config.patch")))))
+    (build-system gnu-build-system)
+    (native-inputs `(("pkg-config" ,pkg-config)
+                     ("scons" ,scons)))
+    (inputs `(("sdl" ,sdl)
+              ("sdl-image" ,sdl-image)
+              ("sdl-mixer" ,sdl-mixer)
+              ("mesa" ,mesa)
+              ("libpng" ,libpng)
+              ("boost" ,boost)))
+    (arguments
+     '(#:tests? #f                      ;no check target
+       #:phases
+       (alist-delete
+        'configure
+        (alist-replace
+         'install
+         (lambda* (#:key outputs #:allow-other-keys)
+           (zero? (system* "make" "install"
+                           (string-append "PREFIX="
+                                          (assoc-ref outputs "out")))))
+         %standard-phases))))
+    (home-page "http://pingus.seul.org/welcome.html")
+    (synopsis "Lemmings clone")
+    (description
+     "Pingus is a free Lemmings-like puzzle game covered under the GNU GPL.
+It features currently 77 playable levels.")
+    ;; Some source files are under bsd-3 and gpl2+ licenses.
+    (license gpl3+)))
diff --git a/gnu/packages/patches/pingus-sdl-libs-config.patch b/gnu/packages/patches/pingus-sdl-libs-config.patch
new file mode 100644
index 0000000..4d695c4
--- /dev/null
+++ b/gnu/packages/patches/pingus-sdl-libs-config.patch
@@ -0,0 +1,21 @@
+Do not assume the SDL_image and SLD_mixer libraries are installed at the same
+prefix reported by sdl-config, but instead get flags from the pkg-config files
+installed with these libraries.
+
+--- a/SConscript	2011-12-24 15:46:47.000000000 -0600
++++ b/SConscript	2014-06-12 21:20:45.702668330 -0500
+@@ -199,7 +199,13 @@
+                 self.fatal_error += "  * library 'png' not found\n"
+ 
+     def configure_sdl(self):
+-        if self.conf.CheckMyProgram('sdl-config'):
++        if self.conf.CheckMyProgram('pkg-config'):
++            self.conf.env.ParseConfig("pkg-config --cflags --libs sdl")
++            for sdllib in ['image', 'mixer']:
++                self.conf.env.ParseConfig("pkg-config --cflags --libs SDL_%s" % sdllib)
++                if not self.conf.CheckSDLLib(sdllib):
++                    self.fatal_error += "  * SDL library '%s' not found\n" % sdllib
++        elif self.conf.CheckMyProgram('sdl-config'):
+             self.conf.env.ParseConfig("sdl-config  --cflags --libs | sed 's/-I/-isystem/g'")
+             for sdllib in ['image', 'mixer']:
+                 if not self.conf.CheckSDLLib(sdllib):
-- 
1.7.9.5


[-- Attachment #3: Type: text/plain, Size: 17 bytes --]


-- 
Eric Bavier

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

end of thread, other threads:[~2014-06-13 15:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-13  5:59 Add pingus Eric Bavier
2014-06-13  8:49 ` Ludovic Courtès
2014-06-13 13:55   ` Eric Bavier
2014-06-13 15:34     ` Ludovic Courtès

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).