<pre style='margin:0'>
Ryan Schmidt (ryandesign) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/5850ad09cb4e049079d744266e2082f53d791361">https://github.com/macports/macports-ports/commit/5850ad09cb4e049079d744266e2082f53d791361</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 5850ad09cb4e049079d744266e2082f53d791361
</span>Author: Ryan Schmidt <ryandesign@macports.org>
AuthorDate: Mon Apr 25 21:44:37 2022 -0500
<span style='display:block; white-space:pre;color:#404040;'> Aseprite: Use only MacPorts python 3
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Don't use macOS python 2 for parts of the build anymore. Fixes build on
</span><span style='display:block; white-space:pre;color:#404040;'> macOS 12.3 and later from which Apple removed python 2.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Closes: https://trac.macports.org/ticket/65072
</span>---
graphics/Aseprite/Portfile | 8 ++-
graphics/Aseprite/files/python3.patch | 92 +++++++++++++++++++++++++++++++++++
graphics/Aseprite/files/stdlib.patch | 1 +
3 files changed, 96 insertions(+), 5 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/graphics/Aseprite/Portfile b/graphics/Aseprite/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 4b8ad67bede..57636fb5130 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/graphics/Aseprite/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/graphics/Aseprite/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -142,11 +142,8 @@ post-extract {
</span> move {*}[glob ${workpath}/[file tail ${submodule}]-*] ${worksrcpath}/${submodule}
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # Various skia gn scripts run "python" and expect it to be python 2.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # A future version of Aseprite should use a newer skia that is
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # compatible with python 3.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # https://github.com/aseprite/skia/commit/beaaf4700f50e5f4760e45dbf4e82dca61f8c652
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ln -s /usr/bin/python ${workpath}/depot_tools/python
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Various skia gn scripts run "python" but are compatible with python 3.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ln -s ${configure.python} ${workpath}/depot_tools/python
</span>
# depot_tools runs "python3".
ln -s ${configure.python} ${workpath}/depot_tools/python3
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -160,6 +157,7 @@ post-extract {
</span>
patch.dir ${workpath}
patchfiles prefix.patch \
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ python3.patch \
</span> stdlib.patch \
USE_SHARED_LIBWEBP.patch
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/graphics/Aseprite/files/python3.patch b/graphics/Aseprite/files/python3.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..81d5a21ed55
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/graphics/Aseprite/files/python3.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,92 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Fix build with python 3. Includes relevant parts of:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+https://github.com/google/skia/commit/7bc4c9a8d1389fd3188d9bff46726ffc3d9bebb9
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- skia/gn/codesign_ios.py.orig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ skia/gn/codesign_ios.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -23,7 +23,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Find the signing identity.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ identity = None
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-for line in subprocess.check_output(['security', 'find-identity']).split('\n'):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++for line in subprocess.check_output([
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ 'security', 'find-identity']).decode('utf-8').split('\n'):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ m = re.match(r'''.*\) (.*) "''' + identstr + '"', line)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if m:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ identity = m.group(1)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- skia/gn/compile_ib_files.py.orig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ skia/gn/compile_ib_files.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -40,9 +40,9 @@ def main():
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ibtool_section_re = re.compile(r'/\*.*\*/')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ibtool_re = re.compile(r'.*note:.*is clipping its content')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ try:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- stdout = subprocess.check_output(ibtool_args)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ stdout = subprocess.check_output(ibtool_args).decode('utf-8')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ except subprocess.CalledProcessError as e:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- print(e.output)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ print(e.output.decode('utf-8'))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ raise
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ current_section_header = None
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for line in stdout.splitlines():
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- skia/gn/compile_sksl_tests.py.orig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ skia/gn/compile_sksl_tests.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -28,11 +28,12 @@ def executeWorklist(input, worklist):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Invoke skslc, passing in the worklist.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ worklist.close()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ try:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- output = subprocess.check_output([skslc, worklist.name], stderr=subprocess.STDOUT)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ output = subprocess.check_output([
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ skslc, worklist.name], stderr=subprocess.STDOUT).decode('utf-8')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ except subprocess.CalledProcessError as err:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if err.returncode != 1:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ print("### " + input + " skslc error:\n")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- print("\n".join(err.output.splitlines()))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ print("\n".join(err.output.decode('utf-8').splitlines()))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sys.exit(err.returncode)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pass # Compile errors (exit code 1) are expected and normal in test code
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- skia/gn/copy_git_directory.py.orig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ skia/gn/copy_git_directory.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -21,7 +21,8 @@ def copy_git_directory(src, dst, out=None):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ raise Exception('Directory "%s" does not exist.' % src)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if not os.path.isdir(dst):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ os.makedirs(dst)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ls_files = subprocess.check_output(['git', 'ls-files', '-z', '.'], cwd=src)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ls_files = subprocess.check_output([
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ 'git', 'ls-files', '-z', '.'], cwd=src).decode('utf-8')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src_files = set(p for p in ls_files.split('\0') if p)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ abs_src = os.path.abspath(src)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cwd = os.getcwd()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- skia/gn/dehydrate_sksl.py.orig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ skia/gn/dehydrate_sksl.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -20,7 +20,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if not os.path.isdir(targetDir):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ os.mkdir(targetDir)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ target = os.path.join(targetDir, tail)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- subprocess.check_output([skslc, inc, target + ".dehydrated.sksl"])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ subprocess.check_output([
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ skslc, inc, target + ".dehydrated.sksl"]).decode('utf-8')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ except subprocess.CalledProcessError as err:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ print("### Error compiling " + inc + ":")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ print(err.output)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- skia/gn/find_headers.py.orig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ skia/gn/find_headers.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -34,9 +34,9 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ desc_json_txt = ''
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ try:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- desc_json_txt = subprocess.check_output(gn_desc_cmd)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ desc_json_txt = subprocess.check_output(gn_desc_cmd).decode('utf-8')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ except subprocess.CalledProcessError as e:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- print(e.output)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ print(e.output.decode('utf-8'))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ raise
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ desc_json = {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- skia/gn/find_xcode_sysroot.py.orig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ skia/gn/find_xcode_sysroot.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -12,4 +12,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (sdk,) = sys.argv[1:]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-print(subprocess.check_output(['xcrun', '--sdk', sdk, '--show-sdk-path']))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++print(subprocess.check_output([
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ 'xcrun', '--sdk', sdk, '--show-sdk-path']).decode('utf-8'))
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/graphics/Aseprite/files/stdlib.patch b/graphics/Aseprite/files/stdlib.patch
</span><span style='display:block; white-space:pre;color:#808080;'>index f3f552dc917..83007c86f17 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/graphics/Aseprite/files/stdlib.patch
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/graphics/Aseprite/files/stdlib.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,4 +1,5 @@
</span> Don't muck with the stdlib. MacPorts already sets it the way we want.
<span style='display:block; white-space:pre;background:#e0ffe0;'>+https://github.com/aseprite/aseprite/commit/be7c26da5eb29dd50705babc4277cb8ebce9af91
</span> --- aseprite/CMakeLists.txt.orig 2022-01-12 08:10:33.000000000 -0600
+++ aseprite/CMakeLists.txt 2022-01-30 22:43:28.000000000 -0600
@@ -30,12 +30,6 @@
</pre><pre style='margin:0'>
</pre>