all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add libsmpeg.
@ 2016-07-22 14:31 Kei Kebreau
  2016-07-22 19:41 ` Kei Kebreau
  0 siblings, 1 reply; 11+ messages in thread
From: Kei Kebreau @ 2016-07-22 14:31 UTC (permalink / raw)
  To: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 156 bytes --]

This is a preliminary patch for pygame. I don't really have a test case
for it outside of (hopefully) a successful build of pygame. We'll see
how it goes.


[-- Attachment #1.2: 0001-gnu-Add-libsmpeg.patch --]
[-- Type: text/plain, Size: 2687 bytes --]

From fa92b4e1fd08b19ad2427121b57a5a61ea798aca Mon Sep 17 00:00:00 2001
From: Kei Kebreau <kei@openmailbox.org>
Date: Fri, 22 Jul 2016 10:20:10 -0400
Subject: [PATCH] gnu: Add libsmpeg.

* gnu/packages/video.scm (libsmpeg): New variable.
---
 gnu/packages/video.scm | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index d36400c..943ff26 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2015 Alex Vong <alexvong1995@gmail.com>
 ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
+;;; Copyright © 2016 Kei Kebreau <kei@openmailbox.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -33,6 +34,7 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
+  #:use-module (guix svn-download)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system glib-or-gtk)
@@ -1525,3 +1527,39 @@ implementation.")
 your graphical desktop and encodes it as a video.  This is a useful tool for
 making @dfn{screencasts}.")
     (license license:gpl2+)))
+
+(define-public libsmpeg
+  (package
+    (name "libsmpeg")
+    (version "0.4.5")
+    (source (origin
+              (method svn-fetch)
+              (uri (svn-reference
+                    (url "svn://svn.icculus.org/smpeg/trunk/")
+                    (revision 412)))
+              (sha256
+               (base32
+                "1irf2d8f150j8cx8lbb0pz1rijap536crsz0mw871xrh6wd2fd96"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  (add-after 'unpack 'autogen.sh
+                    (lambda _
+                      (zero? (system* "sh" "autogen.sh")))))))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)))
+    (inputs
+     `(("sdl" ,sdl2)))
+    (home-page "http://icculus.org/smpeg/")
+    (synopsis "SDL MPEG decoding library")
+    (description
+     "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
+with sound support.  Video playback is based on the ubiquitous Berkeley MPEG
+player, mpeg_play v2.2.  Audio is played through a slightly modified mpegsound
+library, part of splay v0.8.2.  SMPEG supports MPEG audio (MP3), MPEG-1 video,
+and MPEG system streams.")
+    (license (list license:expat
+                   license:lgpl2.1
+                   license:lgpl2.1+
+                   license:gpl2))))
-- 
2.9.1


[-- Attachment #1.3: Type: text/plain, Size: 44 bytes --]

-- 
Kei (GPG Key: 4096R/E6A5EE3C19467A0D)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

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

* Re: [PATCH] gnu: Add libsmpeg.
  2016-07-22 14:31 [PATCH] gnu: Add libsmpeg Kei Kebreau
@ 2016-07-22 19:41 ` Kei Kebreau
  2016-07-22 19:53   ` Vincent Legoll
                     ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Kei Kebreau @ 2016-07-22 19:41 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 388 bytes --]

Kei Kebreau <kei@openmailbox.org> writes:

> This is a preliminary patch for pygame. I don't really have a test case
> for it outside of (hopefully) a successful build of pygame. We'll see
> how it goes.

Pygame's config.py is not finding smpeg-config. This will be fun! Anyone
with skill in Python is welcome to offer me assistance!

-- 
Kei (GPG Key: 4096R/E6A5EE3C19467A0D)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

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

