all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH 2/2] gnu: Add manaplus.
@ 2015-10-04 19:16 Alex Kost
  2015-10-09 12:40 ` Ludovic Courtès
  0 siblings, 1 reply; 14+ messages in thread
From: Alex Kost @ 2015-10-04 19:16 UTC (permalink / raw)
  To: guix-devel

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

I don't know if there is a better workaround for the SDL headers, but
this problem is rather common: there is a workaround in 'abbaye' and a
special patch for 'pingus'.

The problem is: the source code has lines like this:

  #include <SDL_mixer.h>

but the headers of all SDL packages are placed in “include/SDL/”
subdirectories.  And an upstream often doesn't use "pkg-config" for
every SDL package to define CFLAGS and assumes that all SDL headers are
placed in one directory.  So we have to invent workarounds for such
packages.

I just mention this problem here, perhaps someone will come up with a
general solution.


[-- Attachment #2: 0002-gnu-Add-manaplus.patch --]
[-- Type: text/x-diff, Size: 3698 bytes --]

From 220a23aad452663f8262935cfa09fe5321e33602 Mon Sep 17 00:00:00 2001
From: Alex Kost <alezost@gmail.com>
Date: Sun, 4 Oct 2015 20:34:48 +0300
Subject: [PATCH 2/2] gnu: Add manaplus.

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

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 7eb65bb..c080e61 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -10,6 +10,7 @@
 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
 ;;; Copyright © 2015 Christopher Allan Webber <cwebber@dustycloud.org>
+;;; Copyright © 2015 Alex Kost <alezost@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -46,6 +47,7 @@
   #:use-module (gnu packages libunwind)
   #:use-module (gnu packages image)
   #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages physfs)
   #:use-module (gnu packages python)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages xorg)
@@ -1047,3 +1049,59 @@ on the screen and keyboard to display letters.")
     ;; Most files under gpl2+ or gpl3+, but eat.wav under gpl3
     (license license:gpl3)))
 
+(define-public manaplus
+  (package
+    (name "manaplus")
+    (version "1.5.9.26")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "http://repo.manaplus.org/manaplus/download/"
+                    version "/manaplus-" version ".tar.xz"))
+              (sha256
+               (base32
+                "070ms1cv7q88284pqh66lfhacckgv7m9s8z9009k2laypibx7vs6"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:modules ((ice-9 match)
+                  (ice-9 regex)
+                  (srfi srfi-1)
+                  (guix build gnu-build-system)
+                  (guix build utils))
+       ;; The package relies on "sdl-config" to find SDL header files,
+       ;; which adds "include/SDL" for 'sdl' itself.  We need to include
+       ;; such directories for all sdl packages.
+       #:configure-flags
+       (let* ((sdl-rx   (make-regexp "\\`sdl"))
+              (includes (filter-map (match-lambda
+                                      ((name . dir)
+                                       (and (regexp-exec sdl-rx name)
+                                            (string-append
+                                             "-I" dir "/include/SDL"))))
+                                    %build-inputs)))
+         (list (format #f "CPPFLAGS=~{~a ~}" includes)))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("glu" ,glu)
+       ("curl" ,curl)
+       ("libxml2" ,libxml2)
+       ("mesa" ,mesa)
+       ("physfs" ,physfs)
+       ("sdl" ,sdl)
+       ("sdl-gfx" ,sdl-gfx)
+       ("sdl-image" ,sdl-image)
+       ("sdl-mixer" ,sdl-mixer)
+       ("sdl-net" ,sdl-net)
+       ("sdl-ttf" ,sdl-ttf)))
+    (home-page "http://manaplus.org")
+    (synopsis "Client for 'The Mana World' and similar games")
+    (description
+     "ManaPlus is a 2D MMORPG client for game servers.  It is the only
+fully supported client for @uref{http://www.themanaworld.org, The mana
+world}, @uref{http://evolonline.org, Evol Online} and
+@uref{http://landoffire.org, Land of fire}.")
+    ;; "src/debug/*" and "src/sdl2gfx/*" are under Zlib.
+    ;; "data/themes/{golden-delicious,jewelry}/*" are under CC-BY-SA.
+    ;; The rest is under GPL2+.
+    (license (list license:gpl2+ license:zlib license:cc-by-sa4.0))))
-- 
2.5.3


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

end of thread, other threads:[~2015-10-14 16:23 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-04 19:16 [PATCH 2/2] gnu: Add manaplus Alex Kost
2015-10-09 12:40 ` Ludovic Courtès
2015-10-09 16:56   ` Thompson, David
2015-10-09 21:56     ` Ludovic Courtès
2015-10-10  8:48       ` [PATCH] gnu: sdl-union: Wrap into a procedure and export it Alex Kost
2015-10-11 16:50         ` Ludovic Courtès
2015-10-12  8:54           ` Alex Kost
2015-10-10  8:48   ` [PATCH 2/2] gnu: Add manaplus Alex Kost
2015-10-11 16:52     ` Ludovic Courtès
2015-10-12  8:54       ` Alex Kost
2015-10-12 16:35         ` Ludovic Courtès
2015-10-13 10:34           ` [PATCH] gnu: abbaye: Use 'sdl-union' Alex Kost
2015-10-13 14:01             ` Thompson, David
2015-10-14 16:23               ` Alex Kost

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.