[packages/hhvm] add HHVM_API_VERSION check
glen
glen at pld-linux.org
Sun Aug 10 21:55:25 CEST 2014
commit c171e0ff090e6f1c46c722aba7d3d364973983a0
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sun Aug 10 22:52:50 2014 +0300
add HHVM_API_VERSION check
hhvm.spec | 12 ++++++++++++
1 file changed, 12 insertions(+)
---
diff --git a/hhvm.spec b/hhvm.spec
index 9bea69e..d3a3c74 100644
--- a/hhvm.spec
+++ b/hhvm.spec
@@ -67,6 +67,7 @@ BuildRequires: zlib-devel
#BuildRequires: flex >= 2.5.35
#BuildRequires: libafdt-devel >= 0.1.0
#BuildRequires: re2c >= 0.13.0
+Provides: %{name}(api) = %{hhvm_api_version}
# foreach (get_loaded_extensions() as $ext) printf("Provides:\tphp(%s)\n", strtolower($ext));
Provides: php(apache)
Provides: php(apc)
@@ -148,6 +149,9 @@ Obsoletes: hiphop-php < 2.3.2-0.2
ExclusiveArch: %{x8664}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+# must be in sync with source. extra check ensuring that it is so is done in %%build
+%define hhvm_api_version 20140702
+
%description
HHVM (aka the HipHop Virtual Machine) is a new open-source virtual
machine designed for executing programs written in PHP. HHVM uses a
@@ -234,6 +238,14 @@ rm -rf src/third_party/libafdt
%endif
%build
+# also in: hphp/tools/hphpize/hphpize.cmake
+API=$(awk '/#define HHVM_API_VERSION/{v=$3; sub(/L$/, "", v); print v}' hphp/runtime/ext/extension.h)
+
+if [ $API != %{hhvm_api_version} ]; then
+ echo "Set %%define hhvm_api_version to $API and re-run."
+ exit 1
+fi
+
export HPHP_HOME=$(pwd)
export HPHP_LIB=$HPHP_HOME/bin
install -d $HPHP_LIB
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/hhvm.git/commitdiff/c171e0ff090e6f1c46c722aba7d3d364973983a0
More information about the pld-cvs-commit
mailing list