From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 11BE5138350 for ; Tue, 14 Jan 2020 18:48:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4DFD3E0899; Tue, 14 Jan 2020 18:48:42 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1E363E0899 for ; Tue, 14 Jan 2020 18:48:42 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 889DC34DC00 for ; Tue, 14 Jan 2020 18:48:40 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 30D382A for ; Tue, 14 Jan 2020 18:48:38 +0000 (UTC) From: "Conrad Kostecki" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Conrad Kostecki" Message-ID: <1579027619.8019d4039a201fc897f9c6938a4e0bae78fee8fd.conikost@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: games-util/nml/, games-util/nml/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: games-util/nml/files/nml-0.4.5-pillow7.patch games-util/nml/nml-0.4.5-r2.ebuild X-VCS-Directories: games-util/nml/ games-util/nml/files/ X-VCS-Committer: conikost X-VCS-Committer-Name: Conrad Kostecki X-VCS-Revision: 8019d4039a201fc897f9c6938a4e0bae78fee8fd X-VCS-Branch: master Date: Tue, 14 Jan 2020 18:48:38 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 340bdb35-badc-4deb-a604-97f385718789 X-Archives-Hash: 60ef8c0d20e0479a14bcf56b6e8cd05f commit: 8019d4039a201fc897f9c6938a4e0bae78fee8fd Author: Conrad Kostecki gentoo org> AuthorDate: Tue Jan 14 18:45:11 2020 +0000 Commit: Conrad Kostecki gentoo org> CommitDate: Tue Jan 14 18:46:59 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8019d403 games-util/nml: add support for >=dev-python/pillow-7.0.0 Also added support for python3.8 and changed SRC_URI to https. Closes: https://bugs.gentoo.org/705428 Package-Manager: Portage-2.3.84, Repoman-2.3.20 Signed-off-by: Conrad Kostecki gentoo.org> games-util/nml/files/nml-0.4.5-pillow7.patch | 41 ++++++++++++++++++++++++++++ games-util/nml/nml-0.4.5-r2.ebuild | 40 +++++++++++++++++++++++++++ 2 files changed, 81 insertions(+) diff --git a/games-util/nml/files/nml-0.4.5-pillow7.patch b/games-util/nml/files/nml-0.4.5-pillow7.patch new file mode 100644 index 00000000000..a69e40ae3e1 --- /dev/null +++ b/games-util/nml/files/nml-0.4.5-pillow7.patch @@ -0,0 +1,41 @@ +From 70c0b3110509dc7da2cfa688e0717e6c966e21df Mon Sep 17 00:00:00 2001 +From: Conrad Kostecki +Date: Wed, 23 Oct 2019 12:52:15 +0200 +Subject: [PATCH] Fix #39: Add compatibility with >=pillow-7.0.0 + +Changed PILLOW_VERSION to PIL.__version__, +as it got removed with >=pillow-7.0.0. + +In order not to break compatibility with older versions, +PILLOW_VERSION will be used as a fallback. + +Closes: https://github.com/OpenTTD/nml/issues/39 +Signed-off-by: Conrad Kostecki +--- + nml/version_info.py | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/nml/version_info.py b/nml/version_info.py +index 32aa3b13..da60328e 100644 +--- a/nml/version_info.py ++++ b/nml/version_info.py +@@ -139,11 +139,17 @@ def get_lib_versions(): + #PIL + try: + from PIL import Image +- versions["PIL"] = Image.PILLOW_VERSION ++ try: ++ versions["PIL"] = Image.__version__ ++ except AttributeError: ++ versions["PIL"] = Image.PILLOW_VERSION + except ImportError: + try: + import Image +- versions["PIL"] = Image.PILLOW_VERSION ++ try: ++ versions["PIL"] = Image.__version__ ++ except AttributeError: ++ versions["PIL"] = Image.PILLOW_VERSION + except ImportError: + versions["PIL"] = "Not found!" + diff --git a/games-util/nml/nml-0.4.5-r2.ebuild b/games-util/nml/nml-0.4.5-r2.ebuild new file mode 100644 index 00000000000..7627ddc1e89 --- /dev/null +++ b/games-util/nml/nml-0.4.5-r2.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7,8} ) + +inherit distutils-r1 + +DESCRIPTION="Compiler of NML files into GRF/NFO files" +HOMEPAGE="https://dev.openttdcoop.org/projects/nml" +SRC_URI="https://bundles.openttdcoop.org/nml/releases/${PV}/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" + +RDEPEND=" + dev-python/pillow[zlib,${PYTHON_USEDEP}] + dev-python/ply[${PYTHON_USEDEP}] +" + +DEPEND=" + ${RDEPEND} + dev-python/setuptools[${PYTHON_USEDEP}] +" + +DOCS=( docs/{changelog,readme}.txt ) + +PATCHES=( + "${FILESDIR}"/${PN}-0.4.4-pillow3.patch + "${FILESDIR}"/${PN}-0.4.5-pillow6.patch + "${FILESDIR}"/${PN}-0.4.5-pillow7.patch +) + +src_install() { + distutils-r1_src_install + + doman docs/nmlc.1 +}