]> git.pld-linux.org Git - packages/hhvm.git/blame - hiphop-php.spec
start update to 2.1.0, does not build, c++ errors in folly with gcc 4.8
[packages/hhvm.git] / hiphop-php.spec
CommitLineData
ac2930bc 1# TODO
59f13ffd
ER
2# - system libmbfl, system xhp, sqlite3
3# - there should be a bit more packaged into files
be373886
ER
4# - linking segfaults
5# using bfd and gcc-6:4.6.2-2.x86_64 binutils-3:2.22.51.0.1-1.x86_64
6# cd /home/users/glen/rpm/packages/BUILD.x86_64-linux/hiphop-php-1.000_cf9b612/src/hphpi && /home/users/glen/rpm/BUILD.x86_64-linux/hiphop-php-1.000_cf9b612/build/src/hphp/hphp -t cpp -f exe --input-dir . -i hphpi.php -o gen -vEnableEval=2 --log=1
7# Segmentation fault
8# make[2]: *** [src/hphp/hphp] Error 139
9# relinking succeeds, but resulting binary segfaults as well:
10# 0x0000000000b9cc0b in HPHP::Extension::LoadModules(HPHP::Hdf) ()
ed14b19f 11Summary: Virtual Machine, Runtime, and JIT for PHP
65446f6c 12Name: hiphop-php
ed14b19f
ER
13Version: 2.1.0
14Release: 0.1
3f49543c 15License: PHP 3.01
ac2930bc 16Group: Development/Languages
ed14b19f
ER
17Source0: https://github.com/facebook/hiphop-php/archive/HPHP-%{version}.tar.gz
18# Source0-md5: edd3d8b4371d38286c7c5f0c2582f5e1
ef07ca95
ER
19# need fb.changes.patch, which is available for 1.4 only
20Source1: http://www.monkey.org/~provos/libevent-1.4.14b-stable.tar.gz
21# Source1-md5: a00e037e4d3f9e4fe9893e8a2d27918c
be373886 22Source2: get-source.sh
59f13ffd 23Patch0: cmake-missing-library.patch
be373886 24Patch1: libevent14.patch
ef07ca95
ER
25Patch3: system-xhp.patch
26Patch4: system-libafdt.patch
3f49543c
ER
27URL: http://wiki.github.com/facebook/hiphop-php/
28BuildRequires: binutils-devel
59f13ffd 29BuildRequires: bison >= 2.3
ed14b19f
ER
30BuildRequires: boost-devel >= 1.50
31BuildRequires: cmake >= 2.8.5
32BuildRequires: curl-devel >= 7.29.0
33BuildRequires: elfutils-devel
3f49543c 34BuildRequires: expat-devel
59f13ffd 35BuildRequires: flex >= 2.5.35
3f49543c 36BuildRequires: gd-devel
ed14b19f
ER
37BuildRequires: glog-devel >= 0.3.2
38BuildRequires: imap-devel >= 1:2007
be373886 39BuildRequires: jemalloc-devel
ef07ca95 40BuildRequires: libafdt-devel >= 0.1.0
3f49543c 41BuildRequires: libcap-devel
ed14b19f
ER
42BuildRequires: libdwarf-devel
43#BuildRequires: libevent-devel >= 1.4.14
ac2930bc 44BuildRequires: libicu-devel >= 4.2
be373886 45#BuildRequires: libmbfl-devel
ed14b19f
ER
46BuildRequires: libmcrypt-devel
47BuildRequires: libmemcached-devel >= 1.0.9
ef07ca95 48BuildRequires: libstdc++-devel >= 6:4.3
ed14b19f 49BuildRequires: libunwind-devel
ac2930bc 50BuildRequires: libxml2-devel
3f49543c 51BuildRequires: mysql-devel
ac2930bc 52BuildRequires: oniguruma-devel
3f49543c
ER
53BuildRequires: openssl-devel
54BuildRequires: pcre-devel
ed14b19f 55#BuildRequires: php-xhp-devel >= 1.3.9-6
3f49543c 56BuildRequires: re2c >= 0.13.0
ed14b19f 57BuildRequires: readline-devel
ef07ca95 58BuildRequires: rpmbuild(macros) >= 1.600
ed14b19f 59BuildRequires: tbb-devel >= 4.0.6000
3f49543c 60BuildRequires: zlib-devel
65446f6c
ER
61BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62
63%description
ed14b19f
ER
64HipHop VM (HHVM) is a new open-source virtual machine designed for
65executing programs written in PHP. HHVM uses a just-in-time
66compilation approach to achieve superior performance while maintaining
67the flexibility that PHP developers are accustomed to. HipHop VM (and
68before it HPHPc) has realized > 5x increase in throughput for Facebook
69compared with Zend PHP 5.2.
65446f6c 70
ed14b19f
ER
71HipHop is most commonly run as a standalone server, replacing both
72Apache and mod_php.
65446f6c 73
65446f6c 74%prep
ed14b19f
ER
75%setup -q -n %{name}-HPHP-%{version} -a1
76
77ln -s libevent-1.4.*-stable libevent
78%{__patch} -d libevent -p1 < hphp/third_party/libevent-1.4.14.fb-changes.diff
79
80%if 0
59f13ffd 81%patch0 -p1
be373886 82%patch1 -p1
ef07ca95
ER
83#%patch3 -p1
84%patch4 -p1
85
59f13ffd 86
be373886
ER
87#rm -rf src/third_party/libmbfl
88#sed -i -e '/add_subdirectory(third_party\/libmbfl)/d' src/CMakeLists.txt
89
ef07ca95
ER
90rm -rf src/third_party/xhp
91rm -rf src/third_party/libafdt
ed14b19f 92%endif
ac2930bc
ER
93
94%build
ef07ca95
ER
95# build libevent 1.4 with fb patches
96if [ ! -d libevent/.libs ]; then
97 cd libevent
98 # TODO: should use static linking, but then it fails to detect libraries due missing -lrt
99 %configure \
100 %{?0:--enable-static} \
101 %{?0:--disable-shared}
102 %{__make}
103 ln -s .libs lib
104 ln -s . include
105 cd ..
106fi
107
ed14b19f 108export USE_HHVM=1
ac2930bc
ER
109export HPHP_HOME=$(pwd)
110export HPHP_LIB=$HPHP_HOME/bin
111
ed14b19f
ER
112%if 0
113export LIBEVENT_PREFIX=$HPHP_HOME/libevent
114
115 -DLibEvent_LIB=$HPHP_HOME/libevent/libevent.so \
116 -DLibEvent_INCLUDE_PATHS=$HPHP_HOME/libevent \
117 -DLibEvent_LIB_PATHS=$HPHP_HOME/libevent/.libs \
118%endif
119
ef07ca95
ER
120install -d build
121cd build
ed14b19f 122CPPFLAGS="%{rpmcppflags} -fno-permissive"
ef07ca95 123%cmake \
ed14b19f 124 -DLIBEVENT_LIB=$HPHP_HOME/libevent/lib/libevent.so \
ef07ca95
ER
125 -DCMAKE_PREFIX_PATH=%{_prefix} \
126 -DSKIP_BUNDLED_XHP=ON \
be373886
ER
127 -DUSE_JEMALLOC=ON \
128 -DUSE_TCMALLOC=OFF \
ef07ca95 129 ../
ac2930bc
ER
130%{__make}
131
65446f6c
ER
132%install
133rm -rf $RPM_BUILD_ROOT
be373886
ER
134install -d $RPM_BUILD_ROOT%{_bindir}
135install -p build/src/hphp/hphp $RPM_BUILD_ROOT%{_bindir}
65446f6c
ER
136
137%clean
138rm -rf $RPM_BUILD_ROOT
139
140%files
141%defattr(644,root,root,755)
be373886 142%attr(755,root,root) %{_bindir}/hphp
This page took 0.102037 seconds and 4 git commands to generate.