]> git.pld-linux.org Git - packages/hhvm.git/blame - hiphop-php.spec
- up to snapshot at cf9b612, still not usable
[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) ()
11%define snap cf9b612
12%define rel 0.2
65446f6c
ER
13Summary: HipHop for PHP transforms PHP source code into highly optimized C++
14Name: hiphop-php
ef07ca95 15Version: 1.000
be373886 16Release: %{rel}.%{snap}
3f49543c 17License: PHP 3.01
ac2930bc 18Group: Development/Languages
be373886 19Source0: %{name}-%{version}_%{snap}.tar.bz2
ef07ca95
ER
20# Source0-md5: 16b7928995a91001657b015fe7f8a06d
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
3f49543c
ER
29URL: http://wiki.github.com/facebook/hiphop-php/
30BuildRequires: binutils-devel
59f13ffd 31BuildRequires: bison >= 2.3
ef07ca95 32BuildRequires: boost-devel >= 1.39
3f49543c 33BuildRequires: cmake >= 2.6.4
ac2930bc 34BuildRequires: curl-devel >= 7.20.1-2
3f49543c 35BuildRequires: expat-devel
59f13ffd 36BuildRequires: flex >= 2.5.35
3f49543c 37BuildRequires: gd-devel
be373886 38BuildRequires: jemalloc-devel
ef07ca95 39BuildRequires: libafdt-devel >= 0.1.0
3f49543c 40BuildRequires: libcap-devel
ef07ca95
ER
41#BuildRequires: libevent-devel < 2.0
42#BuildRequires: libevent-devel >= 1.4.13-2
ac2930bc 43BuildRequires: libicu-devel >= 4.2
be373886 44#BuildRequires: libmbfl-devel
3f49543c 45BuildRequires: libmcrypt
ef07ca95
ER
46BuildRequires: libmemcached-devel >= 0.39
47BuildRequires: libstdc++-devel >= 6:4.3
ac2930bc 48BuildRequires: libxml2-devel
3f49543c 49BuildRequires: mysql-devel
ac2930bc 50BuildRequires: oniguruma-devel
3f49543c
ER
51BuildRequires: openssl-devel
52BuildRequires: pcre-devel
ef07ca95 53BuildRequires: php-xhp-devel >= 1.3.9-6
3f49543c 54BuildRequires: re2c >= 0.13.0
ef07ca95 55BuildRequires: rpmbuild(macros) >= 1.600
ac2930bc 56BuildRequires: tbb-devel >= 2.2
3f49543c 57BuildRequires: zlib-devel
ac2930bc 58ExclusiveArch: %{x8664}
65446f6c
ER
59BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
60
61%description
62HipHop transforms your PHP source code into highly optimized C++ and
63then compiles it with g++ to build binary files. You keep coding in
64simpler PHP, then HipHop executes your source code in a semantically
65equivalent manner and sacrifices some rarely used features - such as
66eval() - in exchange for improved performance.
67
68Facebook sees about a 50% reduction in CPU usage when serving equal
69amounts of Web traffic when compared to Apache and PHP. Facebook's API
70tier can serve twice the traffic using 30% less CPU.
71
65446f6c 72%prep
be373886 73%setup -qn %{name}-%{version}_%{snap} -a1
59f13ffd 74%patch0 -p1
be373886 75%patch1 -p1
ef07ca95
ER
76#%patch3 -p1
77%patch4 -p1
78
79ln -s libevent-1.4.*-stable libevent
80%{__patch} -d libevent -p1 < src/third_party/libevent-1.4.14.fb-changes.diff
59f13ffd 81
be373886
ER
82#rm -rf src/third_party/libmbfl
83#sed -i -e '/add_subdirectory(third_party\/libmbfl)/d' src/CMakeLists.txt
84
ef07ca95
ER
85rm -rf src/third_party/xhp
86rm -rf src/third_party/libafdt
ac2930bc
ER
87
88%build
ef07ca95
ER
89# build libevent 1.4 with fb patches
90if [ ! -d libevent/.libs ]; then
91 cd libevent
92 # TODO: should use static linking, but then it fails to detect libraries due missing -lrt
93 %configure \
94 %{?0:--enable-static} \
95 %{?0:--disable-shared}
96 %{__make}
97 ln -s .libs lib
98 ln -s . include
99 cd ..
100fi
101
ac2930bc
ER
102export HPHP_HOME=$(pwd)
103export HPHP_LIB=$HPHP_HOME/bin
104
ef07ca95
ER
105install -d build
106cd build
107%cmake \
be373886
ER
108 -DLibEvent_INCLUDE_PATHS=$HPHP_HOME/libevent \
109 -DLibEvent_LIB_PATHS=$HPHP_HOME/libevent/.libs \
ef07ca95
ER
110 -DCMAKE_PREFIX_PATH=%{_prefix} \
111 -DSKIP_BUNDLED_XHP=ON \
be373886
ER
112 -DUSE_JEMALLOC=ON \
113 -DUSE_TCMALLOC=OFF \
ef07ca95 114 ../
ac2930bc
ER
115%{__make}
116
65446f6c
ER
117%install
118rm -rf $RPM_BUILD_ROOT
be373886
ER
119install -d $RPM_BUILD_ROOT%{_bindir}
120install -p build/src/hphp/hphp $RPM_BUILD_ROOT%{_bindir}
65446f6c
ER
121
122%clean
123rm -rf $RPM_BUILD_ROOT
124
125%files
126%defattr(644,root,root,755)
be373886 127%attr(755,root,root) %{_bindir}/hphp
This page took 0.042207 seconds and 4 git commands to generate.