Archived
1
0
Fork 0

gnu: python-pygame: Use G-Expressions and new-style inputs.

* gnu/packages/game-development.scm (python-pygame)[arguments]: Convert
to list of G-Expressions.
[inputs]: Drop labels.

Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
This commit is contained in:
Adam Faiz 2022-12-18 23:54:22 +08:00 committed by Liliana Marie Prikler
parent 211524df84
commit 6dba52892b
No known key found for this signature in database
GPG key ID: 442A84B8C70E2F87

View file

@ -1203,46 +1203,47 @@ interface (API).")
"0g6j79naab7583kymf1bgxc5l5c9h5laq887rmvh8vw8iyifrl6n")))) "0g6j79naab7583kymf1bgxc5l5c9h5laq887rmvh8vw8iyifrl6n"))))
(build-system python-build-system) (build-system python-build-system)
(arguments (arguments
`(#:tests? #f ; tests require pygame to be installed first (list
#:phases #:tests? #f ; tests require pygame to be installed first
(modify-phases %standard-phases #:phases
(add-after 'unpack 'fix-build-config #~(modify-phases %standard-phases
(lambda _ (add-after 'unpack 'fix-build-config
(substitute* "buildconfig/config_unix.py" (lambda _
(("origincdirs = \\[.*\\]") (substitute* "buildconfig/config_unix.py"
"origincdirs = os.environ['C_INCLUDE_PATH'].split(\":\")") (("origincdirs = \\[.*\\]")
(("ORIGLIBDIRS") "LIBRARY_PATH") "origincdirs = os.environ['C_INCLUDE_PATH'].split(\":\")")
(("incdirs = \\[\\]") "incdirs = origincdirs") (("ORIGLIBDIRS") "LIBRARY_PATH")
(("libdirs = \\[\\]") "libdirs = origlibdirs")))) (("incdirs = \\[\\]") "incdirs = origincdirs")
(add-after 'unpack 'fix-sdl2-headers (("libdirs = \\[\\]") "libdirs = origlibdirs"))))
(lambda _ (add-after 'unpack 'fix-sdl2-headers
(substitute* "buildconfig/config_unix.py" (lambda _
(("SDL_ttf.h") "SDL2/SDL_ttf.h") (substitute* "buildconfig/config_unix.py"
(("SDL_image.h") "SDL2/SDL_image.h") (("SDL_ttf.h") "SDL2/SDL_ttf.h")
(("SDL_mixer.h") "SDL2/SDL_mixer.h")) (("SDL_image.h") "SDL2/SDL_image.h")
(substitute* "src_c/imageext.c" (("SDL_mixer.h") "SDL2/SDL_mixer.h"))
(("SDL_image.h") "SDL2/SDL_image.h")) (substitute* "src_c/imageext.c"
(substitute* "src_c/font.h" (("SDL_image.h") "SDL2/SDL_image.h"))
(("SDL_ttf.h") "SDL2/SDL_ttf.h")) (substitute* "src_c/font.h"
(substitute* "src_c/mixer.h" (("SDL_ttf.h") "SDL2/SDL_ttf.h"))
(("SDL_mixer.h") "SDL2/SDL_mixer.h")) (substitute* "src_c/mixer.h"
(substitute* "src_c/_sdl2/mixer.c" (("SDL_mixer.h") "SDL2/SDL_mixer.h"))
(("SDL_mixer.h") "SDL2/SDL_mixer.h"))))))) (substitute* "src_c/_sdl2/mixer.c"
(("SDL_mixer.h") "SDL2/SDL_mixer.h")))))))
(native-inputs (native-inputs
(list pkg-config)) (list pkg-config))
(inputs (inputs
`(("freetype" ,freetype) (list freetype
("sdl2" ,sdl2) sdl2
("sdl2-image" ,sdl2-image) sdl2-image
("sdl2-mixer" ,sdl2-mixer) sdl2-mixer
("sdl2-ttf" ,sdl2-ttf) sdl2-ttf
("sdl2-gfx" ,sdl2-gfx) sdl2-gfx
("libjpeg" ,libjpeg-turbo) libjpeg-turbo
("libpng" ,libpng) libpng
("libX11" ,libx11) libx11
("libsmpeg" ,libsmpeg) libsmpeg
("portmidi" ,portmidi) portmidi
("v4l-utils" ,v4l-utils))) v4l-utils))
(home-page "https://www.pygame.org") (home-page "https://www.pygame.org")
(synopsis "SDL wrapper for Python") (synopsis "SDL wrapper for Python")
(description "Pygame is a set of Python modules designed for writing games. (description "Pygame is a set of Python modules designed for writing games.