remi pushed to php-pecl-xdebug (master). "- add patch for efree/str_efree in php 5.6 (..more)"

notifications at fedoraproject.org notifications at fedoraproject.org
Wed May 27 11:15:32 UTC 2015


From dcfe81c709318d353441456cddf4b30b6d2a4998 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi at fedoraproject.org>
Date: Wed, 27 May 2015 13:15:22 +0200
Subject: - add patch for efree/str_efree in php 5.6 - add patch for
 virtual_file_ex in 5.6 #1214111


diff --git a/php-pecl-xdebug.spec b/php-pecl-xdebug.spec
index d56ecc7..ade64c8 100644
--- a/php-pecl-xdebug.spec
+++ b/php-pecl-xdebug.spec
@@ -1,4 +1,4 @@
-# spec file for php-pecl-xdebug
+# Fedora spec file for php-pecl-xdebug
 #
 # Copyright (c) 2010-2015 Remi Collet
 # Copyright (c) 2006-2009 Christopher Stone
@@ -25,9 +25,15 @@
 Name:           php-pecl-xdebug
 Summary:        PECL package for debugging PHP scripts
 Version:        2.3.2
-Release:        1%{?dist}
+Release:        2%{?dist}
 Source0:        http://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz
 
+# https://github.com/xdebug/xdebug/pull/172
+# https://bugzilla.redhat.com/1214111
+Patch0:         %{pecl_name}-pr172.patch
+# https://github.com/xdebug/xdebug/pull/176
+Patch1:         %{pecl_name}-pr176.patch
+
 # The Xdebug License, version 1.01
 # (Based on "The PHP License", version 3.0)
 License:        PHP
@@ -78,7 +84,10 @@ Xdebug also provides:
 %prep
 %setup -qc
 mv %{pecl_name}-%{version}%{?prever} NTS
+
 cd NTS
+%patch0 -p1 -b .pr172
+%patch1 -p1 -b .pr176
 
 # Check extension version
 ver=$(sed -n '/XDEBUG_VERSION/{s/.* "//;s/".*$//;p}' php_xdebug.h)
@@ -209,6 +218,10 @@ fi
 
 
 %changelog
+* Wed May 27 2015 Remi Collet <remi at fedoraproject.org> - 2.3.2-2
+- add patch for efree/str_efree in php 5.6
+- add patch for virtual_file_ex in 5.6 #1214111
+
 * Sun Mar 22 2015 Remi Collet <remi at fedoraproject.org> - 2.3.2-1
 - Update to 2.3.2
 
diff --git a/xdebug-pr172.patch b/xdebug-pr172.patch
new file mode 100644
index 0000000..e262339
--- /dev/null
+++ b/xdebug-pr172.patch
@@ -0,0 +1,37 @@
+From 419834a441cc65bb4e7220e1128356dc99d86211 Mon Sep 17 00:00:00 2001
+From: Remi Collet <fedora at famillecollet.com>
+Date: Wed, 22 Apr 2015 08:49:51 +0200
+Subject: [PATCH] fix usage of virtual_file_ex
+
+---
+ usefulstuff.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/usefulstuff.c b/usefulstuff.c
+index 83725c7..3bc4d1a 100644
+--- a/usefulstuff.c
++++ b/usefulstuff.c
+@@ -344,7 +344,11 @@ char *xdebug_path_to_url(const char *fileurl TSRMLS_DC)
+ 			cwd[0] = '\0';
+ 		}
+ 
++#if PHP_VERSION_ID < 50600
+ 		new_state.cwd = strdup(cwd);
++#else
++		new_state.cwd = estrdup(cwd);
++#endif
+ 		new_state.cwd_length = strlen(cwd);
+ 
+ 		if (!virtual_file_ex(&new_state, fileurl, NULL, 1 TSRMLS_CC)) {
+@@ -352,7 +356,11 @@ char *xdebug_path_to_url(const char *fileurl TSRMLS_DC)
+ 			tmp = xdebug_sprintf("file://%s",s);
+ 			efree(s);
+ 		}
++#if PHP_VERSION_ID < 50600
+ 		free(new_state.cwd);
++#else
++		efree(new_state.cwd);
++#endif
+ 
+ 	} else if (fileurl[1] == '/' || fileurl[1] == '\\') {
+ 		/* convert UNC paths (eg. \\server\sharepath) */
diff --git a/xdebug-pr176.patch b/xdebug-pr176.patch
new file mode 100644
index 0000000..ea8eef7
--- /dev/null
+++ b/xdebug-pr176.patch
@@ -0,0 +1,22 @@
+From 2358ad26cd4db2806180aca61a7ccaceb19fa526 Mon Sep 17 00:00:00 2001
+From: Remi Collet <fedora at famillecollet.com>
+Date: Wed, 27 May 2015 11:34:09 +0200
+Subject: [PATCH] switch from efree to STR_FREE
+
+---
+ xdebug_stack.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/xdebug_stack.c b/xdebug_stack.c
+index 56304bf..82707f1 100644
+--- a/xdebug_stack.c
++++ b/xdebug_stack.c
+@@ -247,7 +247,7 @@ void xdebug_append_error_description(xdebug_str *str, int html, const char *erro
+ 		xdebug_str_add(str, xdebug_sprintf(formats[1], error_type_str, escaped, error_filename, error_lineno), 1);
+ 	}
+ 
+-	efree(escaped);
++	STR_FREE(escaped);
+ }
+ 
+ void xdebug_append_printable_stack(xdebug_str *str, int html TSRMLS_DC)
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/php-pecl-xdebug.git/commit/?h=master&id=dcfe81c709318d353441456cddf4b30b6d2a4998


More information about the scm-commits mailing list