<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/034c2dab79897acb524edce67a7987d8723a7f8f">https://github.com/macports/macports-ports/commit/034c2dab79897acb524edce67a7987d8723a7f8f</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 034c2da py-pyobjc: restore incorrectly removed patch
</span>034c2da is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 034c2dab79897acb524edce67a7987d8723a7f8f
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Tue Nov 26 22:04:15 2019 +1100
<span style='display:block; white-space:pre;color:#404040;'> py-pyobjc: restore incorrectly removed patch
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Fixes: https://trac.macports.org/ticket/59728
</span>---
python/py-pyobjc/Portfile | 15 +++--
python/py-pyobjc/files/pyobjc_setup.py.patch | 85 ++++++++++++++++++++++++++++
2 files changed, 94 insertions(+), 6 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/python/py-pyobjc/Portfile b/python/py-pyobjc/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index d4c6f87..595a7ac 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/python/py-pyobjc/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/python/py-pyobjc/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -46,6 +46,15 @@ if {${name} ne ${subport}} {
</span> use-system-libffi = 1\\
deployment-target = ${macosx_deployment_target}\\
|" ${worksrcpath}/pyobjc-core/setup.cfg
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "s/sphinx-build /sphinx-build-${python.branch} /g" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${worksrcpath}/docs/Makefile
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "patch ${worksrcpath}/pyobjc-core/Tools/pyobjc_setup.py < ${filespath}/pyobjc_setup.py.patch"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach f [glob -directory ${worksrcpath} */pyobjc_setup.py] {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "patch ${f} < ${filespath}/pyobjc_setup.py.patch"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> }
if {${configure.sdkroot} eq ""} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -65,12 +74,6 @@ deployment-target = ${macosx_deployment_target}\\
</span> }
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- post-patch {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- reinplace \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- "s/sphinx-build /sphinx-build-${python.branch} /g" \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${worksrcpath}/docs/Makefile
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> # the pyobjc build system is vaguely horrible, so do everything in
# the destroot target
build {
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/python/py-pyobjc/files/pyobjc_setup.py.patch b/python/py-pyobjc/files/pyobjc_setup.py.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..65c18cf
</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-pyobjc/files/pyobjc_setup.py.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,85 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+https://bitbucket.org/ronaldoussoren/pyobjc/pull-requests/22/pyobjc_setuppy-sdk-detection-fixes/diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/pyobjc-core/Tools/pyobjc_setup.py b/pyobjc-core/Tools/pyobjc_setup.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/pyobjc-core/Tools/pyobjc_setup.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/pyobjc-core/Tools/pyobjc_setup.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -219,25 +219,46 @@ def get_os_level():
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ v = pl["ProductVersion"]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return ".".join(v.split(".")[:2])
</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 get_sdk():
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ env_cflags = os.environ.get("CFLAGS", "")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ config_cflags = get_config_var("CFLAGS")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sdk = None
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for cflags_str in [env_cflags, config_cflags]:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ cflags = shlex.split(cflags_str)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for i, val in enumerate(cflags):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if val == "-isysroot":
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sdk = cflags[i + 1]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ break
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ elif val.find("-isysroot") == 0:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sdk = val[len("-isysroot"):]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ break
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if sdk:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ break
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return sdk
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ def get_sdk_level():
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- cflags = get_config_var("CFLAGS")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- cflags = shlex.split(cflags)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- for i, val in enumerate(cflags):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if val == "-isysroot":
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- sdk = cflags[i + 1]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- break
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- else:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sdk = get_sdk()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if not sdk:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return None
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if sdk == "/":
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return get_os_level()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- sdk = os.path.basename(sdk)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- assert sdk.startswith("MacOSX")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- assert sdk.endswith(".sdk")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return sdk[6:-4]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sdkname = os.path.basename(sdk)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ assert sdkname.startswith("MacOSX")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ assert sdkname.endswith(".sdk")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if sdkname == "MacOSX.sdk":
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ try:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ pl = plistlib.readPlist(os.path.join(sdk, "SDKSettings.plist"))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return pl["Version"]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ except:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ raise SystemExit("Cannot determine SDK version")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ else:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return sdkname[6:-4]
</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;'>+ class pyobjc_install_lib(install_lib.install_lib):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ def get_exclusions(self):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -411,17 +432,16 @@ def Extension(*args, **kwds):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ldflags = []
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if "clang" in get_config_var("CC"):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cflags.append("-Wno-deprecated-declarations")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- CFLAGS = get_config_var("CFLAGS")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if "-isysroot" not in CFLAGS: # and os.path.exists('/usr/include/stdio.h'):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- # We're likely on a system with de Xcode Command Line Tools.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- # Explicitly use the most recent problems to avoid compile problems.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sdk = get_sdk()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if not sdk: # and os.path.exists('/usr/include/stdio.h'):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # We're likely on a system with the Xcode Command Line Tools.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # Explicitly use the most recent SDK to avoid compile problems.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ data = subprocess.check_output(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ["/usr/bin/xcrun", "-sdk", "macosx", "--show-sdk-path"],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ universal_newlines=True,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ).strip()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- data = data.strip()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if data:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cflags.append("-isysroot")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cflags.append(data)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cflags.append(
</span></pre><pre style='margin:0'>
</pre>