* Re: [PATCH] gnu: Add libsmpeg.
  2016-07-22 19:41 ` Kei Kebreau
@ 2016-07-22 19:53   ` Vincent Legoll
  2016-07-22 21:12     ` Kei Kebreau
  2016-07-23  7:27   ` Roel Janssen
  2016-07-24  6:18   ` Efraim Flashner
  2 siblings, 1 reply; 11+ messages in thread
From: Vincent Legoll @ 2016-07-22 19:53 UTC (permalink / raw)
  To: Kei Kebreau; +Cc: guix-devel

> Pygame's config.py is not finding smpeg-config. This will be fun! Anyone
> with skill in Python is welcome to offer me assistance!

Maybe I can help, could you elaborate on how to reproduce ?

-- 
Vincent Legoll

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

* Re: [PATCH] gnu: Add libsmpeg.
  2016-07-22 19:53   ` Vincent Legoll
@ 2016-07-22 21:12     ` Kei Kebreau
  2016-07-22 22:21       ` Vincent Legoll
  0 siblings, 1 reply; 11+ messages in thread
From: Kei Kebreau @ 2016-07-22 21:12 UTC (permalink / raw)
  To: Vincent Legoll; +Cc: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 2422 bytes --]

Vincent Legoll <vincent.legoll@gmail.com> writes:

>> Pygame's config.py is not finding smpeg-config. This will be fun! Anyone
>> with skill in Python is welcome to offer me assistance!
>
> Maybe I can help, could you elaborate on how to reproduce ?

Sure. Apply the libsmpeg patch and the attached Pygame patch to a copy
of the Guix repo and attempt to build python-pygame. The error is
contained in the build log. I'll copy it below:

starting phase `build'
running "python setup.py" with command "build" and parameters ()


WARNING, No "Setup" File Exists, Running "config.py"
Using UNIX configuration...

/gnu/store/b1yqjimbdh5bf9jnizd4h7yf110744j2-bash-4.3.42/bin/sh: smpeg-config: c
ommand not found                                                              

Hunting dependencies...
WARNING: "smpeg-config" failed!
SDL     : found 1.2.15
FONT    : not found
IMAGE   : not found
MIXER   : not found
SMPEG   : not found
PNG     : not found
JPEG    : not found
SCRAP   : found
PORTMIDI: not found
PORTTIME: not found


Warning, some of the pygame dependencies were not found. Pygame can still
compile and install, but games that depend on those missing dependencies
will not run. Would you like to continue the configuration? [Y/n]:Traceback (mo
st recent call last):                                                         
  File "setup.py", line 132, in <module>
    config.main()
  File "/tmp/guix-build-python-pygame-1.9.1.drv-0/pygame-1.9.1release/config.py
", line 137, in main                                                          
    deps = CFG.main()
  File "/tmp/guix-build-python-pygame-1.9.1.drv-0/pygame-1.9.1release/config_un
ix.py", line 180, in main                                                     
    will not run. Would you like to continue the configuration?"""):
  File "/tmp/guix-build-python-pygame-1.9.1.drv-0/pygame-1.9.1release/config_un
ix.py", line 24, in confirm                                                   
    reply = raw_input('\n' + message + ' [Y/n]:')
EOFError: EOF when reading a line
phase `build' failed after 0.8 seconds
builder for `/gnu/store/fgrm7ph1z050mldbzwg4s872373lqj1j-python-pygame-1.9.1.dr
v' failed with exit code 1                                                    
guix package: error: build failed: build of `/gnu/store/fgrm7ph1z050mldbzwg4s87
2373lqj1j-python-pygame-1.9.1.drv' failed 


