[packages/hhvm] - fix building with libevent 2.1 - rel 12

baggins baggins at pld-linux.org
Thu Apr 6 00:09:24 CEST 2017


commit aa8f72e5cd6348a862c5fe68fd1926d73e97e564
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Thu Apr 6 00:09:05 2017 +0200

    - fix building with libevent 2.1
    - rel 12

 hhvm.spec          |  4 ++-
 libevent-2.1.patch | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 90 insertions(+), 1 deletion(-)
---
diff --git a/hhvm.spec b/hhvm.spec
index 45d6fde..f78d427 100644
--- a/hhvm.spec
+++ b/hhvm.spec
@@ -34,7 +34,7 @@ Name:		hhvm
 # we prefer LTS versions
 # see http://hhvm.com/blog/6083/hhvm-long-term-support
 Version:	3.3.7
-Release:	11
+Release:	12
 License:	PHP 3.01 and BSD
 Group:		Development/Languages
 Source0:	https://github.com/facebook/hhvm/archive/HHVM-%{version}.tar.gz
@@ -56,6 +56,7 @@ Patch6:		libvpx2.patch
 Patch7:		gcc5.patch
 Patch8:		cxx.patch
 Patch9:		gcc6.patch
+Patch10:	libevent-2.1.patch
 URL:		https://github.com/facebook/hhvm/wiki
 BuildRequires:	ImageMagick-devel
 BuildRequires:	a52dec-libs-devel
@@ -267,6 +268,7 @@ mv folly-* third-party/folly/src
 %patch7 -p1
 %patch8 -p1
 %patch9 -p1
+%patch10 -p1
 
 # prefer ones from system
 rm CMake/FindBISON.cmake
