all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alex Kost <alezost@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH 2/2] gnu: Add manaplus.
Date: Mon, 12 Oct 2015 11:54:56 +0300	[thread overview]
Message-ID: <87a8rocvq7.fsf@gmail.com> (raw)
In-Reply-To: 87mvvp2vr4.fsf@gnu.org

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

Ludovic Courtès (2015-10-11 19:52 +0300) wrote:

> Alex Kost <alezost@gmail.com> skribis:
>
>> Ludovic Courtès (2015-10-09 15:40 +0300) wrote:
>
> [...]
>
>>> Can’t ‘sdl-union’ be used here?  I think it was created specifically to
>>> solve this problem.  (Currently it’s private to (gnu packages sdl) but
>>> you can export it.)
>>
>> Oh, great, I didn't know about it, thanks!  It will reduce the workaround.
>>
>> However, just using this package cannot solve the problem: 'sdl-config'
>> points directly to "/gnu/store/…-sdl-1.2.15", so you need to modify a
>> package anyway to make it find "/gnu/store/…-sdl-union-1.2.15/include/SDL"
>> (that's why 'guile-sdl' specifies "--with-sdl-prefix=").
>
> Oh.  :-/  Then I guess you can go with the original patch, which LGTM.

Actually, I think it will be more clear to use 'sdl-union' here, because
the workaround is more concise, WDYT?

The original workaround was:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 899 bytes --]

+    (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)))))



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


Now it is:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: Type: text/x-patch, Size: 200 bytes --]

+    (arguments
+     '(#:configure-flags
+       (list (string-append "CPPFLAGS=-I"
+                            (assoc-ref %build-inputs "sdl-union")
+                            "/include/SDL"))))

[-- Attachment #5: Type: text/plain, Size: 34 bytes --]


The modified patch is attached.


[-- Attachment #6: 0001-gnu-Add-manaplus.patch --]
[-- Type: text/x-patch, Size: 2539 bytes --]

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

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

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 3f1f5a9..cbc147f 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
 ;;; Copyright © 2015 Christopher Allan Webber <cwebber@dustycloud.org>
 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2015 Alex Kost <alezost@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1105,3 +1106,41 @@ 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
+     '(#:configure-flags
+       (list (string-append "CPPFLAGS=-I"
+                            (assoc-ref %build-inputs "sdl-union")
+                            "/include/SDL"))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("glu" ,glu)
+       ("curl" ,curl)
+       ("libxml2" ,libxml2)
+       ("mesa" ,mesa)
+       ("physfs" ,physfs)
+       ("sdl-union" ,(sdl-union))))
+    (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.0


  reply	other threads:[~2015-10-12  8:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a8rocvq7.fsf@gmail.com \
    --to=alezost@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.