diff options
author | 2024-07-19 15:01:07 -0700 | |
---|---|---|
committer | 2024-07-19 15:01:59 -0700 | |
commit | 4faad5f0a66d1e80781f76a356cbf929b16931ba (patch) | |
tree | 5c95ed35a8214a94f504a7865b6ea17dd417e065 /media-sound | |
parent | dev-python/colorspacious: new package, add 1.1.2 (diff) | |
download | guru-4faad5f0a66d1e80781f76a356cbf929b16931ba.tar.gz guru-4faad5f0a66d1e80781f76a356cbf929b16931ba.tar.bz2 guru-4faad5f0a66d1e80781f76a356cbf929b16931ba.zip |
media-sound/corrscope: new package, add 0.10.0
Signed-off-by: Artemis Everfree <artemis@artemis.sh>
Diffstat (limited to 'media-sound')
-rw-r--r-- | media-sound/corrscope/Manifest | 1 | ||||
-rw-r--r-- | media-sound/corrscope/corrscope-0.10.0.ebuild | 45 | ||||
-rw-r--r-- | media-sound/corrscope/files/remove-appnope-dep.patch | 87 | ||||
-rw-r--r-- | media-sound/corrscope/metadata.xml | 12 |
4 files changed, 145 insertions, 0 deletions
diff --git a/media-sound/corrscope/Manifest b/media-sound/corrscope/Manifest new file mode 100644 index 0000000000..117f80c67e --- /dev/null +++ b/media-sound/corrscope/Manifest @@ -0,0 +1 @@ +DIST corrscope-0.10.0.tar.gz 107386 BLAKE2B af3613386ce45917b9701fa2eb3d4857a7ae8b2a0e7452ce03db00493a49ecf3e1d196e0324434261f3f652c64b31036b6bf0f9cf6541a886051445f3d29fb67 SHA512 c403ed4f740d48b720bc521c005708f7c0797fd12d7ebb2a8605f33f2b2ca0e2a7af9e38883437460f32f5515675532b9a6ba49118a8bc21190af8eb070274c2 diff --git a/media-sound/corrscope/corrscope-0.10.0.ebuild b/media-sound/corrscope/corrscope-0.10.0.ebuild new file mode 100644 index 0000000000..ff81597e0a --- /dev/null +++ b/media-sound/corrscope/corrscope-0.10.0.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 +EAPI=8 + +DISTUTILS_USE_PEP517=poetry +DISTUTILS_SINGLE_IMPL=1 +PYTHON_COMPAT=( python3_{10..12} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Advanced oscilloscope audio visualizer specializing in chiptune" +HOMEPAGE=" + https://pypi.org/project/corrscope/ + https://corrscope.github.io/corrscope/ +" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="~amd64 ~arm64" + +RDEPEND=" + $(python_gen_cond_dep ' + dev-python/ruamel-yaml[${PYTHON_USEDEP}] + dev-python/numpy[${PYTHON_USEDEP}] + dev-python/click[${PYTHON_USEDEP}] + dev-python/matplotlib[${PYTHON_USEDEP}] + dev-python/attrs[${PYTHON_USEDEP}] + dev-python/appdirs[${PYTHON_USEDEP}] + dev-python/atomicwrites[${PYTHON_USEDEP}] + dev-python/colorspacious[${PYTHON_USEDEP}] + dev-python/QtPy[${PYTHON_USEDEP}] + ') + media-video/ffmpeg +" + +PATCHES=( + # appnope is a library for disabling powersaving on macOS. corrscope + # hard-depends on this currently. appnope isn't packaged, and it seems a + # bit silly to me to package it for gentoo given its purpose, so I've just + # removed the few lines that import/invoke it. + # + # Ideally, we should upstream a fix that only conditionally imports it, + # but I don't know how to do that right now. + "${FILESDIR}"/remove-appnope-dep.patch +) diff --git a/media-sound/corrscope/files/remove-appnope-dep.patch b/media-sound/corrscope/files/remove-appnope-dep.patch new file mode 100644 index 0000000000..44e96ccfa1 --- /dev/null +++ b/media-sound/corrscope/files/remove-appnope-dep.patch @@ -0,0 +1,87 @@ +diff --git a/PKG-INFO b/PKG-INFO +index 59a2ee4..4407908 100644 +--- a/PKG-INFO ++++ b/PKG-INFO +@@ -21,7 +21,6 @@ Requires-Dist: PyQt5-Qt5 (>=5.15,<5.15.11) ; extra == "qt5" + Requires-Dist: PyQt6 (>=6.2,<7.0) ; extra == "qt6" + Requires-Dist: QtPy (>=2.0.1,<3.0.0) + Requires-Dist: appdirs (>=1.4.4,<2.0.0) +-Requires-Dist: appnope (>=0.1.3,<0.2.0) + Requires-Dist: atomicwrites (>=1.4.0,<2.0.0) + Requires-Dist: attrs (>=21.2.0,<22.0.0) + Requires-Dist: click (>=8.0.1,<9.0.0) +diff --git a/corrscope/corrscope.py b/corrscope/corrscope.py +index 79a6cba..d20b4c4 100644 +--- a/corrscope/corrscope.py ++++ b/corrscope/corrscope.py +@@ -197,11 +197,6 @@ class Arguments: + + + def worker_create_renderer(renderer_params: RendererParams, shmem_names: List[str]): +- import appnope +- +- # Disable power saving for renderer processes. +- appnope.nope() +- + global WORKER_RENDERER + global SHMEMS + +diff --git a/corrscope/gui/__init__.py b/corrscope/gui/__init__.py +index f983021..afe2993 100644 +--- a/corrscope/gui/__init__.py ++++ b/corrscope/gui/__init__.py +@@ -10,7 +10,6 @@ from pathlib import Path + from types import MethodType + from typing import Optional, List, Any, Tuple, Callable, Union, Dict, Sequence, NewType + +-import appnope + import qtpy.QtCore as qc + import qtpy.QtWidgets as qw + import attr +@@ -803,22 +802,21 @@ class CorrJob(qc.QObject): + """Called in separate thread.""" + cfg = self.cfg + arg = self.arg +- with appnope.nope_scope(reason="corrscope preview/render active"): +- try: +- self.corr = CorrScope(cfg, arg) +- self.corr.play() ++ try: ++ self.corr = CorrScope(cfg, arg) ++ self.corr.play() + +- except paths.MissingFFmpegError: +- arg.on_end() +- self.ffmpeg_missing.emit() ++ except paths.MissingFFmpegError: ++ arg.on_end() ++ self.ffmpeg_missing.emit() + +- except Exception as e: +- arg.on_end() +- stack_trace = format_stack_trace(e) +- self.error.emit(stack_trace) ++ except Exception as e: ++ arg.on_end() ++ stack_trace = format_stack_trace(e) ++ self.error.emit(stack_trace) + +- else: +- arg.on_end() ++ else: ++ arg.on_end() + + + class CorrThread(Thread): +diff --git a/pyproject.toml b/pyproject.toml +index 9c281ee..59cbe64 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -32,7 +32,6 @@ QtPy = "^2.0.1" + PyQt5 = {version = "^5.15", optional = true} + PyQt5-Qt5 = {version = "^5.15,<5.15.11", optional = true} + PyQt6 = {version = "^6.2", optional = true} +-appnope = "^0.1.3" + + [tool.poetry.extras] + qt5 = ["PyQt5", "PyQt5-Qt5"] diff --git a/media-sound/corrscope/metadata.xml b/media-sound/corrscope/metadata.xml new file mode 100644 index 0000000000..d907a29b48 --- /dev/null +++ b/media-sound/corrscope/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>artemis@artemis.sh</email> + <name>Artemis Everfree</name> + </maintainer> + <upstream> + <remote-id type="pypi">corrscope</remote-id> + <remote-id type="github">corrscope/corrscope</remote-id> + </upstream> +</pkgmetadata> |