diff options
author | Michael Sterrett <mr_bones_@gentoo.org> | 2015-10-20 13:14:14 -0400 |
---|---|---|
committer | Michael Sterrett <mr_bones_@gentoo.org> | 2015-10-20 22:41:25 -0400 |
commit | ad9c41ce7cbecfd1ae76c7e316f3125860a01f56 (patch) | |
tree | afa04f8f99263dc6875c8c912ca142649d9774a7 /games-util/nml | |
parent | dev-python/intelhex: update KEYWORDS to ~arch (diff) | |
download | gentoo-ad9c41ce7cbecfd1ae76c7e316f3125860a01f56.tar.gz gentoo-ad9c41ce7cbecfd1ae76c7e316f3125860a01f56.tar.bz2 gentoo-ad9c41ce7cbecfd1ae76c7e316f3125860a01f56.zip |
add patch from Lars Wendler via bug #563560 to work correctly with the latest version of pillow
Package-Manager: portage-2.2.20.1
Diffstat (limited to 'games-util/nml')
-rw-r--r-- | games-util/nml/files/nml-0.4.2-pillow3.patch | 31 | ||||
-rw-r--r-- | games-util/nml/nml-0.4.2.ebuild | 1 |
2 files changed, 32 insertions, 0 deletions
diff --git a/games-util/nml/files/nml-0.4.2-pillow3.patch b/games-util/nml/files/nml-0.4.2-pillow3.patch new file mode 100644 index 000000000000..914cef24df51 --- /dev/null +++ b/games-util/nml/files/nml-0.4.2-pillow3.patch @@ -0,0 +1,31 @@ +--- nml-0.4.2/nml/lz77.py ++++ nml-0.4.2/nml/lz77.py +@@ -25,7 +25,7 @@ + @return: Compressed data. + @rtype: C{bytearray} + """ +- stream = data.tostring() ++ stream = data.tobytes() + position = 0 + output = array.array('B') + literal_bytes = array.array('B') +--- nml-0.4.2/nml/spriteencoder.py ++++ nml-0.4.2/nml/spriteencoder.py +@@ -276,7 +276,7 @@ + pos = generic.build_position(sprite_info.poslist) + raise generic.ScriptError("Read beyond bounds of image file '{}'".format(filename_32bpp.value), pos) + sprite = im.crop((x, y, x + size_x, y + size_y)) +- rgb_sprite_data = sprite.tostring() ++ rgb_sprite_data = sprite.tobytes() + + if (info_byte & INFO_ALPHA) != 0: + # Check for half-transparent pixels (not valid for ground sprites) +@@ -296,7 +296,7 @@ + raise generic.ScriptError("Read beyond bounds of image file '{}'".format(filename_8bpp.value), pos) + mask_sprite = mask_im.crop((mask_x, mask_y, mask_x + size_x, mask_y + size_y)) + +- mask_sprite_data = self.palconvert(mask_sprite.tostring(), im_mask_pal) ++ mask_sprite_data = self.palconvert(mask_sprite.tobytes(), im_mask_pal) + + # Check for white pixels; those that cause "artefacts" when shading + pixel_stats['white'] = sum(p == 255 for p in mask_sprite_data) diff --git a/games-util/nml/nml-0.4.2.ebuild b/games-util/nml/nml-0.4.2.ebuild index c98bdab2fb6d..8ccbac26f515 100644 --- a/games-util/nml/nml-0.4.2.ebuild +++ b/games-util/nml/nml-0.4.2.ebuild @@ -20,6 +20,7 @@ DEPEND="${RDEPEND} dev-python/setuptools[${PYTHON_USEDEP}]" DOCS=( docs/{changelog,readme}.txt ) +PATCHES=( "${FILESDIR}"/${P}-pillow3.patch ) src_install() { distutils-r1_src_install |