From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35291) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gOcM1-0002AJ-HR for guix-patches@gnu.org; Mon, 19 Nov 2018 00:44:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gOcLv-0003HS-OD for guix-patches@gnu.org; Mon, 19 Nov 2018 00:44:12 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:55330) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gOcLq-00039B-6N for guix-patches@gnu.org; Mon, 19 Nov 2018 00:44:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gOcLq-0000oj-37 for guix-patches@gnu.org; Mon, 19 Nov 2018 00:44:02 -0500 Subject: [bug#33426] [PATCH] gnu: python-kivy-next: Fix build. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35168) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gOcL2-00024z-DQ for guix-patches@gnu.org; Mon, 19 Nov 2018 00:43:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gOcKy-0002GJ-Dy for guix-patches@gnu.org; Mon, 19 Nov 2018 00:43:12 -0500 Received: from mx1.riseup.net ([198.252.153.129]:45105) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gOcKy-0002Fl-2w for guix-patches@gnu.org; Mon, 19 Nov 2018 00:43:08 -0500 Received: from cotinga.riseup.net (cotinga-pn.riseup.net [10.0.1.164]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.riseup.net (Postfix) with ESMTPS id 099041A01E1 for ; Sun, 18 Nov 2018 21:43:06 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by cotinga.riseup.net with ESMTPSA id 737531042BB for ; Sun, 18 Nov 2018 21:43:06 -0800 (PST) Date: Mon, 19 Nov 2018 00:43:03 -0500 From: "Jovany Leandro G.C" Message-ID: <20181119004303.3fd5e3f4@riseup.net> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 33426@debbugs.gnu.org =46rom 43a2729699ccfae2738fa2cced1106fbb9afbfc6 Mon Sep 17 00:00:00 2001 From: "Jovany Leandro G.C" 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-sup= port.patch b/gnu/packages/patches/python-kivy-next-fix-sdl2-mixer-2.0.2-sup= port.patch new file mode 100644 index 000000000..fdc5dd701 --- /dev/null +++ b/gnu/packages/patches/python-kivy-next-fix-sdl2-mixer-2.0.2-support.pa= tch @@ -0,0 +1,109 @@ +From 3b85f3e1c292b3f6c3f226490f52a2ab78251730 Mon Sep 17 00:00:00 2001 +From: Terje Skjaeveland +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.p= yx +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 installe= d 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) +=20 ++.. 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 <=3D 1.10.0: will fail to build with mixer >=3D 2.0.2 ++ will report correct format support with < 2.0.2 ++ * Kivy >=3D 1.10.1: will build with old and new mixer, and ++ will "guesstimate" sequenced format support ++ + .. Warning:: +=20 + Sequenced formats use the SDL2 Mixer music channel, you can only play +@@ -57,8 +71,13 @@ cdef mix_init(): + mix_is_init =3D -1 + return 0 +=20 ++ # 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 =3D MIX_INIT_FLAC | MIX_INIT_OGG | MIX_INIT_MP3 +- want_flags |=3D MIX_INIT_MOD | MIX_INIT_MODPLUG | MIX_INIT_FLUIDSYNTH ++ want_flags |=3D MIX_INIT_MOD | 0x20 | 0x4 +=20 + mix_flags =3D Mix_Init(want_flags) +=20 +@@ -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 +=20 + # 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 =3D set(['mid', 'midi']) +=20 +- # 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) +=20 + 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 =3D 0x00000001 + MIX_INIT_MOD =3D 0x00000002 +- MIX_INIT_MODPLUG =3D 0x00000004 ++ MIX_INIT_MODPLUG =3D 0x00000004 # Removed in mixer 2.0.2 + MIX_INIT_MP3 =3D 0x00000008 + MIX_INIT_OGG =3D 0x00000010 +- MIX_INIT_FLUIDSYNTH =3D 0x00000020 ++ MIX_INIT_MID =3D 0x00000020 # Previously _FLUIDSYNTH +=20 + cdef int MIX_MAX_VOLUME +=20 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-s= upport.patch"))))))) =20 (define-public python2-kivy-next (package-with-python2 python-kivy-next)) --=20 2.19.0