<pre style='margin:0'>
Ken (kencu) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/ea9528e1a577fce8ccbcec8f8a86e3197be5831a">https://github.com/macports/macports-ports/commit/ea9528e1a577fce8ccbcec8f8a86e3197be5831a</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 ea9528e1a57 py-cffi: fix build on older systems
</span>ea9528e1a57 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit ea9528e1a577fce8ccbcec8f8a86e3197be5831a
</span>Author: Ken Cunningham <kencu@macports.org>
AuthorDate: Thu Dec 10 22:12:50 2020 -0800
<span style='display:block; white-space:pre;color:#404040;'> py-cffi: fix build on older systems
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> blacklist older gcc versions that don't allow
</span><span style='display:block; white-space:pre;color:#404040;'> pragmas inside functions
</span><span style='display:block; white-space:pre;color:#404040;'> remove a -iwithisysroot command that points to
</span><span style='display:block; white-space:pre;color:#404040;'> /usr/include/libffi, which we never want,
</span><span style='display:block; white-space:pre;color:#404040;'> and which is not accepted by gcc
</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/61804
</span>---
python/py-cffi/Portfile | 3 +++
python/py-cffi/files/patch-setup.py.diff | 19 +++++++++++++++----
2 files changed, 18 insertions(+), 4 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/python/py-cffi/Portfile b/python/py-cffi/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 7196ec248e8..8ae296ebc1b 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/python/py-cffi/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/python/py-cffi/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -29,6 +29,9 @@ checksums rmd160 585002edbc970ac5ec7f592bb873cc7c415b9b31 \
</span> if {${name} ne ${subport}} {
patchfiles-append patch-setup.py.diff
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ # ticket 61804
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ compiler.blacklist-append *gcc-3.* *gcc-4.*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> depends_build-append \
port:py${python.version}-setuptools
depends_lib-append port:libffi \
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/python/py-cffi/files/patch-setup.py.diff b/python/py-cffi/files/patch-setup.py.diff
</span><span style='display:block; white-space:pre;color:#808080;'>index a4ceaa07cfb..cab70d66fea 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/python/py-cffi/files/patch-setup.py.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/python/py-cffi/files/patch-setup.py.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,7 +1,7 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- setup.py.orig 2015-12-18 16:51:35.000000000 +0300
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ setup.py 2015-12-18 16:52:01.000000000 +0300
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -67,9 +67,6 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sys.stderr.write("The above error message can be safely ignored\n")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- setup.py.orig 2020-11-24 06:08:38.000000000 -0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ setup.py 2020-12-10 22:04:28.000000000 -0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -109,9 +109,6 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return config.try_compile('#ifndef _MSC_VER\n#error "not MSVC"\n#endif')
</span>
def use_pkg_config():
- if sys.platform == 'darwin' and os.path.exists('/usr/local/bin/brew'):
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -10,3 +10,14 @@
</span> _ask_pkg_config(include_dirs, '--cflags-only-I', '-I', sysroot=True)
_ask_pkg_config(extra_compile_args, '--cflags-only-other')
_ask_pkg_config(library_dirs, '--libs-only-L', '-L', sysroot=True)
<span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -153,10 +150,6 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ask_supports_thread()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ask_supports_sync_synchronize()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-if 'darwin' in sys.platform:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- # priority is given to `pkg_config`, but always fall back on SDK's libffi.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- extra_compile_args += ['-iwithsysroot/usr/include/ffi']
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if 'freebsd' in sys.platform:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ include_dirs.append('/usr/local/include')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ library_dirs.append('/usr/local/lib')
</span></pre><pre style='margin:0'>
</pre>