[-- Attachment #1.2: 0001-gnu-Add-python-pygame.patch --]
[-- Type: text/plain, Size: 3359 bytes --]

From f15ce6a6050543ad6da623dd5758c114ec95fd60 Mon Sep 17 00:00:00 2001
From: Kei Kebreau <kei@openmailbox.org>
Date: Fri, 22 Jul 2016 17:06:11 -0400
Subject: [PATCH] gnu: Add python-pygame.

* gnu/packages/game-development.scm (python-pygame): Add python-pygame.
---
 gnu/packages/game-development.scm | 44 ++++++++++++++++++++++++++++++++++++++-
 1 file changed, 43 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 7067a71..e3ecc79 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -31,6 +31,7 @@
   #:use-module (guix git-download)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system python)
   #:use-module (gnu packages)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages databases)
@@ -41,6 +42,7 @@
   #:use-module (gnu packages gnunet)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages multiprecision)
+  #:use-module (gnu packages music)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages compression)
@@ -60,7 +62,8 @@
   #:use-module (gnu packages xiph)
   #:use-module (gnu packages lua)
   #:use-module (gnu packages mp3)
-  #:use-module (gnu packages xml))
+  #:use-module (gnu packages xml)
+  #:use-module (gnu packages video))
 
 (define-public bullet
   (package
@@ -512,3 +515,42 @@ It offers the following features:
 OpenGL programs with character rendering services via an application programming
 interface (API).")
     (license (list license:expat license:lgpl2.1+))))
+
+
+(define-public python-pygame
+  (package
+    (name "python-pygame")
+    (version "1.9.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://www.pygame.org/ftp/pygame-"
+                                  version "release.tar.gz"))
+              (sha256
+               (base32
+                "0cyl0ww4fjlf289pjxa53q4klyn55ajvkgymw0qrdgp4593raq52"))))
+    (build-system python-build-system)
+    (inputs `(("libpng" ,libpng)
+              ("libjpeg" ,libjpeg)
+              ("libsmpeg" ,libsmpeg)
+              ("portmidi" ,portmidi)
+              ("sdl" ,sdl)
+              ("sdl-ttf" ,sdl-ttf)
+              ("sdl-image" ,sdl-image)
+              ("sdl-mixer" ,sdl-mixer)))
+    (home-page "http://www.pygame.org")
+    (synopsis "Set of Python modules designed for writing games using SDL")
+    (description
+     "Pygame is a cross-platform library designed to make it easy to write
+multimedia software, such as games, in Python. Pygame requires the Python
+language and SDL multimedia library. It can also make use of several other
+popular libraries.")
+    (license (list license:bsd-2
+                   ;; python numeric license as listed by Debian looks like
+                   ;; an Expat-style license with a warranty disclaimer for
+                   ;; the U.S. government and the University of California.
+                   license:expat
+                   license:lgpl2.0+
+                   license:lgpl2.1+
+                   license:gpl3+
+                   license:psfl
+                   license:public-domain))))
-- 
2.9.1


[-- Attachment #1.3: Type: text/plain, Size: 44 bytes --]

-- 
Kei (GPG Key: 4096R/E6A5EE3C19467A0D)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

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

* Re: [PATCH] gnu: Add libsmpeg.
  2016-07-22 21:12     ` Kei Kebreau
@ 2016-07-22 22:21       ` Vincent Legoll
  2016-07-22 22:25         ` Vincent Legoll
  0 siblings, 1 reply; 11+ messages in thread
From: Vincent Legoll @ 2016-07-22 22:21 UTC (permalink / raw)
  To: Kei Kebreau; +Cc: guix-devel

>     reply = raw_input('\n' + message + ' [Y/n]:')
> EOFError: EOF when reading a line

That setup.py is handcrafted, and is interactive. It asks a
question to the user and waits for a keypress in return.

And it looks like it is getting EOF instead of a keypress.

I see 2 solutions, either you find a way to answer its question,
I think I remember having seen some package that does this,
but cannot find it now. :-/

I think it was done with (display "Y" port) and port should be
the stdin of setup.py

You'll have to hunt that scm example.

hope that helps

-- 
Vincent Legoll

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

* Re: [PATCH] gnu: Add libsmpeg.
  2016-07-22 22:21       ` Vincent Legoll
@ 2016-07-22 22:25         ` Vincent Legoll
  2016-07-27 15:21           ` Kei Kebreau
  0 siblings, 1 reply; 11+ messages in thread
From: Vincent Legoll @ 2016-07-22 22:25 UTC (permalink / raw)
  To: Kei Kebreau; +Cc: guix-devel

> I see 2 solutions

The other solution could be to patch the setup.py script, if you
want to do that I'll tell you what to change

-- 
Vincent Legoll

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

* Re: [PATCH] gnu: Add libsmpeg.
  2016-07-22 19:41 ` Kei Kebreau
  2016-07-22 19:53   ` Vincent Legoll
@ 2016-07-23  7:27   ` Roel Janssen
  2016-07-24  6:18   ` Efraim Flashner
  2 siblings, 0 replies; 11+ messages in thread
From: Roel Janssen @ 2016-07-23  7:27 UTC (permalink / raw)
  To: Kei Kebreau; +Cc: guix-devel

Hello Kei,

I had patches for PyGame including SMPEG as well.  Here's what I did:

(define-public python-pygame
  (package
    (name "python-pygame")
    (version "1.9.1")
    (source (origin
              (method url-fetch)
              (uri (string-append
                    "https://github.com/illume/pygame/archive/release_"
                    (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
                    "release.tar.gz"))
              (sha256
               (base32 "0cbfff7lv15pgw5hifnj6hx4c63g1v9lyi3f8l47gjda3pbpkria"))))
    (build-system gnu-build-system)
    (arguments
     `(#:tests? #f ; Tests require pygame to be installed first.
       #:phases
       (modify-phases %standard-phases
         ;; Set the paths to the dependencies manually because
         ;; the configure script does not allow passing them as
         ;; parameters.  This also means we can skip the configure
         ;; phase.
         (replace 'configure
           (lambda* (#:key inputs outputs #:allow-other-keys)
             (let ((sdl-ref   (assoc-ref inputs "sdl"))
                   (font-ref  (assoc-ref inputs "sdl-ttf"))
                   (image-ref (assoc-ref inputs "sdl-image"))
                   (mixer-ref (assoc-ref inputs "sdl-mixer"))
                   (smpeg-ref (assoc-ref inputs "smpeg"))
                   (png-ref   (assoc-ref inputs "libpng"))
                   (jpeg-ref  (assoc-ref inputs "libjpeg"))
                   (v4l-ref   (assoc-ref inputs "v4l-utils"))
                   (out-ref   (assoc-ref outputs "out")))
               (substitute* "Setup.in"
                 (("SDL = -I/usr/include/SDL")
                  (string-append "SDL = -I" sdl-ref "/include/SDL -I.")))
               (substitute* "Setup.in"
                 (("FONT = -lSDL_ttf")
                  (string-append "FONT = -I" font-ref "/include/SDL -L"
                                             font-ref "/lib -lSDL_ttf")))
               (substitute* "Setup.in"
                 (("IMAGE = -lSDL_image")
                  (string-append "IMAGE = -I" image-ref "/include/SDL -L"
                                              image-ref "/lib -lSDL_image")))
               (substitute* "Setup.in"
                 (("MIXER = -lSDL_mixer")
                  (string-append "MIXER = -I" mixer-ref "/include/SDL -L"
                                              mixer-ref "/lib -lSDL_mixer")))
               (substitute* "Setup.in"
                 (("SMPEG = -lsmpeg")
                  (string-append "SMPEG = -I" smpeg-ref "/include/smpeg -L"
                                              smpeg-ref "/lib -lsmpeg")))
               (substitute* "Setup.in"
                 (("PNG = -lpng")
                  (string-append "PNG = -I" png-ref "/include -L"
                                            png-ref "/lib -lpng")))
               (substitute* "Setup.in"
                 (("JPEG = -ljpeg")
                  (string-append "JPEG = -I" jpeg-ref "/include -L"
                                 jpeg-ref "/lib -ljpeg")))
               (substitute* "Setup.in"
                 (("^pypm") "#pypm"))
               ;; Create a path to a header file provided by v4l-utils.
               (system* "mkdir" "linux")
               (system* "ln" "--symbolic"
                        (string-append v4l-ref "/include/libv4l1-videodev.h")
                        "linux/videodev.h")
               (system* "ln" "--symbolic" "Setup.in" "Setup"))))
         ;; The default tries to install libraries into the python directory.
         ;; Using --install-lib, we can provide the correct path.
         (replace 'install
           (lambda* (#:key outputs #:allow-other-keys)
             (system* "python" "setup.py" "install"
                      (string-append "--install-lib="
                                     (assoc-ref outputs "out"))))))))
    (native-inputs
     `(("python-setuptools" ,python-setuptools)))
    (inputs
     `(("python" ,python-2)
       ("sdl" ,sdl)
       ("sdl-image" ,sdl-image)
       ("sdl-mixer" ,sdl-mixer)
       ("sdl-ttf" ,sdl-ttf)
       ("sdl-gfx" ,sdl-gfx)
       ("libjpeg" ,libjpeg)
       ("libpng" ,libpng)
       ("libX11" ,libx11)
       ("smpeg" ,smpeg)
       ("portmidi" ,portmidi)
       ("v4l-utils" ,v4l-utils)))
    (home-page "http://www.pygame.org")
    (synopsis "SDL wrapper for Python")
    (description "")
    (license lgpl2.1+)))

