summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Evans <grknight@gentoo.org>2018-02-16 15:36:45 -0500
committerBrian Evans <grknight@gentoo.org>2018-02-16 17:00:08 -0500
commite144e0964a790f78d8cdcb2726496c206c24dd93 (patch)
treeaed97fba88226250aaf1c023422eeb801cac8b64
parentdev-php/PEAR-File_Fortune: Revbump to add tests and for EAPI/eclass (diff)
downloadgentoo-e144e0964a790f78d8cdcb2726496c206c24dd93.tar.gz
gentoo-e144e0964a790f78d8cdcb2726496c206c24dd93.tar.bz2
gentoo-e144e0964a790f78d8cdcb2726496c206c24dd93.zip
dev-php/PEAR-File_Gettext: Revbump direct to stable
Current stable is very broken with modern PHP Increase EAPI and change eclass WARNING - no tests, syntax checked only Package-Manager: Portage-2.3.24, Repoman-2.3.6
-rw-r--r--dev-php/PEAR-File_Gettext/PEAR-File_Gettext-0.4.2-r1.ebuild (renamed from dev-php/PEAR-File_Gettext/PEAR-File_Gettext-0.4.2.ebuild)7
-rw-r--r--dev-php/PEAR-File_Gettext/files/File_Gettext-0.4.2-construct.patch67
2 files changed, 71 insertions, 3 deletions
diff --git a/dev-php/PEAR-File_Gettext/PEAR-File_Gettext-0.4.2.ebuild b/dev-php/PEAR-File_Gettext/PEAR-File_Gettext-0.4.2-r1.ebuild
index 7c2ab3e6487..633c8c657fc 100644
--- a/dev-php/PEAR-File_Gettext/PEAR-File_Gettext-0.4.2.ebuild
+++ b/dev-php/PEAR-File_Gettext/PEAR-File_Gettext-0.4.2-r1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI="4"
+EAPI=6
-inherit php-pear-r1
+inherit php-pear-r2
DESCRIPTION="GNU Gettext file parser"
@@ -11,3 +11,4 @@ LICENSE="PHP-3"
SLOT="0"
KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ppc64 ~s390 ~sh sparc x86"
IUSE=""
+PATCHES=( "${FILESDIR/File_Gettext-0.4.2-construct.patch}" )
diff --git a/dev-php/PEAR-File_Gettext/files/File_Gettext-0.4.2-construct.patch b/dev-php/PEAR-File_Gettext/files/File_Gettext-0.4.2-construct.patch
new file mode 100644
index 00000000000..3527814485a
--- /dev/null
+++ b/dev-php/PEAR-File_Gettext/files/File_Gettext-0.4.2-construct.patch
@@ -0,0 +1,67 @@
+diff -aurN a/File/Gettext/MO.php b/File/Gettext/MO.php
+--- a/File/Gettext/MO.php 2012-03-03 22:00:49.000000000 -0500
++++ b/File/Gettext/MO.php 2018-02-16 15:15:17.725027132 -0500
+@@ -60,6 +60,10 @@
+ * @access public
+ * @return object File_Gettext_MO
+ */
++ function __construct($file = '')
++ {
++ $this->file = $file;
++ }
+ function File_Gettext_MO($file = '')
+ {
+ $this->file = $file;
+diff -aurN a/File/Gettext/PO.php b/File/Gettext/PO.php
+--- a/File/Gettext/PO.php 2012-03-03 22:00:49.000000000 -0500
++++ b/File/Gettext/PO.php 2018-02-16 15:14:57.997419162 -0500
+@@ -42,6 +42,10 @@
+ * @access public
+ * @return object File_Gettext_PO
+ */
++ function __construct($file = '')
++ {
++ $this->file = $file;
++ }
+ function File_Gettext_PO($file = '')
+ {
+ $this->file = $file;
+diff -aurN a/File/Gettext.php b/File/Gettext.php
+--- a/File/Gettext.php 2012-03-03 22:00:49.000000000 -0500
++++ b/File/Gettext.php 2018-02-16 15:14:27.629022634 -0500
+@@ -85,7 +85,7 @@
+ return File_Gettext::raiseError($php_errormsg);
+ }
+ $class = 'File_Gettext_' . $format;
+- $obref = &new $class($file);
++ $obref = new $class($file);
+ return $obref;
+ }
+
+@@ -110,7 +110,7 @@
+
+ include_once 'File/Gettext/PO.php';
+
+- $PO = &new File_Gettext_PO($pofile);
++ $PO = new File_Gettext_PO($pofile);
+ if (true !== ($e = $PO->load())) {
+ return $e;
+ }
+@@ -247,7 +247,7 @@
+ function &toMO()
+ {
+ include_once 'File/Gettext/MO.php';
+- $MO = &new File_Gettext_MO;
++ $MO = new File_Gettext_MO;
+ $MO->fromArray($this->toArray());
+ return $MO;
+ }
+@@ -261,7 +261,7 @@
+ function &toPO()
+ {
+ include_once 'File/Gettext/PO.php';
+- $PO = &new File_Gettext_PO;
++ $PO = new File_Gettext_PO;
+ $PO->fromArray($this->toArray());
+ return $PO;
+ }