[arch-commits] Commit in hhvm/trunk (PKGBUILD namespaces.patch)

Bartłomiej Piotrowski bpiotrowski at archlinux.org
Fri Mar 4 20:17:46 UTC 2016


    Date: Friday, March 4, 2016 @ 21:17:46
  Author: bpiotrowski
Revision: 164834

Update to 3.12.1 with ugly build fix

Added:
  hhvm/trunk/namespaces.patch
Modified:
  hhvm/trunk/PKGBUILD

------------------+
 PKGBUILD         |   12 ++--
 namespaces.patch |  144 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 152 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2016-03-04 19:41:27 UTC (rev 164833)
+++ PKGBUILD	2016-03-04 20:17:46 UTC (rev 164834)
@@ -3,7 +3,7 @@
 # Contributor: James Miller <james at pocketrent.com>
 
 pkgname=hhvm
-pkgver=3.12.0
+pkgver=3.12.1
 pkgrel=1
 
 _thirdparty_commit=ae031dcc9594163f5b0c35e7026563f1c8372595
@@ -38,7 +38,8 @@
         'hhvm.service'
         'hhvm at .service'
         'php.ini'
-        'server.ini')
+        'server.ini'
+        'namespaces.patch')
 install=hhvm.install
 backup=(etc/hhvm/{php,server}.ini)
 options+=('!buildflags')
@@ -46,6 +47,8 @@
 prepare() {
     cd "$srcdir"/$pkgname-HHVM-$pkgver
 
+    patch -p1 -i "$srcdir"/namespaces.patch
+
     sed -r 's/service hhvm (start|stop|restart)/systemctl \1 hhvm.service/' \
         -i hphp/tools/oss-repo-mode
 
@@ -131,7 +134,7 @@
     install -Dm644 server.ini "$pkgdir"/etc/hhvm/server.ini
 }
 
-sha256sums=('9bbe243f22fd1d3cf6e6fbc2c7d82db383ec88d7742bf4d24584c2af641b0681'
+sha256sums=('6227c1b24418a0c1bc0e1b09990afda1dddeace492becba210f183087a01cd26'
             'bdf6c71fc023cc7093672a54418e62d058361b4d0fd016c497e9083d93786590'
             'd9a68d98bb9ad263c671b48a5f7f5b8db90b5bffe438922c1b285700f01e824c'
             '7e36c2c10a13a416e5384615e93f55d3742e0d96559d611877b746252e672ed7'
@@ -144,4 +147,5 @@
             '8b50d1ef9f5f726e6d8d469a8c84d85ad63f8b507b97d258b4d751a0e3e221df'
             '59c640602929dac0aa34d06c668ed69361eb4b7b47a77f9aa0badb4d0b61571c'
             '3e3093f817706c238fad021483f114fd4ce0b45d84097dcb7870157fc9ec769f'
-            '5b53bc57965e1c5151d720dc7f63f1b2e8ebd5e758b2ef0be3b74df38ebcbce0')
+            '5b53bc57965e1c5151d720dc7f63f1b2e8ebd5e758b2ef0be3b74df38ebcbce0'
+            '4b83a34d76e9a20001d55bf828e6db3272e5f12a7b02a87e902642236ad2ad7c')