Hope you can adapt it to your needs.

Kind regards,
Roel Janssen


Kei Kebreau writes:

> Kei Kebreau <kei@openmailbox.org> writes:
>
>> This is a preliminary patch for pygame. I don't really have a test case
>> for it outside of (hopefully) a successful build of pygame. We'll see
>> how it goes.
>
> Pygame's config.py is not finding smpeg-config. This will be fun! Anyone
> with skill in Python is welcome to offer me assistance!

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

* Re: [PATCH] gnu: Add libsmpeg.
  2016-07-22 19:41 ` Kei Kebreau
  2016-07-22 19:53   ` Vincent Legoll
  2016-07-23  7:27   ` Roel Janssen
@ 2016-07-24  6:18   ` Efraim Flashner
  2 siblings, 0 replies; 11+ messages in thread
From: Efraim Flashner @ 2016-07-24  6:18 UTC (permalink / raw)
  To: Kei Kebreau; +Cc: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 1036 bytes --]

Pygame seems popular, it was also on my backburner list todo. In the AUR¹
there's acutally a package for 1.9.2pre20141217-1, which doesn't have a
dependancy on smpeg. When I tried building pygame with smpeg pygame
couldn't find it, and I also ran into problems with the sdl inputs.


¹ https://aur.archlinux.org/packages/python-pygame/

