From 7895bcf9d979ffe4396b123ab677b93a551e5fe9 Mon Sep 17 00:00:00 2001 From: Comrade Yuri Date: Sat, 19 Oct 2019 15:31:37 +0200 Subject: [PATCH 2/4] gnu: renpy: use main site instead of git * /gnu/packages/game-development: (python2-pygame-for-renpy): Removed variable. (python2-pygame-sdl2): New variable. (renpy): Use renpy main site. Adjust version and inputs. --- gnu/packages/game-development.scm | 106 +++++++++++++++--------------- 1 file changed, 52 insertions(+), 54 deletions(-) diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index f04a9a5f51..ebebe96328 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -971,65 +971,66 @@ to create fully featured games and multimedia programs in the python language.") (define-public python2-pygame (package-with-python2 python-pygame)) -(define (python2-pygame-for-renpy version hash) - (package - (inherit python2-pygame) - (name "python2-pygame-for-renpy") - (version version) - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/renpy/pygame_sdl2.git") - (commit (string-append "renpy-" version)))) - (sha256 (base32 hash)) - (file-name (git-file-name name version)))) - (build-system python-build-system) - (arguments - `(#:tests? #f ; tests require pygame to be installed first - #:python ,python-2 - #:phases - (modify-phases %standard-phases - (add-after 'set-paths 'set-sdl-vars - (lambda* (#:key inputs #:allow-other-keys) - (setenv "PYGAME_SDL2_CFLAGS" - (string-append "-I" - (assoc-ref inputs "sdl-union") - "/include/SDL2 -D_REENTRANT")) - (setenv "PYGAME_SDL2_LDFLAGS" - (string-append "-L" - (assoc-ref inputs "sdl-union") - "/lib -Wl,-rpath," - (assoc-ref inputs "sdl-union") - "/lib -Wl,--enable-new-dtags -lSDL2")) - #t))))) - (inputs - `(("sdl-union" - ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf))))) - (native-inputs - `(("python2-cython" ,python2-cython))) - (home-page "http://www.renpy.org/") - (synopsis "Reimplementation of the Pygame API using SDL2") - (description "Pygame_SDL2 reimplements the Pygame API using SDL2, +(define-public python2-pygame-sdl2 + (let ((real-version "2.1.0") + (renpy-version "7.3.5")) + (package + (inherit python2-pygame) + (name "python2-pygame-sdl2") + (version (string-append real-version "-for-renpy-" renpy-version)) + (source + (origin + (method url-fetch) + (uri (string-append "https://www.renpy.org/dl/" renpy-version + "/pygame_sdl2-" version ".tar.gz")) + (sha256 (base32 "1bmr7j9mlsc4czpgw70ld15ymyp4wxrk9hdsqad40wjwdxvvg2dr")))) + (build-system python-build-system) + (arguments + `(#:tests? #f ; tests require pygame to be installed first + #:python ,python-2 + #:phases + (modify-phases %standard-phases + (add-after 'set-paths 'set-sdl-vars + (lambda* (#:key inputs #:allow-other-keys) + (setenv "PYGAME_SDL2_CFLAGS" + (string-append "-I" + (assoc-ref inputs "sdl-union") + "/include/SDL2 -D_REENTRANT")) + (setenv "PYGAME_SDL2_LDFLAGS" + (string-append "-L" + (assoc-ref inputs "sdl-union") + "/lib -Wl,-rpath," + (assoc-ref inputs "sdl-union") + "/lib -Wl,--enable-new-dtags -lSDL2")) + #t)) + (add-before 'build 'drop-generated-files + (lambda args + (delete-file-recursively "gen") + (delete-file-recursively "gen3") + #t))))) + (inputs + `(("sdl-union" + ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf))))) + (native-inputs + `(("python2-cython" ,python2-cython))) + (home-page "http://www.renpy.org/") + (synopsis "Reimplementation of the Pygame API using SDL2") + (description "Pygame_SDL2 reimplements the Pygame API using SDL2, staying close to the original, but also adding some SDL2-specific features. While it aims to be used as a drop-in replacement, it appears to be developed mainly for Ren'py.") - (license (list license:lgpl2.1 license:zlib)))) + (license (list license:lgpl2.1 license:zlib))))) (define-public renpy (package (name "renpy") - (version "7.3.5.606") + (version "7.3.5") (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/renpy/renpy.git") - (commit version))) - (sha256 - (base32 - "1xfbqfk6g4y5ivvd0mbaspagzhgxdcf0mbkpy8nvrilh6043i51i")) - (file-name (git-file-name name version)))) + (method url-fetch) + (uri (string-append "https://www.renpy.org/dl/" version + "/renpy-" version "-source.tar.bz2")) + (sha256 (base32 "1anr5cfbvbsbik4v4rvrkdkciwhg700k4lydfbs4n85raimz9mw4")))) (build-system python-build-system) (arguments `(;; TODO: We currently can't run renpy inside the guixbuilder and @@ -1226,10 +1227,7 @@ if __name__ == \"__main__\": ("freetype" ,freetype) ("glew" ,glew) ("libpng" ,libpng) - ("python2-pygame" - ,(python2-pygame-for-renpy - version - "1gwbqkyv7763813x7nmzb3nz4r8673d33ggsp6lgp1d640rimlpb")) + ("python2-pygame" ,python2-pygame-sdl2) ("sdl-union" ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf))))) (outputs -- 2.23.0