diff options
author | sjmulder <sjmulder@pkgsrc.org> | 2020-11-18 11:03:31 +0000 |
---|---|---|
committer | sjmulder <sjmulder@pkgsrc.org> | 2020-11-18 11:03:31 +0000 |
commit | b662959677d501278a45a5f51310ad00396f3208 (patch) | |
tree | d37a4c80201c34f908383eb1f1657e4d5148c627 /lang/python37 | |
parent | adb0b0f7e1293727d2d2313458d2bc7781759bff (diff) | |
download | pkgsrc-b662959677d501278a45a5f51310ad00396f3208.tar.gz |
lang/python37: Fix on CentOS 7
Same as lang/python38 fix just now:
Move __has_attribute() inside #if defined(__has_attribute) body so the
preprocessor doesn't break on that.
Diffstat (limited to 'lang/python37')
-rw-r--r-- | lang/python37/distinfo | 6 | ||||
-rw-r--r-- | lang/python37/patches/patch-Modules___ctypes_callbacks.c | 6 | ||||
-rw-r--r-- | lang/python37/patches/patch-Modules_timemodule.c | 16 |
3 files changed, 15 insertions, 13 deletions
diff --git a/lang/python37/distinfo b/lang/python37/distinfo index fb51b8d06b8..9966cce7fda 100644 --- a/lang/python37/distinfo +++ b/lang/python37/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.22 2020/11/17 19:33:26 sjmulder Exp $ +$NetBSD: distinfo,v 1.23 2020/11/18 11:03:31 sjmulder Exp $ SHA1 (Python-3.7.9.tar.xz) = e1de02779a89a94000c0ed340ec126de25825f2f RMD160 (Python-3.7.9.tar.xz) = 6ff3676f84b1a103b0e3161dcc7257936c914daf @@ -22,7 +22,7 @@ SHA1 (patch-Lib_test_test__unicode.py) = 4dfccf72ae60d1e1092ff84b7c05a735865ba8a SHA1 (patch-Mac_BuildScript_build-installer.py) = a377ed164ee2ba72ce0f72ccf9507e775f7b7deb SHA1 (patch-Mac_Tools_pythonw.c) = 94f27032aac27263bc1c1bd66574121fbca1e380 SHA1 (patch-Makefile.pre.in) = 1393dac225c5a7edcb7947eb707b4526ea884f95 -SHA1 (patch-Modules___ctypes_callbacks.c) = 98bd449f9c4bf3acbcfdd24d017f490fc0c9326e +SHA1 (patch-Modules___ctypes_callbacks.c) = 739462325d430d2b57483738d94a3174e36e50e1 SHA1 (patch-Modules___ctypes_callproc.c) = d0905ede69f2c61d917380d6da73c14e7e31d41f SHA1 (patch-Modules___ctypes_ctypes.h) = 2589d24c101771f8696b456d594e5f53305cf72c SHA1 (patch-Modules___ctypes_malloc__closure.c) = 780e7dfa293c57dc28e97358937ed7d148414c8e @@ -32,7 +32,7 @@ SHA1 (patch-Modules_nismodule.c) = 1bafe9b06359586d027a77011b103877590d947d SHA1 (patch-Modules_posixmodule.c) = cae3797179c1a4d820dd294b69ca4b9a6fa81899 SHA1 (patch-Modules_socketmodule.c) = c0bdb256bccc176c2406feec4080cd91fcb693b2 SHA1 (patch-Modules_socketmodule.h) = 13a3290eb72078067060d3e71b7baa08f3eb591c -SHA1 (patch-Modules_timemodule.c) = c0fa13e7f02046b1dfde36a50898b4c46ca3792e +SHA1 (patch-Modules_timemodule.c) = e4be632485280002eb76a8e6e524676429044c15 SHA1 (patch-Python_bootstrap__hash.c) = c60b3987e549987a1180edaab0ad2d48fc272925 SHA1 (patch-Python_pytime.c) = 5d782457439708f5e8e46043eed5fe7ba40f45f9 SHA1 (patch-Python_thread__pthread.h) = fb81eaa604b4ed7c1b64c3f4731d58a8aee257be diff --git a/lang/python37/patches/patch-Modules___ctypes_callbacks.c b/lang/python37/patches/patch-Modules___ctypes_callbacks.c index c7e12b8a403..7a4551e24b3 100644 --- a/lang/python37/patches/patch-Modules___ctypes_callbacks.c +++ b/lang/python37/patches/patch-Modules___ctypes_callbacks.c @@ -1,4 +1,4 @@ -$NetBSD: patch-Modules___ctypes_callbacks.c,v 1.1 2020/11/17 19:33:26 sjmulder Exp $ +$NetBSD: patch-Modules___ctypes_callbacks.c,v 1.2 2020/11/18 11:03:31 sjmulder Exp $ Support for macOS 11 and Apple Silicon (ARM). Mostly backported from: https://github.com/python/cpython/pull/22855 @@ -62,14 +62,14 @@ https://github.com/python/cpython/pull/22855 +#ifdef MACOSX + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wdeprecated-declarations" - #endif ++#endif + result = ffi_prep_closure(p->pcl_write, &p->cif, closure_fcn, p); + +#ifdef MACOSX + #pragma clang diagnostic pop +#endif + -+#endif + #endif + } if (result != FFI_OK) { PyErr_Format(PyExc_RuntimeError, diff --git a/lang/python37/patches/patch-Modules_timemodule.c b/lang/python37/patches/patch-Modules_timemodule.c index 3ac2e612460..72dc1cc3817 100644 --- a/lang/python37/patches/patch-Modules_timemodule.c +++ b/lang/python37/patches/patch-Modules_timemodule.c @@ -1,4 +1,4 @@ -$NetBSD: patch-Modules_timemodule.c,v 1.1 2020/11/17 19:33:26 sjmulder Exp $ +$NetBSD: patch-Modules_timemodule.c,v 1.2 2020/11/18 11:03:31 sjmulder Exp $ Support for macOS 11 and Apple Silicon (ARM). Mostly backported from: https://github.com/python/cpython/pull/22855 @@ -104,24 +104,26 @@ https://github.com/python/cpython/pull/22855 } #endif -@@ -1327,6 +1355,16 @@ _PyTime_GetThreadTimeWithInfo(_PyTime_t +@@ -1327,6 +1355,18 @@ _PyTime_GetThreadTimeWithInfo(_PyTime_t #elif defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_PROCESS_CPUTIME_ID) #define HAVE_THREAD_TIME + -+#if defined(__APPLE__) && defined(__has_attribute) && __has_attribute(availability) ++#if defined(__APPLE__) && defined(__has_attribute) ++# if __has_attribute(availability) +static int +_PyTime_GetThreadTimeWithInfo(_PyTime_t *tp, _Py_clock_info_t *info) + __attribute__((availability(macos, introduced=10.12))) + __attribute__((availability(ios, introduced=10.0))) + __attribute__((availability(tvos, introduced=10.0))) + __attribute__((availability(watchos, introduced=3.0))); ++# endif +#endif + static int _PyTime_GetThreadTimeWithInfo(_PyTime_t *tp, _Py_clock_info_t *info) { -@@ -1358,6 +1396,15 @@ _PyTime_GetThreadTimeWithInfo(_PyTime_t +@@ -1358,6 +1398,15 @@ _PyTime_GetThreadTimeWithInfo(_PyTime_t #endif #ifdef HAVE_THREAD_TIME @@ -137,7 +139,7 @@ https://github.com/python/cpython/pull/22855 static PyObject * time_thread_time(PyObject *self, PyObject *unused) { -@@ -1388,6 +1435,11 @@ PyDoc_STRVAR(thread_time_ns_doc, +@@ -1388,6 +1437,11 @@ PyDoc_STRVAR(thread_time_ns_doc, \n\ Thread time for profiling as nanoseconds:\n\ sum of the kernel and user-space CPU time."); @@ -149,7 +151,7 @@ https://github.com/python/cpython/pull/22855 #endif -@@ -1446,9 +1498,19 @@ time_get_clock_info(PyObject *self, PyOb +@@ -1446,9 +1500,19 @@ time_get_clock_info(PyObject *self, PyOb } #ifdef HAVE_THREAD_TIME else if (strcmp(name, "thread_time") == 0) { @@ -170,7 +172,7 @@ https://github.com/python/cpython/pull/22855 } #endif else { -@@ -1761,40 +1823,85 @@ PyInit_time(void) +@@ -1761,40 +1825,85 @@ PyInit_time(void) if (m == NULL) return NULL; |