diff --git a/acct-group/tang/tang-0.ebuild b/acct-group/tang/tang-0.ebuild
index a8e589b103..c48b2ad8f5 100644
--- a/acct-group/tang/tang-0.ebuild
+++ b/acct-group/tang/tang-0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2022 Gentoo Authors
+# Copyright 2022-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -6,6 +6,5 @@ EAPI=8
inherit acct-group
DESCRIPTION="Group for tang daemon"
-KEYWORDS="~amd64"
ACCT_GROUP_ID=-1
diff --git a/acct-user/tang/tang-0.ebuild b/acct-user/tang/tang-0.ebuild
index fd9bdbf93e..e76b2a0926 100644
--- a/acct-user/tang/tang-0.ebuild
+++ b/acct-user/tang/tang-0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2022 Gentoo Authors
+# Copyright 2022-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -6,7 +6,6 @@ EAPI=8
inherit acct-user
DESCRIPTION="User for tang daemon"
-KEYWORDS="~amd64"
ACCT_USER_ID=-1
ACCT_USER_GROUPS=( ${PN} )
diff --git a/app-text/komikku/Manifest b/app-text/komikku/Manifest
index 2bd812e20d..adf0aa64b5 100644
--- a/app-text/komikku/Manifest
+++ b/app-text/komikku/Manifest
@@ -1,2 +1,2 @@
-DIST Komikku-1.6.1.tar.bz2 4978177 BLAKE2B 1a4ae37ae640f9129df80ac9434a4c0b6850989d072132ae28759ab2bb3e84601fd1417fe7215d177083f1d206e8f9d57fbff5f660a93f5549e29fe0a59fd590 SHA512 897856e9fd817c787adee356d76f35af95e35854036003f4218cf1d7a8f2345c75171040c933bb635b8738f4c01c650651f7e2bdae7b0b81cde94624d916d2b2
DIST Komikku-v1.7.0.tar.bz2 5006494 BLAKE2B de68bc827f7a9676d48f968a1af47809148c0748637200f617e066f17fda5b98ff3b79fb099951a5d5cf4fde91b25c15643bcde3f93b9546d2d56177f6821519 SHA512 f24d7edd17d619e8f59dc3eaf2abc670ab878d4d9f669c9d8b89fa4e2848d0da25127e9d39cdc230fc515f5af329ff211f37e3c79a5130b3f9f4b724ad596efa
+DIST Komikku-v1.8.0.tar.bz2 5037222 BLAKE2B 6e1917ae54a30dc5fdb7ba3b7837354bc489518299a70ebf15b21d466845f1dd5b35794d7f2d6f6af79ccdbf5f8da307c2187279fa72ddce9d22a046ca41e860 SHA512 9d5a4f1881a53f5f59901552b1c8b50f94cac7bf4142034477a1dd7f089d07d47358282d41ecb977f55000a54d120a38d132b236e95d07cb4fff44f26fa0dc4c
diff --git a/app-text/komikku/komikku-1.6.1.ebuild b/app-text/komikku/komikku-1.8.0.ebuild
similarity index 92%
rename from app-text/komikku/komikku-1.6.1.ebuild
rename to app-text/komikku/komikku-1.8.0.ebuild
index 69fa12dd4a..058d610365 100644
--- a/app-text/komikku/komikku-1.6.1.ebuild
+++ b/app-text/komikku/komikku-1.8.0.ebuild
@@ -10,7 +10,7 @@ DISTUTILS_SINGLE_IMPL=1
inherit distutils-r1 meson gnome2-utils virtualx xdg
MY_PN="${PN^}"
-MY_P="${MY_PN}-${PV}"
+MY_P="${MY_PN}-v${PV}"
DESCRIPTION="An online/offline manga reader for GNOME"
HOMEPAGE="https://gitlab.com/valos/Komikku"
SRC_URI="https://gitlab.com/valos/${MY_PN}/-/archive/v${PV}/${MY_P}.tar.bz2"
@@ -26,7 +26,7 @@ PROPERTIES="test_network"
DEPEND="
dev-libs/glib:2
- dev-libs/gobject-introspection[${PYTHON_SINGLE_USEDEP}]
+ dev-libs/gobject-introspection
>=gui-libs/gtk-4.8.2:4
>=gui-libs/libadwaita-1.2.0[introspection]
net-libs/webkit-gtk:5[introspection]
@@ -55,6 +55,7 @@ RDEPEND="
')
"
BDEPEND="
+ sys-devel/gettext
test? (
$(python_gen_cond_dep '
dev-python/pytest-steps[${PYTHON_USEDEP}]
@@ -68,7 +69,7 @@ src_prepare() {
default
# fix broken shebang
- sed "s|py_installation.path()|'${PYTHON}'|" -i bin/meson.build || die
+ sed "s|py_installation.full_path()|'${PYTHON}'|" -i bin/meson.build || die
}
src_test() {
diff --git a/dev-cpp/cli11/Manifest b/dev-cpp/cli11/Manifest
index d0c8ce30ef..57973662c2 100644
--- a/dev-cpp/cli11/Manifest
+++ b/dev-cpp/cli11/Manifest
@@ -1,2 +1,2 @@
-DIST cli11-2.3.0.tar.gz 300720 BLAKE2B 77de82e10c973b40bb180e79b3fed7e747e2efb0937a2bdd8cc7349814733fc055282adc3f17a0b340e106f088dfba8dd08bc2c82f872c03c4e76e8f20dd3396 SHA512 82232a1390485f36ea65bc964a22bacd42caa92eae704ab08407d483e42db56816bea1c68ed233e511fc057fd88bd5313d3c6247dc2d6dfcf38127a9b86f2aa8
DIST cli11-2.3.1.tar.gz 301615 BLAKE2B f5045a50a736aa7add0e21f95b76abbabe191eaa36bf68eb1e05c90343327c6343774b5f34daa281a4ff52230679a44d280eddbc3cef0abe5bce8454d7c98ec9 SHA512 7805a3bff5ce443e93a005341680db1e618d5b0789a697daaac881f9ccac76f855ea3d43c9c5b13c33c2bf590138241df9e55d70e133562272f0859d8341af09
+DIST cli11-2.3.2.tar.gz 303507 BLAKE2B 68a1ca97fb55a4329f7d56a7d661f71f356bebcb0878421bccb18093aab171cff963f4e3e8f47b95cac4947ebbd7c7d6c853cc28e404c07091685ba1e99ac8d3 SHA512 f48b289d52034c47b90db58c035a123b464bed488cf31bcdbe10a692214a5c05e62b99d6fb7c4b065f42df862ecf3813f11dd533b3697939d761e99d2b89c2ec
diff --git a/dev-cpp/cli11/cli11-2.3.0.ebuild b/dev-cpp/cli11/cli11-2.3.2.ebuild
similarity index 100%
rename from dev-cpp/cli11/cli11-2.3.0.ebuild
rename to dev-cpp/cli11/cli11-2.3.2.ebuild
diff --git a/dev-cpp/dpp/Manifest b/dev-cpp/dpp/Manifest
new file mode 100644
index 0000000000..e250f4a890
--- /dev/null
+++ b/dev-cpp/dpp/Manifest
@@ -0,0 +1,3 @@
+DIST dpp-10.0.21-fix-install.patch 4090 BLAKE2B b4177190fb620952619ed5a0e4147a9adde4871f00643129b1f1140152718816cbcc1099c25e0b350c65ede56c2c5f373aeaf6345c382ba953c3ad32e9e3f2fd SHA512 8dd9a5f7db0097bc7de8e0a50253bc144786786331e3cfbfb00884925c41746e7a81bd2f87254d3bcc8d72bb820415bd92013cd0968950533bffa382bc53f279
+DIST dpp-10.0.21.tar.gz 13706441 BLAKE2B e7e68d4d121d17ad840790f14375ddc4e3c95c56ced03a90667b8b838205f3e46162bc9d60ea33d50a619335c7395318a9dd47583eddca3e73481879fe35f393 SHA512 a335886cdde5772b5602426e68c50d91e921cd127bcb918066c450b39fc5b0cf87ae692096140e76176d87265bd0d9de1fbb9d808a1f217dc2c8ef27210ad57f
+DIST dpp-10.0.22.tar.gz 13712205 BLAKE2B b935b763f87bfd1058e72f8d297fda136f532a03a5b9f3a6e3471f0ce64988c9615105fb1eb9b19192844cdaab9d332f355dfc22f8bcdbf977eec3eb5f0b8df3 SHA512 6c71673b47d559ef4f04b30cd72a3bd0a31b72ffe6d73dd17470a7e754eba75d21218ebd247702441db45549e5dcea9b200f3d435dd3a9af76fda90740ca4f1a
diff --git a/dev-cpp/dpp/dpp-10.0.21.ebuild b/dev-cpp/dpp/dpp-10.0.21.ebuild
new file mode 100644
index 0000000000..f8bb48f576
--- /dev/null
+++ b/dev-cpp/dpp/dpp-10.0.21.ebuild
@@ -0,0 +1,63 @@
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="Lightweight C++ Discord bot library"
+HOMEPAGE="https://dpp.dev/ https://github.com/brainboxdotcc/DPP"
+SRC_URI="
+ https://github.com/brainboxdotcc/DPP/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
+ https://patch-diff.githubusercontent.com/raw/brainboxdotcc/DPP/pull/591.patch -> ${P}-fix-install.patch
+"
+
+LICENSE="Apache-2.0"
+# DPP is extremely ABI instable due to frequent changes in the Discord API
+# See https://github.com/brainboxdotcc/DPP/issues/207#issuecomment-1007030157
+SLOT="0/${PV}"
+KEYWORDS="~amd64"
+IUSE="voice"
+
+RDEPEND="
+ dev-libs/openssl:=
+ sys-libs/zlib:=
+
+ voice? (
+ dev-libs/libsodium:=
+ media-libs/opus
+ )
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ # Backport of the installation fixes, remove after 10.0.21
+ "${DISTDIR}/${P}-fix-install.patch"
+)
+
+S="${WORKDIR}/DPP-${PV}"
+
+DOCS=( "README.md" "SECURITY.md" )
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_SHARED_LIBS=true
+ -DBUILD_VOICE_SUPPORT=$(usex voice)
+ -DRUN_LDCONFIG=false
+ # Tests require network access
+ -DDPP_BUILD_TEST=false
+ -DDPP_NO_VCPKG=true
+ )
+
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+
+ # Installation fix, remove after 10.0.21
+ mv \
+ "${ED}"/usr/$(get_libdir)/cmake/dpp/libdpp-config.cmake \
+ "${ED}"/usr/$(get_libdir)/cmake/dpp/dpp-config.cmake \
+ || die "Failed to fix libdpp.cmake file name"
+}
diff --git a/dev-cpp/dpp/dpp-10.0.22.ebuild b/dev-cpp/dpp/dpp-10.0.22.ebuild
new file mode 100644
index 0000000000..6efc34565e
--- /dev/null
+++ b/dev-cpp/dpp/dpp-10.0.22.ebuild
@@ -0,0 +1,47 @@
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="Lightweight C++ Discord bot library"
+HOMEPAGE="https://dpp.dev/ https://github.com/brainboxdotcc/DPP"
+SRC_URI="
+ https://github.com/brainboxdotcc/DPP/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
+"
+
+LICENSE="Apache-2.0"
+# DPP is extremely ABI instable due to frequent changes in the Discord API
+# See https://github.com/brainboxdotcc/DPP/issues/207#issuecomment-1007030157
+SLOT="0/${PV}"
+KEYWORDS="~amd64"
+IUSE="voice"
+
+RDEPEND="
+ dev-libs/openssl:=
+ sys-libs/zlib:=
+
+ voice? (
+ dev-libs/libsodium:=
+ media-libs/opus
+ )
+"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/DPP-${PV}"
+
+DOCS=( "README.md" "SECURITY.md" )
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_SHARED_LIBS=true
+ -DBUILD_VOICE_SUPPORT=$(usex voice)
+ -DRUN_LDCONFIG=false
+ # Tests require network access
+ -DDPP_BUILD_TEST=false
+ -DDPP_NO_VCPKG=true
+ )
+
+ cmake_src_configure
+}
diff --git a/dev-cpp/dpp/metadata.xml b/dev-cpp/dpp/metadata.xml
new file mode 100644
index 0000000000..fe07685949
--- /dev/null
+++ b/dev-cpp/dpp/metadata.xml
@@ -0,0 +1,17 @@
+
+
+
+
+ nex+b-g-o@nexadn.de
+ Adrian Schollmeyer
+
+
+ samuel@seals-are-bouncy.tech
+
+
+
+ brainboxdotcc/dpp
+
+
diff --git a/dev-nim/cligen/Manifest b/dev-nim/cligen/Manifest
index e3219283f8..cfc575b2f6 100644
--- a/dev-nim/cligen/Manifest
+++ b/dev-nim/cligen/Manifest
@@ -1,2 +1,2 @@
-DIST cligen-1.5.32.tar.gz 427842 BLAKE2B ca950deeec655ae30e756c81e281ff31c3bae9cd39c31aae6a33042b91a2fe57332210483e13ad047403c9c065d79d8757f40d6b858b1f6b412666ef7c49351b SHA512 c8f2711d458443f1917c539354db04f22f4d0d0d9e8a7edecf7f798319d5ab64b11c82c840694e7a00e07ba960c39d26079e196c36574d7f37dea7125daa2dd6
DIST cligen-1.5.33.tar.gz 429027 BLAKE2B 8dd797a175435a6dd43f04e86f0e882f745533b97572871fffb040c617a7457cee43d3dda53591823c82dcec42aca396d7831d5e309c87923281529b7c41c1c0 SHA512 6a29bd6b2448161b5d76d96b2d1c3b330b84ab7d1863b4e0b6982939c89da86e251f7df7606ef9f73bdd1b1066fb9496f315b471407ffe0d73b56f73da9ea62e
+DIST cligen-1.5.36.tar.gz 429453 BLAKE2B 12b4dece85d13f092029025ec5affc7c8078bdec6f06c43d20c9d207ab911561348330f9e5c835e14d6ee5bf0444793e7cdc4b31acddeed0ac1c88ab8123f6d1 SHA512 04615f5aa19f4646437f66f3c3faec89a2b9f0d7293df06fc39f2ffdf29e8b66cc050c063bf5c08ad600a6165ac4ba40d88db64a121d79a8fa61a20d2f627968
diff --git a/dev-nim/cligen/cligen-1.5.32.ebuild b/dev-nim/cligen/cligen-1.5.36.ebuild
similarity index 100%
rename from dev-nim/cligen/cligen-1.5.32.ebuild
rename to dev-nim/cligen/cligen-1.5.36.ebuild
diff --git a/dev-python/SQLAlchemy-Utils/Manifest b/dev-python/SQLAlchemy-Utils/Manifest
index 8ea838e16e..799d6048e8 100644
--- a/dev-python/SQLAlchemy-Utils/Manifest
+++ b/dev-python/SQLAlchemy-Utils/Manifest
@@ -1,2 +1,2 @@
-DIST SQLAlchemy-Utils-0.37.9.tar.gz 136639 BLAKE2B e9e92b185ff45cfee5b1a6e59e78ae819ef15e419e178e8773f6f76d0681e6c047b8124c17b95e49c0a1badff13f27c3718d0f68f67523eabe6333a665d5a134 SHA512 5186ea01d5fab000b79496a501321846b326336cb1e725520acd4512e2d129e51b8887d95f3ca6109575b1263fde0178a84ca7d37da06d8b410bc97649c76f14
DIST SQLAlchemy-Utils-0.38.2.tar.gz 136800 BLAKE2B 13d1470c65a6eeb198d6846a85f4b9d0a1476fd95eed24d1a06ff3cc9a87fb56243f39bd6b542b7e5749551270e03d8345f5a3da5a1f1e548cfe757c81b26d49 SHA512 2dc98549501e3b8fc3ad77aa14f31940e9aa73999d699bb1a2d4be424eb3bff38a3fc8cacf8774e42f816c1b31cc1ccc4e9955cf1dae2fd3a2b9e4e0f0b18cc7
+DIST SQLAlchemy-Utils-0.39.0.tar.gz 137193 BLAKE2B 8af238a4826d2a5f5c71880997ab25ca45c72c6a6099c1bb913c6fac70e0feca4c53238d2f05f29efe1226893ee03916c73cb8f1f69d12dd1e298277feec3d5c SHA512 3d276a76867da223242c13b9e883f7c834d54e28a0cf7a3a5382cfbff4051ef0f3c05ccbb97bca78fa0394b665c5013185e4127ca9944cc517340e37aa8ddcf9
diff --git a/dev-python/SQLAlchemy-Utils/SQLAlchemy-Utils-0.37.9.ebuild b/dev-python/SQLAlchemy-Utils/SQLAlchemy-Utils-0.39.0.ebuild
similarity index 92%
rename from dev-python/SQLAlchemy-Utils/SQLAlchemy-Utils-0.37.9.ebuild
rename to dev-python/SQLAlchemy-Utils/SQLAlchemy-Utils-0.39.0.ebuild
index ca89b0b6be..0f0faee2f6 100644
--- a/dev-python/SQLAlchemy-Utils/SQLAlchemy-Utils-0.37.9.ebuild
+++ b/dev-python/SQLAlchemy-Utils/SQLAlchemy-Utils-0.39.0.ebuild
@@ -1,11 +1,10 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-EPYTEST_DESELECT=( tests/types/test_timezone.py )
PYTHON_COMPAT=( python3_{8..10} )
-
+DISTUTILS_USE_PEP517=setuptools
inherit distutils-r1
DESCRIPTION="Various utility functions and datatypes for SQLAlchemy"
diff --git a/dev-python/azure-core/Manifest b/dev-python/azure-core/Manifest
index 5bcbdfcfb4..2f7cd29f4c 100644
--- a/dev-python/azure-core/Manifest
+++ b/dev-python/azure-core/Manifest
@@ -1 +1,2 @@
DIST azure-core-1.26.1.zip 366521 BLAKE2B 538aa1699bc708744800f98391d4913f3bed561718f9143394d4f6b7cbe18097054e941882f6237e9c8fef2d218c955f3b0a8c2cb23e51121c05cb5437afd4f9 SHA512 dcddf28bdbac913e66640adb7c511c74e4597756c444d2ef43fb82d5348eae391544715cbe95600d8caec9afcfe8ab5d20b9b33c49b8fd026b8f0f7657cae931
+DIST azure-core-1.26.2.zip 368264 BLAKE2B 72c611f506c1773917a15dd354b8d97922d7f5b24e114a4e45a7fb3a65505ae5019aa4b6993c37c3840d6bffce648cb2b065904420cc3034209f58e55d2513f7 SHA512 3084c8f24d01e4a283175839be673061b8de13ffa85ab956f3753bd64cd0efb4eff421e239a41433834a8de9a3af620ddb27f24f1fcb475ec963456c0a86a084
diff --git a/dev-python/azure-core/azure-core-1.26.2.ebuild b/dev-python/azure-core/azure-core-1.26.2.ebuild
new file mode 100644
index 0000000000..b2487e7102
--- /dev/null
+++ b/dev-python/azure-core/azure-core-1.26.2.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
+DISTUTILS_USE_PEP517=setuptools
+inherit distutils-r1 optfeature
+
+DESCRIPTION="Microsoft Azure Core Library for Python"
+HOMEPAGE="
+ https://pypi.org/project/azure-core/
+ https://github.com/Azure/azure-sdk-for-python
+"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.zip"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+RESTRICT="test"
+
+RDEPEND="
+ dev-python/requests[${PYTHON_USEDEP}]
+ dev-python/six[${PYTHON_USEDEP}]
+ dev-python/typing-extensions[${PYTHON_USEDEP}]
+"
+BDEPEND="app-arch/unzip"
+# TODO: package azure-sdk-tools
+#BDEPEND="
+# app-arch/unzip
+# test? (
+# dev-python/aiohttp[${PYTHON_USEDEP}]
+# dev-python/azure-sdk-tools[${PYTHON_USEDEP}]
+# dev-python/flask[${PYTHON_USEDEP}]
+# dev-python/msrest[${PYTHON_USEDEP}]
+# dev-python/pytest-trio[${PYTHON_USEDEP}]
+# dev-python/requests[${PYTHON_USEDEP}]
+# )
+#"
+
+DOCS=( {CHANGELOG,CLIENT_LIBRARY_DEVELOPER,README}.md )
+
+distutils_enable_tests pytest
+
+pkg_postinst() {
+ optfeature "aio support" dev-python/aiohttp
+}
diff --git a/dev-python/sphinx-argparse-cli/Manifest b/dev-python/sphinx-argparse-cli/Manifest
index aa44468724..5cab68fc14 100644
--- a/dev-python/sphinx-argparse-cli/Manifest
+++ b/dev-python/sphinx-argparse-cli/Manifest
@@ -1,2 +1,2 @@
-DIST sphinx_argparse_cli-1.8.2.tar.gz 21990 BLAKE2B fda2e87902fa8682a183aa4a16fd80f686a6f0144c4b61d2f8e3840c857b937e27422d2e2c3f346296ef79cc4624ad535ab892409d1633c782343c256d08a763 SHA512 bbc26b0171b20e62a17e130a91b962785ec9edad98b9e838e7a82fe9d464397ac4b12b33c4556253a47320aae2c3e695f938bee04e6583cfbabfe0383955a2d5
+DIST sphinx-argparse-cli-1.11.0.gh.tar.gz 18745 BLAKE2B 9660fc48b80885a9968cb664abd1234d8718d4757e64b0642a46e6fcab9b95c5888cb47acd0b731a88ee8da309a6325eca5ff06b6acac200553caf6446ef92f9 SHA512 adb1c9c2c04cc2d714403806b71705a09ea085e562bd2e97d73249e5b33a1341880151b200a96734291606318acc4d8f7c23d3d42798e677744a37496d88d5ac
DIST sphinx_argparse_cli-1.9.0.tar.gz 23389 BLAKE2B 790db176b789945ebe786ef38cc35a516d8422d0139e5f2b9070acd4a64504d6f0f58793608259bde053cda99e0cad774971cc9c972602b104d3714f48543322 SHA512 effc9c107c184b91c4f13b0c4ce3c3d7559007373e1851bc7802a1832f3056a7d4c715520184392aa49c615a23f000f0c50639bcb8b82e3f98bdb1741e60e935
diff --git a/dev-python/sphinx-argparse-cli/sphinx-argparse-cli-1.8.2.ebuild b/dev-python/sphinx-argparse-cli/sphinx-argparse-cli-1.11.0.ebuild
similarity index 51%
rename from dev-python/sphinx-argparse-cli/sphinx-argparse-cli-1.8.2.ebuild
rename to dev-python/sphinx-argparse-cli/sphinx-argparse-cli-1.11.0.ebuild
index 969b77f4e0..8141001d61 100644
--- a/dev-python/sphinx-argparse-cli/sphinx-argparse-cli-1.8.2.ebuild
+++ b/dev-python/sphinx-argparse-cli/sphinx-argparse-cli-1.11.0.ebuild
@@ -3,19 +3,24 @@
EAPI=8
-PYTHON_COMPAT=( python3_{8..10} )
+DISTUTILS_USE_PEP517=hatchling
+PYTHON_COMPAT=( python3_{8..11} ) # no pypy3 support
inherit distutils-r1
-MY_PN="${PN//-/_}"
DESCRIPTION="Render CLI arguments (sub-commands friendly) defined by argparse module"
HOMEPAGE="https://github.com/tox-dev/sphinx-argparse-cli https://pypi.org/project/sphinx-argparse-cli/"
-SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_PN}-${PV}.tar.gz"
-S="${WORKDIR}/${MY_PN}-${PV}"
+SRC_URI="https://github.com/tox-dev/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.gh.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
-RDEPEND="dev-python/sphinx[${PYTHON_USEDEP}]"
+RDEPEND="
+ >=dev-python/sphinx-5.3.0[${PYTHON_USEDEP}]
+ =dev-haskell/exceptions-0.6:=[profile?]
- >=dev-haskell/filepath-bytestring-1.4.2.1.0:=[profile?]
- dev-haskell/hslogger:=[profile?]
- dev-haskell/ifelse:=[profile?]
- dev-haskell/mtl:=[profile?]
- >=dev-haskell/network-2.6:=[profile?]
- >=dev-haskell/network-uri-2.6:=[profile?]
- >=dev-haskell/optparse-applicative-0.14.1:=[profile?]
- dev-haskell/quickcheck:2=[profile?]
- dev-haskell/split:=[profile?]
- dev-haskell/text:=[profile?]
- >=dev-haskell/unix-compat-0.5:=[profile?]
- dev-haskell/utf8-string:=[profile?]
- >=dev-lang/ghc-8.4.3:=[profile?]
-"
-DEPEND="
- ${RDEPEND}
- >=dev-haskell/cabal-2.2.0.1
- >=dev-haskell/filepath-bytestring-1.4.2.1.1
-"
diff --git a/dev-vcs/git-repair/metadata.xml b/dev-vcs/git-repair/metadata.xml
deleted file mode 100644
index c698af2344..0000000000
--- a/dev-vcs/git-repair/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
- contact@hacktivis.me
- Haelwenn (lanodan) Monnier
-
-
diff --git a/games-fps/assaultcube/assaultcube-1.3.0.2.ebuild b/games-fps/assaultcube/assaultcube-1.3.0.2.ebuild
index 0eb39ae038..25001c0611 100644
--- a/games-fps/assaultcube/assaultcube-1.3.0.2.ebuild
+++ b/games-fps/assaultcube/assaultcube-1.3.0.2.ebuild
@@ -30,7 +30,10 @@ PATCHES=(
"${FILESDIR}/${PN}-1.3.0.2-respect-ldflags.patch"
# a script which checks for required libs and certain parts of the game
"${FILESDIR}/${PN}-1.3.0.2-fix-checkinstall.patch"
+ "${FILESDIR}/0001-Fix-unnecessary-rebuild-on-make-install.patch"
+ "${FILESDIR}/0002-Don-t-configure-libenet-in-Makefile.patch"
)
+RESTRICT="mirror"
src_prepare() {
default
@@ -39,12 +42,16 @@ src_prepare() {
src_configure() {
filter-lto
+ cd source/enet && ./configure \
+ --enable-shared=no \
+ --enable-static=yes
}
src_compile() {
if use debug; then
local -x DEBUGBUILD=1
fi
+ emake -C source/enet
emake -C source/src
}
@@ -66,7 +73,7 @@ src_install() {
Game \
"Keywords=assaultcube;game;fps;\nMimeType=x-scheme-handler/assaultcube"
- dosym "${EPREFIX}/usr/share/assaultcube/assaultcube.sh" usr/bin/assaultcube
+ dosym -r "${EPREFIX}/usr/share/assaultcube/assaultcube.sh" "${EPREFIX}/usr/bin/assaultcube"
}
pkg_postinst() {
diff --git a/games-fps/assaultcube/files/0001-Fix-unnecessary-rebuild-on-make-install.patch b/games-fps/assaultcube/files/0001-Fix-unnecessary-rebuild-on-make-install.patch
new file mode 100644
index 0000000000..c024fa4343
--- /dev/null
+++ b/games-fps/assaultcube/files/0001-Fix-unnecessary-rebuild-on-make-install.patch
@@ -0,0 +1,76 @@
+From 29c82c04a88d6d96866550b5e6c1c972d248ba5f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Duje=20Mihanovi=C4=87?=
+Date: Thu, 5 Jan 2023 14:52:09 +0100
+Subject: [PATCH 1/2] Fix unnecessary rebuild on 'make install'
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Duje Mihanović
+---
+ source/src/Makefile | 27 ++++++++++++++++-----------
+ 1 file changed, 16 insertions(+), 11 deletions(-)
+
+diff --git a/source/src/Makefile b/source/src/Makefile
+index 61da2b7..9ecf691 100644
+--- a/source/src/Makefile
++++ b/source/src/Makefile
+@@ -158,7 +158,7 @@ all: client server
+ ../enet/Makefile:
+ cd ../enet; ./configure --enable-shared=no --enable-static=yes
+
+-libenet: ../enet/Makefile
++../enet/.libs/libenet.la: ../enet/Makefile
+ -$(MAKE) -C ../enet all
+
+ clean-enet: ../enet/Makefile
+@@ -201,24 +201,27 @@ client_install: client
+ server_install: server
+
+ else
+-client: libenet $(CLIENT_OBJS)
+- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o ac_client $(CLIENT_OBJS) $(CLIENT_LIBS)
++ac_client: ../enet/.libs/libenet.la $(CLIENT_OBJS)
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(CLIENT_OBJS) $(CLIENT_LIBS)
++client: ac_client
+
+-server: libenet $(SERVER_OBJS)
+- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o ac_server $(SERVER_OBJS) $(SERVER_LIBS)
+-master: libenet $(MASTER_OBJS)
+- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o ac_master $(MASTER_OBJS) $(SERVER_LIBS)
++ac_server: ../enet/.libs/libenet.la $(SERVER_OBJS)
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(SERVER_OBJS) $(SERVER_LIBS)
++server: ac_server
+
+-client_install: client
++ac_master: ../enet/.libs/libenet.la $(MASTER_OBJS)
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(MASTER_OBJS) $(SERVER_LIBS)
++
++client_install: ac_client
+ install -d ../../bin_unix/
+- install -m755 ac_client ../../bin_unix/$(PLATFORM_PREFIX)_client
++ install -m755 $< ../../bin_unix/$(PLATFORM_PREFIX)_client
+ #ifneq (,$(STRIP))
+ # $(STRIP) ../../bin_unix/$(PLATFORM_PREFIX)_client
+ #endif
+
+-server_install: server
++server_install: ac_server
+ install -d ../../bin_unix/
+- install -m755 ac_server ../../bin_unix/$(PLATFORM_PREFIX)_server
++ install -m755 $< ../../bin_unix/$(PLATFORM_PREFIX)_server
+ #ifneq (,$(STRIP))
+ # $(STRIP) ../../bin_unix/$(PLATFORM_PREFIX)_server
+ #endif
+@@ -233,6 +236,8 @@ depend:
+ makedepend -a -o-standalone.o -Y -I. -Ibot $(subst -standalone.o,.cpp,$(SERVER_OBJS))
+ makedepend -a -o-standalone.o -Y -I. $(subst -standalone.o,.cpp,$(filter-out $(SERVER_OBJS), $(MASTER_OBJS)))
+
++.PHONY: client server install
++
+ # DO NOT DELETE
+
+ crypto.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
+--
+2.38.2
+
diff --git a/games-fps/assaultcube/files/0002-Don-t-configure-libenet-in-Makefile.patch b/games-fps/assaultcube/files/0002-Don-t-configure-libenet-in-Makefile.patch
new file mode 100644
index 0000000000..7a2f32abfa
--- /dev/null
+++ b/games-fps/assaultcube/files/0002-Don-t-configure-libenet-in-Makefile.patch
@@ -0,0 +1,45 @@
+From ab7618606b8358245b13dc5a7291fa3b0211fd10 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Duje=20Mihanovi=C4=87?=
+Date: Thu, 5 Jan 2023 15:14:48 +0100
+Subject: [PATCH 2/2] Don't configure libenet in Makefile
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This shall be done in the ebuild's src_configure instead.
+
+Signed-off-by: Duje Mihanović
+---
+ source/src/Makefile | 9 +++------
+ 1 file changed, 3 insertions(+), 6 deletions(-)
+
+diff --git a/source/src/Makefile b/source/src/Makefile
+index 9ecf691..6607f91 100644
+--- a/source/src/Makefile
++++ b/source/src/Makefile
+@@ -155,19 +155,16 @@ default: all
+
+ all: client server
+
+-../enet/Makefile:
+- cd ../enet; ./configure --enable-shared=no --enable-static=yes
+-
+-../enet/.libs/libenet.la: ../enet/Makefile
++../enet/.libs/libenet.la:
+ -$(MAKE) -C ../enet all
+
+-clean-enet: ../enet/Makefile
++clean-enet:
+ $(MAKE) -C ../enet/ clean
+
+ clean:
+ -$(RM) $(CLIENT_PCH) $(CLIENT_OBJS) $(SERVER_OBJS) $(MASTER_OBJS) ac_client ac_server ac_master
+
+-mrproper: clean ../enet/Makefile
++mrproper: clean
+ $(MAKE) -C ../enet/ distclean
+ -$(RM) ../enet/Makefile
+
+--
+2.38.2
+
diff --git a/kde-apps/tokodon/Manifest b/kde-apps/tokodon/Manifest
index fefefcd17c..55d41b6ff3 100644
--- a/kde-apps/tokodon/Manifest
+++ b/kde-apps/tokodon/Manifest
@@ -1 +1,2 @@
DIST tokodon-21.11.1.tar.xz 165120 BLAKE2B 240e3028deeb7b15b62344c7e0a66f593f92a6b716c435eed4d402ec3b4ab2816c421e8054cc086d37930706889448ae72a5d7989344b6bcb4731552a2f04213 SHA512 059c760f749e006365464bfcbc13aef420991b3047c398d5cb2dbea2b76ba211428e112594402c558f9ec742d532c74ff7fc7739a27357d61c6bcd416c19403d
+DIST tokodon-23.01.0.tar.xz 189660 BLAKE2B 5ce4652c227fca34bc24a567d25f4ea05bbfb197d85c6243c2253c6653478f4b3950b26af1257018943abaa36669d7013940554689e341fc82080f3baa166b1f SHA512 c7ee8d0b3599b9e729f36097b49faf5b9188898dc4cdd23f98bbb80d4860de0ddade0bc519d6aa91f6e4c92ad62871855569614c15666de7bb8fb70b192429d9
diff --git a/kde-apps/tokodon/tokodon-23.01.0.ebuild b/kde-apps/tokodon/tokodon-23.01.0.ebuild
new file mode 100644
index 0000000000..ee63446bc3
--- /dev/null
+++ b/kde-apps/tokodon/tokodon-23.01.0.ebuild
@@ -0,0 +1,47 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+KFMIN=5.77.0
+QTMIN=5.15.0
+ECM_TEST=optional
+inherit ecm
+
+DESCRIPTION="Mastodon client for Plasma and Plasma Mobile"
+HOMEPAGE="https://invent.kde.org/network/tokodon"
+SRC_URI="mirror://kde/stable/${PN}/${P}.tar.xz"
+
+LICENSE="|| ( GPL-2 GPL-3 ) AGPL-3+ CC-BY-SA-4.0 CC0-1.0 GPL-2+ GPL-3 GPL-3+ LGPL-2+ LGPL-2.1+ MIT"
+SLOT="5"
+KEYWORDS="~amd64"
+
+DEPEND="
+ >=dev-libs/kirigami-addons-0.6:5
+ dev-libs/qtkeychain[qt5(+)]
+ >=dev-qt/qtdeclarative-${QTMIN}:5
+ >=dev-qt/qtgui-${QTMIN}:5
+ >=dev-qt/qtmultimedia-${QTMIN}:5
+ >=dev-qt/qtnetwork-${QTMIN}:5
+ >=dev-qt/qtquickcontrols2-${QTMIN}:5
+ >=dev-qt/qtsvg-${QTMIN}:5
+ >=dev-qt/qtwebsockets-${QTMIN}:5
+ >=dev-qt/qtwidgets-${QTMIN}:5
+ >=kde-frameworks/kconfig-${KFMIN}:5
+ >=kde-frameworks/kcoreaddons-${KFMIN}:5
+ >=kde-frameworks/kdbusaddons-${KFMIN}:5
+ >=kde-frameworks/ki18n-${KFMIN}:5
+ >=kde-frameworks/kio-${KFMIN}:5
+ >=kde-frameworks/kirigami-${KFMIN}:5
+ >=kde-frameworks/kitemmodels-${KFMIN}:5
+ >=kde-frameworks/knotifications-${KFMIN}:5
+ >=kde-frameworks/kwindowsystem-${KFMIN}:5
+ >=kde-frameworks/qqc2-desktop-style-${KFMIN}:5
+ >=kde-frameworks/sonnet-${KFMIN}:5
+"
+RDEPEND="${DEPEND}"
+
+src_test() {
+ local -x QT_QPA_PLATFORM=offscreen
+ ecm_src_test
+}
diff --git a/media-sound/opensoundmeter/Manifest b/media-sound/opensoundmeter/Manifest
index 3d1338830b..1cbf64c3a9 100644
--- a/media-sound/opensoundmeter/Manifest
+++ b/media-sound/opensoundmeter/Manifest
@@ -1 +1,2 @@
DIST opensoundmeter-1.2.1.gh.tar.gz 41006647 BLAKE2B a3ab132f8a90497132dae3144dd91d162111754e79056bb95ae2f638f65dc6074d2dbc1739c07897f6b2771edfe82c284aea1a48cc9af9454a91698c6915fb5b SHA512 41701377b5df85e08664b68fe102cb6da5d57e70c0366bb5aafc681c926ba7da0622cceb218998bd677e3313f2727b7ecfcb4fcfb5f80fa1fd87334e2a27c377
+DIST opensoundmeter-1.2.2.gh.tar.gz 41041122 BLAKE2B f04441b5d672bb3f2dfcafcd0a69a272f2196972eff5ec99f3990c822edb35513bc9c27e07adeb58711a5355c1de280433f39baf0002ce3a9424c507988f758e SHA512 3cc848133b51a0409401347bdfccfe12b82b7fb07b8925593ee5b14053ac51ccb84c71960fc0d6e888f7a31baa78dba970588150a41a5f5d13fa54792806edc9
diff --git a/media-sound/opensoundmeter/files/opensoundmeter-deadlock-fix.patch b/media-sound/opensoundmeter/files/opensoundmeter-deadlock-fix.patch
new file mode 100644
index 0000000000..4719fd7888
--- /dev/null
+++ b/media-sound/opensoundmeter/files/opensoundmeter-deadlock-fix.patch
@@ -0,0 +1,64 @@
+diff --git a/src/audio/plugins/alsa.cpp b/src/audio/plugins/alsa.cpp
+index 9987ba3..61537f2 100644
+--- a/src/audio/plugins/alsa.cpp
++++ b/src/audio/plugins/alsa.cpp
+@@ -16,6 +16,7 @@
+ * along with this program. If not, see .
+ */
+ #include "alsa.h"
++#include
+ #include
+ #include
+ #define ALSA_BUFFER_SIZE 1024
+@@ -175,23 +176,26 @@ Format AlsaPlugin::deviceFormat(const DeviceInfo::Id &id, const Plugin::Directio
+ Stream *AlsaPlugin::open(const DeviceInfo::Id &id, const Plugin::Direction &mode, const Format &format,
+ QIODevice *endpoint)
+ {
+- std::lock_guard lock(m_deviceListMutex);
++ std::unique_lock lock(m_deviceListMutex, std::defer_lock);
+ if (id.isNull()) {
+ return nullptr;
+ }
+
++ assert(!lock.owns_lock());
++ lock.lock();
+ AlsaPCMDevice *device = m_devices[ {mode, id}];
+ if (!device) {
+ device = new AlsaPCMDevice(id, mode, format, m_deviceListMutex);
+ connect (device, &AlsaPCMDevice::closed, this, [this, mode, id, device]() {
+- //mutex is locked here by device
++ std::lock_guard lock{m_deviceListMutex};
+ m_devices[ {mode, id}] = nullptr;
+ device->deleteLater();
+- m_deviceListMutex.unlock();
+ });
+
+ m_devices[ {mode, id}] = device;
+ }
++ assert(lock.owns_lock());
++ lock.unlock();
+ if (!device->start()) {
+ return nullptr;
+ }
+@@ -326,14 +330,18 @@ bool AlsaPCMDevice::start()
+ }
+ QCoreApplication::processEvents();
+ if (m_callbacks.empty()) {
+- m_mutex.lock();
++ std::unique_lock lock{m_mutex};
+ if (m_keepAlive) {
++ lock.unlock();
+ QCoreApplication::processEvents();
++ lock.lock();
+ } else {
+- m_threadActive = false;
++ assert(lock.owns_lock());
++ lock.unlock();
+ break;
+ }
+- m_mutex.unlock();
++ assert(lock.owns_lock());
++ lock.unlock();
+ }
+ m_threadActive = true;
+ m_keepAlive = false;
diff --git a/media-sound/opensoundmeter/files/opensoundmeter-jack-support.patch b/media-sound/opensoundmeter/files/opensoundmeter-jack-support.patch
new file mode 100644
index 0000000000..b5c7ad9c9c
--- /dev/null
+++ b/media-sound/opensoundmeter/files/opensoundmeter-jack-support.patch
@@ -0,0 +1,668 @@
+diff --git a/.travis.yml b/.travis.yml
+index ce9e997..2b6fbe4 100644
+--- a/.travis.yml
++++ b/.travis.yml
+@@ -10,11 +10,12 @@ before_install:
+ install:
+ - sudo apt-get install build-essential libgl1-mesa-dev
+ - sudo apt-get install qt514base qt514multimedia qt514quickcontrols2
++ - sudo apt-get install libjack-dev
+ - source /opt/qt514/bin/qt514-env.sh
+
+
+ script:
+- - /opt/qt514/bin/qmake PREFIX=/usr
++ - /opt/qt514/bin/qmake PREFIX=/usr CONFIG+=jack
+ - make
+ - # Generate AppImage
+ # - sudo apt-get -y install checkinstall
+diff --git a/OpenSoundMeter.pro b/OpenSoundMeter.pro
+index a52b502..f9cef4a 100644
+--- a/OpenSoundMeter.pro
++++ b/OpenSoundMeter.pro
+@@ -300,6 +300,18 @@ unix:!macx:!ios {
+ src/audio/plugins/alsa.cpp
+
+ LIBS += -lasound
++
++ CONFIG(jack) {
++ HEADERS += \
++ src/audio/plugins/jack.h
++
++ SOURCES += \
++ src/audio/plugins/jack.cpp
++
++ LIBS += -ljack
++
++ DEFINES += USE_JACK
++ }
+ }
+
+ GRAPH = $$(GRAPH_BACKEND)
+diff --git a/src/audio/client.cpp b/src/audio/client.cpp
+index d319c72..db7c377 100644
+--- a/src/audio/client.cpp
++++ b/src/audio/client.cpp
+@@ -35,6 +35,10 @@
+ #include "plugins/alsa.h"
+ #endif
+
++#ifdef USE_JACK
++#include "plugins/jack.h"
++#endif
++
+ #ifdef USE_ASIO
+ #include "plugins/asioplugin.h"
+ #endif
+@@ -89,6 +93,10 @@ void Client::initPlugins()
+ m_plugins.push_back(QSharedPointer(new AlsaPlugin()));
+ #endif
+
++#ifdef USE_JACK
++ m_plugins.push_back(QSharedPointer(new JackPlugin()));
++#endif
++
+ for (auto &&plugin : m_plugins) {
+ connect(plugin.data(), &Plugin::deviceListChanged, this, [this]() {
+ refreshDeviceList();
+diff --git a/src/audio/plugins/jack.cpp b/src/audio/plugins/jack.cpp
+new file mode 100644
+index 0000000..3a87edf
+--- /dev/null
++++ b/src/audio/plugins/jack.cpp
+@@ -0,0 +1,462 @@
++/**
++ * OSM
++ * Copyright (C) 2022 Adrian Schollmeyer
++
++ * This program is free software: you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation, either version 3 of the License, or
++ * (at your option) any later version.
++
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++
++ * You should have received a copy of the GNU General Public License
++ * along with this program. If not, see .
++ */
++#include "jack.h"
++#include
++#include
++
++namespace {
++constexpr unsigned int DEFAULT_SAMPLE_RATE{48000};
++constexpr unsigned int DEFAULT_CHANNEL_COUNT_INPUT{2};
++constexpr unsigned int DEFAULT_CHANNEL_COUNT_OUTPUT{1};
++
++constexpr const char* PLUGIN_NAME{"JACK"};
++constexpr const char* JACK_CLIENT_NAME{"OpenSoundMeter"};
++constexpr const char* DEFAULT_MEASUREMENT_CHANNEL{"measurement"};
++constexpr const char* DEFAULT_REFERENCE_CHANNEL{"reference"};
++constexpr const char* DEFAULT_OUTPUT_CHANNEL{"out"};
++}
++
++namespace audio {
++JackClient::JackClient(const Plugin::Direction &direction, QIODevice& endpoint)
++ : m_client(nullptr, jackClientDeleter()), m_direction(direction), m_endpoint(endpoint)
++{
++ initJackClient();
++ initPorts();
++ initSampleRate();
++ initBufferSize();
++ initProcessing();
++}
++
++JackClient::~JackClient()
++{
++ // Explicitly stop processing first, to prevent us still running the JACK
++ // processor while the rest of the object is being cleaned up
++ if (m_client)
++ close();
++}
++
++jack_nframes_t JackClient::currentSampleRate() const
++{
++ return m_sampleRate;
++}
++
++std::size_t JackClient::currentChannelCount() const
++{
++ return m_ports.size();
++}
++
++Plugin::Direction JackClient::direction() const
++{
++ return m_direction;
++}
++
++void JackClient::close()
++{
++ deactivate();
++ m_client.reset(nullptr);
++}
++
++void JackClient::initJackClient()
++{
++ jack_status_t jackStatus;
++ jack_client_t* jackClient = jack_client_open(
++ JACK_CLIENT_NAME,
++ JackOptions::JackNoStartServer,
++ &jackStatus
++ );
++
++ if (!jackClient)
++ throw JackPluginException{"Failed to open JACK client"};
++
++ m_client.reset(jackClient);
++}
++
++void JackClient::initSampleRate()
++{
++ assert(m_client);
++ m_sampleRate = jack_get_sample_rate(m_client.get());
++ qDebug() << "[JACK] Sample rate set: " << m_sampleRate;
++
++ int res = jack_set_sample_rate_callback(
++ m_client.get(),
++ jackSampleRateCallback,
++ this
++ );
++ if (res != 0)
++ throw JackPluginException{"Failed to register sample rate callback"};
++}
++
++void JackClient::initBufferSize()
++{
++ assert(m_client);
++ assert(!m_ports.empty());
++ m_bufferSize = jack_get_buffer_size(m_client.get());
++ m_sampleBuffer.resize(m_bufferSize * m_ports.size());
++ qDebug() << "[JACK] Buffer size set: " << m_bufferSize;
++
++ int res = jack_set_buffer_size_callback(
++ m_client.get(),
++ jackBufferSizeCallback,
++ this
++ );
++ if (res != 0)
++ throw JackPluginException{"Failed to register buffer size callback"};
++}
++
++void JackClient::initPorts()
++{
++ assert(m_client);
++ switch (m_direction) {
++ case Plugin::Direction::Input:
++ registerInputs();
++ break;
++
++ case Plugin::Direction::Output:
++ registerOutputs();
++ break;
++
++ default:
++ throw JackPluginException{"Unsupported signal direction"};
++ }
++}
++
++void JackClient::initProcessing()
++{
++ assert(m_client);
++ int res = jack_set_process_callback(
++ m_client.get(),
++ jackProcessCallback,
++ this
++ );
++ if (res != 0)
++ throw JackPluginException{"Failed to register process callback"};
++}
++
++void JackClient::activate()
++{
++ assert(m_client);
++ if (m_active)
++ return;
++
++ qDebug() << "[JACK] Activating";
++ int res = jack_activate(m_client.get());
++ if (res != 0)
++ throw JackPluginException{"Failed to activate client"};
++
++ m_active = true;
++}
++
++void JackClient::deactivate()
++{
++ if (!m_active)
++ return;
++
++ m_active = false;
++
++ assert(m_client);
++ int res = jack_deactivate(m_client.get());
++ if (res != 0)
++ throw JackPluginException{"Failed to deactivate client"};
++}
++
++void JackClient::registerInputs()
++{
++ qDebug() << "[JACK] Registering Inputs";
++ jack_port_t *measurementPort = jack_port_register(
++ m_client.get(),
++ DEFAULT_MEASUREMENT_CHANNEL,
++ JACK_DEFAULT_AUDIO_TYPE,
++ JackPortFlags::JackPortIsInput,
++ 0
++ );
++ if (!measurementPort)
++ throw JackPluginException{"Failed to register measurement port"};
++ m_ports.emplace_back(measurementPort, jackPortDeleter(m_client.get()));
++ m_portBuffers.push_back(nullptr);
++
++ jack_port_t *referencePort = jack_port_register(
++ m_client.get(),
++ DEFAULT_REFERENCE_CHANNEL,
++ JACK_DEFAULT_AUDIO_TYPE,
++ JackPortFlags::JackPortIsInput,
++ 0
++ );
++ if (!referencePort)
++ throw JackPluginException{"Failed to register reference port"};
++ m_ports.emplace_back(referencePort, jackPortDeleter(m_client.get()));
++ m_portBuffers.push_back(nullptr);
++}
++
++void JackClient::registerOutputs()
++{
++ qDebug() << "[JACK] Registering Outputs";
++ jack_port_t *outputPort = jack_port_register(
++ m_client.get(),
++ DEFAULT_OUTPUT_CHANNEL,
++ JACK_DEFAULT_AUDIO_TYPE,
++ JackPortFlags::JackPortIsOutput,
++ 0
++ );
++ if (!outputPort)
++ throw JackPluginException{"Failed to register output port"};
++ m_ports.emplace_back(outputPort, jackPortDeleter(m_client.get()));
++ m_portBuffers.push_back(nullptr);
++}
++
++std::function JackClient::jackClientDeleter()
++{
++ return [this](jack_client_t *client) -> void {
++ m_ports.resize(0);
++ jack_client_close(client);
++ };
++}
++
++std::function JackClient::jackPortDeleter(jack_client_t *client)
++{
++ // We can't use the object's client member here as it might already have
++ // changed if this deleter is called in the client object's deleter,
++ // resulting in an assertion failure or segfault.
++ assert(client);
++ return [client](jack_port_t *port) -> void {
++ jack_port_unregister(client, port);
++ };
++}
++
++int JackClient::jackSampleRateCallback(jack_nframes_t newSampleRate, void* obj)
++{
++ assert(obj);
++ return reinterpret_cast(obj)->jackSampleRateCallbackInt(newSampleRate);
++}
++
++int JackClient::jackSampleRateCallbackInt(jack_nframes_t newSampleRate)
++{
++ m_sampleRate = newSampleRate;
++ qInfo() << "[JACK] Sample rate updated: " << m_sampleRate;
++ emit sampleRateChanged(m_sampleRate);
++ return 0;
++}
++
++int JackClient::jackBufferSizeCallback(jack_nframes_t newBufferSize, void* obj)
++{
++ assert(obj);
++ return reinterpret_cast(obj)->jackBufferSizeCallbackInt(newBufferSize);
++}
++
++int JackClient::jackBufferSizeCallbackInt(jack_nframes_t newBufferSize)
++{
++ m_bufferSize = newBufferSize;
++ qInfo() << "[JACK] Buffer size updated: " << m_bufferSize;
++ if (newBufferSize > 0)
++ m_sampleBuffer.resize(newBufferSize * m_ports.size());
++
++ return 0;
++}
++
++int JackClient::jackProcessCallback(jack_nframes_t nframes, void* obj)
++{
++ assert(obj);
++ return reinterpret_cast(obj)->jackProcessCallbackInt(nframes);
++}
++
++int JackClient::jackProcessCallbackInt(jack_nframes_t nframes)
++{
++ // Yes, this can actually happen
++ if (m_bufferSize == 0)
++ return 1;
++
++ if (!m_active)
++ return 0;
++
++ assert(m_ports.size() == m_portBuffers.size());
++ assert(nframes == m_bufferSize);
++ assert(m_endpoint.isOpen());
++
++ if (m_direction == Plugin::Direction::Input) {
++ processInputPorts(nframes);
++ } else {
++ processOutputPorts(nframes);
++ }
++ return 0;
++}
++
++void JackClient::processInputPorts(jack_nframes_t nframes)
++{
++ if (!m_endpoint.isWritable())
++ return;
++
++ for (std::size_t i = 0; i < m_ports.size(); ++i) {
++ m_portBuffers[i] = reinterpret_cast(
++ jack_port_get_buffer(m_ports[i].get(), nframes));
++ }
++
++ std::size_t sampleBufferPos{0};
++ for (jack_nframes_t i = 0; i < nframes; ++i) {
++ for (const float* portBuf : m_portBuffers) {
++ assert(sampleBufferPos < m_sampleBuffer.size());
++ m_sampleBuffer[sampleBufferPos] = portBuf[i];
++ sampleBufferPos++;
++ }
++ }
++ assert(sampleBufferPos == nframes * m_portBuffers.size());
++ m_endpoint.write(
++ reinterpret_cast(m_sampleBuffer.data()),
++ sampleBufferPos * sizeof(float)
++ );
++}
++
++void JackClient::processOutputPorts(jack_nframes_t nframes)
++{
++ if (!m_endpoint.isReadable())
++ return;
++
++ for (std::size_t i = 0; i < m_ports.size(); ++i) {
++ m_portBuffers[i] = reinterpret_cast(
++ jack_port_get_buffer(m_ports[i].get(), nframes));
++ }
++
++ const std::size_t samplesToWrite = std::max(
++ static_cast(nframes),
++ static_cast(m_endpoint.bytesAvailable() / sizeof(float))
++ );
++ assert(samplesToWrite % m_ports.size() == 0);
++
++ std::size_t portIdx{0};
++ std::size_t portBufferPos{0};
++ for (std::size_t i = 0; i < samplesToWrite; ++i) {
++ assert(portIdx < m_portBuffers.size());
++ assert(portBufferPos < m_bufferSize);
++ const std::size_t bytesRead = m_endpoint.read(
++ reinterpret_cast(m_portBuffers[portIdx] + portBufferPos),
++ sizeof(float)
++ );
++ assert(bytesRead == sizeof(float));
++
++ portIdx = (portIdx + 1) % m_portBuffers.size();
++ if (portIdx == 0)
++ portBufferPos++;
++ }
++}
++
++JackPlugin::JackPlugin()
++{
++ DeviceInfo m_defaultDeviceInfo{PLUGIN_NAME, PLUGIN_NAME};
++ m_defaultDeviceInfo.setName(PLUGIN_NAME);
++ m_defaultDeviceInfo.setInputChannels({
++ DEFAULT_MEASUREMENT_CHANNEL,
++ DEFAULT_REFERENCE_CHANNEL
++ });
++ m_defaultDeviceInfo.setOutputChannels({DEFAULT_OUTPUT_CHANNEL});
++ m_defaultDeviceInfo.setDefaultSampleRate(DEFAULT_SAMPLE_RATE);
++ m_list.push_back(m_defaultDeviceInfo);
++}
++
++QString JackPlugin::name() const
++{
++ return PLUGIN_NAME;
++}
++
++DeviceInfo::List JackPlugin::getDeviceInfoList() const
++{
++ return m_list;
++}
++
++DeviceInfo::Id JackPlugin::defaultDeviceId(
++ [[maybe_unused]] const Plugin::Direction &mode) const
++{
++ return DeviceInfo::Id();
++}
++
++Format JackPlugin::deviceFormat(
++ [[maybe_unused]] const DeviceInfo::Id &id,
++ const Plugin::Direction &mode) const
++{
++ const auto client_it = std::find_if(
++ m_clients.begin(),
++ m_clients.end(),
++ [mode](const auto& client) {
++
++ return client.second->direction() == mode;
++ });
++
++ if (client_it == m_clients.end()) {
++ if (mode == Plugin::Direction::Input)
++ return {DEFAULT_SAMPLE_RATE, DEFAULT_CHANNEL_COUNT_INPUT};
++ else
++ return {DEFAULT_SAMPLE_RATE, DEFAULT_CHANNEL_COUNT_OUTPUT};
++ } else {
++ return {
++ static_cast(client_it->second->currentSampleRate()),
++ static_cast(client_it->second->currentChannelCount())
++ };
++ }
++}
++
++Stream *JackPlugin::open(
++ [[maybe_unused]] const DeviceInfo::Id &id,
++ const Plugin::Direction &mode,
++ [[maybe_unused]] const Format &format,
++ QIODevice *endpoint)
++{
++ // The sample rate is set by JACK, so we don't mess with it.
++ // The channel count is fixed to the minimum amount of channels necessary
++ // for OSM to work as we can freely patch the cannels in JACK.
++ //
++ // The ID can be ignored as we create individual JACK clients
++ // for each requested Stream.
++ try {
++ std::unique_ptr jack = std::make_unique(mode, *endpoint);
++
++ Format f{
++ jack->currentSampleRate(),
++ static_cast(jack->currentChannelCount())
++ };
++ Stream *stream = new Stream(f);
++
++ m_clients.emplace(stream, std::move(jack));
++ JackClient& jackClient = *m_clients.at(stream).get();
++
++ connect(stream, &Stream::closeMe, this, [this, stream, endpoint]() {
++ // Order is important here to prevent JACK still writing data to
++ // the endpoint after it has been closed.
++ m_clients.erase(stream);
++
++ if (endpoint->isOpen())
++ endpoint->close();
++
++ stream->deleteLater();
++ });
++
++ connect(
++ &jackClient,
++ &JackClient::sampleRateChanged,
++ this,
++ [stream](jack_nframes_t newRate) {
++ assert(stream);
++ stream->setSampleRate(static_cast(newRate));
++ });
++
++ endpoint->open(mode == Input ? QIODevice::WriteOnly : QIODevice::ReadOnly);
++ jackClient.activate();
++
++ return stream;
++ } catch (JackPluginException& e) {
++ return nullptr;
++ }
++}
++
++}
+diff --git a/src/audio/plugins/jack.h b/src/audio/plugins/jack.h
+new file mode 100644
+index 0000000..9685f65
+--- /dev/null
++++ b/src/audio/plugins/jack.h
+@@ -0,0 +1,127 @@
++/**
++ * OSM
++ * Copyright (C) 2022 Adrian Schollmeyer
++
++ * This program is free software: you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation, either version 3 of the License, or
++ * (at your option) any later version.
++
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++
++ * You should have received a copy of the GNU General Public License
++ * along with this program. If not, see .
++ */
++#ifndef AUDIO_JACKPLUGIN_H
++#define AUDIO_JACKPLUGIN_H
++
++#include "../plugin.h"
++#include
++#include
++#include
++#include
++#include