From be32e34f17d6c611f76f37d3b86e48cc23dbbb93 Mon Sep 17 00:00:00 2001 From: oreo639 Date: Mon, 22 Jan 2024 02:41:52 -0800 Subject: [PATCH] jack: fix build for python3.12 --- srcpkgs/jack/patches/waf-escape-seq.patch | 246 ++++++++++++++++++++++ srcpkgs/jack/patches/waf-imp.patch | 36 ++++ srcpkgs/jack/template | 2 +- 3 files changed, 283 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/jack/patches/waf-escape-seq.patch create mode 100644 srcpkgs/jack/patches/waf-imp.patch diff --git a/srcpkgs/jack/patches/waf-escape-seq.patch b/srcpkgs/jack/patches/waf-escape-seq.patch new file mode 100644 index 0000000000000..ac6c4f4d665e5 --- /dev/null +++ b/srcpkgs/jack/patches/waf-escape-seq.patch @@ -0,0 +1,246 @@ +From 412a9b819e86a0061f990c7245f0f5db76d0eda3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micka=C3=ABl=20Schoentgen?= +Date: Sat, 5 Jan 2019 12:02:42 +0100 +Subject: [PATCH] Fix all DeprecationWarning: invalid escape sequence +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Mickaƫl Schoentgen +--- + utils/genbench.py | 2 +- + waflib/Build.py | 2 +- + waflib/ConfigSet.py | 2 +- + waflib/Context.py | 2 +- + waflib/Task.py | 2 +- + waflib/TaskGen.py | 2 +- + waflib/Tools/c_config.py | 2 +- + waflib/Tools/c_preproc.py | 6 +++--- + waflib/Tools/d_scan.py | 8 ++++---- + waflib/Tools/fc_config.py | 4 ++-- + waflib/Tools/fc_scan.py | 8 ++++---- + waflib/Tools/ifort.py | 2 +- + waflib/Tools/msvc.py | 16 ++++++++-------- + waflib/Tools/qt5.py | 4 ++-- + waflib/Tools/winres.py | 4 ++-- + waflib/Utils.py | 2 +- + waflib/ansiterm.py | 2 +- + waflib/extras/cpplint.py | 6 +++--- + waflib/extras/distnet.py | 2 +- + waflib/extras/erlang.py | 2 +- + waflib/extras/gccdeps.py | 2 +- + waflib/extras/kde4.py | 2 +- + waflib/extras/ocaml.py | 2 +- + waflib/extras/pgicc.py | 2 +- + waflib/extras/pyqt5.py | 2 +- + waflib/extras/qt4.py | 2 +- + waflib/extras/remote.py | 2 +- + waflib/extras/run_do_script.py | 2 +- + waflib/extras/swig.py | 4 ++-- + 29 files changed, 50 insertions(+), 50 deletions(-) + +diff --git a/waflib/Build.py b/waflib/Build.py +index d8778218b..eb80603d4 100644 +--- a/waflib/Build.py ++++ b/waflib/Build.py +@@ -104,7 +104,7 @@ class BuildContext(Context.Context): + """Amount of jobs to run in parallel""" + + self.targets = Options.options.targets +- """List of targets to build (default: \*)""" ++ """List of targets to build (default: \\*)""" + + self.keep = Options.options.keep + """Whether the build should continue past errors""" +diff --git a/waflib/ConfigSet.py b/waflib/ConfigSet.py +index b300bb56b..9db8e9075 100644 +--- a/waflib/ConfigSet.py ++++ b/waflib/ConfigSet.py +@@ -11,7 +11,7 @@ The values put in :py:class:`ConfigSet` must be serializable (dicts, lists, stri + + import copy, re, os + from waflib import Logs, Utils +-re_imp = re.compile('^(#)*?([^#=]*?)\ =\ (.*?)$', re.M) ++re_imp = re.compile(r'^(#)*?([^#=]*?)\ =\ (.*?)$', re.M) + + class ConfigSet(object): + """ +diff --git a/waflib/Context.py b/waflib/Context.py +index ffe197e40..888091dfd 100644 +--- a/waflib/Context.py ++++ b/waflib/Context.py +@@ -607,7 +607,7 @@ class Context(ctx): + Logs.pprint(color, msg) + + def load_special_tools(self, var, ban=[]): +- """ ++ r""" + Loads third-party extensions modules for certain programming languages + by trying to list certain files in the extras/ directory. This method + is typically called once for a programming language group, see for +diff --git a/waflib/Task.py b/waflib/Task.py +index b93c0b4f4..f67076107 100644 +--- a/waflib/Task.py ++++ b/waflib/Task.py +@@ -1044,7 +1044,7 @@ def funex(c): + exec(c, dc) + return dc['f'] + +-re_cond = re.compile('(?P\w+)|(?P\|)|(?P&)') ++re_cond = re.compile(r'(?P\w+)|(?P\|)|(?P&)') + re_novar = re.compile(r'^(SRC|TGT)\W+.*?$') + reg_act = re.compile(r'(?P\\)|(?P\$\$)|(?P\$\{(?P\w+)(?P.*?)\})', re.M) + def compile_fun_shell(line): +diff --git a/waflib/TaskGen.py b/waflib/TaskGen.py +index e328843b5..532b7d5cd 100644 +--- a/waflib/TaskGen.py ++++ b/waflib/TaskGen.py +@@ -727,7 +727,7 @@ def sequence_order(self): + self.bld.prev = self + + +-re_m4 = re.compile('@(\w+)@', re.M) ++re_m4 = re.compile(r'@(\w+)@', re.M) + + class subst_pc(Task.Task): + """ +diff --git a/waflib/Tools/c_config.py b/waflib/Tools/c_config.py +index d2b3c0d8f..60cc0ecdf 100644 +--- a/waflib/Tools/c_config.py ++++ b/waflib/Tools/c_config.py +@@ -239,7 +239,7 @@ def validate_cfg(self, kw): + + @conf + def exec_cfg(self, kw): +- """ ++ r""" + Executes ``pkg-config`` or other ``-config`` applications to collect configuration flags: + + * if atleast_pkgconfig_version is given, check that pkg-config has the version n and return +diff --git a/waflib/Tools/c_preproc.py b/waflib/Tools/c_preproc.py +index 7e04b4a7c..68e5f5aea 100644 +--- a/waflib/Tools/c_preproc.py ++++ b/waflib/Tools/c_preproc.py +@@ -75,13 +75,13 @@ re_lines = re.compile( + re.IGNORECASE | re.MULTILINE) + """Match #include lines""" + +-re_mac = re.compile("^[a-zA-Z_]\w*") ++re_mac = re.compile(r"^[a-zA-Z_]\w*") + """Match macro definitions""" + + re_fun = re.compile('^[a-zA-Z_][a-zA-Z0-9_]*[(]') + """Match macro functions""" + +-re_pragma_once = re.compile('^\s*once\s*', re.IGNORECASE) ++re_pragma_once = re.compile(r'^\s*once\s*', re.IGNORECASE) + """Match #pragma once statements""" + + re_nl = re.compile('\\\\\r*\n', re.MULTILINE) +@@ -660,7 +660,7 @@ def extract_macro(txt): + # empty define, assign an empty token + return (v, [[], [('T','')]]) + +-re_include = re.compile('^\s*(<(?:.*)>|"(?:.*)")') ++re_include = re.compile(r'^\s*(<(?:.*)>|"(?:.*)")') + def extract_include(txt, defs): + """ + Process a line in the form:: +diff --git a/waflib/Tools/msvc.py b/waflib/Tools/msvc.py +index 17b347d45..ff58449d0 100644 +--- a/waflib/Tools/msvc.py ++++ b/waflib/Tools/msvc.py +@@ -281,7 +281,7 @@ def gather_wince_supported_platforms(): + + def gather_msvc_detected_versions(): + #Detected MSVC versions! +- version_pattern = re.compile('^(\d\d?\.\d\d?)(Exp)?$') ++ version_pattern = re.compile(r'^(\d\d?\.\d\d?)(Exp)?$') + detected_versions = [] + for vcver,vcvar in (('VCExpress','Exp'), ('VisualStudio','')): + prefix = 'SOFTWARE\\Wow6432node\\Microsoft\\' + vcver +@@ -367,7 +367,7 @@ def gather_wsdk_versions(conf, versions): + :param versions: list to modify + :type versions: list + """ +- version_pattern = re.compile('^v..?.?\...?.?') ++ version_pattern = re.compile(r'^v..?.?\...?.?') + try: + all_versions = Utils.winreg.OpenKey(Utils.winreg.HKEY_LOCAL_MACHINE, 'SOFTWARE\\Wow6432node\\Microsoft\\Microsoft SDKs\\Windows') + except OSError: +@@ -525,7 +525,7 @@ def gather_icl_versions(conf, versions): + :param versions: list to modify + :type versions: list + """ +- version_pattern = re.compile('^...?.?\....?.?') ++ version_pattern = re.compile(r'^...?.?\....?.?') + try: + all_versions = Utils.winreg.OpenKey(Utils.winreg.HKEY_LOCAL_MACHINE, 'SOFTWARE\\Wow6432node\\Intel\\Compilers\\C++') + except OSError: +@@ -579,7 +579,7 @@ def gather_intel_composer_versions(conf, versions): + :param versions: list to modify + :type versions: list + """ +- version_pattern = re.compile('^...?.?\...?.?.?') ++ version_pattern = re.compile(r'^...?.?\...?.?.?') + try: + all_versions = Utils.winreg.OpenKey(Utils.winreg.HKEY_LOCAL_MACHINE, 'SOFTWARE\\Wow6432node\\Intel\\Suites') + except OSError: +@@ -683,7 +683,7 @@ def find_lt_names_msvc(self, libname, is_static=False): + if not is_static and ltdict.get('library_names', ''): + dllnames=ltdict['library_names'].split() + dll=dllnames[0].lower() +- dll=re.sub('\.dll$', '', dll) ++ dll=re.sub(r'\.dll$', '', dll) + return (lt_libdir, dll, False) + elif ltdict.get('old_library', ''): + olib=ltdict['old_library'] +@@ -700,7 +700,7 @@ def find_lt_names_msvc(self, libname, is_static=False): + @conf + def libname_msvc(self, libname, is_static=False): + lib = libname.lower() +- lib = re.sub('\.lib$','',lib) ++ lib = re.sub(r'\.lib$','',lib) + + if lib in g_msvc_systemlibs: + return lib +@@ -747,11 +747,11 @@ def libname_msvc(self, libname, is_static=False): + for libn in libnames: + if os.path.exists(os.path.join(path, libn)): + Logs.debug('msvc: lib found: %s', os.path.join(path,libn)) +- return re.sub('\.lib$', '',libn) ++ return re.sub(r'\.lib$', '',libn) + + #if no lib can be found, just return the libname as msvc expects it + self.fatal('The library %r could not be found' % libname) +- return re.sub('\.lib$', '', libname) ++ return re.sub(r'\.lib$', '', libname) + + @conf + def check_lib_msvc(self, libname, is_static=False, uselib_store=None): +diff --git a/waflib/Utils.py b/waflib/Utils.py +index 3f5eb93bf..b84de64bf 100644 +--- a/waflib/Utils.py ++++ b/waflib/Utils.py +@@ -736,7 +736,7 @@ def unversioned_sys_platform(): + if s == 'cli' and os.name == 'nt': + # ironpython is only on windows as far as we know + return 'win32' +- return re.split('\d+$', s)[0] ++ return re.split(r'\d+$', s)[0] + + def nada(*k, **kw): + """ +diff --git a/waflib/ansiterm.py b/waflib/ansiterm.py +index 0d20c6374..027f0ad68 100644 +--- a/waflib/ansiterm.py ++++ b/waflib/ansiterm.py +@@ -264,7 +264,7 @@ else: + 'u': pop_cursor, + } + # Match either the escape sequence or text not containing escape sequence +- ansi_tokens = re.compile('(?:\x1b\[([0-9?;]*)([a-zA-Z])|([^\x1b]+))') ++ ansi_tokens = re.compile(r'(?:\x1b\[([0-9?;]*)([a-zA-Z])|([^\x1b]+))') + def write(self, text): + try: + wlock.acquire() diff --git a/srcpkgs/jack/patches/waf-imp.patch b/srcpkgs/jack/patches/waf-imp.patch new file mode 100644 index 0000000000000..4f5a319d053b9 --- /dev/null +++ b/srcpkgs/jack/patches/waf-imp.patch @@ -0,0 +1,36 @@ +From d2060dfd8af4edb5824153ff24e207b39ecd67a2 Mon Sep 17 00:00:00 2001 +From: Thomas Nagy +Date: Wed, 14 Aug 2019 22:05:45 +0200 +Subject: [PATCH] Conceal imp warnings in Python3 + +--- + waflib/Context.py | 9 ++++++++- + waflib/Tools/python.py | 2 +- + 2 files changed, 9 insertions(+), 2 deletions(-) + +diff --git a/waflib/Context.py b/waflib/Context.py +index e3305fa33..4760bc820 100644 +--- a/waflib/Context.py ++++ b/waflib/Context.py +@@ -6,10 +6,17 @@ + Classes and functions enabling the command system + """ + +-import os, re, imp, sys ++import os, re, sys + from waflib import Utils, Errors, Logs + import waflib.Node + ++if sys.hexversion > 0x3040000: ++ import types ++ class imp(object): ++ new_module = lambda x: types.ModuleType(x) ++else: ++ import imp ++ + # the following 3 constants are updated on each new release (do not touch) + HEXVERSION=0x2001200 + """Constant updated on new releases""" +-- +GitLab + diff --git a/srcpkgs/jack/template b/srcpkgs/jack/template index 05c1ae08ce048..8b3f60353176a 100644 --- a/srcpkgs/jack/template +++ b/srcpkgs/jack/template @@ -1,7 +1,7 @@ # Template file for 'jack' pkgname=jack version=1.9.22 -revision=1 +revision=2 build_style=waf3 configure_args="--alsa --classic --dbus" hostmakedepends="pkg-config"