<pre style='margin:0'>
ra1nb0w (ra1nb0w) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/85665e2f38b4fd8fab44bda79656c0a7354b273e">https://github.com/macports/macports-ports/commit/85665e2f38b4fd8fab44bda79656c0a7354b273e</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 85665e2f38b py-wxpython-4.0: use internal wxWidgets version
</span>85665e2f38b is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 85665e2f38b4fd8fab44bda79656c0a7354b273e
</span>Author: Davide Gerhard <ra1nb0w@macports.org>
AuthorDate: Fri Jan 21 18:12:27 2022 +0100
<span style='display:block; white-space:pre;color:#404040;'> py-wxpython-4.0: use internal wxWidgets version
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> since wxPython is using a commit and not a tagged version of wxWidgets
</span><span style='display:block; white-space:pre;color:#404040;'> it is better to use and install that version. This avoid strange issues
</span><span style='display:block; white-space:pre;color:#404040;'> or crashes particularly with complex software like Kicad that maintains
</span><span style='display:block; white-space:pre;color:#404040;'> sessions between wxWidgets library and the python realm.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> To use that wxWidgets version you need to use the following path for
</span><span style='display:block; white-space:pre;color:#404040;'> wx-config:
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> set python_version 3.9
</span><span style='display:block; white-space:pre;color:#404040;'> set py_ver_no_dot [join [split ${python_version} "."] ""]
</span><span style='display:block; white-space:pre;color:#404040;'> set python_framework_dir ${frameworks_dir}/Python.framework/Versions/${python_version}
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> ${python_framework_dir}/bin/wx-config
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> In cmake
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> -DwxWidgets_CONFIG_EXECUTABLE=${python_framework_dir}/bin/wx-config
</span>---
python/py-wxpython-4.0/Portfile | 29 ++++++++++++++++-----------
python/py-wxpython-4.0/files/build.patch | 34 ++++++++++++++++++++++++++++++++
2 files changed, 51 insertions(+), 12 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/python/py-wxpython-4.0/Portfile b/python/py-wxpython-4.0/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index ac0e5bdff47..dd5fa2eea81 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/python/py-wxpython-4.0/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/python/py-wxpython-4.0/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2,12 +2,12 @@
</span>
PortSystem 1.0
PortGroup python 1.0
<span style='display:block; white-space:pre;background:#ffe0e0;'>-PortGroup wxWidgets 1.0
</span>
name py-wxpython-4.0
python.rootname wxPython
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# check kicad's version before updating
</span> version 4.1.1
<span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 6
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 7
</span>
categories-append graphics devel
license wxwidgets-3.1
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -35,17 +35,12 @@ if {${name} ne ${subport}} {
</span> conflicts py${python.version}-wxpython-3.0
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- patchfiles-append fix_cc_cxx.patch webkit.patch webkit2.patch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append fix_cc_cxx.patch webkit.patch webkit2.patch build.patch
</span> patch.pre_args -p1
<span style='display:block; white-space:pre;background:#ffe0e0;'>- wxWidgets.use wxWidgets-3.2
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> depends_build-append \
port:py${python.version}-setuptools
<span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_lib-append \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- port:${wxWidgets.port}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> if {${python.version} < 38} {
depends_lib-append \
port:py${python.version}-importlib-metadata
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -59,12 +54,22 @@ if {${name} ne ${subport}} {
</span> port:py${python.version}-pathlib2
build.env-append SIP=${python.prefix}/bin/sip
<span style='display:block; white-space:pre;background:#ffe0e0;'>- build.env-append PATH=${python.prefix}/bin:${wxWidgets.prefix}/bin:$env(PATH)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ build.env-append PATH=${python.prefix}/bin:$env(PATH)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set wxpython_options "--no_magic --release --python ${python.bin} --osx_cocoa --nodoc --prefix=${python.prefix}"
</span> build.cmd ${python.bin} build.py
<span style='display:block; white-space:pre;background:#ffe0e0;'>- build.target build_py --use_syswx --release --python ${python.bin} --osx_cocoa --no_magic --nodoc --prefix=${python.prefix}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ build.target build ${wxpython_options}
</span> destroot.cmd ${python.bin} build.py
<span style='display:block; white-space:pre;background:#ffe0e0;'>- destroot.target install_py
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- destroot.destdir --prefix=${python.prefix} --destdir=${destroot}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ destroot.target install
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ destroot.destdir --destdir=${destroot} ${wxpython_options}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ post-patch {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|MACOSX_DEPLOYMENT_TARGET = \"10.10\"|MACOSX_DEPLOYMENT_TARGET = \"${macosx_deployment_target}\"|" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${worksrcpath}/wscript
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span>
livecheck.type none
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ test.run yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ test.cmd "${python.bin} -c 'import wx ; print(wx.__version__)'"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ test.target
</span> }
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/python/py-wxpython-4.0/files/build.patch b/python/py-wxpython-4.0/files/build.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..3b433036913
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/python/py-wxpython-4.0/files/build.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,34 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/build.py.orig 2022-01-21 16:23:13.000000000 +0100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/build.py 2022-01-21 16:24:08.000000000 +0100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1536,9 +1536,6 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ def copyWxDlls(options):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if options.no_magic or options.use_syswx:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if isWindows:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Copy the wxWidgets DLLs to the wxPython package folder
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ msw = getMSWSettings(options)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/build.py.orig 2022-01-21 16:50:42.000000000 +0100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/build.py 2022-01-21 16:51:39.000000000 +0100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1578,8 +1578,6 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cfg = Config()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ wxlibdir = os.path.join(getBuildDir(options), "lib")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dlls = glob.glob(wxlibdir + '/*.dylib')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- for dll in dlls:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- copyIfNewer(dll, posixjoin(phoenixDir(), cfg.PKGDIR, os.path.basename(dll)), verbose=True)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Now use install_name_tool to change the extension modules to look
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # in the same folder for the wx libs, instead of the build dir. Also
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/buildtools/config.py.orig 2022-01-21 16:53:25.000000000 +0100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/buildtools/config.py 2022-01-21 16:54:53.000000000 +0100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -819,7 +819,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ line = line.strip()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ endPos = line.rfind(' (')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ curName = line[:endPos]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- newName = '@loader_path/' + os.path.basename(curName)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ newName = '@loader_path/../../../' + os.path.basename(curName)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cmd = 'install_name_tool -change %s %s %s' % (curName, newName, filename)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ os.system(cmd)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span></pre><pre style='margin:0'>
</pre>