On Fri, Jul 22, 2016 at 03:41:08PM -0400, Kei Kebreau wrote:
> Kei Kebreau <kei@openmailbox.org> writes:
> 
> > This is a preliminary patch for pygame. I don't really have a test case
> > for it outside of (hopefully) a successful build of pygame. We'll see
> > how it goes.
> 
> Pygame's config.py is not finding smpeg-config. This will be fun! Anyone
> with skill in Python is welcome to offer me assistance!
> 
> -- 
> Kei (GPG Key: 4096R/E6A5EE3C19467A0D)



-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #1.2: bambam.scm --]
[-- Type: text/plain, Size: 4684 bytes --]

;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is an addendum to GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (wip bambam)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix download)
  #:use-module (guix packages)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system python)
  #:use-module (gnu packages)
  #:use-module (gnu packages fontutils)
  #:use-module (gnu packages image)
  #:use-module (gnu packages music)
  #:use-module (gnu packages python)
  #:use-module (gnu packages sdl))

(define-public smpeg
  (package
    (name "smpeg")
    (version "0.4.5+cvs20030824")
    (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://debian/pool/main/s/smpeg/"
                            "smpeg_" version ".orig.tar.gz"))
        ;; Unfortunately the svn-fetch method does not work with this repo
        ;(method svn-fetch)
        ;(uri (svn-reference
        ;       (url "https://svn.icculus.org/smpeg/")
        ;       (revision 408)))
        (sha256
         (base32
           "05hrprv8h0bw8xxzraccq922b4jk04c3zwyk5nhyizfrgmwylxhj"))))
        ;  "0cyl0ww4fjlf289pjxa53q4klyn55ajvkgymw0qrdgp4593raq52"))
        ;(file-name (string-append name "-" version "-checkout"))))
    (build-system gnu-build-system)
    (inputs
     `(("sdl" ,sdl)
       ("sdl-mixer" ,sdl-mixer)))
    (home-page "https://icculus.org/smpeg/")
    (synopsis "SDL MPEG Player Library")
    (description "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player
library with sound support.  Video playback is based on the ubiquitous Berkeley
MPEG player, mpeg_play v2.2.  Audio is played through a slightly modified
mpegsound library, part of splay v0.8.2.  SMPEG supports MPEG audio (MP3),
MPEG-1 video, and MPEG system streams.")
    (license #f)))

(define-public python2-pygame
  (package
    (name "python2-pygame")
    (version "1.9.1")
    (source
      (origin
        (method url-fetch)
        (uri (string-append "http://pygame.org/ftp/pygame-"
                            version "release.tar.gz"))
        (sha256
         (base32
          "0cyl0ww4fjlf289pjxa53q4klyn55ajvkgymw0qrdgp4593raq52"))))
    (build-system python-build-system)
    (arguments
     `(#:python ,python-2
       #:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'apply-v4l-patch
           (lambda _
             (zero? (system* "patch" "--force" "-p1" "-i"
                             (assoc-ref %build-inputs "patch")))))
         (add-after 'unpack 'patch-config
           (lambda _
             (substitute* '("config_unix.py"
                            "config_msys.py")
                          (("not confirm")
                           "\"-auto\" not in sys.argv and not confirm"))
             #t))
         (add-before 'build 'config
           (lambda _
             (zero?
               (system* "python2" "config.py" "-auto")))))))
    (inputs
     `(
       ;("freetype" ,freetype)
       ;("libjpeg" ,libjpeg)
       ;("libpng" ,libpng)
       ;("python2-numpy" ,python2-numpy)
       ;("sdl" ,sdl)
       ("portmidi" ,portmidi)
       ("sdl-image" ,sdl-image)
       ("sdl-mixer" ,sdl-mixer)
       ("sdl-ttf" ,sdl-ttf)
       ;("smpeg" ,smpeg)
       ))
    ;(native-inputs
    ; `("patch" ,@("/home/efraim/workspace/my-guix/patches/pygame-v4l.patch")))
    (home-page "http://www.pygame.org/")
    (synopsis "SDL bindings for games development in Python")
    (description "A multimedia development kit for Python.  Pygame provides
modules for you to access the video display, play sounds, track time, read the
mouse and joystick, control the CD player, render true type fonts and more.  It
does this using mainly the cross-platform SDL library, a lightweight wrapper to
OS-specific APIs.")
    (license (list license:lgpl2.1
                   license:public-domain)))) ; programs in example directory

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH] gnu: Add libsmpeg.
  2016-07-22 22:25         ` Vincent Legoll
@ 2016-07-27 15:21           ` Kei Kebreau
  2016-07-29 12:42             ` Vincent Legoll
  0 siblings, 1 reply; 11+ messages in thread
From: Kei Kebreau @ 2016-07-27 15:21 UTC (permalink / raw)
  To: Vincent Legoll; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 376 bytes --]

Vincent Legoll <vincent.legoll@gmail.com> writes:

>> I see 2 solutions
>
> The other solution could be to patch the setup.py script, if you
> want to do that I'll tell you what to change

I want to try patching the setup.py script, that way I could see how
pygame tries to detect the libraries that it says are missing.

-- 
Kei (GPG Key: 4096R/E6A5EE3C19467A0D)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

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

* Re: [PATCH] gnu: Add libsmpeg.
  2016-07-27 15:21           ` Kei Kebreau
