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