py-cffi: Do not attempt to peek past pkg-config on Darwin/FreeBSD

This commit is contained in:
nia 2024-03-19 10:49:46 +00:00
parent 26fb34196e
commit dda658f49b
2 changed files with 25 additions and 1 deletions

View File

@ -1,7 +1,8 @@
$NetBSD: distinfo,v 1.48 2023/10/04 21:51:44 adam Exp $
$NetBSD: distinfo,v 1.49 2024/03/19 10:49:46 nia Exp $
BLAKE2s (cffi-1.16.0.tar.gz) = 9573f137415a07450c7403bd50d5335cd101f538567b9ada700cc00ed88eeff6
SHA512 (cffi-1.16.0.tar.gz) = fd2588115092202aa9289c9d4e0a0b3e264b5e9ec1dc192950f31aeb412fd9f9d4e5c96a3f9c6762987b58ccc1e229f2012ddda89211797104df672d8ed51152
Size (cffi-1.16.0.tar.gz) = 512873 bytes
SHA1 (patch-setup.py) = 5d31edc3a7787f04f4e4f18fc4deb25daf338401
SHA1 (patch-testing_cffi0_test__verify.py) = 91e903aa6aa89f997aba1578cb9452e6ac160f50
SHA1 (patch-testing_cffi1_test__verify1.py) = 72d564ff8422bc1c8ed8b7058fb95ca669b69529

View File

@ -0,0 +1,23 @@
$NetBSD: patch-setup.py,v 1.1 2024/03/19 10:49:46 nia Exp $
Nope, we want the one from pkgsrc. Honour pkg-config.
Also, -iwithsysroot is not supported by all compilers.
--- setup.py.orig 2024-03-19 10:46:00.000000000 +0000
+++ setup.py
@@ -148,14 +148,6 @@ else:
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')
-
forced_extra_objs = os.environ.get('CFFI_FORCE_STATIC', [])
if forced_extra_objs:
forced_extra_objs = forced_extra_objs.split(';')