%bcond_without system_sqlite # system sqlite3
%bcond_without system_lz4 # system lz4
%bcond_without system_fastlz # system fastlz
-%bcond_without system_libafdt # system libafdt
+%bcond_with system_libafdt # system libafdt
%bcond_without system_libzip # system libzip
# cotire breaks sqlite3 on builders: https://github.com/facebook/hhvm/issues/4524
%bcond_with cotire # cotire (compile time reducer): Speed up the build by precompiling headers
# - system xhp
# - system proxygen
# - system thrift
-# - system LIBAFDT_LIBRARY
# NOTES:
# - hphp/runtime/base/runtime-option.cpp evalJitDefault enables jit if /.hhvm-jit exists (yes, in filesystem root)
Patch3: MAX.patch
Patch4: system-thirdparty.patch
Patch5: cmake.patch
+Patch6: system-fastlz.patch
URL: https://github.com/facebook/hhvm/wiki
BuildRequires: ImageMagick-devel
BuildRequires: a52dec-libs-devel
BuildRequires: imap-devel >= 1:2007
#BuildRequires: jemalloc-devel >= 3.0.0
%{?with_system_libafdt:BuildRequires: libafdt-devel >= 0.1.0}
-%{?with_system_libzip:BuildRequires: libzip-devel >= 0.11.2}
BuildRequires: libcap-devel
BuildRequires: libdwarf-devel >= 20130729
BuildRequires: libicu-devel >= 4.2
BuildRequires: libunwind-devel
BuildRequires: libxml2-devel
BuildRequires: libxslt-devel
+%{?with_system_libzip:BuildRequires: libzip-devel >= 0.11.2}
%{?with_system_lz4:BuildRequires: lz4-devel >= 0.0-1.r119}
BuildRequires: mysql-devel
BuildRequires: ocaml-findlib
# check later, seem unused
#BuildRequires: bison >= 2.3
#BuildRequires: flex >= 2.5.35
-#BuildRequires: libafdt-devel >= 0.1.0
+BuildRequires: libafdt-devel >= 0.1.0
#BuildRequires: re2c >= 0.13.0
Provides: %{name}(api) = %{hhvm_api_version}
Provides: php(core) = %{php_version}
%patch2 -p1
%patch3 -p1
%patch4 -p1
-%patch5 -p1
+#%patch5 -p1
+%patch6 -p1
# prefer ones from system
rm CMake/FindBISON.cmake
rm CMake/FindFreetype.cmake
# ensure system libs get used
-# NOTE: keep sqlite dir, build breaks with 3.8.5.0
-
cd third-party
rm -r pcre \
+ %{?with_system_sqlite:libsqlite3} \
%{?with_system_lz4:lz4} \
%{?with_system_dconv:double-conversion} \
%{?with_system_fastlz:fastlz} \
-DUSE_JEMALLOC=OFF \
-DUSE_TCMALLOC=OFF \
-DTEST_BIN=OFF \
- -DPCRE_LIBRARY=OFF \
- %{?with_system_sqlite:-DLIBSQLITE3_LIBRARY=OFF} \
- %{?with_system_lz4:-DLZ4_LIBRARY=OFF} \
- %{?with_system_dconv:-DDOUBLE_CONVERSION_LIBRARY=OFF} \
- %{?with_system_fastlz:-DFASTLZ_LIBRARY=OFF} \
- %{?with_system_libafdt:-DSYSTEM_LIBAFDT=ON} \
- %{?with_system_libzip:-DLIBZIP_LIBRARY=OFF} \
-DENABLE_COTIRE=%{!?with_cotire:OFF}%{?with_cotire:ON} \
.