]> git.pld-linux.org Git - packages/hhvm.git/commitdiff
- up to snapshot at cf9b612, still not usable
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 13 Dec 2011 11:27:04 +0000 (11:27 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    get-source.sh -> 1.1
    hiphop-php.spec -> 1.7
    libevent14.patch -> 1.1

get-source.sh [new file with mode: 0644]
hiphop-php.spec
libevent14.patch [new file with mode: 0644]

diff --git a/get-source.sh b/get-source.sh
new file mode 100644 (file)
index 0000000..dc475cd
--- /dev/null
@@ -0,0 +1,28 @@
+#!/bin/sh
+set -e
+
+package=hiphop-php
+version=$(awk '/^Version:/{print $NF}' $package.spec)
+repo_url=git://github.com/facebook/$package.git
+
+export GIT_DIR=$package/.git
+
+if [ ! -d $package ]; then
+       git clone --depth 1 $repo_url $package
+else
+       git pull
+fi
+
+git submodule init
+git submodule update
+
+#rm -rf src/third_party/libmbfl
+#rm -rf src/third_party/xhp
+#rm -rf src/third_party/libafdt
+
+version=$(cd $package; (echo 'function HPHP_VERSION(v) { printf("%.3f", v)}; BEGIN{'; cat src/version; echo '}') | awk -f -)
+version=${version}_$(git log -1 --format=%h)
+
+git archive master --prefix $package-$version/ | bzip2 > $package-$version.tar.bz2
+
+../dropin $package-$version.tar.bz2 &
index ca073ff5c85fc7f4f90e166bcb81678e721617d3..725c4357621e66152d29325f5b98a3c2cce62771 100644 (file)
@@ -1,38 +1,29 @@
 # TODO
 # - system libmbfl, system xhp, sqlite3
 # - there should be a bit more packaged into files
-# - mysql namespace sanity:
-#/home/users/glen/rpm/BUILD.x86_64-linux/hiphop-php/src/runtime/ext/ext_mysql.cpp:730: error: undefined reference to 'cli_safe_read'
-#/home/users/glen/rpm/BUILD.x86_64-linux/hiphop-php/src/runtime/ext/ext_mysql.cpp:740: error: undefined reference to 'net_field_length'
-#/home/users/glen/rpm/BUILD.x86_64-linux/hiphop-php/src/runtime/ext/ext_mysql.cpp:753: error: undefined reference to 'cli_safe_read'
-#/home/users/glen/rpm/BUILD.x86_64-linux/hiphop-php/src/runtime/ext/ext_mysql.cpp:784: error: undefined reference to 'free_root'
-%if 0
-# source updating:
-git clone git://github.com/facebook/hiphop-php.git
-cd hiphop-php
-git submodule init
-git submodule update
-rm -rf src/third_party/libmbfl
-rm -rf src/third_party/xhp
-rm -rf src/third_party/libafdt
-version=$((echo 'function HPHP_VERSION(v) { printf("%.3f", v)}; BEGIN{'; cat src/version; echo '}') | awk -f -)
-version=${version}_$(git log -1 --format=%h)
-cd ..
-tar --exclude-vcs -cjf hiphop-php-$version.tar.bz2 hiphop-php
-../dropin hiphop-php-$version.tar.bz2
-%endif
+# - linking segfaults
+#   using bfd and gcc-6:4.6.2-2.x86_64 binutils-3:2.22.51.0.1-1.x86_64
+#   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
+#   Segmentation fault
+#   make[2]: *** [src/hphp/hphp] Error 139
+#   relinking succeeds, but resulting binary segfaults as well:
+#   0x0000000000b9cc0b in HPHP::Extension::LoadModules(HPHP::Hdf) ()
+%define                snap    cf9b612
+%define                rel             0.2
 Summary:       HipHop for PHP transforms PHP source code into highly optimized C++
 Name:          hiphop-php
 Version:       1.000
-Release:       0.1
+Release:       %{rel}.%{snap}
 License:       PHP 3.01
 Group:         Development/Languages
-Source0:       %{name}-%{version}_9f026c9.tar.bz2
+Source0:       %{name}-%{version}_%{snap}.tar.bz2
 # Source0-md5: 16b7928995a91001657b015fe7f8a06d
 # need fb.changes.patch, which is available for 1.4 only
 Source1:       http://www.monkey.org/~provos/libevent-1.4.14b-stable.tar.gz
 # Source1-md5: a00e037e4d3f9e4fe9893e8a2d27918c
+Source2:       get-source.sh
 Patch0:                cmake-missing-library.patch
+Patch1:                libevent14.patch
 Patch3:                system-xhp.patch
 Patch4:                system-libafdt.patch
 URL:           http://wiki.github.com/facebook/hiphop-php/
@@ -44,12 +35,13 @@ BuildRequires:      curl-devel >= 7.20.1-2
 BuildRequires: expat-devel
 BuildRequires: flex >= 2.5.35
 BuildRequires: gd-devel
+BuildRequires: jemalloc-devel
 BuildRequires: libafdt-devel >= 0.1.0
 BuildRequires: libcap-devel
 #BuildRequires:        libevent-devel < 2.0
 #BuildRequires:        libevent-devel >= 1.4.13-2
 BuildRequires: libicu-devel >= 4.2
-BuildRequires: libmbfl-devel
+#BuildRequires:        libmbfl-devel
 BuildRequires: libmcrypt
 BuildRequires: libmemcached-devel >= 0.39
 BuildRequires: libstdc++-devel >= 6:4.3
@@ -78,15 +70,18 @@ amounts of Web traffic when compared to Apache and PHP. Facebook's API
 tier can serve twice the traffic using 30% less CPU.
 
 %prep
-%setup -qn %{name} -a1
+%setup -qn %{name}-%{version}_%{snap} -a1
 %patch0 -p1
+%patch1 -p1
 #%patch3 -p1
 %patch4 -p1
 
 ln -s libevent-1.4.*-stable libevent
 %{__patch} -d libevent -p1 < src/third_party/libevent-1.4.14.fb-changes.diff
 
-rm -rf src/third_party/libmbfl
+#rm -rf src/third_party/libmbfl
+#sed -i -e '/add_subdirectory(third_party\/libmbfl)/d' src/CMakeLists.txt
+
 rm -rf src/third_party/xhp
 rm -rf src/third_party/libafdt
 
@@ -110,21 +105,23 @@ export HPHP_LIB=$HPHP_HOME/bin
 install -d build
 cd build
 %cmake \
-       -DLibEvent_PREFIX=$HPHP_HOME/libevent \
-       -DzLIBEVENT_INCLUDE_DIR=$HPHP_HOME/libevent \
-       -DzLIBEVENT_LIB=$HPHP_HOME/libevent/.libs/libevent.a \
+       -DLibEvent_INCLUDE_PATHS=$HPHP_HOME/libevent \
+       -DLibEvent_LIB_PATHS=$HPHP_HOME/libevent/.libs \
        -DCMAKE_PREFIX_PATH=%{_prefix} \
        -DSKIP_BUNDLED_XHP=ON \
+       -DUSE_JEMALLOC=ON \
+       -DUSE_TCMALLOC=OFF \
        ../
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%{__make} install \
-       DESTDIR=$RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_bindir}
+install -p build/src/hphp/hphp $RPM_BUILD_ROOT%{_bindir}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/hphp
diff --git a/libevent14.patch b/libevent14.patch
new file mode 100644 (file)
index 0000000..cde6586
--- /dev/null
@@ -0,0 +1,13 @@
+--- hiphop-php-1.000_cf9b612/CMake/FindLibEvent.cmake~ 2011-12-12 22:32:34.000000000 +0200
++++ hiphop-php-1.000_cf9b612/CMake/FindLibEvent.cmake  2011-12-12 22:32:36.674152072 +0200
+@@ -10,8 +10,8 @@
+       list(APPEND LibEvent_LIB_PATHS "${prefix}/lib")
+ endforeach()
+-find_path(LIBEVENT_INCLUDE_DIR event.h PATHS ${LibEvent_INCLUDE_PATHS})
+-find_library(LIBEVENT_LIB NAMES event PATHS ${LibEvent_LIB_PATHS})
++find_path(LIBEVENT_INCLUDE_DIR event.h PATHS ${LibEvent_INCLUDE_PATHS} NO_DEFAULT_PATH)
++find_library(LIBEVENT_LIB NAMES event PATHS ${LibEvent_LIB_PATHS} NO_DEFAULT_PATH)
+  
+ if (LIBEVENT_LIB AND LIBEVENT_INCLUDE_DIR)
+   set(LibEvent_FOUND TRUE)
This page took 0.069432 seconds and 4 git commands to generate.