[arch-commits] Commit in hhvm (10 files)

Massimiliano Torromeo mtorromeo at archlinux.org
Wed Nov 19 16:11:30 UTC 2014


    Date: Wednesday, November 19, 2014 @ 17:11:29
  Author: mtorromeo
Revision: 122766

archrelease: copy trunk to community-x86_64

Added:
  hhvm/repos/
  hhvm/repos/community-x86_64/
  hhvm/repos/community-x86_64/PKGBUILD
    (from rev 122765, hhvm/trunk/PKGBUILD)
  hhvm/repos/community-x86_64/hhvm-max.patch
    (from rev 122765, hhvm/trunk/hhvm-max.patch)
  hhvm/repos/community-x86_64/hhvm.install
    (from rev 122765, hhvm/trunk/hhvm.install)
  hhvm/repos/community-x86_64/hhvm.service
    (from rev 122765, hhvm/trunk/hhvm.service)
  hhvm/repos/community-x86_64/hhvm.tmpfile
    (from rev 122765, hhvm/trunk/hhvm.tmpfile)
  hhvm/repos/community-x86_64/hhvm at .service
    (from rev 122765, hhvm/trunk/hhvm at .service)
  hhvm/repos/community-x86_64/php.ini
    (from rev 122765, hhvm/trunk/php.ini)
  hhvm/repos/community-x86_64/server.ini
    (from rev 122765, hhvm/trunk/server.ini)

----------------+
 PKGBUILD       |  113 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 hhvm-max.patch |   30 ++++++++++++++
 hhvm.install   |    9 ++++
 hhvm.service   |   15 +++++++
 hhvm.tmpfile   |    2 
 hhvm at .service  |   15 +++++++
 php.ini        |   10 ++++
 server.ini     |    6 ++
 8 files changed, 200 insertions(+)

Copied: hhvm/repos/community-x86_64/PKGBUILD (from rev 122765, hhvm/trunk/PKGBUILD)
===================================================================
--- repos/community-x86_64/PKGBUILD	                        (rev 0)
+++ repos/community-x86_64/PKGBUILD	2014-11-19 16:11:29 UTC (rev 122766)
@@ -0,0 +1,113 @@
+# $Id$
+# Maintainer: Massimiliano Torromeo <massimiliano.torromeo at gmail.com>
+# Contributor: James Miller <james at pocketrent.com>
+
+pkgname=hhvm
+pkgver=3.4.0
+_thirdparty_commit=21bded6b6119ec24c53c4653868c05660529a62e
+_folly_commit=32a9723ad4951fcc8b6324c55d967c3d2f21552e
+_thrift_commit=0a455fe206fc4c32de8bf40caf71a75d03edf87c
+_proxygen_commit=c4e89168873153ee74882f6d7bfadda16f91a308
+pkgrel=2
+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' 'lz4'
+         'libxslt' 'intel-tbb' 'libmcrypt' 'oniguruma' 'jemalloc' 'curl' 'libvpx'
+         'libdwarf' 'imagemagick' 'libedit' 'sqlite' 'libyaml')
+makedepends=('git' 'cmake' 'gcc' 'chrpath' 'boost' 'gflags' 'python2' 'pfff')
+source=("https://github.com/facebook/hhvm/archive/HHVM-$pkgver.tar.gz"
+        "hhvm-third-party-$_thirdparty_commit.tar.gz::https://github.com/hhvm/hhvm-third-party/archive/$_thirdparty_commit.tar.gz"
+        "folly-$_folly_commit.tar.gz::https://github.com/facebook/folly/archive/$_folly_commit.tar.gz"
+        "thrift-$_thrift_commit.tar.gz::https://github.com/facebook/fbthrift/archive/$_thrift_commit.tar.gz"
+        "proxygen-$_proxygen_commit.tar.gz::https://github.com/facebook/proxygen/archive/$_proxygen_commit.tar.gz"
+        'hhvm-max.patch'
+        'hhvm.tmpfile'
+        'hhvm.service'
+        'hhvm at .service'
+        'php.ini'
+        'server.ini')
+install=hhvm.install
+backup=(etc/hhvm/{php,server}.ini)
+options+=('!buildflags')
+
+prepare() {
+    cd "$srcdir"/$pkgname-HHVM-$pkgver
+    patch -p1 -i "$srcdir"/hhvm-max.patch
+
+    rm -rf third-party
+    ln -s "$srcdir"/hhvm-third-party-$_thirdparty_commit third-party
+
+    # no bundled pcre
+    sed '/pcre/d' -i third-party/CMakeLists.txt
+
+    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
+}
+
+build() {
+    cd "$srcdir"/$pkgname-HHVM-$pkgver
+    msg2 "Building hhvm"
+
+    # comment for tests
+    HPHP_NOTEST=1 \
+    cmake \
+        -DCMAKE_INSTALL_PREFIX=/usr \
+        -DCMAKE_PREFIX_PATH="$srcdir" \
+        -DFREETYPE_INCLUDE_DIRS:PATH=/usr/include/freetype2 \
+        .
+
+    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
+    rm -rf "$pkgdir"/usr/{lib*,include}
+
+    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 at .service "$pkgdir"/usr/lib/systemd/system/hhvm at .service
+
+    install -Dm644 php.ini "$pkgdir"/etc/hhvm/php.ini
+    install -Dm644 server.ini "$pkgdir"/etc/hhvm/server.ini
+}
+
+sha256sums=('65e194667722dd0f240321dce026e1707363ae42ce415a1974db5c28f54fb3ff'
+            '55be18422577d97b9dfb1eaf34fe4fc8d348cb48fb3ae9190915d7dcba54fb8b'
+            'e8ee31e3a08b4e42cd1bfe8c09a812d2887bb41b9ee0e67c8717ffdfd4d7c31b'
+            'fa6cf805cb94c230fe20ba33d13eee76d6dc6956776c2bacd344cb698bab1d47'
+            '0cc4fb29790305e2319182f5bf73ad6dd1f69e6f129e4efb7fff308e8aebb8dc'
+            'ab98d74c382f503f1208407e891d26a88f9314fa2b631f6ec2a4a73ead644ba2'
+            'c356010a6d6b976f387bb205a75ea07d5f40593a8010483f2ed0f66f112331bc'
+            '8b50d1ef9f5f726e6d8d469a8c84d85ad63f8b507b97d258b4d751a0e3e221df'
+            '59c640602929dac0aa34d06c668ed69361eb4b7b47a77f9aa0badb4d0b61571c'
+            '3e3093f817706c238fad021483f114fd4ce0b45d84097dcb7870157fc9ec769f'
+            '5b53bc57965e1c5151d720dc7f63f1b2e8ebd5e758b2ef0be3b74df38ebcbce0')

