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