summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-admin/drush')
-rw-r--r--app-admin/drush/drush-6.7.0-r6.ebuild (renamed from app-admin/drush/drush-6.7.0-r3.ebuild)8
-rw-r--r--app-admin/drush/drush-6.7.0-r7.ebuild68
-rw-r--r--app-admin/drush/files/drush-6.7.0-batch-signature-fix-r1.patch46
-rw-r--r--app-admin/drush/files/drush-6.7.0-batch-signature-fix.patch46
-rw-r--r--app-admin/drush/files/drush-6.7.0-dont-pass-null-to-strtoupper.patch26
-rw-r--r--app-admin/drush/files/drush-6.7.0-gzip-mime.patch25
-rw-r--r--app-admin/drush/files/drush-6.7.0-php8.0.patch87
7 files changed, 303 insertions, 3 deletions
diff --git a/app-admin/drush/drush-6.7.0-r3.ebuild b/app-admin/drush/drush-6.7.0-r6.ebuild
index 1ecfe2c05382..4f0d63ad593b 100644
--- a/app-admin/drush/drush-6.7.0-r3.ebuild
+++ b/app-admin/drush/drush-6.7.0-r6.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -12,15 +12,17 @@ SRC_URI="https://github.com/drush-ops/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 x86"
-IUSE=""
-DEPEND=""
RDEPEND="dev-lang/php[cli,ctype,json(+),simplexml]
dev-php/PEAR-Console_Table"
PATCHES=(
"${FILESDIR}/update-bash-completion-script-for-2.1.patch"
"${FILESDIR}/array-syntax.patch"
+ "${FILESDIR}/${P}-php8.0.patch"
+ "${FILESDIR}/${P}-gzip-mime.patch"
+ "${FILESDIR}/${P}-dont-pass-null-to-strtoupper.patch"
+ "${FILESDIR}/${P}-batch-signature-fix.patch"
)
src_prepare() {
diff --git a/app-admin/drush/drush-6.7.0-r7.ebuild b/app-admin/drush/drush-6.7.0-r7.ebuild
new file mode 100644
index 000000000000..1329345e4dc0
--- /dev/null
+++ b/app-admin/drush/drush-6.7.0-r7.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit bash-completion-r1
+
+DESCRIPTION="Command line shell and scripting interface for Drupal"
+HOMEPAGE="https://github.com/drush-ops/drush"
+SRC_URI="https://github.com/drush-ops/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="dev-lang/php[cli,ctype,json(+),simplexml]
+ dev-php/PEAR-Console_Table"
+
+PATCHES=(
+ "${FILESDIR}/update-bash-completion-script-for-2.1.patch"
+ "${FILESDIR}/array-syntax.patch"
+ "${FILESDIR}/${P}-php8.0.patch"
+ "${FILESDIR}/${P}-gzip-mime.patch"
+ "${FILESDIR}/${P}-dont-pass-null-to-strtoupper.patch"
+ "${FILESDIR}/${P}-batch-signature-fix-r1.patch"
+)
+
+src_prepare() {
+ default
+
+ # dodoc compresses all of the documentation, so we fix the filenames
+ # in a few places.
+ #
+ # First, the README location in bootstrap.inc.
+ sed -i -e \
+ "s!/share/doc/drush!/share/doc/${PF}!" \
+ -e "s!README\.md!\0.bz2!g" \
+ includes/bootstrap.inc || die
+
+ # Next, the list of documentation in docs.drush.inc. Note that
+ # html files don't get compressed.
+ sed -i \
+ -e "s!\.bashrc'!.bashrc.bz2'!" \
+ -e "s!\.inc'!.inc.bz2'!" \
+ -e "s!\.ini'!.ini.bz2'!" \
+ -e "s!\.md'!.md.bz2'!" \
+ -e "s!\.php'!.php.bz2'!" \
+ -e "s!\.script'!.script.bz2'!" \
+ -e "s!\.txt'!.txt.bz2'!" \
+ commands/core/docs.drush.inc || die
+}
+
+src_install() {
+ # Always install the examples; they're referenced within the source
+ # code and too difficult to exorcise.
+ dodoc -r README.md docs examples
+
+ insinto /usr/share/drush
+ doins -r classes commands includes lib misc
+ doins drush_logo-black.png drush.info drush.php
+
+ exeinto /usr/share/drush
+ doexe drush
+ dosym ../share/drush/drush /usr/bin/drush
+
+ keepdir /etc/drush
+ newbashcomp drush.complete.sh drush
+}
diff --git a/app-admin/drush/files/drush-6.7.0-batch-signature-fix-r1.patch b/app-admin/drush/files/drush-6.7.0-batch-signature-fix-r1.patch
new file mode 100644
index 000000000000..14ee72b7dc4a
--- /dev/null
+++ b/app-admin/drush/files/drush-6.7.0-batch-signature-fix-r1.patch
@@ -0,0 +1,46 @@
+From 1acd52cff0d516ebfa7f177c38ed7f851c4f472a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 16 Aug 2023 21:21:39 -0400
+Subject: [PATCH] includes/batch.inc: synchronize sub and superclass signatures
+
+The DrushBatchContext class overrides the offsetSet() method of its
+superclass, ArrayObject, but changes its signature:
+
+ Error: Return type of DrushBatchContext::offsetSet($name, $value)
+ should either be compatible with ArrayObject::offsetSet(mixed $key,
+ mixed $value): void, or the #[\ReturnTypeWillChange] attribute should
+ be used to temporarily suppress the notice in .../batch.inc, line 37
+
+Renaming the parameter to $key and adding type hints fixes the issue.
+
+Signed-off-by: Michael Orlitzky <michael@orlitzky.com>
+---
+ includes/batch.inc | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/includes/batch.inc b/includes/batch.inc
+index dd4adc9..d26fabb 100644
+--- a/includes/batch.inc
++++ b/includes/batch.inc
+@@ -34,14 +34,14 @@
+ * @see _drush_batch_worker().
+ */
+ class DrushBatchContext extends ArrayObject {
+- function offsetSet($name, $value) {
+- if ($name == 'message') {
++ function offsetSet(mixed $key, mixed $value): void {
++ if ($key == 'message') {
+ drush_log(strip_tags($value), 'ok');
+ }
+- elseif ($name == 'error_message') {
++ elseif ($key == 'error_message') {
+ drush_set_error('DRUSH_BATCH_ERROR', strip_tags($value));
+ }
+- parent::offsetSet($name, $value);
++ parent::offsetSet($key, $value);
+ }
+ }
+
+--
+2.43.2
+
diff --git a/app-admin/drush/files/drush-6.7.0-batch-signature-fix.patch b/app-admin/drush/files/drush-6.7.0-batch-signature-fix.patch
new file mode 100644
index 000000000000..8d5aa74fed46
--- /dev/null
+++ b/app-admin/drush/files/drush-6.7.0-batch-signature-fix.patch
@@ -0,0 +1,46 @@
+From 31d7a945230eaf1f8ab94d5f782619434f7f2b8c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 16 Aug 2023 21:21:39 -0400
+Subject: [PATCH 1/1] includes/batch.inc: synchronize sub and superclass
+ parameter names
+
+The DrushBatchContext class overrides the offsetSet() method of its
+superclass, ArrayObject, but changes the first parameter's name from
+$key to $name. This makes php-8.1 unhappy:
+
+ Error: Return type of DrushBatchContext::offsetSet($name, $value)
+ should either be compatible with ArrayObject::offsetSet(mixed $key,
+ mixed $value): void, or the #[\ReturnTypeWillChange] attribute should
+ be used to temporarily suppress the notice in .../batch.inc, line 37
+
+Renaming the parameter to $key throughout the function fixes the issue.
+---
+ includes/batch.inc | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/includes/batch.inc b/includes/batch.inc
+index dd4adc9..785f411 100644
+--- a/includes/batch.inc
++++ b/includes/batch.inc
+@@ -34,14 +34,14 @@
+ * @see _drush_batch_worker().
+ */
+ class DrushBatchContext extends ArrayObject {
+- function offsetSet($name, $value) {
+- if ($name == 'message') {
++ function offsetSet($key, $value) {
++ if ($key == 'message') {
+ drush_log(strip_tags($value), 'ok');
+ }
+- elseif ($name == 'error_message') {
++ elseif ($key == 'error_message') {
+ drush_set_error('DRUSH_BATCH_ERROR', strip_tags($value));
+ }
+- parent::offsetSet($name, $value);
++ parent::offsetSet($key, $value);
+ }
+ }
+
+--
+2.41.0
+
diff --git a/app-admin/drush/files/drush-6.7.0-dont-pass-null-to-strtoupper.patch b/app-admin/drush/files/drush-6.7.0-dont-pass-null-to-strtoupper.patch
new file mode 100644
index 000000000000..408a271ce38f
--- /dev/null
+++ b/app-admin/drush/files/drush-6.7.0-dont-pass-null-to-strtoupper.patch
@@ -0,0 +1,26 @@
+From 621cb8db059f3dff434dc369ab46faf3a2efa539 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 3 Aug 2023 08:52:35 -0400
+Subject: [PATCH 1/1] includes/environment.inc: don't pass null to
+ strtoupper().
+
+---
+ includes/environment.inc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/includes/environment.inc b/includes/environment.inc
+index 7837104..dd2c71d 100644
+--- a/includes/environment.inc
++++ b/includes/environment.inc
+@@ -736,7 +736,7 @@ function _drush_get_os($os = NULL) {
+ // that the path be converted to /cygdrive/c/path, even on DOS or Powershell.
+ // The special os "RSYNC" can be used to indicate that we want to assume
+ // "CWRSYNC" when cwrsync is installed, or default to the local OS otherwise.
+- if (strtoupper($os) == "RSYNC") {
++ if (isset($os) && strtoupper($os) == "RSYNC") {
+ $os = _drush_get_os("LOCAL");
+ // For now we assume that cwrsync is always installed on Windows, and never installed son any other platform.
+ return drush_is_windows($os) ? "CWRSYNC" : $os;
+--
+2.39.3
+
diff --git a/app-admin/drush/files/drush-6.7.0-gzip-mime.patch b/app-admin/drush/files/drush-6.7.0-gzip-mime.patch
new file mode 100644
index 000000000000..53601c80fbda
--- /dev/null
+++ b/app-admin/drush/files/drush-6.7.0-gzip-mime.patch
@@ -0,0 +1,25 @@
+From 48a16a67ec072428339cc165743fedab6264edfe Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 26 Sep 2022 20:01:41 -0400
+Subject: [PATCH 1/4] includes/drush.inc: support application/gzip MIME type.
+
+This type is actually registered, as opposed to application/x-gzip.
+---
+ includes/drush.inc | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/includes/drush.inc b/includes/drush.inc
+index f869b37..a748a0c 100644
+--- a/includes/drush.inc
++++ b/includes/drush.inc
+@@ -930,6 +930,7 @@ function drush_file_is_tarball($path) {
+ $content_type = drush_mime_content_type($path);
+ $supported = array(
+ 'application/x-bzip2',
++ 'application/gzip',
+ 'application/x-gzip',
+ 'application/x-tar',
+ 'application/x-zip',
+--
+2.35.1
+
diff --git a/app-admin/drush/files/drush-6.7.0-php8.0.patch b/app-admin/drush/files/drush-6.7.0-php8.0.patch
new file mode 100644
index 000000000000..33a4ee7ba98b
--- /dev/null
+++ b/app-admin/drush/files/drush-6.7.0-php8.0.patch
@@ -0,0 +1,87 @@
+From 7be49f4d78111372fc58d91132daf6c4230b08ba Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 26 Sep 2022 19:08:09 -0400
+Subject: [PATCH 1/3] includes/drush.inc: replace create_function() with
+ function(){...}
+
+---
+ includes/drush.inc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/includes/drush.inc b/includes/drush.inc
+index a748a0c..7b8dda3 100644
+--- a/includes/drush.inc
++++ b/includes/drush.inc
+@@ -987,9 +987,9 @@ function drush_tarball_extract($path, $destination = FALSE, $listing = FALSE, $t
+ // Remove the header line.
+ array_shift($output);
+ // Remove the prefix verb from each line.
+- $output = array_map(create_function('$str', 'return substr($str, strpos($str, ":") + 3 + ' . strlen($destination) . ');'), $output);
++ $output = array_map(function($str){ return substr($str, strpos($str, ":") + 3 + strlen($destination)) ; }, $output);
+ // Remove any remaining blank lines.
+- $return = array_filter($output, create_function('$str', 'return $str != "";'));
++ $return = array_filter($output, function($str){return $str != "";});
+ }
+ }
+ // Otherwise we have a possibly-compressed Tar file.
+--
+2.35.1
+
+From f118117814ef690ec71f484dc3c4906f82d9c726 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 26 Sep 2022 19:32:13 -0400
+Subject: [PATCH 2/3] includes/backend.inc: replace usage of each().
+
+---
+ includes/backend.inc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/includes/backend.inc b/includes/backend.inc
+index d004850..0ca010d 100644
+--- a/includes/backend.inc
++++ b/includes/backend.inc
+@@ -355,8 +355,8 @@ function _drush_backend_proc_open($cmds, $process_limit, $context = NULL) {
+ if (count($cmds) && (count($open_processes) < $process_limit)) {
+ // Pop the site and command (key / value) from the cmds array
+ end($cmds);
+- list($site, $cmd) = each($cmds);
+- unset($cmds[$site]);
++ $site = key($cmds);
++ $cmd = array_pop($cmds);
+
+ if (is_array($cmd)) {
+ $c = $cmd['cmd'];
+--
+2.35.1
+
+From 7d718639b68bd09c262005cff133d24ffdf800f1 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 26 Sep 2022 19:36:29 -0400
+Subject: [PATCH 3/3] includes/environment.inc: default fifth parameter in
+ error handler.
+
+The fifth parameter was removed in php-8.0:
+
+ https://www.php.net/manual/en/function.set-error-handler.php
+
+We now default it to the empty array in drush_error_handler().
+---
+ includes/environment.inc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/includes/environment.inc b/includes/environment.inc
+index 7837104..8f2f414 100644
+--- a/includes/environment.inc
++++ b/includes/environment.inc
+@@ -24,7 +24,7 @@ define('CONSOLE_TABLE_BASE_URL', 'https://github.com/RobLoach/Console_Table/arch
+ * Log PHP errors to the Drush log. This is in effect until Drupal's error
+ * handler takes over.
+ */
+-function drush_error_handler($errno, $message, $filename, $line, $context) {
++function drush_error_handler($errno, $message, $filename, $line, $context=[]) {
+ // E_DEPRECATED was added in PHP 5.3. Drupal 6 will not fix all the
+ // deprecated errors, but suppresses them. So we suppress them as well.
+ if (defined('E_DEPRECATED')) {
+--
+2.35.1
+