From nobody Tue Aug 16 18:34:18 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4M6ftz0Pqcz4Z6nM; Tue, 16 Aug 2022 18:34:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4M6fty71Qrz48sL; Tue, 16 Aug 2022 18:34:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660674859; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LjX7i5leRete1UlOR2MFOfLFt6ihgT6D/6MTHPfH4Rg=; b=ViJgynb9qvB4+zUheJ27uG/rTP4PhDOaTRshGGfxzb0ZVlazTjLqpX4F7TQY4vcmKvlw7D jCQE1HNDHckMHqWK+crq4bxpZ6OjnhR7VyAFMnXPbA+9URAxxxLbul+FrVQFHNyV3yvrzk EZXvmLGemexwmeQcHrblB8e1KKeuU3iEP4hKe3qSbFtkt6fAYYPEwK+Zt7i7ZQK+kX5MVG /Y/OgsKwPHmlK9cph2iSFlK5gEylwJB+S4uebk/hwNfwT67l//CFA8ue2hDTl/+BVf8oIY 36fKjdt6HYXWEsn1kn+BBCWy6xhE34gxPHtLoLitQfXc0BW2j/XvZKmsbE3N0Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4M6fty62VczJfR; Tue, 16 Aug 2022 18:34:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 27GIYIWt044315; Tue, 16 Aug 2022 18:34:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27GIYI35044314; Tue, 16 Aug 2022 18:34:18 GMT (envelope-from git) Date: Tue, 16 Aug 2022 18:34:18 GMT Message-Id: <202208161834.27GIYI35044314@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Renato Botelho Subject: git: 06920cf2b951 - main - net/pear-Net_IPv6: Fix for PHP < 8 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: garga X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 06920cf2b951f3d725bf4e582775dfa7086acd34 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660674859; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LjX7i5leRete1UlOR2MFOfLFt6ihgT6D/6MTHPfH4Rg=; b=QHAS99A8v/q1dnFAhyWXDxzQA7QXDXJDmG54YDIZR21tsZ7QHyBq5xxSZXNvm/vsI6I9ar RXJ3T4G/hx2YkkE/R2hHgTRDzEvd+iBV6EJHAD7pOXcXozMgjBCmlqDDMj1cduN6pKJVGX i5FmkW8Rw2dsjqeVZlVX4zbL9spbk55sbN0Y6N8UqRXf4QUBsbQQM8+NplEUZ7hcfafFoP KYkQiaNYKFzlQvn3GFR47PYHyzXy1Sh09LYKU6bUwPXgnoiBfQ1XaWdXD9CEP/J99L8AU1 l4bsc3z9UEdTwriapQQi6mYXTmWrygA0HfxNt8oOEFO02XYZaAl7O75fdkchmw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660674859; a=rsa-sha256; cv=none; b=cXJ45XrS4MAxFu2o4OVxO95cE/aR73RIxoFeSTaheSPtrogQsB70fyxY+ENTjsW0PnP4DS VO5OHBSQhlUo1ndnPjUCnH0H8rdjYAe/jiyb1L2z+ZU94Ndnq01B1A5P8jNOSFL+iiLKGq mpSTBhEA+7t6T55PzyNsHvWQh5zwaw3q4E8gQcGr2VE16wafz6P8EpcdAamWSa4XITQFdv jQbapQftADtxPoD/5yw0C4kYyG/qlaIK8PM4deZkMaIAd0CZnTVwsHWgUZwctIspTrNuwP qsXJ8HtICfTnWL/Vw6EwGw5Wedh/GDWQndgKEUWDaKelrs8GYkBP8/tKtENWKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by garga: URL: https://cgit.FreeBSD.org/ports/commit/?id=06920cf2b951f3d725bf4e582775dfa7086acd34 commit 06920cf2b951f3d725bf4e582775dfa7086acd34 Author: Reid Linnemann AuthorDate: 2022-08-16 18:31:35 +0000 Commit: Renato Botelho CommitDate: 2022-08-16 18:34:09 +0000 net/pear-Net_IPv6: Fix for PHP < 8 Previously added patches use str_ends_with(), which is only available in php 8 and newer. This commit adds to the patch a definition of str_ends_with() in the case it is undefined in an earlier version. Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D36219 --- net/pear-Net_IPv6/Makefile | 2 +- net/pear-Net_IPv6/files/patch-Net_IPv6.php | 46 +++++++++++++++++++++--------- 2 files changed, 34 insertions(+), 14 deletions(-) diff --git a/net/pear-Net_IPv6/Makefile b/net/pear-Net_IPv6/Makefile index 8e48731d9b7d..51c687239c36 100644 --- a/net/pear-Net_IPv6/Makefile +++ b/net/pear-Net_IPv6/Makefile @@ -1,6 +1,6 @@ PORTNAME= Net_IPv6 DISTVERSION= 1.3.0.b4 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net pear DISTNAME= ${PORTNAME}-1.3.0b4 diff --git a/net/pear-Net_IPv6/files/patch-Net_IPv6.php b/net/pear-Net_IPv6/files/patch-Net_IPv6.php index 4f341704902c..1b2a62434afc 100644 --- a/net/pear-Net_IPv6/files/patch-Net_IPv6.php +++ b/net/pear-Net_IPv6/files/patch-Net_IPv6.php @@ -1,6 +1,26 @@ --- Net/IPv6.php.orig 2022-08-11 20:00:46 UTC +++ Net/IPv6.php -@@ -224,6 +224,27 @@ class Net_IPv6 +@@ -117,6 +117,19 @@ define("NET_IPV6_UNKNOWN_TYPE", 1001); + define("NET_IPV6_UNKNOWN_TYPE", 1001); + + // }}} ++// {{{ compatability ++ ++/* define str_ends_with() for php < 8 */ ++if (! function_exists('str_ends_with')) { ++ function str_ends_with(string $haystack, string $needle): bool ++ { ++ $needle_len = strlen($needle); ++ return ($needle_len === 0 || ++ substr_compare($haystack, $needle, - $needle_len) === 0); ++ } ++} ++ ++// }}} + // {{{ Net_IPv6 + + /** +@@ -224,6 +237,27 @@ class Net_IPv6 } // }}} @@ -28,7 +48,7 @@ // {{{ getNetmaskSpec() /** -@@ -324,6 +345,33 @@ class Net_IPv6 +@@ -324,6 +358,33 @@ class Net_IPv6 } // }}} @@ -62,7 +82,7 @@ // {{{ isInNetmask() /** -@@ -549,6 +597,8 @@ class Net_IPv6 +@@ -549,6 +610,8 @@ class Net_IPv6 } @@ -71,7 +91,7 @@ $netmask = Net_IPv6::getNetmaskSpec($ip); $uip = Net_IPv6::removeNetmaskSpec($ip); -@@ -639,6 +689,12 @@ class Net_IPv6 +@@ -639,6 +702,12 @@ class Net_IPv6 $uip = implode(':', $uipT); } @@ -84,7 +104,7 @@ if ('' != $netmask) { $uip = $uip.'/'.$netmask; -@@ -696,6 +752,9 @@ class Net_IPv6 +@@ -696,6 +765,9 @@ class Net_IPv6 } @@ -94,7 +114,7 @@ $prefix = Net_IPv6::getPrefixLength($ip); if (false === $prefix) { -@@ -709,7 +768,7 @@ class Net_IPv6 +@@ -709,7 +781,7 @@ class Net_IPv6 } @@ -103,7 +123,7 @@ $ip = $split[0]; $netmask = Net_IPv6::getNetmaskSpec($ip); -@@ -750,9 +809,20 @@ class Net_IPv6 +@@ -750,9 +822,20 @@ class Net_IPv6 } if ('' != $split[1]) { // add ipv4 part is available @@ -126,7 +146,7 @@ if ('' != $netmask) { $cip = $cip.'/'.$netmask; -@@ -807,7 +877,7 @@ class Net_IPv6 +@@ -807,7 +890,7 @@ class Net_IPv6 public static function isCompressible($ip) { @@ -135,7 +155,7 @@ } -@@ -820,6 +890,9 @@ class Net_IPv6 +@@ -820,6 +903,9 @@ class Net_IPv6 * RFC 2373 allows you to note the last two parts of an IPv6 address as * an IPv4 compatible address * @@ -145,7 +165,7 @@ * Example: 0:0:0:0:0:0:13.1.68.3 * 0:0:0:0:0:FFFF:129.144.52.38 * -@@ -837,6 +910,7 @@ class Net_IPv6 +@@ -837,6 +923,7 @@ class Net_IPv6 */ public static function SplitV64($ip, $uncompress = true) { @@ -153,7 +173,7 @@ $ip = Net_IPv6::removeNetmaskSpec($ip); if ($uncompress) { -@@ -853,10 +927,10 @@ class Net_IPv6 +@@ -853,10 +940,10 @@ class Net_IPv6 return array("", $ip); } @@ -166,7 +186,7 @@ $ipPart[0] .= ":"; } -@@ -885,7 +959,6 @@ class Net_IPv6 +@@ -885,7 +972,6 @@ class Net_IPv6 */ public static function checkIPv6($ip) { @@ -174,7 +194,7 @@ $elements = Net_IPv6::separate($ip); $ip = $elements[0]; -@@ -1057,13 +1130,13 @@ class Net_IPv6 +@@ -1057,13 +1143,13 @@ class Net_IPv6 protected static function _ip2Bin($ip) { $binstr = '';