]>
Commit | Line | Data |
---|---|---|
ac2930bc | 1 | # TODO |
59f13ffd ER |
2 | # - system libmbfl, system xhp, sqlite3 |
3 | # - there should be a bit more packaged into files | |
4 | # - build fail: | |
5 | #Linking CXX executable hphp | |
6 | #Building hphpi | |
7 | #Exception: ParseError: [<string>:1] Unable to parse line hphpi_build.hdf | |
8 | #make[2]: *** [src/hphp/hphp] Error 255 | |
9 | #make[1]: *** [src/hphp/CMakeFiles/hphp.dir/all] Error 2 | |
65446f6c ER |
10 | Summary: HipHop for PHP transforms PHP source code into highly optimized C++ |
11 | Name: hiphop-php | |
3f49543c | 12 | Version: 0.1 |
65446f6c | 13 | Release: 0.1 |
3f49543c | 14 | License: PHP 3.01 |
ac2930bc | 15 | Group: Development/Languages |
3f49543c | 16 | # git clone git://github.com/facebook/hiphop-php.git |
59f13ffd ER |
17 | # rm -rf hiphop-php/src/third_party/libmbfl |
18 | # tar --exclude-vcs -cjf hiphop-php.tar.bz2 hiphop-php | |
ac2930bc | 19 | Source0: %{name}.tar.bz2 |
4356f011 | 20 | # Source0-md5: fbeaba0785d6ae3a6f513576867fb5a6 |
59f13ffd ER |
21 | Patch0: cmake-missing-library.patch |
22 | Patch1: system-libmbfl.patch | |
23 | Patch2: gcc45.patch | |
3f49543c ER |
24 | URL: http://wiki.github.com/facebook/hiphop-php/ |
25 | BuildRequires: binutils-devel | |
59f13ffd | 26 | BuildRequires: bison >= 2.3 |
3f49543c ER |
27 | BuildRequires: boost-devel >= 1.37 |
28 | BuildRequires: cmake >= 2.6.4 | |
ac2930bc | 29 | BuildRequires: curl-devel >= 7.20.1-2 |
3f49543c | 30 | BuildRequires: expat-devel |
59f13ffd | 31 | BuildRequires: flex >= 2.5.35 |
3f49543c ER |
32 | BuildRequires: gd-devel |
33 | BuildRequires: libcap-devel | |
ac2930bc ER |
34 | BuildRequires: libevent-devel >= 1.4.13-2 |
35 | BuildRequires: libicu-devel >= 4.2 | |
59f13ffd | 36 | BuildRequires: libmbfl-devel |
3f49543c ER |
37 | BuildRequires: libmcrypt |
38 | BuildRequires: libstdc++-devel >= 6:4.1 | |
ac2930bc | 39 | BuildRequires: libxml2-devel |
3f49543c | 40 | BuildRequires: mysql-devel |
ac2930bc | 41 | BuildRequires: oniguruma-devel |
3f49543c ER |
42 | BuildRequires: openssl-devel |
43 | BuildRequires: pcre-devel | |
44 | BuildRequires: re2c >= 0.13.0 | |
ac2930bc | 45 | BuildRequires: tbb-devel >= 2.2 |
3f49543c | 46 | BuildRequires: zlib-devel |
ac2930bc | 47 | ExclusiveArch: %{x8664} |
65446f6c ER |
48 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
49 | ||
50 | %description | |
51 | HipHop transforms your PHP source code into highly optimized C++ and | |
52 | then compiles it with g++ to build binary files. You keep coding in | |
53 | simpler PHP, then HipHop executes your source code in a semantically | |
54 | equivalent manner and sacrifices some rarely used features - such as | |
55 | eval() - in exchange for improved performance. | |
56 | ||
57 | Facebook sees about a 50% reduction in CPU usage when serving equal | |
58 | amounts of Web traffic when compared to Apache and PHP. Facebook's API | |
59 | tier can serve twice the traffic using 30% less CPU. | |
60 | ||
61 | Keep up to date on HipHop development by joining the HipHop for PHP | |
62 | Discussion Group. | |
63 | ||
64 | %prep | |
ac2930bc | 65 | %setup -qn %{name} |
59f13ffd ER |
66 | %patch0 -p1 |
67 | %patch1 -p1 | |
68 | %patch2 -p1 | |
69 | ||
70 | %{__sed} -i -e 's,/usr/local/bin/php,/usr/bin/php,g' src/crutch.php | |
ac2930bc ER |
71 | |
72 | %build | |
73 | export HPHP_HOME=$(pwd) | |
74 | export HPHP_LIB=$HPHP_HOME/bin | |
75 | ||
59f13ffd ER |
76 | %cmake . \ |
77 | -DCMAKE_BUILD_TYPE=%{!?debug:Release}%{?debug:Debug} \ | |
78 | -DCMAKE_INSTALL_PREFIX=%{_prefix} \ | |
79 | %if "%{_lib}" == "lib64" | |
80 | -DLIB_SUFFIX=64 | |
81 | %endif | |
ac2930bc ER |
82 | %{__make} |
83 | ||
65446f6c ER |
84 | %install |
85 | rm -rf $RPM_BUILD_ROOT | |
59f13ffd ER |
86 | %{__make} install \ |
87 | DESTDIR=$RPM_BUILD_ROOT | |
65446f6c ER |
88 | |
89 | %clean | |
90 | rm -rf $RPM_BUILD_ROOT | |
91 | ||
92 | %files | |
93 | %defattr(644,root,root,755) | |
59f13ffd ER |
94 | %{_includedir}/afdt.h |
95 | %{_libdir}/libafdt.a | |
96 | %{_libdir}/libxhp.a |