commit:     bca42285d106105b0463c82a48299cfadc0a2b63
Author:     Nick Sarnie <sarnex <AT> gentoo <DOT> org>
AuthorDate: Sun May 11 18:42:45 2025 +0000
Commit:     Nick Sarnie <sarnex <AT> gentoo <DOT> org>
CommitDate: Sun May 11 18:46:25 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bca42285

media-gfx/displaycal-py3: add 3.9.16

Closes: https://bugs.gentoo.org/952514

Signed-off-by: Nick Sarnie <sarnex <AT> gentoo.org>

 media-gfx/displaycal-py3/Manifest                  |  1 +
 .../displaycal-py3/displaycal-py3-3.9.16.ebuild    | 73 ++++++++++++++++++++++
 .../files/displaycal-py3-3.9.16-Fix-build.patch    | 58 +++++++++++++++++
 3 files changed, 132 insertions(+)

diff --git a/media-gfx/displaycal-py3/Manifest 
b/media-gfx/displaycal-py3/Manifest
index 6a94987e38b7..a8d936d623ef 100644
--- a/media-gfx/displaycal-py3/Manifest
+++ b/media-gfx/displaycal-py3/Manifest
@@ -1,2 +1,3 @@
 DIST DisplayCAL-3.9.10.tar.gz 10676033 BLAKE2B 
94bfa3ac95bfc16788421fa5b9a31920c40da66d2875e4037b3b20b6792a1005ee9fea11b5325a94ffae845f56583647e42de9d4d7d96d149264a86e6d1158a6
 SHA512 
fc1b981925c6f4660557d8f0935a62d0112b39664b0c74cdb1a907e0e7b7e3f61ec76986fa2072f8ada1d105ebfa61bb116df75dc10f902ff545db3368634fc5
 DIST DisplayCAL-3.9.13_pre20240925.tar.gz 14027557 BLAKE2B 
915ef1b74e26da9efdb2dbb70ac0920fdb773868d7cbfc9ef7be5e4d60b300fe22ff54a7d762e3ef901c0ea70e0ba073881df055fecfec38afc8df873879064b
 SHA512 
82993dd4f922b2316954f29ec976851aecc263acbe0e01c1cc158013e04d829c0387b5440092a78bd61743cee416a3bc3cde905843dce9c8233eb18f68915184
+DIST DisplayCAL-3.9.16.tar.gz 14406126 BLAKE2B 
c7d50251feed08ce33cc2f09d3e23a5bfbe54c0634fa39926862a638689e6e52b1a567b3b7433b84498bc38ea0e70208f263ba01107e39940d7eaa2183db30dd
 SHA512 
54c0202b2803702b760b2b57a83ca273c4b70a504540e1bb4a543f0b16ad490b3f7d336516d754b3047c957fd8c274c779074422c55f6d422728c216e59aba64

diff --git a/media-gfx/displaycal-py3/displaycal-py3-3.9.16.ebuild 
b/media-gfx/displaycal-py3/displaycal-py3-3.9.16.ebuild
new file mode 100644
index 000000000000..26fe7981cee8
--- /dev/null
+++ b/media-gfx/displaycal-py3/displaycal-py3-3.9.16.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+PYTHON_COMPAT=( python3_{9..13} )
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+
+inherit distutils-r1 xdg
+
+DESCRIPTION="Modernize the DisplayCAL code including Python 3 support"
+HOMEPAGE="https://github.com/eoyilmaz/displaycal-py3";
+
+MY_PN="DisplayCAL"
+MY_P="${MY_PN}-${PV}"
+MY_COMMIT="9b17f280b132c452396c7af29f2b6d16bdf14128"
+SRC_URI="https://github.com/eoyilmaz/displaycal-py3/archive/${MY_COMMIT}.tar.gz
 -> ${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+
+SLOT="0"
+KEYWORDS="~amd64"
+
+RESTRICT="test"
+
+PATCHES="${FILESDIR}/${P}-Fix-build.patch"
+
+DEPEND="
+       dev-python/build[${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}]
+       dev-python/installer[${PYTHON_USEDEP}]
+       dev-python/certifi[${PYTHON_USEDEP}]
+       dev-python/wheel[${PYTHON_USEDEP}]
+       >=media-gfx/argyllcms-3.3.0
+       x11-libs/libXxf86vm"
+
+RDEPEND="${DEPEND}"
+
+src_unpack() {
+       default
+       # Upstream build system is very sensitive to the build folder name
+       mv "${WORKDIR}/${PN}-${MY_COMMIT}" "${S}" || die
+}
+
+src_prepare() {
+       # 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/${PF}" || die
+}
+
+pkg_postinst() {
+       xdg_pkg_postinst
+}
+
+pkg_postrm() {
+       xdg_pkg_postrm
+}

diff --git 
a/media-gfx/displaycal-py3/files/displaycal-py3-3.9.16-Fix-build.patch 
b/media-gfx/displaycal-py3/files/displaycal-py3-3.9.16-Fix-build.patch
new file mode 100644
index 000000000000..43aa53741d94
--- /dev/null
+++ b/media-gfx/displaycal-py3/files/displaycal-py3-3.9.16-Fix-build.patch
@@ -0,0 +1,58 @@
+diff --git a/DisplayCAL/__version__.py b/DisplayCAL/__version__.py
+new file mode 100644
+index 00000000..28eceb81
+--- /dev/null
++++ b/DisplayCAL/__version__.py
+@@ -0,0 +1,7 @@
++# generated by setup.py
++
++BUILD_DATE = "2022-11-21T22:56:25Z"
++LASTMOD = '2022-11-21T22:55:57Z'
++VERSION = (3, 9, 16)
++VERSION_BASE = (3, 9, 16)
++VERSION_STRING = '3.9.16'
+diff --git a/DisplayCAL/setup.py b/DisplayCAL/setup.py
+index 27425a18..43b6143b 100644
+--- a/DisplayCAL/setup.py
++++ b/DisplayCAL/setup.py
+@@ -629,7 +629,6 @@ def setup():
+     if not is_rpm_build or doc_layout.startswith("deb"):
+         data_files += get_data(doc, "doc", excludes=["LICENSE.txt"])
+     if data_files:
+-        data_files.append((doc, [os.path.join(pydir, "..", "dist", 
"copyright")]))
+         data_files.append(
+             (
+                 os.path.join(os.path.dirname(data), "doc-base"),
+@@ -659,20 +662,6 @@ def setup():
+                 )
+             )
+ 
+-    # metainfo / appdata.xml
+-    data_files.append(
+-        (
+-            os.path.join(os.path.dirname(data), "metainfo"),
+-            [
+-                relpath(
+-                    os.path.normpath(
+-                        os.path.join(pydir, "..", "dist", 
f"{appstream_id}.appdata.xml")
+-                    ),
+-                    source_dir,
+-                )
+-            ],
+-        )
+-    )
+ 
+     if sys.platform not in ("darwin", "win32") or do_py2app or do_py2exe:
+         # Linux/Unix or py2app/py2exe
+diff --git a/pyproject.toml b/pyproject.toml
+index b43679f0..89e02aaf 100644
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -65,6 +65,7 @@ include-package-data = false
+ 
+ [tool.setuptools.packages.find]
+ where = ["./"]
++exclude = [ "tests", "tests.*"]
+ 
+ [tool.setuptools.package-data]
+ DisplayCAL = [

Reply via email to