guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/2] gnu: Add manaplus.


From: Alex Kost
Subject: Re: [PATCH 2/2] gnu: Add manaplus.
Date: Mon, 12 Oct 2015 11:54:56 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

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

> Alex Kost <address@hidden> 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:

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


Now it is:

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

Attachment: 0001-gnu-Add-manaplus.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]