@ 2016-07-29 12:42             ` Vincent Legoll
  2016-07-29 21:08               ` Kei Kebreau
  0 siblings, 1 reply; 11+ messages in thread
From: Vincent Legoll @ 2016-07-29 12:42 UTC (permalink / raw)
  To: Kei Kebreau; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 377 bytes --]

>>> I see 2 solutions
>>
>> The other solution could be to patch the setup.py script, if you
>> want to do that I'll tell you what to change
>
> I want to try patching the setup.py script, that way I could see how
> pygame tries to detect the libraries that it says are missing.

Could you try the attached untested patch, that will avoid user interaction.

-- 
Vincent Legoll

[-- Attachment #2: patch-pygame-fix-interactive-setup.diff --]
[-- Type: text/plain, Size: 462 bytes --]

22c22
< def confirm(message):
---
> def confirm(message, default_ret=0):
24c24,27
<     reply = raw_input('\n' + message + ' [Y/n]:')
---
>     try:
>         reply = raw_input('\n' + message + ' [Y/n]:')
>     catch EOFError:
>         return default_ret
174a178
> 
180c184,185
< will not run. Would you like to continue the configuration?"""):
---
> will not run. Would you like to continue the configuration?""", 
>                            default_ret=1):

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

* Re: [PATCH] gnu: Add libsmpeg.
  2016-07-29 12:42             ` Vincent Legoll
@ 2016-07-29 21:08               ` Kei Kebreau
  0 siblings, 0 replies; 11+ messages in thread