Added: namespaces.patch
===================================================================
--- namespaces.patch	                        (rev 0)
+++ namespaces.patch	2016-03-04 20:17:46 UTC (rev 164834)
@@ -0,0 +1,144 @@
+diff --git a/hphp/runtime/base/tv-helpers.cpp b/hphp/runtime/base/tv-helpers.cpp
+index 4e01e81..1a872dd 100644
+--- a/hphp/runtime/base/tv-helpers.cpp
++++ b/hphp/runtime/base/tv-helpers.cpp
+@@ -14,6 +14,8 @@
+    +----------------------------------------------------------------------+
+ */
+ 
++#include <cmath>
++
+ #include "hphp/runtime/base/tv-helpers.h"
+ 
+ #include "hphp/runtime/base/dummy-resource.h"
+@@ -673,7 +675,7 @@ bool tvCoerceParamToInt64InPlace(TypedValue* tv) {
+   if (RuntimeOption::PHP7_ScalarTypes && tv->m_type == KindOfDouble) {
+     if (tv->m_data.dbl < std::numeric_limits<int64_t>::min()) return false;
+     if (tv->m_data.dbl > std::numeric_limits<int64_t>::max()) return false;
+-    if (isnan(tv->m_data.dbl)) return false;
++    if (std::isnan(tv->m_data.dbl)) return false;
+   }
+   tvCastToInt64InPlace(tv);
+   return true;
+diff --git a/hphp/runtime/base/zend-printf.cpp b/hphp/runtime/base/zend-printf.cpp
+index a008f3a..c6f0fa4 100644
+--- a/hphp/runtime/base/zend-printf.cpp
++++ b/hphp/runtime/base/zend-printf.cpp
+@@ -18,6 +18,7 @@
+ #include "hphp/runtime/base/zend-printf.h"
+ 
+ #include <math.h>
++#include <cmath>
+ 
+ #include "hphp/runtime/base/array-iterator.h"
+ #include "hphp/runtime/base/builtin-functions.h"
+@@ -693,14 +694,14 @@ inline static void appenddouble(StringBuffer *buffer,
+     precision = MAX_FLOAT_PRECISION;
+   }
+ 
+-  if (isnan(number)) {
++  if (std::isnan(number)) {
+     is_negative = (number<0);
+     appendstring(buffer, "NaN", 3, 0, padding,
+                  alignment, 3, is_negative, 0, always_sign);
+     return;
+   }
+ 
+-  if (isinf(number)) {
++  if (std::isinf(number)) {
+     is_negative = (number<0);
+     appendstring(buffer, "INF", 3, 0, padding,
+                  alignment, 3, is_negative, 0, always_sign);
+@@ -1407,10 +1408,10 @@ static int xbuf_format_converter(char **outbuf, const char *fmt, va_list ap)
+               goto fmt_error;
+           }
+ 
+-          if (isnan(fp_num)) {
++          if (std::isnan(fp_num)) {
+             s = const_cast<char*>("nan");
+             s_len = 3;
+-          } else if (isinf(fp_num)) {
++          } else if (std::isinf(fp_num)) {
+             s = const_cast<char*>("inf");
+             s_len = 3;
+           } else {
+@@ -1448,11 +1449,11 @@ static int xbuf_format_converter(char **outbuf, const char *fmt, va_list ap)
+               goto fmt_error;
+           }
+ 
+-          if (isnan(fp_num)) {
++          if (std::isnan(fp_num)) {
+              s = const_cast<char*>("NAN");
+              s_len = 3;
+              break;
+-           } else if (isinf(fp_num)) {
++           } else if (std::isinf(fp_num)) {
+              if (fp_num > 0) {
+                s = const_cast<char*>("INF");
+                s_len = 3;
+diff --git a/hphp/runtime/ext/std/ext_std_math.cpp b/hphp/runtime/ext/std/ext_std_math.cpp
+index 7bb7390..2d6da60 100644
+--- a/hphp/runtime/ext/std/ext_std_math.cpp
++++ b/hphp/runtime/ext/std/ext_std_math.cpp
+@@ -24,6 +24,8 @@
+ #include "hphp/runtime/ext/std/ext_std.h"
+ #include "hphp/system/constants.h"
+ 
++#include <cmath>
++
+ namespace HPHP {
+ ///////////////////////////////////////////////////////////////////////////////
+ 
+@@ -187,9 +189,9 @@ Variant HHVM_FUNCTION(abs, const Variant& number) {
+   }
+ }
+ 
+-bool HHVM_FUNCTION(is_finite, double val) { return finite(val);}
+-bool HHVM_FUNCTION(is_infinite, double val) { return isinf(val);}
+-bool HHVM_FUNCTION(is_nan, double val) { return isnan(val);}
++bool HHVM_FUNCTION(is_finite, double val) { return std::isfinite(val);}
++bool HHVM_FUNCTION(is_infinite, double val) { return std::isinf(val);}
++bool HHVM_FUNCTION(is_nan, double val) { return std::isnan(val);}
+ 
+ Variant HHVM_FUNCTION(ceil, const Variant& number) {
+   int64_t ival;
+diff --git a/hphp/runtime/ext_zend_compat/php-src/main/snprintf.cpp b/hphp/runtime/ext_zend_compat/php-src/main/snprintf.cpp
+index 352c4f8..7745085 100644
+--- a/hphp/runtime/ext_zend_compat/php-src/main/snprintf.cpp
++++ b/hphp/runtime/ext_zend_compat/php-src/main/snprintf.cpp
+@@ -29,6 +29,8 @@
+ #include <stdlib.h>
+ #include <math.h>
+ 
++#include <cmath>
++
+ #ifdef HAVE_INTTYPES_H
+ #include <inttypes.h>
+ #endif
+@@ -989,10 +991,10 @@ static int format_converter(register buffy * odp, const char *fmt, va_list ap) /
+               goto fmt_error;
+           }
+ 
+-          if (zend_isnan(fp_num)) {
++          if (std::isnan(fp_num)) {
+             s = "NAN";
+             s_len = 3;
+-          } else if (zend_isinf(fp_num)) {
++          } else if (std::isinf(fp_num)) {
+             s = "INF";
+             s_len = 3;
+           } else {
+@@ -1030,11 +1032,11 @@ static int format_converter(register buffy * odp, const char *fmt, va_list ap) /
+               goto fmt_error;
+           }
+ 
+-          if (zend_isnan(fp_num)) {
++          if (std::isnan(fp_num)) {
+             s = "NAN";
+             s_len = 3;
+             break;
+-          } else if (zend_isinf(fp_num)) {
++          } else if (std::isinf(fp_num)) {
+             if (fp_num > 0) {
+               s = "INF";
+               s_len = 3;



More information about the arch-commits mailing list