From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: [PATCH 2/2] gnu: Add manaplus. Date: Mon, 12 Oct 2015 11:54:56 +0300 Message-ID: <87a8rocvq7.fsf@gmail.com> References: <87wpv2jvgr.fsf@gmail.com> <87oag8qkp8.fsf@gnu.org> <87mvvrrtwu.fsf@gmail.com> <87mvvp2vr4.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51491) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZlYsq-0005ff-Bx for guix-devel@gnu.org; Mon, 12 Oct 2015 04:55:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZlYsk-00058v-CL for guix-devel@gnu.org; Mon, 12 Oct 2015 04:55:04 -0400 List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s (2015-10-11 19:52 +0300) wrote: > Alex Kost skribis: > >> Ludovic Court=C3=A8s (2015-10-09 15:40 +0300) wrote: > > [...] > >>> Can=E2=80=99t =E2=80=98sdl-union=E2=80=99 be used here? I think it was= created specifically to >>> solve this problem. (Currently it=E2=80=99s private to (gnu packages s= dl) but >>> you can export it.) >> >> Oh, great, I didn't know about it, thanks! It will reduce the workaroun= d. >> >> However, just using this package cannot solve the problem: 'sdl-config' >> points directly to "/gnu/store/=E2=80=A6-sdl-1.2.15", so you need to mod= ify a >> package anyway to make it find "/gnu/store/=E2=80=A6-sdl-union-1.2.15/in= clude/SDL" >> (that's why 'guile-sdl' specifies "--with-sdl-prefix=3D"). > > 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: --=-=-= Content-Type: text/x-patch Content-Disposition: inline + (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))))) --=-=-= Content-Type: text/plain Now it is: --=-=-= Content-Type: text/x-patch Content-Disposition: inline + (arguments + '(#:configure-flags + (list (string-append "CPPFLAGS=-I" + (assoc-ref %build-inputs "sdl-union") + "/include/SDL")))) --=-=-= Content-Type: text/plain The modified patch is attached. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-gnu-Add-manaplus.patch Content-Transfer-Encoding: quoted-printable >From 2ace868aa60b36eb134ac155f79cee6d2f402970 Mon Sep 17 00:00:00 2001 From: Alex Kost 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 =C2=A9 2015 David Hashe ;;; Copyright =C2=A9 2015 Christopher Allan Webber ;;; Copyright =C2=A9 2015 Ricardo Wurmus +;;; Copyright =C2=A9 2015 Alex Kost ;;; ;;; 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))) =20 +(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=3D-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)))) --=20 2.5.0 --=-=-=--