From: Kei Kebreau @ 2016-07-29 21:08 UTC (permalink / raw)
  To: Vincent Legoll; +Cc: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 610 bytes --]

Vincent Legoll <vincent.legoll@gmail.com> writes:

>>>> I see 2 solutions
>>>
>>> The other solution could be to patch the setup.py script, if you
>>> want to do that I'll tell you what to change
>>
>> I want to try patching the setup.py script, that way I could see how
>> pygame tries to detect the libraries that it says are missing.
>
> Could you try the attached untested patch, that will avoid user interaction.

I actually got pygame to build successfully without the patch by
integrating Roel's recipe! Attached is an updated patch for
libsmpeg. It's corrected for use with the following pygame patch.

[-- Attachment #1.2: 0001-gnu-Add-libsmpeg.patch --]
[-- Type: text/plain, Size: 2731 bytes --]

From bb7b799281949d0959922cd40c158102e8876149 Mon Sep 17 00:00:00 2001
From: Kei Kebreau <kei@openmailbox.org>
Date: Fri, 29 Jul 2016 17:01:51 -0400
Subject: [PATCH] gnu: Add libsmpeg.

* gnu/packages/video.scm (libsmpeg): New variable.
---
 gnu/packages/video.scm | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 5b5bbd0..7089c99 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2015 Alex Vong <alexvong1995@gmail.com>
 ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
+;;; Copyright © 2016 Kei Kebreau <kei@openmailbox.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -33,6 +34,7 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
+  #:use-module (guix svn-download)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system glib-or-gtk)
@@ -1518,3 +1520,39 @@ implementation.")
 your graphical desktop and encodes it as a video.  This is a useful tool for
 making @dfn{screencasts}.")
     (license license:gpl2+)))
+
+(define-public libsmpeg
+  (package
+    (name "libsmpeg")
+    (version "0.4.5")
+    (source (origin
+              (method svn-fetch)
+              (uri (svn-reference
+                    (url "svn://svn.icculus.org/smpeg/trunk/")
+                    (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
+              (sha256
+               (base32
+                "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  (add-after 'unpack 'autogen.sh
+                    (lambda _
+                      (zero? (system* "sh" "autogen.sh")))))))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)))
+    (inputs
+     `(("sdl" ,sdl2)))
+    (home-page "http://icculus.org/smpeg/")
+    (synopsis "SDL MPEG decoding library")
+    (description
+     "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
+with sound support.  Video playback is based on the ubiquitous Berkeley MPEG
+player, mpeg_play v2.2.  Audio is played through a slightly modified mpegsound
+library, part of splay v0.8.2.  SMPEG supports MPEG audio (MP3), MPEG-1 video,
+and MPEG system streams.")
+    (license (list license:expat
+                   license:lgpl2.1
+                   license:lgpl2.1+
+                   license:gpl2))))
-- 
2.9.2


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

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

end of thread, other threads:[~2016-07-29 21:09 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-22 14:31 [PATCH] gnu: Add libsmpeg Kei Kebreau
2016-07-22 19:41 ` Kei Kebreau
2016-07-22 19:53   ` Vincent Legoll
2016-07-22 21:12     ` Kei Kebreau
2016-07-22 22:21       ` Vincent Legoll
2016-07-22 22:25         ` Vincent Legoll
2016-07-27 15:21           ` Kei Kebreau
2016-07-29 12:42             ` Vincent Legoll
2016-07-29 21:08               ` Kei Kebreau
2016-07-23  7:27   ` Roel Janssen
2016-07-24  6:18   ` Efraim Flashner

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.