[packages/hhvm] use system double-conversion, sqlite3, lz4
glen
glen at pld-linux.org
Wed Nov 19 08:45:42 CET 2014
commit fd4a736fea5210111a9e7b9a6487a6de73edcab0
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Tue Nov 18 19:51:35 2014 +0200
use system double-conversion, sqlite3, lz4
hhvm.spec | 19 +++++++++++++++----
system-thirdparty.patch | 29 ++++++++++++++++++++++++-----
2 files changed, 39 insertions(+), 9 deletions(-)
---
diff --git a/hhvm.spec b/hhvm.spec
index a9125e6..f5ce698 100644
--- a/hhvm.spec
+++ b/hhvm.spec
@@ -1,9 +1,14 @@
+#
+# Conditional build:
+%bcond_without system_dconv # system double-conversion
+%bcond_without system_sqlite # system sqlite3
+%bcond_without system_lz4 # system lz4
+
# NOTES:
# - hphp/runtime/base/runtime-option.cpp evalJitDefault enables jit if /.hhvm-jit exists (yes, in filesystem root)
# - patch /usr/lib/hphp/CMake/HPHPIZEFunctions.cmake for %{_libdir}/hhvm as extension dir
# TODO
-# - system libmbfl, system xhp, sqlite3
-# - use system pcre
+# - system libmbfl, system xhp
# git show HHVM-3.3.1
%define githash e0c98e21167b425dddf1fc9efe78c9f7a36db268
# these hashes are git submodules
@@ -12,7 +17,7 @@
Summary: Virtual Machine, Runtime, and JIT for PHP
Name: hhvm
Version: 3.3.1
-Release: 0.1
+Release: 0.4
License: PHP 3.01 and BSD
Group: Development/Languages
Source0: https://github.com/facebook/hhvm/archive/HHVM-%{version}.tar.gz
@@ -40,6 +45,7 @@ BuildRequires: binutils-static
BuildRequires: boost-devel >= 1.50
BuildRequires: cmake >= 2.8.5
BuildRequires: curl-devel >= 7.29.0
+%{?with_system_dconv:BuildRequires: double-conversion-devel >= 1.1.1}
BuildRequires: elfutils-devel
BuildRequires: expat-devel
BuildRequires: gcc >= 6:4.6.0
@@ -57,14 +63,16 @@ BuildRequires: libstdc++-devel >= 6:4.8
BuildRequires: libunwind-devel
BuildRequires: libxml2-devel
BuildRequires: libxslt-devel
+%{?with_system_lz4:BuildRequires: lz4-devel >= 0.0-1.r119}
BuildRequires: mysql-devel
BuildRequires: ocaml-findlib
BuildRequires: oniguruma-devel
BuildRequires: openssl-devel
-BuildRequires: pcre-devel
+BuildRequires: pcre-devel >= 8.32
#BuildRequires: php-xhp-devel >= 1.3.9-6
BuildRequires: readline-devel
BuildRequires: rpmbuild(macros) >= 1.675
+%{?with_system_sqlite:BuildRequires: sqlite3-devel >= 3.7.15.2}
BuildRequires: tbb-devel >= 4.0.6000
BuildRequires: zlib-devel
# check later, seem unused
@@ -272,6 +280,9 @@ fi
-DUSE_TCMALLOC=OFF \
-DHPHP_NOTEST=ON \
-DSYSTEM_PCRE=ON \
+ %{?with_system_sqlite:-DSYSTEM_SQLITE3=ON} \
+ %{?with_system_lz4:-DSYSTEM_LZ4=ON} \
+ %{?with_system_dconv:-DSYSTEM_DOUBLE_CONVERSION=ON} \
-DENABLE_COTIRE=ON \
.
diff --git a/system-thirdparty.patch b/system-thirdparty.patch
index b113f8d..1210525 100644
--- a/system-thirdparty.patch
+++ b/system-thirdparty.patch
@@ -1,6 +1,6 @@
--- hhvm-HHVM-3.3.1/./third-party/CMakeLists.txt~ 2014-09-19 00:27:19.000000000 +0300
-+++ hhvm-HHVM-3.3.1/./third-party/CMakeLists.txt 2014-11-17 16:47:31.381478001 +0200
-@@ -24,7 +24,6 @@
++++ hhvm-HHVM-3.3.1/./third-party/CMakeLists.txt 2014-11-17 22:39:00.515744741 +0200
+@@ -24,16 +24,33 @@
set(THIRD_PARTY_HEADERS)
list(APPEND THIRD_PARTY_MODULES
@@ -8,15 +8,34 @@
fastlz
libafdt
libmbfl
-@@ -34,6 +33,11 @@
- double-conversion
+- libsqlite3
+ timelib
+- lz4
+- double-conversion
folly
- libzip)
+- libzip)
++)
+
+if(NOT SYSTEM_PCRE)
+ list(APPEND THIRD_PARTY_MODULES pcre)
+endif()
+
++if(NOT SYSTEM_SQLITE3)
++ list(APPEND THIRD_PARTY_MODULES libsqlite3)
++endif()
++
++if(NOT SYSTEM_LZ4)
++ list(APPEND THIRD_PARTY_MODULES lz4)
++endif()
++
++if(NOT SYSTEM_DOUBLE_CONVERSION)
++ list(APPEND THIRD_PARTY_MODULES double-conversion)
++endif()
++
++if(NOT SYSTEM_LIBZIP)
++ list(APPEND THIRD_PARTY_MODULES libzip)
++endif()
++
if(ENABLE_FASTCGI)
list(APPEND THIRD_PARTY_MODULES proxygen)
list(APPEND THIRD_PARTY_MODULES thrift)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/hhvm.git/commitdiff/e494b5cb90068bb31c01e68798f0a00b0177f166
More information about the pld-cvs-commit
mailing list