summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2013-12-14 17:19:27 +0100
committerRemi Collet <fedora@famillecollet.com>2013-12-14 17:19:27 +0100
commit659e7edd95ac0d70043996d6bc91a34eaead52a0 (patch)
tree00781e2572eb8761aecdd7242406d6f999c134d0
parent60f0f13572c5c1cb2dbb65de51dcf22c5e707acc (diff)
php-pecl-gmagick: 1.1.6RC1
-rw-r--r--gmagick-svn.patch79
-rw-r--r--php-pecl-gmagick.spec43
2 files changed, 108 insertions, 14 deletions
diff --git a/gmagick-svn.patch b/gmagick-svn.patch
new file mode 100644
index 0000000..7de88f9
--- /dev/null
+++ b/gmagick-svn.patch
@@ -0,0 +1,79 @@
+Index: gmagick.c
+===================================================================
+--- gmagick.c (révision 332363)
++++ gmagick.c (copie de travail)
+@@ -1082,7 +1082,7 @@
+ ZEND_ARG_INFO(0, miterLimit)
+ ZEND_END_ARG_INFO()
+
+-#if GMAGICK_LIB_MASK >= 1004000
++#if GMAGICK_LIB_MASK >= 1003000
+ ZEND_BEGIN_ARG_INFO_EX(gmagickdraw_setstrokedasharray_args, 0, 0, 1)
+ ZEND_ARG_INFO(0, dashArray)
+ ZEND_END_ARG_INFO()
+@@ -1137,7 +1137,7 @@
+ PHP_ME(gmagickdraw, getstrokelinecap, gmagick_empty_args, ZEND_ACC_PUBLIC)
+ PHP_ME(gmagickdraw, getstrokelinejoin, gmagick_empty_args, ZEND_ACC_PUBLIC)
+ PHP_ME(gmagickdraw, getstrokemiterlimit, gmagick_empty_args, ZEND_ACC_PUBLIC)
+-#if GMAGICK_LIB_MASK >= 1004000
++#if GMAGICK_LIB_MASK >= 1003000
+ PHP_ME(gmagickdraw, getstrokedasharray, gmagick_empty_args, ZEND_ACC_PUBLIC)
+ PHP_ME(gmagickdraw, setstrokedasharray, gmagickdraw_setstrokedasharray_args, ZEND_ACC_PUBLIC)
+ #endif
+Index: gmagick_helpers.c
+===================================================================
+--- gmagick_helpers.c (révision 332363)
++++ gmagick_helpers.c (copie de travail)
+@@ -632,7 +632,8 @@
+ return NULL;
+ }
+
+- double_array = (double *)emalloc(sizeof(double) * elements);
++ /* Number of elements + 1 for final 0 */
++ double_array = (double *)emalloc(sizeof(double) * (elements+1));
+
+ for (zend_hash_internal_pointer_reset(Z_ARRVAL_P(param_array));
+ zend_hash_get_current_data(Z_ARRVAL_P(param_array), (void **) &ppzval) == SUCCESS;
+@@ -648,6 +649,6 @@
+ double_array[i] = Z_DVAL_P(tmp_pzval);
+ tmp_pzval = NULL;
+ }
+- *num_elements = elements;
++ double_array[elements] = 0.0;
+ return double_array;
+-}
+\ Pas de retour chariot à la fin du fichier
++}
+Index: gmagickdraw_methods.c
+===================================================================
+--- gmagickdraw_methods.c (révision 332363)
++++ gmagickdraw_methods.c (copie de travail)
+@@ -1098,7 +1098,7 @@
+ /* }}} */
+
+
+-#if GMAGICK_LIB_MASK >= 1004000
++#if GMAGICK_LIB_MASK >= 1003000
+ /* {{{ proto array GmagickDraw::getStrokeDashArray()
+ Returns an array representing the pattern of dashes and gaps used to stroke paths (see DrawSetStrokeDashArray). The array must be freed once it is no longer required by the user.
+ */
+@@ -1157,4 +1157,4 @@
+ RETURN_TRUE;
+ }
+ /* }}} */
+-#endif
+\ Pas de retour chariot à la fin du fichier
++#endif
+Index: php_gmagick.h
+===================================================================
+--- php_gmagick.h (révision 332363)
++++ php_gmagick.h (copie de travail)
+@@ -335,7 +335,7 @@
+ PHP_METHOD(gmagickdraw, getstrokelinecap);
+ PHP_METHOD(gmagickdraw, getstrokelinejoin);
+ PHP_METHOD(gmagickdraw, getstrokemiterlimit);
+-#if GMAGICK_LIB_MASK >= 1004000
++#if GMAGICK_LIB_MASK >= 1003000
+ PHP_METHOD(gmagickdraw, setstrokedasharray);
+ PHP_METHOD(gmagickdraw, getstrokedasharray);
+ #endif
diff --git a/php-pecl-gmagick.spec b/php-pecl-gmagick.spec
index 52911d2..cba8509 100644
--- a/php-pecl-gmagick.spec
+++ b/php-pecl-gmagick.spec
@@ -1,3 +1,4 @@
+%{?scl: %scl_package php-pecl-gmagick}
%{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d}
%{!?__pecl: %global __pecl %{_bindir}/pecl}
%{!?__php: %global __php %{_bindir}/php}
@@ -7,32 +8,36 @@
%global with_zts 0%{?__ztsphp:1}
Summary: Provides a wrapper to the GraphicsMagick library
-Name: php-pecl-%{pecl_name}
-Version: 1.1.5
+Name: %{?scl_prefix}php-pecl-%{pecl_name}
+Version: 1.1.6
Release: 0.1.%{prever}%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
License: PHP
Group: Development/Libraries
-URL: http://pecl.php.net/package/gmagick
-Source0: http://pecl.php.net/get/gmagick-%{version}%{?prever}.tgz
+URL: http://pecl.php.net/package/%{pecl_name}
+Source0: http://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz
+
+# http://svn.php.net/viewvc?view=revision&revision=332364
+Patch0: %{pecl_name}-svn.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n)
-BuildRequires: php-pear
-BuildRequires: php-devel
+BuildRequires: %{?scl_prefix}php-pear
+BuildRequires: %{?scl_prefix}php-devel
BuildRequires: GraphicsMagick-devel >= 1.2.6
Requires(post): %{__pecl}
Requires(postun): %{__pecl}
-Requires: php(zend-abi) = %{php_zend_api}
-Requires: php(api) = %{php_core_api}
+Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
+Requires: %{?scl_prefix}php(api) = %{php_core_api}
-Provides: php-%{pecl_name} = %{version}
-Provides: php-%{pecl_name}%{?_isa} = %{version}
-Provides: php-pecl(%{pecl_name}) = %{version}
-Provides: php-pecl(%{pecl_name})%{?_isa} = %{version}
+Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
+Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
+Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
+Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
-Conflicts: php-pecl-imagick
-Conflicts: php-magickwand
+Conflicts: %{?scl_prefix}php-pecl-imagick
+Conflicts: %{?scl_prefix}php-magickwand
+%if 0%{!?scl:1}
# Other third party repo stuff
%if "%{php_version}" > "5.5"
Obsoletes: php53-pecl-%{pecl_name}
@@ -42,6 +47,7 @@ Obsoletes: php54-pecl-%{pecl_name}
%if "%{php_version}" > "5.5"
Obsoletes: php55u-pecl-%{pecl_name}
%endif
+%endif
%if 0%{?fedora} < 20
# Filter private shared
@@ -60,6 +66,10 @@ of images using the GraphicsMagick API.
mv %{pecl_name}-%{version}%{?prever} NTS
+pushd NTS
+%patch0 -p0 -b .svn
+popd
+
# Don't install any font (and test using it)
sed -e '/\.ttf"/d' \
-e '/gmagickdraw-008-setfont_getfont.phpt/d' \
@@ -189,6 +199,11 @@ export TEST_PHP_EXECUTABLE=%{__ztsphp}
%changelog
+* Sat Dec 14 2013 Remi Collet <remi@fedoraproject.org> - 1.1.6-0.1.RC1
+- Update to 1.1.6RC1 (beta)
+- adapt for SCL
+- add patch for setStrokeDashArray / getStrokeDashArray
+
* Tue Nov 5 2013 Remi Collet <RPMS@FamilleCollet.com> - 1.1.5-0.1.RC1
- Update to 1.1.5RC1
- cleanups for Copr