Date: Sunday, April 3, 2016 @ 07:36:36 Author: fyan Revision: 169324 archrelease: copy trunk to community-staging-x86_64
Added: hhvm/repos/community-staging-x86_64/ hhvm/repos/community-staging-x86_64/PKGBUILD (from rev 169323, hhvm/trunk/PKGBUILD) hhvm/repos/community-staging-x86_64/hhvm.install (from rev 169323, hhvm/trunk/hhvm.install) hhvm/repos/community-staging-x86_64/hhvm.service (from rev 169323, hhvm/trunk/hhvm.service) hhvm/repos/community-staging-x86_64/hhvm.tmpfile (from rev 169323, hhvm/trunk/hhvm.tmpfile) hhvm/repos/community-staging-x86_64/hhvm@.service (from rev 169323, hhvm/trunk/hhvm@.service) hhvm/repos/community-staging-x86_64/namespaces.patch (from rev 169323, hhvm/trunk/namespaces.patch) hhvm/repos/community-staging-x86_64/php.ini (from rev 169323, hhvm/trunk/php.ini) hhvm/repos/community-staging-x86_64/server.ini (from rev 169323, hhvm/trunk/server.ini) ------------------+ PKGBUILD | 151 +++++++++++++++++++++++++++++++++++++++++++++++++++++ hhvm.install | 9 +++ hhvm.service | 15 +++++ hhvm.tmpfile | 2 hhvm@.service | 15 +++++ namespaces.patch | 143 ++++++++++++++++++++++++++++++++++++++++++++++++++ php.ini | 10 +++ server.ini | 6 ++ 8 files changed, 351 insertions(+) Copied: hhvm/repos/community-staging-x86_64/PKGBUILD (from rev 169323, hhvm/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2016-04-03 05:36:36 UTC (rev 169324) @@ -0,0 +1,151 @@ +# $Id$ +# Maintainer: Massimiliano Torromeo <massimiliano.torro...@gmail.com> +# Contributor: James Miller <ja...@pocketrent.com> + +pkgname=hhvm +pkgver=3.13.0 +pkgrel=2 + +_thirdparty_commit=57ddc7942877befb97ecc3df2581a4de119049aa +_folly_commit=add5a7aeacacb050c4b0bad84aac1475fa2658c9 +_mcrouter_commit=fa3892ced1a5525b947828c9860861f8d97c8ae0 +_proxygen_commit=61e339de02b1537c943506fa1a0570c4f8fa3cc0 +_squangle_commit=e0fc74959076c552efb56b4c62aa373364640421 +_thrift_commit=f6da2972faf97639f96e2d879b4649ab3b5b6d17 +_wangle_commit=ec31c0496f606a3c8e6f90f7d5441db9f2a74618 +_webscalesql_commit=a9e580b5a0baa768210ef10544c8fab52003ec0b + +pkgdesc="Virtual Machine, Runtime, and JIT for PHP" +arch=('x86_64') +url="http://hhvm.com" +license=('PHP') +depends=('boost-libs' 'google-glog' 'libmysqlclient' 'libmemcached' 'libzip' + 'libxslt' 'intel-tbb' 'libmcrypt' 'oniguruma' 'jemalloc' 'curl' 'libvpx' + 'libdwarf' 'imagemagick' 'libedit' 'sqlite' 'libyaml' 'fribidi' 're2' + 'gperf' 'c-client' 'unixodbc') +makedepends=('git' 'cmake' 'gcc' 'boost' 'gflags' 'python2' 'pfff' 'mongodb' + 'ragel' 'libmariadbclient') +source=("https://github.com/facebook/hhvm/archive/HHVM-$pkgver.tar.gz" + "https://github.com/hhvm/hhvm-third-party/archive/$_thirdparty_commit/hhvm-third-party-$_thirdparty_commit.tar.gz" + "https://github.com/facebook/folly/archive/$_folly_commit/folly-$_folly_commit.tar.gz" + "https://github.com/facebook/fbthrift/archive/$_thrift_commit/thrift-$_thrift_commit.tar.gz" + "https://github.com/facebook/proxygen/archive/$_proxygen_commit/proxygen-$_proxygen_commit.tar.gz" + "https://github.com/facebook/mysql-5.6/archive/$_webscalesql_commit/webscalesql-$_webscalesql_commit.tar.gz" + "https://github.com/facebook/mcrouter/archive/$_mcrouter_commit/mcrouter-$_mcrouter_commit.tar.gz" + "https://github.com/facebook/squangle/archive/$_squangle_commit/squangle-$_squangle_commit.tar.gz" + "https://github.com/facebook/wangle/archive/$_wangle_commit/wangle-$_wangle_commit.tar.gz" + 'hhvm.tmpfile' + 'hhvm.service' + 'hhvm@.service' + 'php.ini' + 'server.ini' + 'namespaces.patch') +install=hhvm.install +backup=(etc/hhvm/{php,server}.ini) +options+=('!buildflags') + +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 + + # Fix sendmail path + sed -r 's#/usr/lib/sendmail#/usr/bin/sendmail#g' -i \ + hphp/runtime/base/runtime-option.cpp + + rm -rf third-party + ln -s "$srcdir"/hhvm-third-party-$_thirdparty_commit third-party + + cd third-party/folly + rm -rf src + ln -s "$srcdir"/folly-$_folly_commit src + + cd ../thrift + rm -rf src + ln -s "$srcdir"/fbthrift-$_thrift_commit src + + cd ../proxygen + rm -rf src + ln -s "$srcdir"/proxygen-$_proxygen_commit src + + cd ../mcrouter + rm -rf src + ln -s "$srcdir"/mcrouter-$_mcrouter_commit src + + cd ../wangle + rm -rf src + ln -s "$srcdir"/wangle-$_wangle_commit src + + cd ../squangle + rm -rf src squangle + ln -s "$srcdir"/squangle-$_squangle_commit src + ln -s src/squangle + + cd ../webscalesqlclient + rm -rf mysql-5.6 + ln -s "$srcdir"/mysql-5.6-$_webscalesql_commit mysql-5.6 +} + +build() { + cd "$srcdir"/$pkgname-HHVM-$pkgver + msg2 "Building hhvm" + + cmake -Wno-dev \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_PREFIX_PATH="$srcdir" \ + -DENABLE_MONGO:BOOL=ON \ + -DMYSQL_UNIX_SOCK_ADDR=/run/mysqld/mysqld.sock \ + . + + make + + for hacktool in hackificator remove_soft_types; do + cd "$srcdir"/$pkgname-HHVM-$pkgver/hphp/hack/tools/$hacktool + make depend + make + done +} + +# check() { +# cd "$srcdir"/$pkgname-HHVM-$pkgver/hphp/test +# ./run --threads 8 quick +# } + +package() { + cd "$srcdir"/$pkgname-HHVM-$pkgver + make DESTDIR="$pkgdir/" install + + cd hphp/hack/bin + for bin in hh_* tools/*; do + install -Dm755 $bin "$pkgdir"/usr/bin/$(basename $bin) + done + + cd "$srcdir" + install -Dm644 hhvm.tmpfile "$pkgdir"/usr/lib/tmpfiles.d/hhvm.conf + install -Dm644 hhvm.service "$pkgdir"/usr/lib/systemd/system/hhvm.service + install -Dm644 hhvm@.service "$pkgdir"/usr/lib/systemd/system/hhvm@.service + + install -Dm644 php.ini "$pkgdir"/etc/hhvm/php.ini + install -Dm644 server.ini "$pkgdir"/etc/hhvm/server.ini +} + +sha256sums=('d0636b27816461aa67c0841e39b1045b010e545373f66893f11749d88a177903' + '58c1ff59791c7e9aca6f4225a006f7dffa824f3b37a1aa07246698dda32c6c50' + '9f93911918c911d15752871a4f8149749bb5e510054e90d45821d7b2e763d489' + 'e489bcd7318bdcd9f96f5ed9b561a071e288cc4e4a4665442ef7e383ab103059' + '255197d59ee50b0c5f3fabf8959c1fb4497080b6dd041a301750a4e362e4de8b' + '06983fb95386626dc1a2fdfda2d2632d8f8851b7ad03ec3bef2046f5736af3ab' + '90e0bc1e438f6d9768dfa49dd90ae3dea9b9fac5d2818cd1dffe014d691ab3ff' + 'bacb1913487c19faf7bf45cc8b3942bfd76233ebe0f3884081fa932da7cd1dd3' + '0430de8aaf658cabd90ab1cb04b09778a7d6ff2eaa6b73bfbd6415371b3459aa' + 'c356010a6d6b976f387bb205a75ea07d5f40593a8010483f2ed0f66f112331bc' + '8b50d1ef9f5f726e6d8d469a8c84d85ad63f8b507b97d258b4d751a0e3e221df' + '59c640602929dac0aa34d06c668ed69361eb4b7b47a77f9aa0badb4d0b61571c' + '3e3093f817706c238fad021483f114fd4ce0b45d84097dcb7870157fc9ec769f' + '5b53bc57965e1c5151d720dc7f63f1b2e8ebd5e758b2ef0be3b74df38ebcbce0' + '49aa0e42f416493b318ff54e780e5282683a806efa4f9ce42b6eac2da4115c4f') Copied: hhvm/repos/community-staging-x86_64/hhvm.install (from rev 169323, hhvm/trunk/hhvm.install) =================================================================== --- community-staging-x86_64/hhvm.install (rev 0) +++ community-staging-x86_64/hhvm.install 2016-04-03 05:36:36 UTC (rev 169324) @@ -0,0 +1,9 @@ +post_install() { + if [[ ! -d run/hhvm ]]; then + usr/bin/systemd-tmpfiles --create hhvm.conf + fi +} + +post_upgrade() { + post_install +} Copied: hhvm/repos/community-staging-x86_64/hhvm.service (from rev 169323, hhvm/trunk/hhvm.service) =================================================================== --- community-staging-x86_64/hhvm.service (rev 0) +++ community-staging-x86_64/hhvm.service 2016-04-03 05:36:36 UTC (rev 169324) @@ -0,0 +1,15 @@ +[Unit] +Description=HHVM FastCGI application server +After=syslog.target network.target + +[Service] +PIDFile=/run/hhvm/server.pid +PrivateTmp=true +User=http +Group=http +ExecStart=/usr/bin/hhvm --config=/etc/hhvm/php.ini --config=/etc/hhvm/server.ini --mode=daemon -vServer.Type=fastcgi -vPidFile=/run/hhvm/server.pid +Restart=on-failure +RuntimeDirectory=hhvm + +[Install] +WantedBy=multi-user.target Copied: hhvm/repos/community-staging-x86_64/hhvm.tmpfile (from rev 169323, hhvm/trunk/hhvm.tmpfile) =================================================================== --- community-staging-x86_64/hhvm.tmpfile (rev 0) +++ community-staging-x86_64/hhvm.tmpfile 2016-04-03 05:36:36 UTC (rev 169324) @@ -0,0 +1,2 @@ +d /var/run/hhvm 755 http http +d /var/log/hhvm 755 http http Copied: hhvm/repos/community-staging-x86_64/hhvm@.service (from rev 169323, hhvm/trunk/hhvm@.service) =================================================================== --- community-staging-x86_64/hhvm@.service (rev 0) +++ community-staging-x86_64/hhvm@.service 2016-04-03 05:36:36 UTC (rev 169324) @@ -0,0 +1,15 @@ +[Unit] +Description=HHVM FastCGI application server +After=syslog.target network.target + +[Service] +PIDFile=/run/hhvm/%I.pid +PrivateTmp=true +User=http +Group=http +ExecStart=/usr/bin/hhvm --config=/etc/hhvm/php.ini --config=/etc/hhvm/%I.ini --mode=daemon -vServer.Type=fastcgi -vPidFile=/run/hhvm/%I.pid +Restart=on-failure +RuntimeDirectory=hhvm + +[Install] +WantedBy=multi-user.target Copied: hhvm/repos/community-staging-x86_64/namespaces.patch (from rev 169323, hhvm/trunk/namespaces.patch) =================================================================== --- community-staging-x86_64/namespaces.patch (rev 0) +++ community-staging-x86_64/namespaces.patch 2016-04-03 05:36:36 UTC (rev 169324) @@ -0,0 +1,143 @@ +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 std::isfinite(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_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; Copied: hhvm/repos/community-staging-x86_64/php.ini (from rev 169323, hhvm/trunk/php.ini) =================================================================== --- community-staging-x86_64/php.ini (rev 0) +++ community-staging-x86_64/php.ini 2016-04-03 05:36:36 UTC (rev 169324) @@ -0,0 +1,10 @@ +; php options +session.save_handler = files +;session.save_path = /var/lib/php5 +session.gc_maxlifetime = 1440 + +; hhvm specific +hhvm.log.level = Warning +hhvm.log.always_log_unhandled_exceptions = true +hhvm.log.runtime_error_reporting_level = 8191 +hhvm.mysql.typed_results = false Copied: hhvm/repos/community-staging-x86_64/server.ini (from rev 169323, hhvm/trunk/server.ini) =================================================================== --- community-staging-x86_64/server.ini (rev 0) +++ community-staging-x86_64/server.ini 2016-04-03 05:36:36 UTC (rev 169324) @@ -0,0 +1,6 @@ +hhvm.server.port = 9000 +hhvm.server.type = fastcgi +hhvm.server.default_document = index.php +hhvm.log.use_log_file = true +hhvm.log.file = /var/log/hhvm/error.log +hhvm.repo.central.path = /var/run/hhvm/hhvm.hhbc