<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/9719fb3cf851e6c7888a1a855079a76b3f3a0364">https://github.com/macports/macports-ports/commit/9719fb3cf851e6c7888a1a855079a76b3f3a0364</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 9719fb3cf85 python27: libffi detection fixes
</span>9719fb3cf85 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 9719fb3cf851e6c7888a1a855079a76b3f3a0364
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Sat Jan 8 23:51:42 2022 +1100
<span style='display:block; white-space:pre;color:#404040;'> python27: libffi detection fixes
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Fix getting libffi include dir from pkgconfig. Fix ffi.h validation to
</span><span style='display:block; white-space:pre;color:#404040;'> recognise muniversal builds.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> See: https://trac.macports.org/ticket/63730
</span>---
lang/python27/Portfile | 4 +++-
lang/python27/files/patch-setup.py.diff | 25 ++++++++++++++++++-------
2 files changed, 21 insertions(+), 8 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/python27/Portfile b/lang/python27/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index ce1c2052b7e..a6d6dedfa75 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/python27/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/python27/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -9,7 +9,7 @@ name python27
</span> epoch 2
# Remember to keep py27-tkinter and py27-gdbm's versions sync'd with this
version 2.7.18
<span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 7
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 8
</span>
set major [lindex [split $version .] 0]
set branch [join [lrange [split ${version} .] 0 1] .]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -114,6 +114,8 @@ configure.cppflags-append -I${prefix}/include/db48
</span> configure.ldflags-append -L${prefix}/lib/db48
configure.ccache no
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# pkg-config removes -I flags for paths in CPATH, which confuses python.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+configure.env-append PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
</span>
post-patch {
reinplace "s|@@PREFIX@@|${prefix}|g" \
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/python27/files/patch-setup.py.diff b/lang/python27/files/patch-setup.py.diff
</span><span style='display:block; white-space:pre;color:#808080;'>index 170b8837907..787f41b36f4 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/python27/files/patch-setup.py.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/python27/files/patch-setup.py.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- setup.py.orig 2017-09-17 03:38:35.000000000 +1000
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ setup.py 2017-09-22 08:06:01.000000000 +1000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- setup.py.orig 2020-04-20 07:13:39.000000000 +1000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ setup.py 2022-01-08 23:39:54.000000000 +1100
</span> @@ -33,7 +33,7 @@
COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -9,7 +9,7 @@
</span>
def add_dir_to_list(dirlist, dir):
"""Add the directory 'dir' to the list 'dirlist' (at the front) if
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -454,10 +454,6 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -500,10 +500,6 @@
</span> os.unlink(tmpfile)
def detect_modules(self):
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -20,7 +20,7 @@
</span> if cross_compiling:
self.add_gcc_paths()
self.add_multiarch_paths()
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -808,10 +804,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -854,10 +850,7 @@
</span> depends=['socketmodule.h'],
libraries=math_libs) )
# Detect SSL support for the socket module (via _ssl)
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -32,7 +32,7 @@
</span> ssl_incs = find_file('openssl/ssl.h', inc_dirs,
search_for_ssl_incs_in
)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -821,9 +814,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -867,9 +860,7 @@
</span> if krb5_h:
ssl_incs += krb5_h
ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -43,7 +43,7 @@
</span>
if (ssl_incs is not None and
ssl_libs is not None):
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -944,34 +935,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -990,34 +981,7 @@
</span>
# construct a list of paths to look for the header file in on
# top of the normal inc_dirs.
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -79,7 +79,7 @@
</span>
if cross_compiling:
db_inc_paths = []
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -2125,11 +2089,6 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2163,11 +2127,6 @@
</span> if not '--with-system-ffi' in sysconfig.get_config_var("CONFIG_ARGS"):
return
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -91,3 +91,14 @@
</span> ffi_inc = [sysconfig.get_config_var("LIBFFI_INCLUDEDIR")]
if not ffi_inc or ffi_inc[0] == '':
ffi_inc = find_file('ffi.h', [], inc_dirs)
<span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2177,7 +2136,9 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for line in f:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ line = line.strip()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if line.startswith(('#define LIBFFI_H',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- '#define ffi_wrapper_h')):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ '#define ffi_wrapper_h')) \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ or (line.startswith('#include "') and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ line.endswith('-ffi.h"')):
</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;'>+ ffi_inc = None
</span></pre><pre style='margin:0'>
</pre>