diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-06-03 00:07:26 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-06-03 00:07:26 +0100 |
commit | a3bb28551df94028000fb72308a9e9baa01458b0 (patch) | |
tree | 33b14c7bf0dffbd5bb04dbd5b395514ebdda4896 /dev-python/pyalsa | |
parent | 6657c680376cedf378fcf328e5fa03ed3b41d580 (diff) |
gentoo auto-resync : 03:06:2024 - 00:07:25
Diffstat (limited to 'dev-python/pyalsa')
-rw-r--r-- | dev-python/pyalsa/Manifest | 2 | ||||
-rw-r--r-- | dev-python/pyalsa/files/pyalsa-1.2.7-python3.12.patch | 34 | ||||
-rw-r--r-- | dev-python/pyalsa/pyalsa-1.2.7-r2.ebuild | 55 |
3 files changed, 91 insertions, 0 deletions
diff --git a/dev-python/pyalsa/Manifest b/dev-python/pyalsa/Manifest index 213df73bcfd0..0de75a7c13e5 100644 --- a/dev-python/pyalsa/Manifest +++ b/dev-python/pyalsa/Manifest @@ -1,5 +1,7 @@ AUX pyalsa-1.1.6-no-build-symlinks.patch 682 BLAKE2B 046f4cffa0b08a32360356d82384148b805544b6f05e44ec329bef2299b67e46c68401b800761e9dff2141b22bc029a55fd5cf01cd5cdb533303aef91a2bbe0f SHA512 fd3937df5a69326908da942a8926e10221bb85693c863cc06ca363ca8fb07761173d2b51113615970887442d8779b2e9ff468b927b078acf52620e944b71b779 +AUX pyalsa-1.2.7-python3.12.patch 1266 BLAKE2B 3d39d2eeebb9d7c6063144294e94e95d57a377737e71797cc8099e6bebcf096040cbb73ba7eeedc6e866885c954b215f119fb96beb048ba5b32df9584e562eff SHA512 110849f66b4475f6693a2b3d64914745407417a4ac7a6b85a6c9ba0fca17f78ac0b48d1f251875bbec870a4dac58261f0a50da05e9b3911e6ce6f650f85b9c48 DIST pyalsa-1.2.7.tar.bz2 40132 BLAKE2B c100d16bd8c0d9fc6eddcda360f3582c55ed1b143a58a49caf76a62494882952d311271941ce0ecdf57ac934f3564dc922c80e8a5f5742b593341ff4215b700c SHA512 126501fe7b9c006f28e9290bdd3ad907ea9e053b71e21e2c6f0b0beeecdba07b4b557014041b03452f96be690f59f2e647e075487ee87054f21f66df7f39b34b EBUILD pyalsa-1.2.7-r1.ebuild 1114 BLAKE2B 390c4c7748e6f9299dcf88b81bad0eea1a6b1cfa1646e6731e47e5bf88df44fa7bef5e11f4284ac0ccf71eb2462295fdc61839aac8a9bedf25e9569f6b53e90d SHA512 ebe6ac3c970b3c93e5d73d7b44c9a8ccda793f9f9134c478bc63451eb166e7aa22d61650f868d640ab8b84d6d7dc70c2356b632d056d399939a80a85aa63aa23 +EBUILD pyalsa-1.2.7-r2.ebuild 1100 BLAKE2B e071290e274be860acf25a27258b830f858fc2df50736e7c7f310a71244f5bcb15ccb051614a1f79c09844b0e048d989630094e10af22eec4479f72da83ab394 SHA512 669da4f7f60666006c6f651ca593a95067234a7a31e507081f96397cb59ba788c052ed18e60cf307ddc27d754040dd23b1bd39af0ffaa7f7adb6fe06c4ac1225 EBUILD pyalsa-1.2.7.ebuild 980 BLAKE2B f27d5b3de6b41fc70fb4e1764c4e02ff09190a3afd43f9f41baafccf965260b78c47d4073a67abb3917e274cc80ac8f6f91073b820c53ad2e7d8132df322ad93 SHA512 6a52512e4c9a2af5199749e894b4bc8daeefd96cf13a7ecd6ebeaaf15a5a12685bff87e986e4637e760f73ffdd1ffbcba5a89438961c4fdaf3c339be1413bd1f MISC metadata.xml 491 BLAKE2B b44d13fa5ffd8b1eceaedbfd6b4fa564d93b99be45dec176817a9665153988d6a91f892edab698e50d2ae761edc7ec11371fa07ef3dd6976977c7dd84f9ba9ae SHA512 bbafa414b3416db7abb27921ce74d532f4b16f145a91f46075be9abaf6cf46017e8cd17c61fa019c662fc93ff9286747822b4ec8f6d19f69857cc3221e3f9a25 diff --git a/dev-python/pyalsa/files/pyalsa-1.2.7-python3.12.patch b/dev-python/pyalsa/files/pyalsa-1.2.7-python3.12.patch new file mode 100644 index 000000000000..f27a7714a986 --- /dev/null +++ b/dev-python/pyalsa/files/pyalsa-1.2.7-python3.12.patch @@ -0,0 +1,34 @@ +https://github.com/alsa-project/alsa-python/issues/9 +https://github.com/alsa-project/alsa-python/pull/10 +https://github.com/alsa-project/alsa-python/commit/cb75f5cdba0a29bdfa43eb56285da4917d2941a9 + +From cb75f5cdba0a29bdfa43eb56285da4917d2941a9 Mon Sep 17 00:00:00 2001 +From: Francesco Ceruti <ceppofrancy@gmail.com> +Date: Sat, 4 May 2024 22:16:16 +0200 +Subject: [PATCH] alsaseq: fix seg. fault when accessing `ConstantObject` extra + +Closes: https://github.com/alsa-project/alsa-python/pull/10 +Signed-off-by: Francesco Ceruti <ceppofrancy@gmail.com> +Signed-off-by: Jaroslav Kysela <perex@perex.cz> +--- a/pyalsa/alsaseq.c ++++ b/pyalsa/alsaseq.c +@@ -353,18 +353,11 @@ typedef struct { + } ConstantObject; + + #if PY_MAJOR_VERSION < 3 +-/* PyInt is fixed size in Python 2 */ + # define CONST_VALUE(x) PyInt_AsLong((PyObject *)x) +-# define CONST_EXTRA(x) (&(x->extra)) + #else +-/* PyLong is variable size in Python 3 */ + # define CONST_VALUE(x) PyLong_AsLong((PyObject *)x) +-# define CONST_EXTRA(x) \ +- ((ConstantExtraFields *)( \ +- ((intptr_t)(&x->extra)) \ +- + abs(Py_SIZE(&x->base)) * Py_TYPE(x)->tp_itemsize \ +- )) + #endif ++# define CONST_EXTRA(x) (&(x->extra)) + + /** alsaseq.Constant type (initialized later...) */ + static PyTypeObject ConstantType; diff --git a/dev-python/pyalsa/pyalsa-1.2.7-r2.ebuild b/dev-python/pyalsa/pyalsa-1.2.7-r2.ebuild new file mode 100644 index 000000000000..2632cb21b9c9 --- /dev/null +++ b/dev-python/pyalsa/pyalsa-1.2.7-r2.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{10..12} ) + +inherit distutils-r1 + +DESCRIPTION="Python bindings for ALSA library" +HOMEPAGE="https://alsa-project.org/wiki/Main_Page" +SRC_URI="https://www.alsa-project.org/files/pub/pyalsa/${P}.tar.bz2" + +LICENSE="LGPL-2.1+" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" +# Needs access to system's alsa configuration/devices +RESTRICT="test" + +DEPEND=" + media-libs/alsa-lib +" +RDEPEND=" + ${DEPEND} +" +BDEPEND=" + dev-python/setuptools[${PYTHON_USEDEP}] +" + +PATCHES=( + "${FILESDIR}/${PN}-1.1.6-no-build-symlinks.patch" + "${FILESDIR}/${PN}-1.2.7-python3.12.patch" +) + +python_test() { + cd "${T}" || die + + shopt -s nullglob + local test + local failed + for test in "${S}"/test/*.py ; do + ${EPYTHON} "${test}" || { + eerror "${test} failed with ${EPYTHON}" + failed=1 + break + } + done + shopt -u nullglob + + if [[ ${failed} -eq 1 ]] ; then + die "${test} failed with ${EPYTHON}" + fi +} |