GNU bug report logs - #33426
[PATCH] gnu: python-kivy-next: Fix build.

Previous Next

Package: guix-patches;

Reported by: "Jovany Leandro G.C" <bit4bit <at> riseup.net>

Date: Mon, 19 Nov 2018 05:44:01 UTC

Severity: normal

Tags: patch

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 33426 in the body.
You can then email your comments to 33426 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#33426; Package guix-patches. (Mon, 19 Nov 2018 05:44:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Jovany Leandro G.C" <bit4bit <at> riseup.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 19 Nov 2018 05:44:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Jovany Leandro G.C" <bit4bit <at> riseup.net>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: python-kivy-next: Fix build.
Date: Mon, 19 Nov 2018 00:43:03 -0500
From 43a2729699ccfae2738fa2cced1106fbb9afbfc6 Mon Sep 17 00:00:00 2001
From: "Jovany Leandro G.C" <bit4bit <at> riseup.net>
Date: Mon, 19 Nov 2018 00:36:27 -0500
Subject: [PATCH] gnu: python-kivy-next: Fix build.

* gnu/packages/patches/python-kivy-next-fix-sdl2-mixer-2.0.2-support.patch: New file.
---
 ...vy-next-fix-sdl2-mixer-2.0.2-support.patch | 109 ++++++++++++++++++
 gnu/packages/python.scm                       |   3 +-
 2 files changed, 111 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/python-kivy-next-fix-sdl2-mixer-2.0.2-support.patch

