summaryrefslogtreecommitdiff
path: root/media-gfx/displaycal-py3
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-05-02 05:22:02 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-05-02 05:22:02 +0100
commitf20a854a6189579b2cc296900c479d9b6b5b595e (patch)
tree310fb68782e96ae228c8ffe97ae3b2859a7e4a17 /media-gfx/displaycal-py3
parentb7e514e2dc987a8b3e10ea8ea3d6e1d197eeb355 (diff)
gentoo auto-resync : 02:05:2023 - 05:22:02
Diffstat (limited to 'media-gfx/displaycal-py3')
-rw-r--r--media-gfx/displaycal-py3/Manifest2
-rw-r--r--media-gfx/displaycal-py3/displaycal-py3-3.9.10-r1.ebuild69
-rw-r--r--media-gfx/displaycal-py3/files/displaycal-py3-3.9.10-python-3.11.patch83
3 files changed, 154 insertions, 0 deletions
diff --git a/media-gfx/displaycal-py3/Manifest b/media-gfx/displaycal-py3/Manifest
index dbeaf6d8d7be..fa1cd7bb21ce 100644
--- a/media-gfx/displaycal-py3/Manifest
+++ b/media-gfx/displaycal-py3/Manifest
@@ -1,3 +1,5 @@
+AUX displaycal-py3-3.9.10-python-3.11.patch 3134 BLAKE2B 3110f39ecab47eff46a97389c2164bfbb2b44f80fd30bb848856dae050738cd6590905b2b9ce603eb9d919f2811674b378b1562396b1437bea8247798868313f SHA512 98bb7ea8a0b29ffbb455f8666183489d1571bdcd1829398ce4535c7581f797582ed7c1a5035b2bdf9a0d19397ef14e5f8068ec2baf5078f64b614c901be48f33
DIST DisplayCAL-3.9.10.tar.gz 10676033 BLAKE2B 94bfa3ac95bfc16788421fa5b9a31920c40da66d2875e4037b3b20b6792a1005ee9fea11b5325a94ffae845f56583647e42de9d4d7d96d149264a86e6d1158a6 SHA512 fc1b981925c6f4660557d8f0935a62d0112b39664b0c74cdb1a907e0e7b7e3f61ec76986fa2072f8ada1d105ebfa61bb116df75dc10f902ff545db3368634fc5
+EBUILD displaycal-py3-3.9.10-r1.ebuild 1556 BLAKE2B dabb560ef7dcac4a3dec1406e3cef82973957b92f4093c5ea92e5995a277a21dbf3b8037dba40909d8bc2cc267a1b79d204fc2c91c5c1f7305089086402a5b0e SHA512 a0e68b5700912181dcb963a30fbc02ce5cd8e206b77cfda131ea5e44ac7742b5ed088a1f0c3797cb109e6c7c4cccdd7c301dd829f703e0f0eba9199039c2c680
EBUILD displaycal-py3-3.9.10.ebuild 1494 BLAKE2B 9696773d870850429eea8df9d7c62624277f2c0ba2475271c367e5b642124a70c2c5dea38d5916eb0cad8ec028089c76a31c8fb21aa68f2042e76d203b03217f SHA512 c82759379322f0d177365081a7fcc61eb7d258e3e60e149345290c33cd6a054f6586911a1fdbf302b282a1a4eeeb447fcc660a299e71d8a83a2c313832d62af5
MISC metadata.xml 790 BLAKE2B aa3f32f061f4840bbc0e29c36e6154cc37b85a9fa76a92e7f69a32ccadef16fa5a9680266c35b51c3351c4f4d65e2e1659515550e2366c9c9516e8c26c049694 SHA512 d4fad45e53ac19ede7f26709878ff36b55906a4c642b1ce7ce2e49ef56a1285582700d07170f702263a3a99ea0bfa2c2cfbc842978f565291d3322fb9a6a5c0d
diff --git a/media-gfx/displaycal-py3/displaycal-py3-3.9.10-r1.ebuild b/media-gfx/displaycal-py3/displaycal-py3-3.9.10-r1.ebuild
new file mode 100644
index 000000000000..570bbc0db81d
--- /dev/null
+++ b/media-gfx/displaycal-py3/displaycal-py3-3.9.10-r1.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+PYTHON_COMPAT=( python3_{9..11} )
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+
+inherit distutils-r1 xdg
+
+MY_PN="DisplayCAL"
+MY_P="${MY_PN}-${PV}"
+
+SRC_URI="https://github.com/eoyilmaz/displaycal-py3/releases/download/${PV}/${MY_P}.tar.gz"
+KEYWORDS="~amd64"
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="Modernize the DisplayCAL code including Python 3 support"
+HOMEPAGE="https://github.com/eoyilmaz/displaycal-py3"
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE=""
+
+RESTRICT="test"
+
+PATCHES="${FILESDIR}/${P}-python-3.11.patch"
+
+DEPEND="
+ dev-python/build[${PYTHON_USEDEP}]
+ dev-python/certifi:0[${PYTHON_USEDEP}]
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ dev-python/distro[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/pillow[${PYTHON_USEDEP}]
+ dev-python/pychromecast[${PYTHON_USEDEP}]
+ dev-python/send2trash[${PYTHON_USEDEP}]
+ dev-python/zeroconf[${PYTHON_USEDEP}]
+ >=dev-python/wxpython-4.2.0[${PYTHON_USEDEP}]
+ media-gfx/argyllcms
+ x11-libs/libXxf86vm"
+
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ # Fix QA warning
+ sed -e 's/license_file/license_files/g' -i setup.cfg || die
+
+ # Remove x-world MIME
+ sed -i 's|x-world/x-vrml;||g' \
+ misc/displaycal-vrml-to-x3d-converter.desktop || die
+
+ distutils-r1_src_prepare
+}
+
+src_install() {
+ distutils-r1_src_install
+
+ # Use Gentoo package name for doc folder
+ mv "${ED}/usr/share/doc/${MY_P}" "${ED}/usr/share/doc/${P}" || die
+}
+
+pkg_postinst() {
+ xdg_pkg_postinst
+}
+
+pkg_postrm() {
+ xdg_pkg_postrm
+}
diff --git a/media-gfx/displaycal-py3/files/displaycal-py3-3.9.10-python-3.11.patch b/media-gfx/displaycal-py3/files/displaycal-py3-3.9.10-python-3.11.patch
new file mode 100644
index 000000000000..d8e7d05abfb4
--- /dev/null
+++ b/media-gfx/displaycal-py3/files/displaycal-py3-3.9.10-python-3.11.patch
@@ -0,0 +1,83 @@
+Based on
+https://github.com/eoyilmaz/displaycal-py3/commit/3762e7be0368484d68c4a90923672fdb0f51a5fc
+and
+https://github.com/eoyilmaz/displaycal-py3/commit/97f0c91f5855e4d21f47181ef596251eb03cb835
+
+diff --git a/DisplayCAL/RealDisplaySizeMM.py b/DisplayCAL/RealDisplaySizeMM.py
+index 00957692c..25b730d05 100644
+--- a/DisplayCAL/RealDisplaySizeMM.py
++++ b/DisplayCAL/RealDisplaySizeMM.py
+@@ -25,6 +25,8 @@
+ from DisplayCAL.lib64.python39.RealDisplaySizeMM import *
+ elif sys.version_info[:2] == (3, 10):
+ from DisplayCAL.lib64.python310.RealDisplaySizeMM import *
++ elif sys.version_info[:2] == (3, 11):
++ from DisplayCAL.lib64.python311.RealDisplaySizeMM import *
+ # else:
+ # pass
+
+diff --git a/DisplayCAL/defaultpaths.py b/DisplayCAL/defaultpaths.py
+index cd11d6d75..59258e79d 100644
+--- a/DisplayCAL/defaultpaths.py
++++ b/DisplayCAL/defaultpaths.py
+@@ -235,9 +235,14 @@ def set_translation(obj):
+ obj.GETTEXT_PACKAGE, locale_dir, codeset="UTF-8"
+ )
+ except TypeError:
+- obj.translation = gettext.translation(
+- obj.GETTEXT_PACKAGE, locale_dir
+- )
++ try:
++ obj.translation = gettext.translation(
++ obj.GETTEXT_PACKAGE, locale_dir
++ )
++ except FileNotFoundError as exc:
++ print("XDG:", exc)
++ obj.translation = gettext.NullTranslations()
++ return False
+ except IOError as exception:
+ print("XDG:", exception)
+ obj.translation = gettext.NullTranslations()
+@@ -261,11 +266,7 @@ def get_config_files(filename):
+
+ @staticmethod
+ def shell_unescape(s):
+- a = []
+- for i, c in enumerate(s):
+- if c == "\\" and len(s) > i + 1:
+- continue
+- a.append(c)
++ a = [c for i, c in enumerate(s) if c != "\\" or len(s) <= i + 1]
+ return "".join(a)
+
+ @staticmethod
+diff --git a/DisplayCAL/lib64/python311/__init__.py b/DisplayCAL/lib64/python311/__init__.py
+new file mode 100644
+index 000000000..e69de29bb
+diff --git a/README.md b/README.md
+index 3ff3c4ec4..4119ace70 100644
+--- a/README.md
++++ b/README.md
+@@ -25,7 +25,7 @@ Here is a screenshots showing the tool working with Python 3.10:
+
+ ![image](https://user-images.githubusercontent.com/1786804/169152229-e06ff549-55fe-4149-8742-405446e6b01f.png)
+
+-Currently, DisplayCAL is working with Python 3.8, 3.9 and 3.10 and wxPython 4.1.1 or 4.2.0.
++Currently, DisplayCAL is working with Python 3.8, 3.9, 3.10 and 3.11 and wxPython 4.1.1 or 4.2.0.
+
+ Here is a list of things that is working:
+
+
+diff --git a/DisplayCAL/meta.py b/DisplayCAL/meta.py
+index 00b9c82c..30797cdf 100644
+--- a/DisplayCAL/meta.py
++++ b/DisplayCAL/meta.py
+@@ -62,7 +62,7 @@
+ name_html = '<span class="appname">Display<span>CAL</span></span>'
+
+ py_minversion = (3, 8)
+-py_maxversion = (3, 10)
++py_maxversion = (3, 11)
+
+ version = VERSION_STRING
+ version_lin = VERSION_STRING # Linux