Files
Ken Cunningham ea9528e1a5 py-cffi: fix build on older systems
blacklist older gcc versions that don't allow
  pragmas inside functions
remove a -iwithisysroot command that points to
  /usr/include/libffi, which we never want,
  and which is not accepted by gcc

closes: https://trac.macports.org/ticket/61804
2020-12-10 23:54:12 -08:00

24 lines
942 B
Diff

--- setup.py.orig 2020-11-24 06:08:38.000000000 -0800
+++ setup.py 2020-12-10 22:04:28.000000000 -0800
@@ -109,9 +109,6 @@
return config.try_compile('#ifndef _MSC_VER\n#error "not MSVC"\n#endif')
def use_pkg_config():
- if sys.platform == 'darwin' and os.path.exists('/usr/local/bin/brew'):
- use_homebrew_for_libffi()
-
_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)
@@ -153,10 +150,6 @@
ask_supports_thread()
ask_supports_sync_synchronize()
-if 'darwin' in sys.platform:
- # priority is given to `pkg_config`, but always fall back on SDK's libffi.
- extra_compile_args += ['-iwithsysroot/usr/include/ffi']
-
if 'freebsd' in sys.platform:
include_dirs.append('/usr/local/include')
library_dirs.append('/usr/local/lib')