diff options
author | Nick Sarnie <sarnex@gentoo.org> | 2024-10-04 18:13:33 +0900 |
---|---|---|
committer | Nick Sarnie <sarnex@gentoo.org> | 2024-10-04 18:27:04 +0900 |
commit | ea1e11fb05838502f073420cce8dd7ff5c7956a8 (patch) | |
tree | 9ecbc0875919e4781ad94be2d8accbdeedff1e33 /media-gfx | |
parent | media-sound/qsynth: bump to 1.0.2 (diff) | |
download | gentoo-ea1e11fb05838502f073420cce8dd7ff5c7956a8.tar.gz gentoo-ea1e11fb05838502f073420cce8dd7ff5c7956a8.tar.bz2 gentoo-ea1e11fb05838502f073420cce8dd7ff5c7956a8.zip |
media-gfx/displaycal-py3: add 3.9.13_pre20240925
Closes: https://bugs.gentoo.org/924762
Signed-off-by: Nick Sarnie <sarnex@gentoo.org>
Diffstat (limited to 'media-gfx')
3 files changed, 136 insertions, 0 deletions
diff --git a/media-gfx/displaycal-py3/Manifest b/media-gfx/displaycal-py3/Manifest index 9eff15b5ee37..6a94987e38b7 100644 --- a/media-gfx/displaycal-py3/Manifest +++ b/media-gfx/displaycal-py3/Manifest @@ -1 +1,2 @@ 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 diff --git a/media-gfx/displaycal-py3/displaycal-py3-3.9.13_pre20240925.ebuild b/media-gfx/displaycal-py3/displaycal-py3-3.9.13_pre20240925.ebuild new file mode 100644 index 000000000000..8602a8c66ea1 --- /dev/null +++ b/media-gfx/displaycal-py3/displaycal-py3-3.9.13_pre20240925.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +PYTHON_COMPAT=( python3_{9..12} ) +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="eda424388be5dc18f76b02f8d015d6b2ddafa174" +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 + 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() { + sed -e 's/license_file/license_files/g' -i setup.cfg || die + + # remove dependency only imported if `sys.platform in ("darwin", "win32")` + sed -e '/certifi/d' -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/${PF}" || die +} + +pkg_postinst() { + xdg_pkg_postinst +} + +pkg_postrm() { + xdg_pkg_postrm +} diff --git a/media-gfx/displaycal-py3/files/displaycal-py3-3.9.13_pre20240925-Fix-build.patch b/media-gfx/displaycal-py3/files/displaycal-py3-3.9.13_pre20240925-Fix-build.patch new file mode 100644 index 000000000000..6d7ad881054b --- /dev/null +++ b/media-gfx/displaycal-py3/files/displaycal-py3-3.9.13_pre20240925-Fix-build.patch @@ -0,0 +1,57 @@ +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, 13) ++VERSION_BASE = (3, 9, 13) ++VERSION_STRING = '3.9.13_pre20240925' +diff --git a/DisplayCAL/setup.py b/DisplayCAL/setup.py +index 27425a18..43b6143b 100644 +--- a/DisplayCAL/setup.py ++++ b/DisplayCAL/setup.py +@@ -384,9 +384,12 @@ def get_data(tgt_dir, key, pkgname=None, subkey=None, excludes=None): + data = [] + for pth in files: + if not [exclude for exclude in excludes or [] if fnmatch(pth, exclude)]: +- normalized_path = os.path.normpath(os.path.join(tgt_dir, os.path.dirname(pth))) +- safe_path = [relpath(p, src_dir) for p in safe_glob(os.path.join(src_dir, pth))] +- data.append((normalized_path, safe_path)) ++ data.append( ++ ( ++ os.path.normpath(os.path.join(tgt_dir, os.path.dirname(pth))), ++ safe_glob(os.path.join(src_dir, pth)), ++ ) ++ ) + return data + + +@@ -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 +-- +2.45.2 + |