packages: hiphop-php/hiphop-php.spec, hiphop-php/get-source.sh (NEW), hipho...

glen glen at pld-linux.org
Tue Dec 13 12:27:09 CET 2011


Author: glen                         Date: Tue Dec 13 11:27:09 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- up to snapshot at cf9b612, still not usable

---- Files affected:
packages/hiphop-php:
   hiphop-php.spec (1.6 -> 1.7) , get-source.sh (NONE -> 1.1)  (NEW), libevent14.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/hiphop-php/hiphop-php.spec
diff -u packages/hiphop-php/hiphop-php.spec:1.6 packages/hiphop-php/hiphop-php.spec:1.7
--- packages/hiphop-php/hiphop-php.spec:1.6	Mon Jul 25 20:44:15 2011
+++ packages/hiphop-php/hiphop-php.spec	Tue Dec 13 12:27:04 2011
@@ -2,38 +2,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/
@@ -45,12 +36,13 @@
 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
@@ -79,15 +71,18 @@
 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
 
@@ -111,24 +106,26 @@
 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
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -136,6 +133,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.7  2011/12/13 11:27:04  glen
+- up to snapshot at cf9b612, still not usable
+
 Revision 1.6  2011/07/25 18:44:15  glen
 - up to 9f026c9 snapshot
 

================================================================
Index: packages/hiphop-php/get-source.sh
diff -u /dev/null packages/hiphop-php/get-source.sh:1.1
--- /dev/null	Tue Dec 13 12:27:09 2011
+++ packages/hiphop-php/get-source.sh	Tue Dec 13 12:27:04 2011
@@ -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: packages/hiphop-php/libevent14.patch
diff -u /dev/null packages/hiphop-php/libevent14.patch:1.1
--- /dev/null	Tue Dec 13 12:27:09 2011
+++ packages/hiphop-php/libevent14.patch	Tue Dec 13 12:27:04 2011
@@ -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)
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/hiphop-php/hiphop-php.spec?r1=1.6&r2=1.7&f=u



More information about the pld-cvs-commit mailing list