[packages/php-pear-Net_IPv6] Up to 1.3.0b4 and fix isCompressible()

arekm arekm at pld-linux.org
Wed Jun 5 09:06:00 CEST 2024


commit 1db557bfd79b9e953e8f7802b5c23f25725af2ec
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Wed Jun 5 09:05:40 2024 +0200

    Up to 1.3.0b4 and fix isCompressible()

 Net_IPv6-static.patch  | 165 -------------------------------------------------
 ipv6.patch             |  12 ++++
 php-pear-Net_IPv6.spec |  11 ++--
 3 files changed, 18 insertions(+), 170 deletions(-)
---
diff --git a/php-pear-Net_IPv6.spec b/php-pear-Net_IPv6.spec
index 9b8d00b..a30969e 100644
--- a/php-pear-Net_IPv6.spec
+++ b/php-pear-Net_IPv6.spec
@@ -1,15 +1,16 @@
 %define		_status		stable
 %define		_pearname	Net_IPv6
+%define		snap		b4
 Summary:	%{_pearname} - check and validate IPv6 addresses
 Summary(pl.UTF-8):	%{_pearname} - sprawdzanie poprawności adresów IPv6
 Name:		php-pear-%{_pearname}
-Version:	1.2.1
-Release:	4
+Version:	1.3.0
+Release:	0.%{snap}.1
 License:	PHP 2.02
 Group:		Development/Languages/PHP
-Source0:	http://pear.php.net/get/%{_pearname}-%{version}.tgz
-# Source0-md5:	eed1de2713af790e29f24e6141123451
-Patch0:		Net_IPv6-static.patch
+Source0:	http://pear.php.net/get/%{_pearname}-%{version}%{snap}.tgz
+# Source0-md5:	ce65df2c910333711a528bf85e68226d
+Patch0:		ipv6.patch
 URL:		http://pear.php.net/package/Net_IPv6/
 BuildRequires:	php-pear-PEAR
 BuildRequires:	rpm-php-pearprov >= 4.4.2-11
