summaryrefslogtreecommitdiff
path: root/dev-python/python-rtmidi
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-06-04 05:48:38 -0500
committerroot <root@alpha.trunkmasters.com>2026-06-04 05:48:38 -0500
commitbfd9c39e4712ebdb442d4ca0673061faed1e70e1 (patch)
tree0d7a74b4463ee387f9cf9368ceb1b757f694f72a /dev-python/python-rtmidi
parentf716a9fe6455d39eef01e718aae68dae61c19704 (diff)
downloadbaldeagleos-repo-bfd9c39e4712ebdb442d4ca0673061faed1e70e1.tar.gz
baldeagleos-repo-bfd9c39e4712ebdb442d4ca0673061faed1e70e1.tar.xz
baldeagleos-repo-bfd9c39e4712ebdb442d4ca0673061faed1e70e1.zip
Revert "Adding metadata"
This reverts commit f716a9fe6455d39eef01e718aae68dae61c19704.
Diffstat (limited to 'dev-python/python-rtmidi')
-rw-r--r--dev-python/python-rtmidi/Manifest1
-rw-r--r--dev-python/python-rtmidi/files/python-rtmidi-1.5.1-unbundle_rtmidi.patch55
-rw-r--r--dev-python/python-rtmidi/metadata.xml9
-rw-r--r--dev-python/python-rtmidi/python-rtmidi-1.5.8.ebuild60
4 files changed, 125 insertions, 0 deletions
diff --git a/dev-python/python-rtmidi/Manifest b/dev-python/python-rtmidi/Manifest
new file mode 100644
index 000000000000..193f9f36e877
--- /dev/null
+++ b/dev-python/python-rtmidi/Manifest
@@ -0,0 +1 @@
+DIST python_rtmidi-1.5.8.tar.gz 368130 BLAKE2B 99fecb8cd003431b5fca31f436a77f27a50076a02ea7f92019800d0816c968f032bd31d236a13d67b2ee9ebdc341d16955675867a8dd345e76282131b781ef13 SHA512 0f2b949a2a53f813a891bc391ce0369fbbec0d6e898a9ace2925adc5714d791ce1f4df133edf34c87b3336cb3ab4ad70851a42124241ec1707f32f66a778dc18
diff --git a/dev-python/python-rtmidi/files/python-rtmidi-1.5.1-unbundle_rtmidi.patch b/dev-python/python-rtmidi/files/python-rtmidi-1.5.1-unbundle_rtmidi.patch
new file mode 100644
index 000000000000..1501a46738d4
--- /dev/null
+++ b/dev-python/python-rtmidi/files/python-rtmidi-1.5.1-unbundle_rtmidi.patch
@@ -0,0 +1,55 @@
+--- a/meson.build
++++ b/meson.build
+@@ -11,6 +11,8 @@
+
+ cpp = meson.get_compiler('cpp')
+
++rtmidi_dep = dependency('rtmidi')
++
+ # Jack API (portable)
+ jack2_dep = dependency('jack', version: '>=1.9.11', required: false)
+ jack1_dep = dependency('jack', version: ['>=0.125.0', '<1.0'], required: false)
+--- a/rtmidi/meson.build
++++ b/rtmidi/meson.build
+@@ -1,7 +1,7 @@
+ # https://mesonbuild.com/Python-module.html
+
+ defines = []
+-dependencies = [python.dependency()]
++dependencies = [python.dependency(), rtmidi_dep]
+ link_args = []
+
+ if host_machine.system() == 'darwin' and coremidi_dep.found() and get_option('coremidi')
+@@ -47,11 +47,10 @@
+ # Build and install the extension module
+ module = python.extension_module(
+ '_rtmidi',
+- [rtmidi_cython, rtmidi_sources],
++ [rtmidi_cython],
+ dependencies: dependencies,
+ cpp_args: defines,
+ link_args: link_args,
+- include_directories: rtmidi_inc,
+ install: true,
+ subdir: 'rtmidi',
+ )
+--- a/src/meson.build
++++ b/src/meson.build
+@@ -1,9 +1,5 @@
+ fs = import('fs')
+
+-rtmidi_sources = files([
+- 'rtmidi/RtMidi.cpp',
+-])
+-rtmidi_inc = include_directories('.', 'rtmidi')
+ rtmidi_mod_pyx = '_rtmidi.pyx'
+ rtmidi_mod_cpp = '_rtmidi.cpp'
+
+@@ -16,7 +12,6 @@
+ 'rtmidi_cython',
+ output: rtmidi_mod_cpp,
+ input: rtmidi_mod_pyx,
+- depend_files: [rtmidi_sources],
+ command: [cython, '-3', '--cplus', '-o', '@OUTPUT@', '@INPUT@'],
+ )
+ else
diff --git a/dev-python/python-rtmidi/metadata.xml b/dev-python/python-rtmidi/metadata.xml
new file mode 100644
index 000000000000..fea32d854d2f
--- /dev/null
+++ b/dev-python/python-rtmidi/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <upstream>
+ <remote-id type="pypi">python-rtmidi</remote-id>
+ <remote-id type="github">SpotlightKid/python-rtmidi</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-python/python-rtmidi/python-rtmidi-1.5.8.ebuild b/dev-python/python-rtmidi/python-rtmidi-1.5.8.ebuild
new file mode 100644
index 000000000000..13030544ee5d
--- /dev/null
+++ b/dev-python/python-rtmidi/python-rtmidi-1.5.8.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{13..14} )
+DOCS_BUILDER="sphinx"
+DOCS_DEPEND="dev-python/myst-parser"
+DOCS_DIR="docs"
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=meson-python
+
+inherit distutils-r1 docs pypi
+
+DESCRIPTION="Python bindings for media-libs/rtmidi implemented using Cython"
+HOMEPAGE="
+ https://pypi.org/project/python-rtmidi/
+ https://spotlightkid.github.io/python-rtmidi/
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64"
+IUSE="+alsa jack"
+
+# Most of these tests do not play nicely with the sandbox, some only
+# work with exactly the same version of rtmidi as the bundled one, and
+# several fail even with disabled sandbox unless there are actual MIDI
+# I/O devices present.
+RESTRICT="test"
+
+DEPEND="media-libs/rtmidi[alsa?,jack?]"
+RDEPEND="${DEPEND}"
+BDEPEND="dev-python/cython[${PYTHON_USEDEP}]
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.1-unbundle_rtmidi.patch
+)
+
+distutils_enable_tests unittest
+
+src_prepare() {
+ distutils-r1_src_prepare
+
+ # Just in case
+ rm -r src/rtmidi || die
+ rm src/_rtmidi.cpp || die
+
+ # Needed by USE=doc because documentation generation happens in ${S}
+ # but the version.py generated by Meson end up in respective ${BUILD_DIR}s.
+ # The version put in ${S} should be ignored by everything except Sphinx but
+ # just in case, be consistent and generate it unconditionally.
+ sed -e "s|@VERSION@|${PV}|" < rtmidi/version.py.in > rtmidi/version.py || die
+}
+
+python_test() {
+ cd "${T}" || die
+ eunittest "${S}"/tests
+}