diff --git a/gnu/packages/patches/python-kivy-next-fix-sdl2-mixer-2.0.2-support.patch b/gnu/packages/patches/python-kivy-next-fix-sdl2-mixer-2.0.2-support.patch
new file mode 100644
index 000000000..fdc5dd701
--- /dev/null
+++ b/gnu/packages/patches/python-kivy-next-fix-sdl2-mixer-2.0.2-support.patch
@@ -0,0 +1,109 @@
+From 3b85f3e1c292b3f6c3f226490f52a2ab78251730 Mon Sep 17 00:00:00 2001
+From: Terje Skjaeveland <terje.skjaeveland <at> gmail.com>
+Date: Sun, 29 Oct 2017 12:35:46 +0100
+Subject: [PATCH] audio_sdl2: Update for mixer v2.0.2 support
+
+Flags MIX_INIT_MODPLUG was removed, and MIX_INIT_FLUIDSYNTH was
+renamed to MIX_INIT_MID.
+---
+ kivy/core/audio/audio_sdl2.pyx | 45 +++++++++++++++++++++++-----------
+ kivy/lib/sdl2.pxi              |  4 +--
+ 2 files changed, 33 insertions(+), 16 deletions(-)
+
+diff --git a/kivy/core/audio/audio_sdl2.pyx b/kivy/core/audio/audio_sdl2.pyx
+index 2ab569fe60..c6f26be5c8 100644
+--- a/kivy/core/audio/audio_sdl2.pyx
++++ b/kivy/core/audio/audio_sdl2.pyx
+@@ -15,9 +15,23 @@ Depending the compilation of SDL2 mixer and/or installed libraries:
+ * ogg since 1.9.1 (mixer needs libvorbis/libogg)
+ * flac since 1.9.1 (mixer needs libflac)
+ * mp3 since 1.9.1 (mixer needs libsmpeg/libmad; only use mad for GPL apps)
++  * Since 1.10.1 + mixer 2.0.2, mpg123 can also be used
+ * sequenced formats since 1.9.1 (midi, mod, s3m, etc. Mixer needs
+   libmodplug or libmikmod)
+ 
++.. Note::
++
++    Sequenced format support changed with mixer v2.0.2. If mixer is
++    linked with one of libmodplug or libmikmod, format support for
++    both libraries is assumed. This will work perfectly with formats
++    upported by both libraries, but if you were to try to load an
++    obscure format (like `apun` file with mikmod only), it will fail.
++
++    * Kivy <= 1.10.0: will fail to build with mixer >= 2.0.2
++      will report correct format support with < 2.0.2
++    * Kivy >= 1.10.1: will build with old and new mixer, and
++      will "guesstimate" sequenced format support
++
+ .. Warning::
+ 
+     Sequenced formats use the SDL2 Mixer music channel, you can only play
+@@ -57,8 +71,13 @@ cdef mix_init():
+         mix_is_init = -1
+         return 0
+ 
++    # In mixer 2.0.2, MIX_INIT_MODPLUG is now implied by MIX_INIT_MOD,
++    # and MIX_INIT_FLUIDSYNTH was renamed to MIX_INIT_MID. In previous
++    # versions, we requested both _MODPLUG and _MOD + _FLUIDSYNTH.
++    # 0x20 used to be MIX_INIT_FLUIDSYNTH, now MIX_INIT_MID
++    # 0x4  used to be MIX_INIT_MODPLUG before 2.0.2
+     want_flags = MIX_INIT_FLAC | MIX_INIT_OGG | MIX_INIT_MP3
+-    want_flags |= MIX_INIT_MOD | MIX_INIT_MODPLUG | MIX_INIT_FLUIDSYNTH
++    want_flags |= MIX_INIT_MOD | 0x20 | 0x4
+ 
+     mix_flags = Mix_Init(want_flags)
+ 
+@@ -244,25 +263,23 @@ class MusicSDL2(Sound):
+     @staticmethod
+     def extensions():
+         mix_init()
++        # FIXME: this should probably evolve to use the new has_music()
++        #        interface to determine format support
+ 
+         # Assume native midi support (defaults to enabled), but may use
+         # modplug, fluidsynth or timidity in reality. It may also be
+         # disabled completely, in which case loading it will fail
+         extensions = set(['mid', 'midi'])
+ 
+-        # libmodplug, may be incomplete
+-        if mix_flags & MIX_INIT_MODPLUG:
+-            extensions.update(['669', 'abc', 'amf', 'ams', 'dbm', 'dmf',
+-                               'dsm', 'far', 'it', 'j2b', 'mdl', 'med',
+-                               'mod', 'mt2', 'mtm', 'okt', 'pat', 'psm',
+-                               'ptm', 's3m', 'stm', 'ult', 'umx', 'xm'])
+-
+-        # libmikmod, may be incomplete
+-        if mix_flags & MIX_INIT_MOD:
+-            extensions.update(['669', 'amf', 'apun', 'dsm', 'far', 'gdm',
+-                               'gt2', 'it',  'med', 'mod', 'mtm', 'okt',
+-                               's3m', 'stm', 'stx', 'ult', 'umx', 'uni',
+-                               'xm'])
++        # libmodplug and libmikmod, may be incomplete.
++        # 0x4 is for mixer < 2.0.2, MIX_INIT_MODPLUG
++        if mix_flags & (MIX_INIT_MOD | 0x4):
++            extensions.update(['669', 'abc', 'amf', 'ams', 'apun', 'dbm',
++                               'dmf', 'dsm', 'far', 'gdm', 'it',   'j2b',
++                               'mdl', 'med', 'mod', 'mt2', 'mtm',  'okt',
++                               'pat', 'psm', 'ptm', 's3m', 'stm',  'stx',
++                               'ult', 'umx', 'uni', 'xm'])
++
+         return list(extensions)
+ 
+     def __init__(self, **kwargs):
+diff --git a/kivy/lib/sdl2.pxi b/kivy/lib/sdl2.pxi
+index 07d055c903..ad62ce8023 100644
+--- a/kivy/lib/sdl2.pxi
++++ b/kivy/lib/sdl2.pxi
+@@ -881,10 +881,10 @@ cdef extern from "SDL_mixer.h":
+     ctypedef enum MIX_InitFlags:
+         MIX_INIT_FLAC        = 0x00000001
+         MIX_INIT_MOD         = 0x00000002
+-        MIX_INIT_MODPLUG     = 0x00000004
++        MIX_INIT_MODPLUG     = 0x00000004 # Removed in mixer 2.0.2
+         MIX_INIT_MP3         = 0x00000008
+         MIX_INIT_OGG         = 0x00000010
+-        MIX_INIT_FLUIDSYNTH  = 0x00000020
++        MIX_INIT_MID         = 0x00000020 # Previously _FLUIDSYNTH
+ 
+     cdef int MIX_MAX_VOLUME
+ 
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index b6b0ad75a..b32c9049d 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -9998,7 +9998,8 @@ hardware-accelerated multitouch applications.")
          (file-name (string-append name "-" version "-checkout"))
          (sha256
           (base32
-           "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
+           "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p"))
+         (patches (search-patches "python-kivy-next-fix-sdl2-mixer-2.0.2-support.patch")))))))
 
 (define-public python2-kivy-next
   (package-with-python2 python-kivy-next))
-- 
2.19.0





Information forwarded to guix-patches <at> gnu.org:
bug#33426; Package guix-patches. (Mon, 19 Nov 2018 09:02:02 GMT) Full text and rfc822 format available.