diff --git a/Net_IPv6-static.patch b/Net_IPv6-static.patch
deleted file mode 100644
index 9446bb0..0000000
--- a/Net_IPv6-static.patch
+++ /dev/null
@@ -1,165 +0,0 @@
-diff -urN Net_IPv6-1.2.1.org/Net/IPv6.php Net_IPv6-1.2.1/Net/IPv6.php
---- Net_IPv6-1.2.1.org/Net/IPv6.php	2011-02-07 22:41:59.000000000 +0100
-+++ Net_IPv6-1.2.1/Net/IPv6.php	2017-12-08 11:59:42.918728932 +0100
-@@ -146,7 +146,7 @@
-      * @access public
-      * @static     
-      */
--    function separate($ip) 
-+    public static function separate($ip) 
-     {
-         
-         $addr = $ip;
-@@ -184,7 +184,7 @@
-      * @access public
-      * @static
-      */
--    function removeNetmaskSpec($ip)
-+    public static function removeNetmaskSpec($ip)
-     {
- 
-         $elements = Net_IPv6::separate($ip);
-@@ -210,7 +210,7 @@
-      * @see removeNetmaskSpec()
-      * @deprecated
-      */
--    function removePrefixLength($ip)
-+    public static function removePrefixLength($ip)
-     {
-         $pos = strrpos($ip, '/');
- 
-@@ -236,7 +236,7 @@
-      * @access public
-      * @static
-      */
--    function getNetmaskSpec($ip) 
-+    public static function getNetmaskSpec($ip) 
-     {
- 
-         $elements = Net_IPv6::separate($ip);
-@@ -262,7 +262,7 @@
-      * @static
-      * @deprecated
-      */
--    function getPrefixLength($ip) 
-+    public static function getPrefixLength($ip) 
-     {
-         if (preg_match("/^([0-9a-fA-F:]{2,39})\/(\d{1,3})*$/", 
-                         $ip, $matches)) {
-@@ -292,7 +292,7 @@
-      * @access public
-      * @static
-      */
--    function getNetmask($ip, $bits = null)
-+    public static function getNetmask($ip, $bits = null)
-     {
-         if (null==$bits) {
- 
-@@ -342,7 +342,7 @@
-      * @access public
-      * @static
-      */
--    function isInNetmask($ip, $netmask, $bits=null)
-+    public static function isInNetmask($ip, $netmask, $bits=null)
-     {
-         // try to get the bit count
- 
-@@ -425,7 +425,7 @@
-      * @see    NET_IPV6_LOOPBACK  
-      * @see    NET_IPV6_UNKNOWN_TYPE
-      */
--    function getAddressType($ip) 
-+    public static function getAddressType($ip) 
-     {
-         $ip    = Net_IPv6::removeNetmaskSpec($ip);
-         $binip = Net_IPv6::_ip2Bin($ip);
-@@ -508,7 +508,7 @@
-      * Uncompresses an IPv6 adress
-      *
-      * RFC 2373 allows you to compress zeros in an adress to '::'. This
--     * function expects an valid IPv6 adress and expands the '::' to
-+     * public static function expects an valid IPv6 adress and expands the '::' to
-      * the required zeros.
-      *
-      * Example:  FF01::101  ->  FF01:0:0:0:0:0:0:101
-@@ -526,7 +526,7 @@
-      * @static
-      * @author Pascal Uhlmann
-      */
--    function uncompress($ip, $leadingZeros = false)
-+    public static function uncompress($ip, $leadingZeros = false)
-     {
- 
-         $prefix = Net_IPv6::getPrefixLength($ip);
-@@ -648,7 +648,7 @@
-      * Compresses an IPv6 adress
-      *
-      * RFC 2373 allows you to compress zeros in an adress to '::'. This
--     * function expects an valid IPv6 adress and compresses successive zeros
-+     * public static function expects an valid IPv6 adress and compresses successive zeros
-      * to '::'
-      *
-      * Example:  FF01:0:0:0:0:0:0:101   -> FF01::101
-@@ -672,7 +672,7 @@
-      * @static
-      * @author elfrink at introweb dot nl
-      */
--    function compress($ip, $force = false)  
-+    public static function compress($ip, $force = false)  
-     {
-         
-         if(false !== strpos($ip, '::')) { // its already compressed
-@@ -762,7 +762,7 @@
-      * @static
-      * @author Manuel Schmitt
-      */
--    function isCompressible($ip) 
-+    public static function isCompressible($ip) 
-     {
- 
-         return (bool)($ip != Net_IPv6::compress($address));
-@@ -790,7 +790,7 @@
-      * @access public
-      * @static
-      */
--    function SplitV64($ip, $uncompress = true)
-+    public static function SplitV64($ip, $uncompress = true)
-     {
-         $ip = Net_IPv6::removeNetmaskSpec($ip);
- 
-@@ -829,7 +829,7 @@
-      * @access public
-      * @static
-      */
--    function checkIPv6($ip)
-+    public static function checkIPv6($ip)
-     {
-         $ip = Net_IPv6::removePrefixLength($ip);
-         $ip = Net_IPv6::removeNetmaskSpec($ip);
-@@ -926,7 +926,7 @@
-      * @author Nicholas Williams
-      */
- 
--    function parseAddress($ipToParse, $bits = null)
-+    public static function parseAddress($ipToParse, $bits = null)
-     {
- 
-         $ip      = null;
-@@ -982,7 +982,7 @@
-      * @access private
-      @ @since 1.1.0
-      */
--    function _ip2Bin($ip) 
-+    protected static function _ip2Bin($ip) 
-     {
-         $binstr = '';
- 
-@@ -1013,7 +1013,7 @@
-      * @access private
-      @ @since 1.1.0
-      */
--    function _bin2Ip($bin)
-+    protected static function _bin2Ip($bin)
-     {
-         $ip = "";
- 
diff --git a/ipv6.patch b/ipv6.patch
new file mode 100644
index 0000000..f84f7f7
--- /dev/null
+++ b/ipv6.patch
@@ -0,0 +1,12 @@
+diff -urN Net_IPv6-1.3.0b4.org/Net/IPv6.php Net_IPv6-1.3.0b4/Net/IPv6.php
+--- Net_IPv6-1.3.0b4.org/Net/IPv6.php	2018-07-09 13:55:41.000000000 +0200
++++ Net_IPv6-1.3.0b4/Net/IPv6.php	2024-06-05 09:04:05.726443082 +0200
+@@ -807,7 +807,7 @@
+     public static function isCompressible($ip)
+     {
+ 
+-        return (bool)($ip != Net_IPv6::compress($address));
++        return (bool)($ip != Net_IPv6::compress($ip));
+ 
+     }
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/php-pear-Net_IPv6.git/commitdiff/1db557bfd79b9e953e8f7802b5c23f25725af2ec



More information about the pld-cvs-commit mailing list