summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-07-16 15:39:51 +0200
committerLudovic Courtès <ludo@gnu.org>2021-07-24 16:23:22 +0200
commitbf182596a9d85604f6f029302671a38001575355 (patch)
treeab99ec4b5db48abf76ea81d709f20c6486688567 /gnu
parent6ea7297ea49f6c704afb727a5afe7ef9ce4a4f73 (diff)
downloadguix-patches-bf182596a9d85604f6f029302671a38001575355.tar
guix-patches-bf182596a9d85604f6f029302671a38001575355.tar.gz
gnu: Use 'search-input-directory' for the SDL header directory.
* 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.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/education.scm22
-rw-r--r--gnu/packages/game-development.scm7
-rw-r--r--gnu/packages/games.scm71
-rw-r--r--gnu/packages/python-xyz.scm4
4 files changed, 46 insertions, 58 deletions
diff --git a/gnu/packages/education.scm b/gnu/packages/education.scm
index efe210e1ec..02aacf353c 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)
@@ -949,9 +948,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"
@@ -1000,10 +1000,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 e24b7bbed9..32172b2db0 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -2599,10 +2599,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 e67b22d6b6..857bf5e431 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -1159,10 +1159,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 _
@@ -1863,10 +1862,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/")
@@ -2077,10 +2075,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)
@@ -2920,9 +2917,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.
@@ -4868,10 +4865,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")))
@@ -6218,11 +6214,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 "
@@ -6953,10 +6948,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
@@ -8591,10 +8585,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"
@@ -8741,10 +8734,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)
@@ -8860,10 +8852,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 7a4e2e68b7..763a8d18a3 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -15480,9 +15480,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)))