diff options
author | Andrew Savchenko <bircoph@gentoo.org> | 2019-01-10 17:49:44 +0300 |
---|---|---|
committer | Andrew Savchenko <bircoph@gentoo.org> | 2019-01-10 17:50:21 +0300 |
commit | ce9cbff3c8210a0b96dc0b1317e747b6f136914e (patch) | |
tree | c9c8f2685777a6ae05e8c67abacd7d97971592b4 /dev-python/pygame_sdl2 | |
parent | profiles/packages.mask: mask sci-electronics/librepcb (diff) | |
download | gentoo-ce9cbff3c8210a0b96dc0b1317e747b6f136914e.tar.gz gentoo-ce9cbff3c8210a0b96dc0b1317e747b6f136914e.tar.bz2 gentoo-ce9cbff3c8210a0b96dc0b1317e747b6f136914e.zip |
dev-python/pygame_sdl2: fix bug 635442
Add support for the latest sdl2-mixer API.
Closes: https://bugs.gentoo.org/635442
Package-Manager: Portage-2.3.54, Repoman-2.3.12
Signed-off-by: Andrew Savchenko <bircoph@gentoo.org>
Diffstat (limited to 'dev-python/pygame_sdl2')
-rw-r--r-- | dev-python/pygame_sdl2/files/pygame_sdl2-6.99.12.4-mixer.patch | 43 | ||||
-rw-r--r-- | dev-python/pygame_sdl2/pygame_sdl2-6.99.12.4-r1.ebuild | 44 |
2 files changed, 87 insertions, 0 deletions
diff --git a/dev-python/pygame_sdl2/files/pygame_sdl2-6.99.12.4-mixer.patch b/dev-python/pygame_sdl2/files/pygame_sdl2-6.99.12.4-mixer.patch new file mode 100644 index 000000000000..1c3964afaa9a --- /dev/null +++ b/dev-python/pygame_sdl2/files/pygame_sdl2-6.99.12.4-mixer.patch @@ -0,0 +1,43 @@ +From ced6051f4a4559a725804cc58c079e1efea0a573 Mon Sep 17 00:00:00 2001 +From: Markus Koschany <apo@debian.org> +Date: Sat, 11 Nov 2017 23:00:25 +0100 +Subject: [PATCH] Fix build failure due to the removal of MIX_INIT_MODPLUG and + the replacement of + +MIX_INIT_FLUIDSYNTH with MIX_INIT_MID. +--- + include/sdl2_mixer.pxd | 3 +-- + src/pygame_sdl2/mixer.pyx | 4 ++-- + 2 files changed, 3 insertions(+), 4 deletions(-) + +diff --git a/include/sdl2_mixer.pxd b/include/sdl2_mixer.pxd +index 0cea395..4bb0187 100644 +--- a/include/sdl2_mixer.pxd ++++ b/include/sdl2_mixer.pxd +@@ -18,10 +18,9 @@ cdef extern from "SDL_mixer.h" nogil: + ctypedef enum MIX_InitFlags: + MIX_INIT_FLAC + MIX_INIT_MOD +- MIX_INIT_MODPLUG + MIX_INIT_MP3 + MIX_INIT_OGG +- MIX_INIT_FLUIDSYNTH ++ MIX_INIT_MID + + int Mix_Init(int flags) + void Mix_Quit() +diff --git a/src/pygame_sdl2/mixer.pyx b/src/pygame_sdl2/mixer.pyx +index 3c5e185..bea5cbf 100644 +--- a/src/pygame_sdl2/mixer.pyx ++++ b/src/pygame_sdl2/mixer.pyx +@@ -81,8 +81,8 @@ def init(frequency=22050, size=MIX_DEFAULT_FORMAT, channels=2, buffer=4096): + if get_init() is not None: + return + +- for flag in (MIX_INIT_FLAC, MIX_INIT_MOD, MIX_INIT_MODPLUG, +- MIX_INIT_MP3, MIX_INIT_OGG, MIX_INIT_FLUIDSYNTH): ++ for flag in (MIX_INIT_FLAC, MIX_INIT_MOD, ++ MIX_INIT_MP3, MIX_INIT_OGG, MIX_INIT_MID): + + if Mix_Init(flag) != flag: + errors.append("{}\n".format(SDL_GetError())) diff --git a/dev-python/pygame_sdl2/pygame_sdl2-6.99.12.4-r1.ebuild b/dev-python/pygame_sdl2/pygame_sdl2-6.99.12.4-r1.ebuild new file mode 100644 index 000000000000..2f5df88d3689 --- /dev/null +++ b/dev-python/pygame_sdl2/pygame_sdl2-6.99.12.4-r1.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) +inherit distutils-r1 + +PYSDL="${PN}-2.1.0" + +DESCRIPTION="Reimplementation of portions of the pygame API using SDL2" +HOMEPAGE="https://github.com/renpy/pygame_sdl2" +SRC_URI="http://www.renpy.org/dl/${PV}/${PYSDL}-for-renpy-${PV}.tar.gz" + +LICENSE="LGPL-2.1 ZLIB" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +BDEPEND=" + dev-python/cython[${PYTHON_USEDEP}] +" +DEPEND=" + dev-python/numpy[${PYTHON_USEDEP}] + media-libs/libpng:0 + media-libs/libsdl2[video] + media-libs/sdl2-image[png,jpeg] + >=media-libs/sdl2-mixer-2.0.2 + media-libs/sdl2-ttf + virtual/jpeg:62 +" +RDEPEND="${DEPEND}" + +S=${WORKDIR}/${PYSDL}-for-renpy-${PV} + +PATCHES=( "${FILESDIR}/pygame_sdl2-6.99.12.4-mixer.patch" ) + +# PyGame distribution for this version has some pregenerated files; +# we need to remove them +python_prepare_all() +{ + rm -r "${S}"/gen{,3} || die + distutils-r1_python_prepare_all +} |