From 1592491c39af02a2f651ccd4d0d9cf97104e352f Mon Sep 17 00:00:00 2001 From: Leo Prikler Date: Thu, 10 Dec 2020 20:03:12 +0100 Subject: gnu: renpy: Use system fribidi and drop generated sources. * gnu/packages/patches/renpy-use-system-fribidi.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it here. * gnu/packages/game-development.scm (renpy)[source] Use it here. : Add (guix build utils). : Drop generated sources and fribidi sources. (arguments)[phases]: Add fix-include-paths. (inputs): Add fribidi. Signed-off-by: Nicolas Goaziou --- gnu/packages/game-development.scm | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'gnu/packages/game-development.scm') diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index 557f02f564..21f7f7e880 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -1120,7 +1120,18 @@ developed mainly for Ren'py.") (method url-fetch) (uri (string-append "https://www.renpy.org/dl/" version "/renpy-" version "-source.tar.bz2")) - (sha256 (base32 "1anr5cfbvbsbik4v4rvrkdkciwhg700k4lydfbs4n85raimz9mw4")))) + (sha256 (base32 "1anr5cfbvbsbik4v4rvrkdkciwhg700k4lydfbs4n85raimz9mw4")) + (modules '((guix build utils))) + (patches + (search-patches + "renpy-use-system-fribidi.patch")) + (snippet + '(with-directory-excursion "module" + ;; drop generated sources + (delete-file-recursively "gen") + ;; drop fribidi sources + (delete-file-recursively "fribidi-src") + #t)))) (build-system python-build-system) (arguments `(#:tests? #f ; Ren'py doesn't seem to package tests @@ -1133,6 +1144,13 @@ developed mainly for Ren'py.") (("xdg-open") (which "xdg-open"))) #t)) + (add-after 'unpack 'fix-include-paths + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "module/setup.py" + (("/usr/include/fribidi") + (string-append (assoc-ref inputs "fribidi") + "/include/fribidi"))) + #t)) (add-after 'set-paths 'set-build-vars (lambda* (#:key inputs #:allow-other-keys) (setenv "RENPY_CYTHON" @@ -1170,6 +1188,7 @@ developed mainly for Ren'py.") (inputs `(("ffmpeg" ,ffmpeg) ("freetype" ,freetype) + ("fribidi" ,fribidi) ("glew" ,glew) ("libpng" ,libpng) ("python2-pygame" ,python2-pygame-sdl2) -- cgit v1.2.3