summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2019-11-21 08:41:32 +0100
committerRemi Collet <remi@remirepo.net>2019-11-21 08:41:32 +0100
commit78a041a8ec5064c3f83016356202a8b5b7759964 (patch)
tree65171a482da7995fb62af13ab13c6d33c63565f3
parent534e8bb4e6d09ae1293f536bc568513d68c98402 (diff)
- update Console_Getopt to 1.4.3
- drop patches merged upstream
-rw-r--r--4.patch66
-rw-r--r--5.patch22
-rw-r--r--php-pear.spec14
3 files changed, 7 insertions, 95 deletions
diff --git a/4.patch b/4.patch
deleted file mode 100644
index c8a8a31..0000000
--- a/4.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From f37ba4a4f42a1f1173fe7de28fb9b71a54c2ff63 Mon Sep 17 00:00:00 2001
-From: Jack Cherng <jfcherng@gmail.com>
-Date: Wed, 7 Aug 2019 07:32:38 +0800
-Subject: [PATCH] Fix PHP 7.4 deprecation: array/string curly braces access
-
-Signed-off-by: Jack Cherng <jfcherng@gmail.com>
----
- Console/Getopt.php | 16 ++++++++--------
- 1 file changed, 8 insertions(+), 8 deletions(-)
-
-diff --git a/Console/Getopt.php b/Console/Getopt.php
-index f8df71c..29f86bb 100644
---- a/Console/Getopt.php
-+++ b/Console/Getopt.php
-@@ -138,10 +138,10 @@ public static function doGetopt($version, $args, $short_options, $long_options =
- break;
- }
-
-- if ($arg{0} != '-' || (strlen($arg) > 1 && $arg{1} == '-' && !$long_options)) {
-+ if ($arg[0] != '-' || (strlen($arg) > 1 && $arg[1] == '-' && !$long_options)) {
- $non_opts = array_merge($non_opts, array_slice($args, $i));
- break;
-- } elseif (strlen($arg) > 1 && $arg{1} == '-') {
-+ } elseif (strlen($arg) > 1 && $arg[1] == '-') {
- $error = Console_Getopt::_parseLongOption(substr($arg, 2),
- $long_options,
- $opts,
-@@ -186,11 +186,11 @@ public static function doGetopt($version, $args, $short_options, $long_options =
- protected static function _parseShortOption($arg, $short_options, &$opts, &$argIdx, $args, $skip_unknown)
- {
- for ($i = 0; $i < strlen($arg); $i++) {
-- $opt = $arg{$i};
-+ $opt = $arg[$i];
- $opt_arg = null;
-
- /* Try to find the short option in the specifier string. */
-- if (($spec = strstr($short_options, $opt)) === false || $arg{$i} == ':') {
-+ if (($spec = strstr($short_options, $opt)) === false || $arg[$i] == ':') {
- if ($skip_unknown === true) {
- break;
- }
-@@ -199,8 +199,8 @@ protected static function _parseShortOption($arg, $short_options, &$opts, &$argI
- return PEAR::raiseError($msg);
- }
-
-- if (strlen($spec) > 1 && $spec{1} == ':') {
-- if (strlen($spec) > 2 && $spec{2} == ':') {
-+ if (strlen($spec) > 1 && $spec[1] == ':') {
-+ if (strlen($spec) > 2 && $spec[2] == ':') {
- if ($i + 1 < strlen($arg)) {
- /* Option takes an optional argument. Use the remainder of
- the arg string if there is anything left. */
-@@ -296,11 +296,11 @@ protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx
- $next_option_rest = '';
- }
-
-- if ($opt_rest != '' && $opt{0} != '=' &&
-+ if ($opt_rest != '' && $opt[0] != '=' &&
- $i + 1 < count($long_options) &&
- $opt == substr($long_options[$i+1], 0, $opt_len) &&
- $next_option_rest != '' &&
-- $next_option_rest{0} != '=') {
-+ $next_option_rest[0] != '=') {
-
- $msg = "Console_Getopt: option --$opt is ambiguous";
- return PEAR::raiseError($msg);
diff --git a/5.patch b/5.patch
deleted file mode 100644
index fdd688a..0000000
--- a/5.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From ed634fd44250abab4f6ad85ae7849d0811a3d128 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Mon, 18 Nov 2019 12:58:50 +0100
-Subject: [PATCH] fix phplint warnings
-
----
- Console/Getopt.php | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Console/Getopt.php b/Console/Getopt.php
-index 29f86bb..e5793bb 100644
---- a/Console/Getopt.php
-+++ b/Console/Getopt.php
-@@ -123,7 +123,7 @@ public static function doGetopt($version, $args, $short_options, $long_options =
- * erroneous POSIX fix.
- */
- if ($version < 2) {
-- if (isset($args[0]{0}) && $args[0]{0} != '-') {
-+ if (isset($args[0][0]) && $args[0][0] != '-') {
- array_shift($args);
- }
- }
diff --git a/php-pear.spec b/php-pear.spec
index 5947011..8aad34c 100644
--- a/php-pear.spec
+++ b/php-pear.spec
@@ -19,7 +19,7 @@
%global peardir %{_datadir}/pear
%global metadir %{_localstatedir}/lib/pear
-%global getoptver 1.4.2
+%global getoptver 1.4.3
%global arctarver 1.4.8
# https://pear.php.net/bugs/bug.php?id=19367
# Structures_Graph 1.0.4 - incorrect FSF address
@@ -40,7 +40,7 @@
Summary: PHP Extension and Application Repository framework
Name: %{?scl_prefix}php-pear
Version: 1.10.10
-Release: 1%{?dist}
+Release: 2%{?dist}
Epoch: 1
# PEAR, PEAR_Manpages, Archive_Tar, XML_Util, Console_Getopt are BSD
# Structures_Graph is LGPLv3+
@@ -61,9 +61,6 @@ Source23: http://pear.php.net/get/Structures_Graph-%{structver}.tgz
Source24: http://pear.php.net/get/XML_Util-%{xmlutil}.tgz
Source25: http://pear.php.net/get/PEAR_Manpages-%{manpages}.tgz
-Patch0: https://patch-diff.githubusercontent.com/raw/pear/Console_Getopt/pull/4.patch
-Patch1: https://patch-diff.githubusercontent.com/raw/pear/Console_Getopt/pull/5.patch
-
BuildArch: noarch
BuildRequires: %{?scl_prefix}php(language) > 5.4
BuildRequires: %{?scl_prefix}php-cli
@@ -280,8 +277,7 @@ install -m 644 -D macros.pear \
# apply patches on installed PEAR tree
pushd %{buildroot}%{peardir}
-patch -p1 <%{PATCH0}
-patch -p1 <%{PATCH1}
+: no patch
popd
# Why this file here ?
@@ -467,6 +463,10 @@ fi
%changelog
+* Thu Nov 21 2019 Remi Collet <remi@remirepo.net> - 1:1.10.10-1
+- update Console_Getopt to 1.4.3
+- drop patches merged upstream
+
* Wed Nov 20 2019 Remi Collet <remi@remirepo.net> - 1:1.10.10-1
- update PEAR to 1.10.10