summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-pecl-xdebug.spec37
-rw-r--r--xdebug-build.patch97
2 files changed, 127 insertions, 7 deletions
diff --git a/php-pecl-xdebug.spec b/php-pecl-xdebug.spec
index ac48b92..46e49ac 100644
--- a/php-pecl-xdebug.spec
+++ b/php-pecl-xdebug.spec
@@ -1,13 +1,19 @@
%{!?__pecl: %{expand: %%global __pecl %{_bindir}/pecl}}
%global pecl_name xdebug
+%global gitver e773b090fc
+%global prever dev
Name: php-pecl-xdebug
Summary: PECL package for debugging PHP scripts
-Version: 2.2.1
-Release: 2%{?dist}
+Version: 2.2.2
+Release: 0.1%{?gitver:.git%{gitver}}%{?dist}
+%if 0%{?gitver:1}
+# https://github.com/xdebug/xdebug/archive/xdebug_2_2.tar.gz
+Source0: xdebug-xdebug_2_2.tar.gz
+%else
Source0: http://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz
-
+%endif
# The Xdebug License, version 1.01
# (Based on "The PHP License", version 3.0)
License: PHP
@@ -19,11 +25,15 @@ BuildRequires: php-pear >= 1:1.4.9-1.2
BuildRequires: php-devel >= 5.1.0
BuildRequires: libedit-devel
+Patch0: %{pecl_name}-build.patch
+
Requires(post): %{__pecl}
Requires(postun): %{__pecl}
Requires: php(zend-abi) = %{php_zend_api}
Requires: php(api) = %{php_core_api}
+Provides: php-%{pecl_name} = %{version}
+Provides: php-%{pecl_name}%{?_isa} = %{version}
Provides: php-pecl(Xdebug) = %{version}
Provides: php-pecl(Xdebug)%{?_isa} = %{version}
@@ -60,9 +70,18 @@ Xdebug also provides:
%prep
%setup -qc
+%if 0%{?gitver:1}
+sed -e '/release/s/2.2.1/%{version}%{?prever}/' \
+ xdebug-xdebug_2_2/package.xml >package.xml
+mv xdebug-xdebug_2_2 %{pecl_name}-%{version}%{?prever}
+%endif
cd %{pecl_name}-%{version}%{?prever}
+%if "%{php_version}" > "5.5"
+%patch0 -p0 -b .php55
+%endif
+
# https://bugs.php.net/60330
sed -i -e '/AC_PREREQ/s/2.60/2.59/' debugclient/configure.in
grep AC_PREREQ debugclient/configure.in
@@ -73,8 +92,8 @@ chmod -x *.[ch]
# Check extension version
ver=$(sed -n '/XDEBUG_VERSION/{s/.* "//;s/".*$//;p}' php_xdebug.h)
-if test "$ver" != "%{version}%{?devver}"; then
- : Error: Upstream XDEBUG_VERSION version is ${ver}, expecting %{version}%{?devver}.
+if test "$ver" != "%{version}%{?prever}"; then
+ : Error: Upstream XDEBUG_VERSION version is ${ver}, expecting %{version}%{?prever}.
exit 1
fi
@@ -118,7 +137,7 @@ install -Dpm 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
# install config file
install -d %{buildroot}%{_sysconfdir}/php.d
-cat > %{buildroot}%{_sysconfdir}/php.d/%{pecl_name}.ini << 'EOF'
+cat > %{buildroot}%{php_inidir}/%{pecl_name}.ini << 'EOF'
; Enable xdebug extension module
zend_extension=%{php_extdir}/%{pecl_name}.so
@@ -168,7 +187,7 @@ rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc %{pecl_name}-%{version}%{?prever}/{CREDITS,LICENSE,NEWS,README}
-%config(noreplace) %{_sysconfdir}/php.d/%{pecl_name}.ini
+%config(noreplace) %{php_inidir}/%{pecl_name}.ini
%{php_extdir}/%{pecl_name}.so
%{_bindir}/debugclient
%{pecl_xmldir}/%{name}.xml
@@ -178,6 +197,10 @@ rm -rf %{buildroot}
%changelog
+* Fri Nov 30 2012 Remi Collet <RPMS@FamilleCollet.com> - 2.2.1-3.gite773b090fc
+- update to git snapshoit for php 5.5
+- also provides php-xdebug
+
* Sun Sep 9 2012 Remi Collet <RPMS@FamilleCollet.com> - 2.2.1-2
- sync with rawhide, cleanups
- obsoletes php53*, php54*
diff --git a/xdebug-build.patch b/xdebug-build.patch
new file mode 100644
index 0000000..e9a7d01
--- /dev/null
+++ b/xdebug-build.patch
@@ -0,0 +1,97 @@
+--- xdebug.c.old 2012-11-30 13:22:26.000000000 +0100
++++ xdebug.c 2012-11-30 13:27:34.000000000 +0100
+@@ -65,16 +65,17 @@
+ zend_op_array* (*old_compile_file)(zend_file_handle* file_handle, int type TSRMLS_DC);
+ zend_op_array* xdebug_compile_file(zend_file_handle*, int TSRMLS_DC);
+
+-#if PHP_VERSION_ID < 50500
++#if PHP_VERSION_ID < 50600
+ void (*xdebug_old_execute)(zend_op_array *op_array TSRMLS_DC);
+ void xdebug_execute(zend_op_array *op_array TSRMLS_DC);
+-
+-void (*xdebug_old_execute_internal)(zend_execute_data *current_execute_data, int return_value_used TSRMLS_DC);
+-void xdebug_execute_internal(zend_execute_data *current_execute_data, int return_value_used TSRMLS_DC);
+ #else
+ void (*xdebug_old_execute_ex)(zend_execute_data *execute_data TSRMLS_DC);
+ void xdebug_execute_ex(zend_execute_data *execute_data TSRMLS_DC);
+-
++#endif
++#if PHP_VERSION_ID < 50500
++void (*xdebug_old_execute_internal)(zend_execute_data *current_execute_data, int return_value_used TSRMLS_DC);
++void xdebug_execute_internal(zend_execute_data *current_execute_data, int return_value_used TSRMLS_DC);
++#else
+ void (*xdebug_old_execute_internal)(zend_execute_data *current_execute_data, struct _zend_fcall_info *fci, int return_value_used TSRMLS_DC);
+ void xdebug_execute_internal(zend_execute_data *current_execute_data, struct _zend_fcall_info *fci, int return_value_used TSRMLS_DC);
+ #endif
+@@ -569,7 +570,7 @@
+ old_compile_file = zend_compile_file;
+ zend_compile_file = xdebug_compile_file;
+
+-#if PHP_VERSION_ID < 50500
++#if PHP_VERSION_ID < 50600
+ xdebug_old_execute = zend_execute;
+ zend_execute = xdebug_execute;
+ #else
+@@ -713,7 +714,7 @@
+
+ /* Reset compile, execute and error callbacks */
+ zend_compile_file = old_compile_file;
+-#if PHP_VERSION_ID < 50500
++#if PHP_VERSION_ID < 50600
+ zend_execute = xdebug_old_execute;
+ #else
+ zend_execute_ex = xdebug_old_execute_ex;
+@@ -1233,7 +1234,7 @@
+ return 1;
+ }
+
+-#if PHP_VERSION_ID < 50500
++#if PHP_VERSION_ID < 50600
+ void xdebug_execute(zend_op_array *op_array TSRMLS_DC)
+ {
+ zend_execute_data *edata = EG(current_execute_data);
+@@ -1254,7 +1255,7 @@
+
+ /* If we're evaluating for the debugger's eval capability, just bail out */
+ if (op_array && op_array->filename && strcmp("xdebug://debug-eval", op_array->filename) == 0) {
+-#if PHP_VERSION_ID < 50500
++#if PHP_VERSION_ID < 50600
+ xdebug_old_execute(op_array TSRMLS_CC);
+ #else
+ xdebug_old_execute_ex(execute_data TSRMLS_CC);
+@@ -1265,7 +1266,7 @@
+ /* if we're in a ZEND_EXT_STMT, we ignore this function call as it's likely
+ that it's just being called to check for breakpoints with conditions */
+ if (edata && edata->opline && edata->opline->opcode == ZEND_EXT_STMT) {
+-#if PHP_VERSION_ID < 50500
++#if PHP_VERSION_ID < 50600
+ xdebug_old_execute(op_array TSRMLS_CC);
+ #else
+ xdebug_old_execute_ex(execute_data TSRMLS_CC);
+@@ -1379,7 +1380,7 @@
+ xdebug_trace_function_begin(fse, function_nr TSRMLS_CC);
+
+ fse->symbol_table = EG(active_symbol_table);
+-#if PHP_VERSION_ID < 50500
++#if PHP_VERSION_ID < 50600
+ fse->execute_data = EG(current_execute_data);
+ #else
+ fse->execute_data = EG(current_execute_data)->prev_execute_data;
+@@ -1429,7 +1430,7 @@
+ clear = 1;
+ }
+
+-#if PHP_VERSION_ID < 50500
++#if PHP_VERSION_ID < 50600
+ xdebug_old_execute(op_array TSRMLS_CC);
+ #else
+ xdebug_old_execute_ex(execute_data TSRMLS_CC);
+@@ -1445,7 +1446,7 @@
+ if (XG(collect_return) && do_return && XG(do_trace) && XG(trace_file)) {
+ if (EG(return_value_ptr_ptr) && *EG(return_value_ptr_ptr)) {
+ char *t;
+-#if PHP_VERSION_ID >= 50500
++#if PHP_VERSION_ID >= 50600
+ if (op_array->fn_flags & ZEND_ACC_GENERATOR) {
+ t = xdebug_return_trace_stack_generator_retval(fse, (zend_generator *) EG(return_value_ptr_ptr) TSRMLS_CC);
+ } else {