summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Gmelin <grembo@FreeBSD.org>2024-12-03 16:47:54 +0100
committerMichael Gmelin <grembo@FreeBSD.org>2024-12-03 16:47:54 +0100
commit4512883f38bd8038bde15205df4afb841957a140 (patch)
tree0d06f04212fda832729ab98f445c31a921f354aa
parentbiology/fasttree: Update to 2.1.11 (diff)
devel/phabricator: Fix phpmailer with PHP 8
PR: 280512 Reported by: Ivan Rozhuk <rozhuk.im@gmail.com>
-rw-r--r--devel/phabricator/Makefile5
-rw-r--r--devel/phabricator/files/patch-externals_phpmailer_class.phpmailer-lite.php11
-rw-r--r--devel/phabricator/files/patch-externals_phpmailer_class.phpmailer.php11
-rw-r--r--devel/phabricator/files/patch-externals_phpmailer_class.smtp.php20
4 files changed, 45 insertions, 2 deletions
diff --git a/devel/phabricator/Makefile b/devel/phabricator/Makefile
index 6c80d8ef0e85..10288310a0b7 100644
--- a/devel/phabricator/Makefile
+++ b/devel/phabricator/Makefile
@@ -1,6 +1,6 @@
PORTNAME= phabricator
PORTVERSION= 20211218
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= devel
PKGNAMESUFFIX= ${PHP_PKGNAMESUFFIX}
@@ -14,8 +14,9 @@ LICENSE_FILE= ${WRKSRC}/LICENSE
RUN_DEPENDS= arcanist-lib${PHP_PKGNAMESUFFIX}>=20210113_4:devel/arcanist-lib@${PHP_FLAVOR} \
git:devel/git
-USES= cpe php:cli,flavors shebangfix
+USES= cpe dos2unix php:cli,flavors shebangfix
CPE_VENDOR= phacility
+DOS2UNIX_FILES= externals/phpmailer/class.smtp.php externals/phpqrcode/phpqrcode.php
USE_GITHUB= yes
GH_ACCOUNT= phacility
GH_TAGNAME= dec9522
diff --git a/devel/phabricator/files/patch-externals_phpmailer_class.phpmailer-lite.php b/devel/phabricator/files/patch-externals_phpmailer_class.phpmailer-lite.php
new file mode 100644
index 000000000000..ec552a49b104
--- /dev/null
+++ b/devel/phabricator/files/patch-externals_phpmailer_class.phpmailer-lite.php
@@ -0,0 +1,11 @@
+--- externals/phpmailer/class.phpmailer-lite.php.orig 2024-12-03 14:44:25 UTC
++++ externals/phpmailer/class.phpmailer-lite.php
+@@ -1492,7 +1492,7 @@ class PHPMailerLite {
+ $eol = "\r\n";
+ $escape = '=';
+ $output = '';
+- while( list(, $line) = each($lines) ) {
++ foreach ($lines as $line) {
+ $linlen = strlen($line);
+ $newline = '';
+ for($i = 0; $i < $linlen; $i++) {
diff --git a/devel/phabricator/files/patch-externals_phpmailer_class.phpmailer.php b/devel/phabricator/files/patch-externals_phpmailer_class.phpmailer.php
new file mode 100644
index 000000000000..eed5581a6b8f
--- /dev/null
+++ b/devel/phabricator/files/patch-externals_phpmailer_class.phpmailer.php
@@ -0,0 +1,11 @@
+--- externals/phpmailer/class.phpmailer.php.orig 2024-12-03 14:44:25 UTC
++++ externals/phpmailer/class.phpmailer.php
+@@ -1624,7 +1624,7 @@ class PHPMailer {
+ $eol = "\r\n";
+ $escape = '=';
+ $output = '';
+- while( list(, $line) = each($lines) ) {
++ foreach ($lines as $line) {
+ $linlen = strlen($line);
+ $newline = '';
+ for($i = 0; $i < $linlen; $i++) {
diff --git a/devel/phabricator/files/patch-externals_phpmailer_class.smtp.php b/devel/phabricator/files/patch-externals_phpmailer_class.smtp.php
new file mode 100644
index 000000000000..69047be742ef
--- /dev/null
+++ b/devel/phabricator/files/patch-externals_phpmailer_class.smtp.php
@@ -0,0 +1,20 @@
+--- externals/phpmailer/class.smtp.php.orig 2024-12-03 14:44:25 UTC
++++ externals/phpmailer/class.smtp.php
+@@ -385,7 +385,7 @@ class SMTP {
+
+ $max_line_length = 998; // used below; set here for ease in change
+
+- while(list(,$line) = @each($lines)) {
++ foreach($lines as $line) {
+ $lines_out = null;
+ if($line == "" && $in_headers) {
+ $in_headers = false;
+@@ -414,7 +414,7 @@ class SMTP {
+ $lines_out[] = $line;
+
+ // send the lines to the server
+- while(list(,$line_out) = @each($lines_out)) {
++ foreach($lines_out as $line_out) {
+ if(strlen($line_out) > 0)
+ {
+ if(substr($line_out, 0, 1) == ".") {