[packages/php-pecl-haru] - added libharu patch (adjust for libharu 2.4.x API changes); release 6

qboosh qboosh at pld-linux.org
Tue Jan 24 21:18:19 CET 2023


commit 32374a69b8e32dca3d4c3bf870890164eea04045
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue Jan 24 21:19:35 2023 +0100

    - added libharu patch (adjust for libharu 2.4.x API changes); release 6

 haru-libharu.patch | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 php-pecl-haru.spec |  6 ++++--
 2 files changed, 60 insertions(+), 2 deletions(-)
---
diff --git a/php-pecl-haru.spec b/php-pecl-haru.spec
index 123364e..bb0db67 100644
--- a/php-pecl-haru.spec
+++ b/php-pecl-haru.spec
@@ -5,14 +5,15 @@ Summary:	%{modname} - Haru PDF functions
 Summary(pl.UTF-8):	%{modname} - funkcje PDF haru
 Name:		%{php_name}-pecl-%{modname}
 Version:	1.0.4
-Release:	5
+Release:	6
 License:	PHP
 Group:		Development/Languages/PHP
 Source0:	http://pecl.php.net/get/%{modname}-%{version}.tgz
 # Source0-md5:	be91eed4a46c7067d7877bbe8b64ac23
+Patch0:		haru-libharu.patch
 URL:		http://pecl.php.net/package/haru/
 BuildRequires:	%{php_name}-devel >= 3:5.0.4
-BuildRequires:	libharu-devel >= 2.0.8-2
+BuildRequires:	libharu-devel >= 2.4
 BuildRequires:	rpmbuild(macros) >= 1.650
 %{?requires_php_extension}
 Provides:	php(%{modname}) = %{version}
@@ -34,6 +35,7 @@ To rozszerzenie ma w PECL status: %{status}.
 %prep
 %setup -q -c
 mv %{modname}-%{version}/* .
+%patch0 -p1
 
 %build
 phpize
diff --git a/haru-libharu.patch b/haru-libharu.patch
new file mode 100644
index 0000000..554e3cf
--- /dev/null
+++ b/haru-libharu.patch
@@ -0,0 +1,56 @@
+--- haru-1.0.4/haru.c.orig	2012-12-23 12:17:58.000000000 +0100
++++ haru-1.0.4/haru.c	2023-01-24 21:14:58.215362453 +0100
+@@ -2120,7 +2120,7 @@ static PHP_METHOD(HaruPage, setLineCap)
+ 	switch (cap) {
+ 		case HPDF_BUTT_END:
+ 		case HPDF_ROUND_END:
+-		case HPDF_PROJECTING_SCUARE_END:
++		case HPDF_PROJECTING_SQUARE_END:
+ 			/* only these are valid */
+ 			break;
+ 		default:
+@@ -2196,7 +2196,7 @@ static PHP_METHOD(HaruPage, setDash)
+ {
+ 	php_harupage *page = (php_harupage *)zend_object_store_get_object(getThis() TSRMLS_CC);
+ 	HPDF_STATUS status;
+-	HPDF_UINT16 *pat = NULL;
++	HPDF_REAL *pat = NULL;
+ 	zval *pattern;
+ 	int pat_num = 0;
+ 	long phase;
+@@ -2222,7 +2222,7 @@ static PHP_METHOD(HaruPage, setDash)
+ 		zval **element, tmp, tmp_element;
+ 		int i = 0;
+ 
+-		pat = emalloc(pat_num * sizeof(HPDF_UINT16)); /* safe */
++		pat = emalloc(pat_num * sizeof(HPDF_REAL)); /* safe */
+ 
+ 		for (zend_hash_internal_pointer_reset(Z_ARRVAL_P(pattern));
+ 				zend_hash_get_current_data(Z_ARRVAL_P(pattern), (void **) &element) == SUCCESS;
+@@ -2245,7 +2245,7 @@ static PHP_METHOD(HaruPage, setDash)
+ 		}
+ 	}
+ 
+-	status = HPDF_Page_SetDash(page->h, (const HPDF_UINT16 *)pat, (HPDF_UINT)pat_num, (HPDF_UINT)phase);
++	status = HPDF_Page_SetDash(page->h, (const HPDF_REAL *)pat, (HPDF_UINT)pat_num, (HPDF_UINT)phase);
+ 
+ 	if (pat) {
+ 		efree(pat);
+@@ -5851,7 +5851,7 @@ static PHP_MINIT_FUNCTION(haru)
+ 	
+ 	HARU_CLASS_CONST(ce_harupage, "BUTT_END", HPDF_BUTT_END);
+ 	HARU_CLASS_CONST(ce_harupage, "ROUND_END", HPDF_ROUND_END);
+-	HARU_CLASS_CONST(ce_harupage, "PROJECTING_SCUARE_END", HPDF_PROJECTING_SCUARE_END);
++	HARU_CLASS_CONST(ce_harupage, "PROJECTING_SCUARE_END", HPDF_PROJECTING_SQUARE_END);
+ 
+ 	HARU_CLASS_CONST(ce_harupage, "MITER_JOIN", HPDF_MITER_JOIN);
+ 	HARU_CLASS_CONST(ce_harupage, "ROUND_JOIN", HPDF_ROUND_JOIN);
+@@ -5918,7 +5918,7 @@ static PHP_MINIT_FUNCTION(haru)
+ 	
+ 	HARU_CLASS_CONST(ce_haruencoder, "BYTE_TYPE_SINGLE", HPDF_BYTE_TYPE_SINGLE);
+ 	HARU_CLASS_CONST(ce_haruencoder, "BYTE_TYPE_LEAD", HPDF_BYTE_TYPE_LEAD);
+-	HARU_CLASS_CONST(ce_haruencoder, "BYTE_TYPE_TRAIL", HPDF_BYTE_TYPE_TRIAL); /* note the typo in the original name.. */
++	HARU_CLASS_CONST(ce_haruencoder, "BYTE_TYPE_TRAIL", HPDF_BYTE_TYPE_TRAIL); /* note the typo in the original name.. */
+ 	HARU_CLASS_CONST(ce_haruencoder, "BYTE_TYPE_UNKNOWN", HPDF_BYTE_TYPE_UNKNOWN);
+ 	
+ 	HARU_CLASS_CONST(ce_haruencoder, "WMODE_HORIZONTAL", HPDF_WMODE_HORIZONTAL);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/php-pecl-haru.git/commitdiff/32374a69b8e32dca3d4c3bf870890164eea04045



More information about the pld-cvs-commit mailing list