commit:     85b8c258201ffa0dc83d2a05d65c8018abb493a9
Author:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
AuthorDate: Mon Jul  7 17:52:02 2025 +0000
Commit:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
CommitDate: Tue Jul  8 22:59:41 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=85b8c258

media-plugins/ams-lv2: enable py3.12, py3.13, py3.14

The package performs crimes against technology: namely, it builds with
waf. This is the only reason it needs python at all.

This necessitates replacing bundled waf with a more modern vesion, since
the bundled version was already crudely patched to support py3.11
instead of updating waf, and it immediately broke again for 3.12. The
current replacement waf is used elsewhere in ::gentoo, and is tested to
install the same using any python from 3.11-3.14.

Closes: https://bugs.gentoo.org/929650
Signed-off-by: Eli Schwartz <eschwartz <AT> gentoo.org>

 media-plugins/ams-lv2/Manifest                     |  1 +
 media-plugins/ams-lv2/ams-lv2-1.2.2-r1.ebuild      | 22 +++++++++++++++++-----
 .../ams-lv2/files/ams-lv2-1.2.2-wscript.patch      | 22 ----------------------
 3 files changed, 18 insertions(+), 27 deletions(-)

diff --git a/media-plugins/ams-lv2/Manifest b/media-plugins/ams-lv2/Manifest
index 2fbe44da61fc..f1508e7f76c4 100644
--- a/media-plugins/ams-lv2/Manifest
+++ b/media-plugins/ams-lv2/Manifest
@@ -1 +1,2 @@
 DIST ams-lv2-1.2.2.tar.gz 488234 BLAKE2B 
1dfeaa2708bda64aadb00d8ec5f57fd3a7dd35a1fdce5fb2289f52f00fd73d25a11f39c91823c9322a5cd625ff369c4b05fd9de300b1635e172aefabb02825ea
 SHA512 
6c1c6f3179a851f67e162d225a761c38678159d9f178d9bfa3991b84b84ea557f5a44882ea710626204f158c40ae18f0e87f24faec0a0bd6aa64e18eeb81c45f
+DIST waf-2.0.20 104725 BLAKE2B 
c9467b5205f596cd1b5d4b6ccb97806e9fa1f4d4eb9109d378a0978179ab49a029926cb86876ca2088878378f88eb292d899840b4a072e62fc6542b93bc2d894
 SHA512 
72de1c5a78eb353da4b4a6ea4fbf52d232ed6dd08e972872744e3727b952f813f44e47f0b47106bd6f05ce7fa137c4685ac313fb0b0d70e5fc85dc34918e66f0

diff --git a/media-plugins/ams-lv2/ams-lv2-1.2.2-r1.ebuild 
b/media-plugins/ams-lv2/ams-lv2-1.2.2-r1.ebuild
index 4c4d78535a74..34ffca811486 100644
--- a/media-plugins/ams-lv2/ams-lv2-1.2.2-r1.ebuild
+++ b/media-plugins/ams-lv2/ams-lv2-1.2.2-r1.ebuild
@@ -1,15 +1,21 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
-# version 1.2.2 does not compile with python 3.11
-PYTHON_COMPAT=( python3_{9..11} )
+
+PYTHON_COMPAT=( python3_{11..14} )
 PYTHON_REQ_USE="threads(+)"
 inherit waf-utils python-any-r1
 
+# bundles ancient broken waf
+WAF_VER=2.0.20
+
 DESCRIPTION="A port of the AMS internal modules to LV2 plugins to create 
modular synthesizers"
 HOMEPAGE="https://github.com/blablack/ams-lv2";
-SRC_URI="https://github.com/blablack/ams-lv2/archive/${PV}.tar.gz -> 
${P}.tar.gz"
+SRC_URI="
+       https://github.com/blablack/ams-lv2/archive/${PV}.tar.gz -> ${P}.tar.gz
+       https://waf.io/waf-${WAF_VER}
+"
 
 LICENSE="GPL-2"
 SLOT="0"
@@ -29,4 +35,10 @@ DEPEND="${RDEPEND}
 
 DOCS=( LICENSE README.md THANKS )
 
-PATCHES="${FILESDIR}/${P}-wscript.patch"
+src_unpack() {
+       unpack ${P}.tar.gz || die
+
+       # we need newer version of waf to work with py3.11
+       cp "${DISTDIR}/waf-${WAF_VER}" "${S}/waf" || die
+       rm -r "${S}"/waflib || die
+}

diff --git a/media-plugins/ams-lv2/files/ams-lv2-1.2.2-wscript.patch 
b/media-plugins/ams-lv2/files/ams-lv2-1.2.2-wscript.patch
deleted file mode 100644
index 5fd4fd7857f5..000000000000
--- a/media-plugins/ams-lv2/files/ams-lv2-1.2.2-wscript.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/waflib/ConfigSet.py
-+++ b/waflib/ConfigSet.py
-@@ -312,7 +312,7 @@ class ConfigSet(object):
-               :type filename: string
-               """
-               tbl = self.table
--              code = Utils.readf(filename, m='rU')
-+              code = Utils.readf(filename, m='r')
-               for m in re_imp.finditer(code):
-                       g = m.group
-                       tbl[g(2)] = eval(g(3))
---- a/waflib/Context.py
-+++ b/waflib/Context.py
-@@ -662,7 +662,7 @@ def load_module(path, encoding=None):
- 
-       module = imp.new_module(WSCRIPT_FILE)
-       try:
--              code = Utils.readf(path, m='rU', encoding=encoding)
-+              code = Utils.readf(path, m='r', encoding=encoding)
-       except EnvironmentError:
-               raise Errors.WafError('Could not read the file %r' % path)
- 

Reply via email to