diff --git a/libev.patch b/libev.patch new file mode 100644 index 0000000..12b6ec0 --- /dev/null +++ b/libev.patch @@ -0,0 +1,24 @@ +Index: gevent-1.0/libev/ev.c +=================================================================== +--- gevent-1.0.orig/libev/ev.c ++++ gevent-1.0/libev/ev.c +@@ -617,9 +617,16 @@ struct signalfd_siginfo + #if ECB_GCC_VERSION(4,7) + /* see comment below (stdatomic.h) about the C11 memory model. */ + #define ECB_MEMORY_FENCE __atomic_thread_fence (__ATOMIC_SEQ_CST) +- #elif defined __clang && __has_feature (cxx_atomic) +- /* see comment below (stdatomic.h) about the C11 memory model. */ +- #define ECB_MEMORY_FENCE __c11_atomic_thread_fence (__ATOMIC_SEQ_CST) ++ ++ /* The __has_feature syntax from clang is so misdesigned that we cannot use it ++ * without risking compile time errors with other compilers. We *could* ++ * define our own ecb_clang_has_feature, but I just can't be bothered to work ++ * around this shit time and again. ++ * #elif defined __clang && __has_feature (cxx_atomic) ++ * // see comment below (stdatomic.h) about the C11 memory model. ++ * #define ECB_MEMORY_FENCE __c11_atomic_thread_fence (__ATOMIC_SEQ_CST) ++ */ ++ + #elif ECB_GCC_VERSION(4,4) || defined __INTEL_COMPILER || defined __clang__ + #define ECB_MEMORY_FENCE __sync_synchronize () + #elif _MSC_VER >= 1400 /* VC++ 2005 */ diff --git a/python-gevent.changes b/python-gevent.changes index 9dbca00..23eacc1 100644 --- a/python-gevent.changes +++ b/python-gevent.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jun 12 08:47:18 UTC 2014 - schwab@suse.de + +- libev.patch: fix syntax error in preprocessor conditional + ------------------------------------------------------------------- Sun Dec 15 15:01:04 UTC 2013 - p.drouand@gmail.com diff --git a/python-gevent.spec b/python-gevent.spec index 4a67785..a183b94 100644 --- a/python-gevent.spec +++ b/python-gevent.spec @@ -1,7 +1,7 @@ # # spec file for package python-gevent # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,6 +24,8 @@ Summary: Python network library that uses greenlet and libevent License: MIT Group: Development/Languages/Python Source: http://pypi.python.org/packages/source/g/gevent/gevent-%{version}.tar.gz +# PATCH-FIX-UPSTREAM fix syntax error in preprocessor conditional (github issue 361) +Patch: libev.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: libevent-devel #BuildRequires: python-Sphinx @@ -54,6 +56,7 @@ out the list of the open source projects based on gevent. %prep %setup -q -n gevent-%{version} +%patch -p1 %build CFLAGS="%{optflags} -fno-strict-aliasing" python setup.py build