Update to 4.4.3 (#1450031).
Signed-off-by: Randy Barlow <randy@electronsweatshop.com>
This commit is contained in:
parent
ec40649b8e
commit
48caa81517
5 changed files with 31 additions and 39 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1 +1,3 @@
|
|||
/php-gettext-gettext-3.5.9-8da2f945.tgz
|
||||
/php-gettext-gettext-4.4.3.tar.gz
|
||||
/Gettext-4.4.3.tar.gz
|
||||
|
|
|
|||
|
|
@ -1,8 +1,12 @@
|
|||
From 063cf0e74c8bce8785a8d7cc90a5af2bac345fe3 Mon Sep 17 00:00:00 2001
|
||||
From: Remi Collet <remi@remirepo.net>
|
||||
Date: Tue, 31 Oct 2017 09:54:52 +0100
|
||||
From 73c0f65dad03f1beff820b415af12eba3f1f6601 Mon Sep 17 00:00:00 2001
|
||||
From: Randy Barlow <randy@electronsweatshop.com>
|
||||
Date: Mon, 15 Jan 2018 15:59:10 -0500
|
||||
Subject: [PATCH] don't check Po file content on bigendian
|
||||
|
||||
Patch originally written by Remi Collet[0], and adapted for
|
||||
Gettext 4.4.3 by Randy Barlow.
|
||||
|
||||
Signed-off-by: Randy Barlow <randy@electronsweatshop.com>
|
||||
---
|
||||
tests/AbstractTest.php | 10 +++++++++-
|
||||
1 file changed, 9 insertions(+), 1 deletion(-)
|
||||
|
|
@ -11,7 +15,7 @@ diff --git a/tests/AbstractTest.php b/tests/AbstractTest.php
|
|||
index 42f54b6..42f419f 100644
|
||||
--- a/tests/AbstractTest.php
|
||||
+++ b/tests/AbstractTest.php
|
||||
@@ -51,7 +51,10 @@ protected function assertContent(Translations $translations, $file, $format = nu
|
||||
@@ -51,7 +51,10 @@ abstract class AbstractTest extends PHPUnit_Framework_TestCase
|
||||
$method = "to{$format}String";
|
||||
$content = file_get_contents(static::asset($file.'.'.static::$ext[$format]));
|
||||
|
||||
|
|
@ -23,7 +27,7 @@ index 42f54b6..42f419f 100644
|
|||
}
|
||||
|
||||
protected static function saveContent(Translations $translations, $file, $format = null)
|
||||
@@ -78,4 +81,9 @@ protected function runTestFormat($file, $countTranslations, $countTranslated = 0
|
||||
@@ -78,4 +81,9 @@ abstract class AbstractTest extends PHPUnit_Framework_TestCase
|
||||
$this->assertSame($countTranslated, $translations->countTranslated());
|
||||
$this->assertContent($translations, $file);
|
||||
}
|
||||
|
|
@ -33,3 +37,6 @@ index 42f54b6..42f419f 100644
|
|||
+ return pack("s", 0x3031) === "10";
|
||||
+ }
|
||||
}
|
||||
--
|
||||
2.15.1
|
||||
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
Adapted for 3.5.9 from
|
||||
|
||||
From 0134262c82747d9905598d3a0a07ed70049c1040 Mon Sep 17 00:00:00 2001
|
||||
From: oscarotero <oom@oscarotero.com>
|
||||
Date: Sat, 20 May 2017 13:37:44 +0200
|
||||
Subject: [PATCH] removed create_function
|
||||
|
||||
|
||||
diff --git a/src/Translator.php b/src/Translator.php
|
||||
index 21fb67b..147f0c2 100644
|
||||
--- a/src/Translator.php
|
||||
+++ b/src/Translator.php
|
||||
@@ -204,7 +204,8 @@ class Translator extends BaseTranslator
|
||||
}
|
||||
|
||||
if (!isset($this->plurals[$domain]['function'])) {
|
||||
- $this->plurals[$domain]['function'] = create_function('$n', self::fixTerseIfs($this->plurals[$domain]['code']));
|
||||
+ $code = self::fixTerseIfs($this->plurals[$domain]['code']);
|
||||
+ $this->plurals[$domain]['function'] = eval("return function (\$n) { $code };");
|
||||
}
|
||||
|
||||
if ($this->plurals[$domain]['count'] <= 2) {
|
||||
|
|
@ -1,30 +1,30 @@
|
|||
%global gh_commit 8da2f94538a2250275bb86b431c51e31e256e1e1
|
||||
%global gh_commit 4f57f004635cc6311a20815ebfdc0757cb337113
|
||||
%global gh_short %(c=%{gh_commit}; echo ${c:0:8})
|
||||
%global gh_owner oscarotero
|
||||
%global gh_project Gettext
|
||||
|
||||
|
||||
Name: php-gettext-gettext
|
||||
Version: 3.5.9
|
||||
Release: 7%{?dist}
|
||||
Version: 4.4.3
|
||||
Release: 1%{?dist}
|
||||
BuildArch: noarch
|
||||
|
||||
License: MIT
|
||||
Summary: PHP gettext manager
|
||||
URL: https://github.com/%{gh_owner}/%{gh_project}
|
||||
Source0: %{name}-%{version}-%{gh_short}.tgz
|
||||
# Upstream strips the tests from the tarball, so we have to generate it manually.
|
||||
Source0: %{gh_project}-%{version}.tar.gz
|
||||
|
||||
# Upstream patch
|
||||
Patch0: %{name}-php72.patch
|
||||
# Skip some tests on bigendian as reference file are littleendian
|
||||
Patch1: %{name}-bigendian.patch
|
||||
# https://github.com/oscarotero/Gettext/pull/159
|
||||
Patch0: 0000-don-t-check-Po-file-content-on-bigendian.patch
|
||||
|
||||
BuildRequires: dos2unix
|
||||
BuildRequires: php-composer(gettext/languages) >= 2.0.0
|
||||
BuildRequires: php-composer(gettext/languages) >= 2.3.0
|
||||
BuildRequires: php-composer(gettext/languages) < 3.0.0
|
||||
BuildRequires: phpunit
|
||||
|
||||
Requires: php(language) >= 5.3.0
|
||||
Requires: php(language) >= 5.4.0
|
||||
Requires: php-date
|
||||
Requires: php-dom
|
||||
Requires: php-gettext
|
||||
|
|
@ -34,7 +34,7 @@ Requires: php-simplexml
|
|||
Requires: php-spl
|
||||
Requires: php-tokenizer
|
||||
|
||||
Requires: php-composer(gettext/languages) >= 2.0.0
|
||||
Requires: php-composer(gettext/languages) >= 2.3.0
|
||||
Requires: php-composer(gettext/languages) < 3.0.0
|
||||
|
||||
Provides: php-composer(gettext/gettext) = %{version}
|
||||
|
|
@ -48,7 +48,7 @@ Autoloader: %{_datadir}/php/Gettext/autoload.php
|
|||
|
||||
|
||||
%prep
|
||||
%autosetup -n Gettext-%{gh_commit} -p1
|
||||
%autosetup -p1 -n Gettext-%{version}
|
||||
|
||||
# The documentation has the wrong newline codes
|
||||
dos2unix *.md
|
||||
|
|
@ -92,6 +92,7 @@ phpunit --bootstrap tests/bootstrap.php --filter ^\(\(?!\(testBlade\|testTwig\)\
|
|||
|
||||
%files
|
||||
%license LICENSE
|
||||
%doc CHANGELOG.md
|
||||
%doc composer.json
|
||||
%doc CONTRIBUTING.md
|
||||
%doc README.md
|
||||
|
|
@ -99,6 +100,10 @@ phpunit --bootstrap tests/bootstrap.php --filter ^\(\(?!\(testBlade\|testTwig\)\
|
|||
|
||||
|
||||
%changelog
|
||||
* Sun Dec 17 2017 Randy Barlow <bowlofeggs@fedoraproject.org> - 4.4.3-1
|
||||
- Update to 4.4.3 (#1450031).
|
||||
- https://github.com/oscarotero/Gettext/blob/v4.4.3/CHANGELOG.md
|
||||
|
||||
* Tue Oct 31 2017 Remi Collet <remi@remirepo.net> - 3.5.9-7
|
||||
- fix FTBFS from Koschei
|
||||
- add upstream patch for PHP 7.2
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (php-gettext-gettext-3.5.9-8da2f945.tgz) = b949a74bc5a39790a2621579469d81fb39d34c8c59616e68a38d256b7aef617f283b07c65080efd00cfdb0bd48bdfffcbc02659018e81e185edd444ff22c0d44
|
||||
SHA512 (Gettext-4.4.3.tar.gz) = ddf73e9a18ada71755f3c2778db2fb5bce26624b6c6893c911f94e0d62d1359d102f6849687d0c17073b6e0447adf368741d6a8d0e98b17a938aa80a3d192985
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue