all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] gnu: python-pygame: Update to 1.9.3.
@ 2017-02-21 17:53 Danny Milosavljevic
  2017-02-21 19:14 ` Leo Famulari
  0 siblings, 1 reply; 3+ messages in thread
From: Danny Milosavljevic @ 2017-02-21 17:53 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/game-development.scm (python-pygame)[version]: Update to 1.9.3.
  [source]: Use pypi-uri.
  [inputs]: Add freetype.
  [arguments]: Remove python-2. Substitute "FREETYPE".
  Remove "src/movie.c" dummy substitution.
  (python2-pygame): New variable.
---
 gnu/packages/game-development.scm | 24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 619c2f1bc..908ce4834 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -526,18 +526,16 @@ interface (API).")
 (define-public python-pygame
   (package
     (name "python-pygame")
-    (version "1.9.1")
+    (version "1.9.3")
     (source (origin
               (method url-fetch)
-              (uri (string-append "http://pygame.org/ftp/pygame-"
-                                  version "release.tar.gz"))
+              (uri (pypi-uri "pygame" version))
               (sha256
                (base32
-                "0cyl0ww4fjlf289pjxa53q4klyn55ajvkgymw0qrdgp4593raq52"))))
+                "1hlydiyygl444bq5m5g8n3jsxsgrdyxlm42ipmfbw36wkf0j243m"))))
     (build-system python-build-system)
     (arguments
-     `(#:python ,python-2
-       #:tests? #f ; Tests require pygame to be installed first.
+     `(#:tests? #f ; Tests require pygame to be installed first.
        #:phases
        (modify-phases %standard-phases
          ;; Set the paths to the dependencies manually because
@@ -553,6 +551,7 @@ interface (API).")
                    (smpeg-ref (assoc-ref inputs "libsmpeg"))
                    (png-ref   (assoc-ref inputs "libpng"))
                    (jpeg-ref  (assoc-ref inputs "libjpeg"))
+                   (freetype-ref (assoc-ref inputs "freetype"))
                    (v4l-ref   (assoc-ref inputs "v4l-utils"))
                    (out-ref   (assoc-ref outputs "out")))
                (substitute* "Setup.in"
@@ -582,9 +581,14 @@ interface (API).")
                  (("JPEG = -ljpeg")
                   (string-append "JPEG = -I" jpeg-ref "/include -L"
                                  jpeg-ref "/lib -ljpeg")))
+
+               (substitute* "Setup.in"
+                 (("FREETYPE = -lfreetype")
+                  (string-append "FREETYPE = -I" freetype-ref "/include/freetype2 -L"
+                                 freetype-ref "/lib -lfreetype")))
+
                (substitute* "Setup.in"
                  (("^pypm") "#pypm"))
-               (substitute* "src/movie.c")
                ;; Create a path to a header file provided by v4l-utils.
                (system* "mkdir" "linux")
                (system* "ln" "--symbolic"
@@ -592,7 +596,8 @@ interface (API).")
                         "linux/videodev.h")
                (system* "ln" "--symbolic" "Setup.in" "Setup")))))))
     (inputs
-     `(("sdl" ,sdl)
+     `(("freetype" ,freetype)
+       ("sdl" ,sdl)
        ("sdl-image" ,sdl-image)
        ("sdl-mixer" ,sdl-mixer)
        ("sdl-ttf" ,sdl-ttf)
@@ -619,3 +624,6 @@ to create fully featured games and multimedia programs in the python language.")
                    license:psfl
                    license:public-domain
                    license:lgpl2.1+))))
+
+(define-public python2-pygame
+  (package-with-python2 python-pygame))

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] gnu: python-pygame: Update to 1.9.3.
  2017-02-21 17:53 [PATCH] gnu: python-pygame: Update to 1.9.3 Danny Milosavljevic
@ 2017-02-21 19:14 ` Leo Famulari
  2017-02-22 10:32   ` Danny Milosavljevic
  0 siblings, 1 reply; 3+ messages in thread
From: Leo Famulari @ 2017-02-21 19:14 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel

On Tue, Feb 21, 2017 at 06:53:19PM +0100, Danny Milosavljevic wrote:
> * gnu/packages/game-development.scm (python-pygame)[version]: Update to 1.9.3.
>   [source]: Use pypi-uri.

These lines should start in the first column, not indented.

>   [inputs]: Add freetype.
>   [arguments]: Remove python-2. Substitute "FREETYPE".

I would write "Use python-3 instead of python-2". 

And I would write "Provide path to freetype library in
'set-library-paths' phase.

Otherwise, LGTM! Thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] gnu: python-pygame: Update to 1.9.3.
  2017-02-21 19:14 ` Leo Famulari
@ 2017-02-22 10:32   ` Danny Milosavljevic
  0 siblings, 0 replies; 3+ messages in thread
From: Danny Milosavljevic @ 2017-02-22 10:32 UTC (permalink / raw)
  Cc: guix-devel

Applied as 052f75da754b1d6aae00049f732a3bb549147e0f to master.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-02-22 10:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-21 17:53 [PATCH] gnu: python-pygame: Update to 1.9.3 Danny Milosavljevic
2017-02-21 19:14 ` Leo Famulari
2017-02-22 10:32   ` Danny Milosavljevic

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.