%bcond_without xmlrpc # without XML-RPC extension module
%bcond_without apache1 # disable building apache 1.3.x module
%bcond_without apache2 # disable building apache 2.x module
-%bcond_without zts # disable experimental-zts
+%bcond_without zts # disable Zend Thread Safety
+%bcond_without suhosin # with suhosin patch
%bcond_with tests # default off; test process very often hangs on buildersl; perform "make test"
%bcond_with type_hints # experimental support for strict typing/casting
Patch32: %{name}-m4-divert.patch
Patch38: %{name}-tds.patch
Patch43: %{name}-use-prog_sendmail.patch
+Patch47: suhosin.patch
%if %{with type_hints}
Patch50: http://ilia.ws/patch/type_hint_53_v2.txt
%endif
%prep
%setup -q
+# for suhosin patch
+%{__sed} -i -e 's,\r$,,' Zend/Zend.dsp Zend/ZendTS.dsp
+
%if %{with type_hints}
%patch50 -p0
%endif
%patch43 -p1
+%if %{with suhosin}
+%patch47 -p1
+%endif
+
# conflict seems to be resolved by recode patches
rm -f ext/recode/config9.m4
int php_init_info_logos(void)
{
if(zend_hash_init(&phpinfo_logo_hash, 0, NULL, NULL, 1)==FAILURE)
-@@ -58,7 +62,9 @@
- php_register_info_logo(PHP_LOGO_GUID , "image/gif", php_logo , sizeof(php_logo));
+@@ -63,6 +63,9 @@
php_register_info_logo(PHP_EGG_LOGO_GUID, "image/gif", php_egg_logo, sizeof(php_egg_logo));
php_register_info_logo(ZEND_LOGO_GUID , "image/gif", zend_logo , sizeof(zend_logo));
--
+ php_register_info_logo(PLD_LOGO_GUID , "image/png", pld_logo , sizeof(pld_logo));
+#if SUHOSIN_PATCH
-+ php_register_info_logo(SUHOSIN_LOGO_GUID, "image/jpeg", suhosin_logo , sizeof(suhosin_logo));
++ php_register_info_logo(SUHOSIN_LOGO_GUID, "image/jpeg", suhosin_logo , sizeof(suhosin_logo));
+#endif
+
return SUCCESS;
}
-
diff -Nura php-5.3.1RC1/main/snprintf.c suhosin-patch-5.3.1RC1-0.9.8/main/snprintf.c
--- php-5.3.1RC1/main/snprintf.c 2008-12-31 12:15:49.000000000 +0100
+++ suhosin-patch-5.3.1RC1-0.9.8/main/snprintf.c 2009-09-27 19:04:06.000000000 +0200