all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: 49597@debbugs.gnu.org
Cc: "Ludovic Courtès" <ludo@gnu.org>
Subject: [bug#49597] [PATCH core-updates 05/15] gnu: Use 'search-input-directory' for the SDL header directory.
Date: Fri, 16 Jul 2021 17:54:10 +0200	[thread overview]
Message-ID: <20210716155420.32447-5-ludo@gnu.org> (raw)
In-Reply-To: <20210716155420.32447-1-ludo@gnu.org>

* gnu/packages/education.scm (gcompris)[arguments]: Use
'search-input-directory' when searching for SDL headers.
* gnu/packages/education.scm (t4k-common): Likewise.
(tuxmath): Likewise.
* gnu/packages/game-development.scm (tesseract-engine): Likewise.
* gnu/packages/games.scm (foobillard++): Likewise.
(ltris): Likewise.
(prboom-plus): Likewise.
(abbaye): Likewise.
(red-eclipse): Likewise.
(kiki): Likewise.
(tome4): Likewise.
(btanks): Likewise.
(4dtris): Likewise.
(edgar): Likewise.
* gnu/packages/python-xyz.scm (python-kivy): Likewise.
---
 gnu/packages/education.scm        | 22 +++++-----
 gnu/packages/game-development.scm |  7 ++-
 gnu/packages/games.scm            | 71 ++++++++++++++-----------------
 gnu/packages/python-xyz.scm       |  4 +-
 4 files changed, 46 insertions(+), 58 deletions(-)

diff --git a/gnu/packages/education.scm b/gnu/packages/education.scm
index 14ebe4fffd..aed7f1f2ab 100644
--- a/gnu/packages/education.scm
+++ b/gnu/packages/education.scm
@@ -101,10 +101,9 @@
          (add-after 'set-paths 'set-sdl-paths
            (lambda* (#:key inputs #:allow-other-keys)
              (setenv "CPATH"
-                     (string-append (assoc-ref inputs "sdl-mixer")
-                                    "/include/SDL:"
-                                    (or (getenv "CPATH") "")))
-             #t)))))
+                     (string-append
+                      (search-input-directory inputs "include/SDL")
+                      ":" (or (getenv "CPATH") ""))))))))
     (inputs
      `(("gtk+" ,gtk+-2)
        ("librsvg" ,librsvg)
@@ -894,9 +893,10 @@ endless.  For example:
        (modify-phases %standard-phases
          (add-after 'set-paths 'set-sdl-paths
            (lambda* (#:key inputs #:allow-other-keys)
-             (setenv "CPATH" (string-append (assoc-ref inputs "sdl")
-                                            "/include/SDL:"
-                                            (or (getenv "CPATH") "")))))
+             (setenv "CPATH"
+                     (string-append
+                      (search-input-directory inputs "/include/SDL")
+                      ":" (or (getenv "CPATH") "")))))
          (add-after 'unpack 'fix-andika-font-path
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "src/t4k_sdl.c"
@@ -945,10 +945,10 @@ TuxMath and TuxType.")
          (add-after 'set-paths 'set-sdl-paths
            (lambda* (#:key inputs #:allow-other-keys)
              (setenv "CPATH"
-                     (string-append (assoc-ref inputs "sdl")
-                                    "/include/SDL:"
-                                    (or (getenv "CPATH") "")))
-             #t))
+                     (string-append
+                      (search-input-directory inputs "/include/SDL")
+                      ":"
+                      (or (getenv "CPATH") "")))))
          (add-after 'install 'install-desktop-file
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 600940049b..92ab3e4fb5 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -2560,10 +2560,9 @@ support.")
            (add-before 'build 'fix-env
              (lambda* (#:key inputs #:allow-other-keys)
                (setenv "CPATH"
-                       (string-append (assoc-ref inputs "sdl2-union")
-                                      "/include/SDL2:"
-                                      (or (getenv "CPATH") "")))
-               #t))
+                       (string-append
+                        (search-input-directory inputs "include/SDL2")
+                        ":" (or (getenv "CPATH") "")))))
            (add-after 'install 'really-install
              (lambda* (#:key outputs #:allow-other-keys)
                (let* ((out (assoc-ref outputs "out"))
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 483cb87dcb..84b14696af 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -1149,10 +1149,9 @@ characters and lines resulting in a rainbow effect.")
              ;; Set correct environment for SDL.
              (lambda* (#:key inputs #:allow-other-keys)
                (setenv "CPATH"
-                       (string-append (assoc-ref inputs "sdl")
-                                      "/include/SDL:"
-                                      (or (getenv "CPATH") "")))
-               #t))
+                       (string-append
+                        (search-input-directory inputs "include/SDL")
+                        ":" (or (getenv "CPATH") "")))))
            (add-before 'build 'fix-settings-directory
              ;; Hide foobillardplus settings directory in $HOME.
              (lambda _
@@ -1852,10 +1851,9 @@ Chess).  It is similar to standard chess but this variant is far more complicate
          (add-after 'set-paths 'set-sdl-paths
            (lambda* (#:key inputs #:allow-other-keys)
              (setenv "CPATH"
-                     (string-append (assoc-ref inputs "sdl-union")
-                                    "/include/SDL:"
-                                    (or (getenv "CPATH") "")))
-             #t)))))
+                     (string-append
+                      (search-input-directory inputs "include/SDL")
+                      ":" (or (getenv "CPATH") ""))))))))
     (inputs
      `(("sdl-union" ,(sdl-union (list sdl sdl-mixer)))))
     (home-page "http://lgames.sourceforge.net/LTris/")