Copied: hhvm/repos/community-x86_64/hhvm-max.patch (from rev 122765, hhvm/trunk/hhvm-max.patch)
===================================================================
--- repos/community-x86_64/hhvm-max.patch	                        (rev 0)
+++ repos/community-x86_64/hhvm-max.patch	2014-11-19 16:11:29 UTC (rev 122766)
@@ -0,0 +1,30 @@
+diff --git a/hphp/compiler/analysis/emitter.cpp b/hphp/compiler/analysis/emitter.cpp
+index ba33bbd..38fe9ed 100644
+--- a/hphp/compiler/analysis/emitter.cpp
++++ b/hphp/compiler/analysis/emitter.cpp
+@@ -124,6 +124,10 @@ namespace HPHP {
+ namespace Compiler {
+ ///////////////////////////////////////////////////////////////////////////////
+ 
++#ifndef MAX
++#define MAX(a,b) ((a)<(b)?(b):(a))
++#endif
++
+ TRACE_SET_MOD(emitter)
+ 
+ using uchar = unsigned char;
+diff --git a/hphp/runtime/base/zend-pack.cpp b/hphp/runtime/base/zend-pack.cpp
+index d878ea4..01034c2 100644
+--- a/hphp/runtime/base/zend-pack.cpp
++++ b/hphp/runtime/base/zend-pack.cpp
+@@ -23,6 +23,10 @@
+ 
+ namespace HPHP {
+ 
++#ifndef MAX
++#define MAX(a,b) ((a)<(b)?(b):(a))
++#endif
++
+ #define INC_OUTPUTPOS(a,b)                                              \
+   if ((a) < 0 || ((INT_MAX - outputpos)/((int)b)) < (a)) {              \
+     throw_invalid_argument                                              \

Copied: hhvm/repos/community-x86_64/hhvm.install (from rev 122765, hhvm/trunk/hhvm.install)
===================================================================
--- repos/community-x86_64/hhvm.install	                        (rev 0)
+++ repos/community-x86_64/hhvm.install	2014-11-19 16:11:29 UTC (rev 122766)
@@ -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-x86_64/hhvm.service (from rev 122765, hhvm/trunk/hhvm.service)
===================================================================
--- repos/community-x86_64/hhvm.service	                        (rev 0)
+++ repos/community-x86_64/hhvm.service	2014-11-19 16:11:29 UTC (rev 122766)
@@ -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-x86_64/hhvm.tmpfile (from rev 122765, hhvm/trunk/hhvm.tmpfile)
===================================================================
--- repos/community-x86_64/hhvm.tmpfile	                        (rev 0)
+++ repos/community-x86_64/hhvm.tmpfile	2014-11-19 16:11:29 UTC (rev 122766)
@@ -0,0 +1,2 @@
+d /var/run/hhvm 755 http http
+d /var/log/hhvm 755 http http

Copied: hhvm/repos/community-x86_64/hhvm at .service (from rev 122765, hhvm/trunk/hhvm at .service)
===================================================================
--- repos/community-x86_64/hhvm at .service	                        (rev 0)
+++ repos/community-x86_64/hhvm at .service	2014-11-19 16:11:29 UTC (rev 122766)
@@ -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-x86_64/php.ini (from rev 122765, hhvm/trunk/php.ini)
===================================================================
--- repos/community-x86_64/php.ini	                        (rev 0)
+++ repos/community-x86_64/php.ini	2014-11-19 16:11:29 UTC (rev 122766)
@@ -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-x86_64/server.ini (from rev 122765, hhvm/trunk/server.ini)
===================================================================
--- repos/community-x86_64/server.ini	                        (rev 0)
+++ repos/community-x86_64/server.ini	2014-11-19 16:11:29 UTC (rev 122766)
@@ -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


More information about the arch-commits mailing list