Message #8 received at 33426 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: "Jovany Leandro G.C" <bit4bit <at> riseup.net>
Cc: 33426 <at> debbugs.gnu.org
Subject: Re: [bug#33426] [PATCH] gnu: python-kivy-next: Fix build.
Date: Mon, 19 Nov 2018 10:00:54 +0100
Hello,

"Jovany Leandro G.C" <bit4bit <at> riseup.net> skribis:

> From 43a2729699ccfae2738fa2cced1106fbb9afbfc6 Mon Sep 17 00:00:00 2001
> From: "Jovany Leandro G.C" <bit4bit <at> riseup.net>
> Date: Mon, 19 Nov 2018 00:36:27 -0500
> Subject: [PATCH] gnu: python-kivy-next: Fix build.
>
> * gnu/packages/patches/python-kivy-next-fix-sdl2-mixer-2.0.2-support.patch: New file.

A couple of things: please shorten the file name a bit, make sure to add
it to gnu/local.mk, and mention these three files in the change log.

However, since ‘python-kivy-next’ is a Git snapshot anyway, what about
updating the commit that is used instead of applying a patch?

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#33426; Package guix-patches. (Mon, 19 Nov 2018 16:24:02 GMT) Full text and rfc822 format available.

Message #11 received at 33426 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: "Jovany Leandro G.C" <bit4bit <at> riseup.net>
Cc: 33426 <at> debbugs.gnu.org
Subject: Re: [bug#33426] [PATCH] gnu: python-kivy-next: Fix build.
Date: Mon, 19 Nov 2018 17:23:02 +0100
Hello,

(Re-adding Cc:.)

"Jovany Leandro G.C" <bit4bit <at> riseup.net> skribis:

> El Mon, 19 Nov 2018 10:00:54 +0100
> ludo <at> gnu.org (Ludovic Courtès) escribió:

[...]

>> However, since ‘python-kivy-next’ is a Git snapshot anyway, what about
>> updating the commit that is used instead of applying a patch?
>> 
>> Thanks,
>> Ludo’.
>
> Hello,
>
> i not found a commit tagged in version 1.9.1,
>
> this pull https://github.com/kivy/kivy/pull/5459,
> was in 2017 between version >1.9.1 and <1.10.0 and tag 1.9.1 was 2016,
> which is the best route?

Are you saying the patch you’re interested in was never integrated in
the official repo?

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#33426; Package guix-patches. (Mon, 19 Nov 2018 20:13:02 GMT) Full text and rfc822 format available.

Message #14 received at 33426 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: "Jovany Leandro G.C" <bit4bit <at> riseup.net>
Cc: 33426 <at> debbugs.gnu.org
Subject: Re: [bug#33426] [PATCH] gnu: python-kivy-next: Fix build.
Date: Mon, 19 Nov 2018 21:12:04 +0100
¡Hola!

(Re-re-adding Cc:.)

"Jovany Leandro G.C" <bit4bit <at> riseup.net> skribis:

> El Mon, 19 Nov 2018 17:23:02 +0100
> ludo <at> gnu.org (Ludovic Courtès) escribió:

[...]

>> Are you saying the patch you’re interested in was never integrated in
>> the official repo?
>> 
>> Ludo’.
>
> in the master branch, for version 1.10.0.
>
>
> question: python-kivy 1.10.1 is mantanied, 1.9.1 it's old and
> unmantained, ¿why python-kivy-next, we can delete it?

‘python-kivy-next’ was added in 6eb7af2a43d94d6404a9b70c8beff1a535b50607
in 2016.  Probably the reason to add it back then no longer makes any
sense.

So yes, I think we can simply delete it.

Sounds good?

Thank you,
Ludo’.




Reply sent to ludo <at> gnu.org (Ludovic Courtès):
You have taken responsibility. (Tue, 27 Nov 2018 11:14:01 GMT) Full text and rfc822 format available.

Notification sent to "Jovany Leandro G.C" <bit4bit <at> riseup.net>:
bug acknowledged by developer. (Tue, 27 Nov 2018 11:14:02 GMT) Full text and rfc822 format available.

Message #19 received at 33426-done <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: "Jovany Leandro G.C" <bit4bit <at> riseup.net>
Cc: 33426-done <at> debbugs.gnu.org
Subject: Re: [bug#33426] [PATCH] gnu: python-kivy-next: Fix build.
Date: Tue, 27 Nov 2018 12:13:27 +0100
ludo <at> gnu.org (Ludovic Courtès) skribis:

> ‘python-kivy-next’ was added in 6eb7af2a43d94d6404a9b70c8beff1a535b50607
> in 2016.  Probably the reason to add it back then no longer makes any
> sense.
>
> So yes, I think we can simply delete it.

Done in commit 312edcd0a1e9d3c679bb65456a958673d72fe4c3.

Thanks,
Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 25 Dec 2018 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 122 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.