summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-09-28 16:56:50 +0200
committerRemi Collet <fedora@famillecollet.com>2015-09-28 16:56:50 +0200
commitd1e15f976adba037e3023e54524cb65e4552bcd5 (patch)
tree8700624b90d72fbce7275730a861fb161966fea7
parent5838ce76db3810b71fef4cf2230927083a48115b (diff)
php-pecl-solr2: add patch for zpp calls
-rw-r--r--php-pecl-solr2.spec9
-rw-r--r--solr-upstream.patch84
2 files changed, 92 insertions, 1 deletions
diff --git a/php-pecl-solr2.spec b/php-pecl-solr2.spec
index 1ed3241..7cc7a27 100644
--- a/php-pecl-solr2.spec
+++ b/php-pecl-solr2.spec
@@ -42,13 +42,15 @@ Summary: Object oriented API to Apache Solr
Summary(fr): API orientée objet pour Apache Solr
Name: %{?sub_prefix}php-pecl-solr2
Version: 2.2.1
-Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: PHP
Group: Development/Languages
URL: http://pecl.php.net/package/solr
Source0: http://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz
+Patch0: %{pecl_name}-upstream.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: %{?scl_prefix}php-devel
BuildRequires: %{?scl_prefix}php-pear
@@ -134,6 +136,8 @@ sed -e 's/role="test"/role="src"/' -i package.xml
mv %{pecl_name}-%{version}%{?prever} NTS
cd NTS
+%patch0 -p1 -b .upstream
+
# Check version
extver=$(sed -n '/#define PHP_SOLR_VERSION /{s/.* "//;s/".*$//;p}' php_solr_version.h)
if test "x${extver}" != "x%{version}%{?prever}"; then
@@ -285,6 +289,9 @@ rm -rf %{buildroot}
%changelog
+* Mon Sep 28 2015 Remi Collet <remi@fedoraproject.org> - 2.2.1-3
+- add upstream patch for zpp calls (fix broken ppc64)
+
* Sun Sep 27 2015 Remi Collet <remi@fedoraproject.org> - 2.2.1-2
- ignore test with jsonc < 1.3.9
diff --git a/solr-upstream.patch b/solr-upstream.patch
new file mode 100644
index 0000000..11d35cd
--- /dev/null
+++ b/solr-upstream.patch
@@ -0,0 +1,84 @@
+From cd0f083c625505e6587102b03c840c7273fb761f Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@php.net>
+Date: Mon, 28 Sep 2015 15:31:39 +0200
+Subject: [PATCH] fix zpp calls
+
+---
+ php_solr_client.c | 8 ++++----
+ php_solr_utils.c | 6 +++---
+ 2 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/php_solr_client.c b/php_solr_client.c
+index 71572a0..1c324ea 100644
+--- a/php_solr_client.c
++++ b/php_solr_client.c
+@@ -1085,7 +1085,7 @@ PHP_METHOD(SolrClient, request)
+ PHP_METHOD(SolrClient, deleteById)
+ {
+ solr_char_t *id = NULL;
+- long int id_length = 0L;
++ int id_length = 0L;
+ solr_client_t *client = NULL;
+ xmlNode *root_node = NULL;
+ xmlDoc *doc_ptr = NULL;
+@@ -1279,7 +1279,7 @@ end_doc_ids_loop :
+ PHP_METHOD(SolrClient, deleteByQuery)
+ {
+ solr_char_t *query = NULL;
+- long int query_length = 0L;
++ int query_length = 0L;
+ solr_client_t *client = NULL;
+ xmlNode *root_node = NULL;
+ xmlDoc *doc_ptr = NULL;
+@@ -1357,7 +1357,7 @@ PHP_METHOD(SolrClient, getById)
+ {
+ solr_client_t *client;
+ solr_char_t *id;
+- size_t id_len = 0;
++ int id_len = 0;
+ solr_string_t query_string;
+ int success = 1;
+
+@@ -1479,7 +1479,7 @@ solr_getbyids_exit:
+ PHP_METHOD(SolrClient, setResponseWriter)
+ {
+ solr_char_t *wt = NULL;
+- long int wt_length = 0L;
++ int wt_length = 0L;
+ solr_client_t *client = NULL;
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &wt, &wt_length) == FAILURE) {
+diff --git a/php_solr_utils.c b/php_solr_utils.c
+index 4ad16ca..5e5c2d7 100644
+--- a/php_solr_utils.c
++++ b/php_solr_utils.c
+@@ -28,7 +28,7 @@ PHP_METHOD(SolrUtils, escapeQueryChars)
+ {
+ solr_char_t *unescaped = NULL;
+ solr_string_t sbuilder;
+- long int unescaped_length = 0;
++ int unescaped_length = 0;
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &unescaped, &unescaped_length) == FAILURE) {
+
+@@ -56,7 +56,7 @@ PHP_METHOD(SolrUtils, queryPhrase)
+ {
+ solr_char_t *unescaped = NULL;
+ solr_string_t sbuilder;
+- long int unescaped_length = 0;
++ int unescaped_length = 0;
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &unescaped, &unescaped_length) == FAILURE) {
+
+@@ -152,7 +152,7 @@ PHP_METHOD(SolrUtils, digestXmlResponse)
+ PHP_METHOD(SolrUtils, digestJsonResponse)
+ {
+ solr_char_t *jsonResponse = NULL;
+- long jsonResponse_len = 0;
++ int jsonResponse_len = 0;
+ unsigned char *raw_resp = NULL, *str_end = NULL;
+
+ solr_string_t buffer;
+--
+2.1.4
+