Tue Mar 19 10:49:47 2024 UTC (68d)
py-cffi: Do not attempt to peek past pkg-config on Darwin/FreeBSD


(nia)
diff -r1.48 -r1.49 pkgsrc/devel/py-cffi/distinfo
diff -r0 -r1.1 pkgsrc/devel/py-cffi/patches/patch-setup.py

cvs diff -r1.48 -r1.49 pkgsrc/devel/py-cffi/distinfo (expand / switch to unified diff)

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

File Added: pkgsrc/devel/py-cffi/patches/patch-setup.py
$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(';')