diff --git a/libevent-2.1.patch b/libevent-2.1.patch
new file mode 100644
index 0000000..ca62e37
--- /dev/null
+++ b/libevent-2.1.patch
@@ -0,0 +1,87 @@
+diff -ur hhvm-HHVM-3.3.7/third-party/folly/src/folly/io/async/EventHandler.cpp hhvm-HHVM-3.3.7-libevent/third-party/folly/src/folly/io/async/EventHandler.cpp
+--- hhvm-HHVM-3.3.7/third-party/folly/src/folly/io/async/EventHandler.cpp	2014-08-15 07:39:56.000000000 +0200
++++ hhvm-HHVM-3.3.7-libevent/third-party/folly/src/folly/io/async/EventHandler.cpp	2017-04-05 09:48:54.401495460 +0200
+@@ -48,7 +48,7 @@
+     // If the new events are the same are the same as the already registered
+     // flags, we don't have to do anything.  Just return.
+     if (events == event_.ev_events &&
+-        static_cast<bool>(event_.ev_flags & EVLIST_INTERNAL) == internal) {
++        static_cast<bool>(event_.ev_evcallback.evcb_flags & EVLIST_INTERNAL) == internal) {
+       return true;
+     }
+ 
+@@ -65,7 +65,7 @@
+ 
+   // Set EVLIST_INTERNAL if this is an internal event
+   if (internal) {
+-    event_.ev_flags |= EVLIST_INTERNAL;
++    event_.ev_evcallback.evcb_flags |= EVLIST_INTERNAL;
+   }
+ 
+   // Add the event.
+@@ -157,7 +157,7 @@
+ }
+ 
+ bool EventHandler::isPending() const {
+-  if (event_.ev_flags & EVLIST_ACTIVE) {
++  if (event_.ev_evcallback.evcb_flags & EVLIST_ACTIVE) {
+     if (event_.ev_res & EV_READ) {
+       return true;
+     }
+diff -ur hhvm-HHVM-3.3.7/third-party/folly/src/folly/io/async/EventUtil.h hhvm-HHVM-3.3.7-libevent/third-party/folly/src/folly/io/async/EventUtil.h
+--- hhvm-HHVM-3.3.7/third-party/folly/src/folly/io/async/EventUtil.h	2014-08-15 07:39:56.000000000 +0200
++++ hhvm-HHVM-3.3.7-libevent/third-party/folly/src/folly/io/async/EventUtil.h	2017-04-05 09:49:06.011644952 +0200
+@@ -33,7 +33,7 @@
+       EVLIST_REGISTERED = (EVLIST_INSERTED | EVLIST_ACTIVE |
+                            EVLIST_TIMEOUT | EVLIST_SIGNAL)
+     };
+-    return (ev->ev_flags & EVLIST_REGISTERED);
++    return (ev->ev_evcallback.evcb_flags & EVLIST_REGISTERED);
+   }
+ };
+ 
+diff -ur hhvm-HHVM-3.3.7/third-party/thrift/lib/cpp/async/TEventBase.cpp hhvm-HHVM-3.3.7-libevent/third-party/thrift/lib/cpp/async/TEventBase.cpp
+--- hhvm-HHVM-3.3.7/third-party/thrift/lib/cpp/async/TEventBase.cpp	2015-01-09 22:57:55.000000000 +0100
++++ hhvm-HHVM-3.3.7-libevent/third-party/thrift/lib/cpp/async/TEventBase.cpp	2017-04-05 09:51:18.936671156 +0200
+@@ -545,7 +545,7 @@
+   event_base_set(getLibeventBase(), ev);
+   if (internal == TAsyncTimeout::InternalEnum::INTERNAL) {
+     // Set the EVLIST_INTERNAL flag
+-    ev->ev_flags |= EVLIST_INTERNAL;
++    ev->ev_evcallback.evcb_flags |= EVLIST_INTERNAL;
+   }
+ }
+ 
+diff -ur hhvm-HHVM-3.3.7/third-party/thrift/lib/cpp/async/TEventHandler.cpp hhvm-HHVM-3.3.7-libevent/third-party/thrift/lib/cpp/async/TEventHandler.cpp
+--- hhvm-HHVM-3.3.7/third-party/thrift/lib/cpp/async/TEventHandler.cpp	2015-01-09 22:57:55.000000000 +0100
++++ hhvm-HHVM-3.3.7-libevent/third-party/thrift/lib/cpp/async/TEventHandler.cpp	2017-04-05 21:46:33.663690636 +0200
+@@ -49,7 +49,7 @@
+     // If the new events are the same are the same as the already registered
+     // flags, we don't have to do anything.  Just return.
+     if (events == event_.ev_events &&
+-        static_cast<bool>(event_.ev_flags & EVLIST_INTERNAL) == internal) {
++        static_cast<bool>(event_.ev_evcallback.evcb_flags & EVLIST_INTERNAL) == internal) {
+       return true;
+     }
+ 
+@@ -66,7 +66,7 @@
+ 
+   // Set EVLIST_INTERNAL if this is an internal event
+   if (internal) {
+-    event_.ev_flags |= EVLIST_INTERNAL;
++    event_.ev_evcallback.evcb_flags |= EVLIST_INTERNAL;
+   }
+ 
+   // Add the event.
+diff -ur hhvm-HHVM-3.3.7/third-party/thrift/lib/cpp/async/TEventUtil.h hhvm-HHVM-3.3.7-libevent/third-party/thrift/lib/cpp/async/TEventUtil.h
+--- hhvm-HHVM-3.3.7/third-party/thrift/lib/cpp/async/TEventUtil.h	2015-01-09 22:57:55.000000000 +0100
++++ hhvm-HHVM-3.3.7-libevent/third-party/thrift/lib/cpp/async/TEventUtil.h	2017-04-05 09:49:53.382252029 +0200
+@@ -34,7 +34,7 @@
+       EVLIST_REGISTERED = (EVLIST_INSERTED | EVLIST_ACTIVE |
+                            EVLIST_TIMEOUT | EVLIST_SIGNAL)
+     };
+-    return (ev->ev_flags & EVLIST_REGISTERED);
++    return (ev->ev_evcallback.evcb_flags & EVLIST_REGISTERED);
+   }
+ };
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/hhvm.git/commitdiff/aa8f72e5cd6348a862c5fe68fd1926d73e97e564



More information about the pld-cvs-commit mailing list