@@ -2066,10 +2064,9 @@ Every puzzle has a complete solution, although there may be more than one.")
         (add-after 'set-paths 'set-sdl'paths
           (lambda* (#:key inputs #:allow-other-keys)
             (setenv "CPATH"
-                    (string-append (assoc-ref inputs "sdl-union")
-                                   "/include/SDL:"
-                                   (or (getenv "CPATH") "")))
-            #t)))))
+                    (string-append
+                     (search-input-file inputs "/include/SDL")
+                     ":" (or (getenv "CPATH") ""))))))))
    (inputs
     `(("fluidsynth" ,fluidsynth)
       ("glu" ,glu)
@@ -2909,9 +2906,9 @@ properly.")
                   (add-after 'set-paths 'set-sdl-paths
                     (lambda* (#:key inputs #:allow-other-keys)
                       (setenv "CPATH"
-                              (string-append (assoc-ref inputs "sdl-union")
-                                             "/include/SDL:"
-                                             (or (getenv "CPATH") "")))))
+                              (string-append
+                               (search-input-file inputs "include/SDL")
+                               ":" (or (getenv "CPATH") "")))))
                   (add-after 'patch-source-shebangs 'patch-makefile
                     (lambda* (#:key outputs #:allow-other-keys)
                       ;; Replace /usr with package output directory.
@@ -4857,10 +4854,9 @@ http://lavachat.symlynx.com/unix/")
            (add-after 'set-paths 'set-sdl-paths
              (lambda* (#:key inputs #:allow-other-keys)
                (setenv "CPATH"
-                       (string-append (assoc-ref inputs "sdl-union")
-                                      "/include/SDL2:"
-                                      (or (getenv "CPATH") "")))
-               #t))
+                       (string-append
+                        (search-input-file inputs "/include/SDL2")
+                        ":" (or (getenv "CPATH") "")))))
            (add-after 'install 'copy-data
              (lambda* (#:key outputs #:allow-other-keys)
                (let ((out (assoc-ref outputs "out")))
@@ -6207,11 +6203,10 @@ over 100 user-created campaigns.")
          (replace 'configure
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (setenv "CPLUS_INCLUDE_PATH"
-                     (string-append (assoc-ref inputs "sdl-union")
-                                    "/include/SDL:"
-                                    (assoc-ref inputs "python")
-                                    "/include/python2.7:"
-                                    (or (getenv "CPLUS_INCLUDE_PATH") "")))
+                     (string-append
+                      (search-input-directory inputs "include/SDL") ":"
+                      (search-input-directory inputs "include/python2.7")
+                      ":" (or (getenv "CPLUS_INCLUDE_PATH") "")))
              (substitute* "src/main/main.cpp"
                (("#include <SDL.h>" line)
                 (string-append line "
@@ -6942,10 +6937,9 @@ Crowther & Woods, its original authors, in 1995.  It has been known as
                   (add-after 'set-paths 'set-sdl-paths
                     (lambda* (#:key inputs #:allow-other-keys)
                       (setenv "CPATH"
-                              (string-append (assoc-ref inputs "sdl-union")
-                                             "/include/SDL2:"
-                                             (or (getenv "CPATH") "")))
-                      #t))
+                              (string-append
+                               (search-input-directory inputs "/include/SDL2")
+                               ":" (or (getenv "CPATH") "")))))
                   (delete 'check)
                   ;; premake doesn't provide install target
                   (replace 'install
@@ -8580,10 +8574,9 @@ download and unpack them separately.")
          (add-after 'set-paths 'set-sdl-paths
            (lambda* (#:key inputs #:allow-other-keys)
              (setenv "CPATH"
-                     (string-append (assoc-ref inputs "sdl")
-                                    "/include/SDL:"
-                                    (or (getenv "CPATH") "")))
-             #t))
+                     (string-append
+                      (search-input-file inputs "/include/SDL")
+                      ":" (or (getenv "CPATH") "")))))
          (add-after 'unpack 'fix-compilation-errors
            (lambda _
              (substitute* "mrt/base_file.h"
@@ -8730,10 +8723,9 @@ affected by the gravity of the planets.")
          (add-after 'set-paths 'set-sdl-paths
            (lambda* (#:key inputs #:allow-other-keys)
              (setenv "CPATH"
-                     (string-append (assoc-ref inputs "sdl")
-                                    "/include/SDL:"
-                                    (or (getenv "CPATH") "")))
-             #t)))))
+                     (string-append
+                      (search-input-file inputs "/include/SDL")
+                      ":" (or (getenv "CPATH") ""))))))))
     (inputs
      `(("fontconfig" ,fontconfig)
        ("freeglut" ,freeglut)
@@ -8849,10 +8841,9 @@ where the player draws runes in real time to effect the desired spell.")
                    (add-before 'build 'fix-env
                      (lambda* (#:key inputs #:allow-other-keys)
                        (setenv "CPATH"
-                               (string-append (assoc-ref inputs "sdl2-union")
-                                              "/include/SDL2:"
-                                              (or (getenv "CPATH") "")))
-                       #t)))))
+                               (string-append
+                                (search-input-file inputs "/include/SDL2")
+                                ":" (or (getenv "CPATH") ""))))))))
     (inputs
      `(("sdl2-union" ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))
        ("zlib" ,zlib)))
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 9681dd81fd..512b5be234 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -15498,9 +15498,7 @@ and/or Xon/Xoff.  The port is accessed in RAW mode.")
          (add-after 'patch-generated-file-shebangs 'set-sdl-paths
            (lambda* (#:key inputs #:allow-other-keys)
              (setenv "KIVY_SDL2_PATH"
-                     (string-append (assoc-ref inputs "sdl-union")
-                                    "/include/SDL2"))
-             #t)))))
+                     (search-input-directory inputs "/include/SDL2")))))))
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("python-cython" ,python-cython)))
-- 
2.32.0





  parent reply	other threads:[~2021-07-16 15:55 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-16 15:50 [bug#49597] [PATCH core-updates 00/15] Ajust packages to label-less input style Ludovic Courtès
2021-07-16 15:54 ` [bug#49597] [PATCH core-updates 01/15] gnu: commencement: Use gexps and 'local-file' to refer to patches Ludovic Courtès
2021-07-16 15:54   ` [bug#49597] [PATCH core-updates 02/15] gnu: tzdata: Remove input labels Ludovic Courtès
2021-07-16 15:54   ` [bug#49597] [PATCH core-updates 03/15] gnu: Simplify "Xvbf" invocation in pre-check phases Ludovic Courtès
2021-07-16 15:54   ` [bug#49597] [PATCH core-updates 04/15] gnu: Use 'search-input-directory' when looking for tzdata Ludovic Courtès
2021-07-16 15:54   ` Ludovic Courtès [this message]
2021-07-16 15:54   ` [bug#49597] [PATCH core-updates 06/15] gnu: Use 'search-input-directory' for the OpenEXR header directory Ludovic Courtès
2021-07-16 15:54   ` [bug#49597] [PATCH core-updates 07/15] gnu: Use 'search-input-file' when searching for Automake files Ludovic Courtès
2021-07-16 15:54   ` [bug#49597] [PATCH core-updates 08/15] gnu: Use 'search-input-directory' for the Eigen header directory Ludovic Courtès
2021-07-16 15:54   ` [bug#49597] [PATCH core-updates 09/15] gnu: Use 'search-input-directory' for glibc locale data Ludovic Courtès
2021-07-16 15:54   ` [bug#49597] [PATCH core-updates 10/15] gnu: Use 'search-input-directory' when looking for C/C++ library headers Ludovic Courtès
2021-07-16 15:54   ` [bug#49597] [PATCH core-updates 11/15] gnu: Use 'search-input-file' when looking for *.so and *.a Ludovic Courtès
2021-07-16 15:54   ` [bug#49597] [PATCH core-updates 12/15] gnu: Use 'search-input-file' when looking for executables Ludovic Courtès
2021-07-16 15:54   ` [bug#49597] [PATCH core-updates 13/15] gnu: mozjs: Use 'which' where appropriate Ludovic Courtès
2021-07-16 15:54   ` [bug#49597] [PATCH core-updates 14/15] gnu: Use 'search-input-file' when looking for .jar files Ludovic Courtès
2021-07-18 15:56     ` Maxime Devos
2021-07-19 14:52       ` [bug#49597] [PATCH core-updates 00/15] Ajust packages to label-less input style Ludovic Courtès
2021-07-16 15:54   ` [bug#49597] [PATCH core-updates 15/15] gnu: Use 'search-input-directory' and 'search-input-file' where appropriate Ludovic Courtès
2021-07-17 15:06 ` [bug#49597] [PATCH core-updates 00/15] Ajust packages to label-less input style Mathieu Othacehe
2021-07-18 15:44 ` Maxime Devos
2021-07-19 14:50   ` Ludovic Courtès
2021-07-19 16:47     ` Maxime Devos
2021-07-20 21:14       ` Ludovic Courtès
2021-07-24 14:29 ` bug#49597: " Ludovic Courtès
2021-07-25  9:54   ` [bug#49597] " Mathieu Othacehe
2021-07-25 15:13     ` Maxime Devos
2021-07-25 17:17       ` Mathieu Othacehe
2021-07-25 17:05     ` Ludovic Courtès
2021-07-25 17:18       ` Mathieu Othacehe

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=20210716155420.32447-5-ludo@gnu.org \
    --to=ludo@gnu.org \
    --cc=49597@debbugs.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.