[packages/php-pear-Net_IPv6] - mark functions as protected or public, so newer phps won't complain

arekm arekm at pld-linux.org
Fri Dec 8 12:07:21 CET 2017


commit 3b47a9d639b511cdd74638e069f4ad0aaa352b38
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Fri Dec 8 12:07:08 2017 +0100

    - mark functions as protected or public, so newer phps won't complain

 Net_IPv6-static.patch  | 165 +++++++++++++++++++++++++++++++++++++++++++++++++
 php-pear-Net_IPv6.spec |   4 +-
 2 files changed, 168 insertions(+), 1 deletion(-)
---
diff --git a/php-pear-Net_IPv6.spec b/php-pear-Net_IPv6.spec
index dc15002..1e2d17c 100644
--- a/php-pear-Net_IPv6.spec
+++ b/php-pear-Net_IPv6.spec
@@ -5,11 +5,12 @@ 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:	2
+Release:	3
 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
 URL:		http://pear.php.net/package/Net_IPv6/
 BuildRequires:	php-pear-PEAR
 BuildRequires:	rpm-php-pearprov >= 4.4.2-11
@@ -36,6 +37,7 @@ Ta klasa ma w PEAR status: %{_status}.
 
 %prep
 %pear_package_setup
+%patch0 -p1
 
 %install
 rm -rf $RPM_BUILD_ROOT
diff --git a/Net_IPv6-static.patch b/Net_IPv6-static.patch
new file mode 100644
index 0000000..9446bb0
--- /dev/null
+++ b/Net_IPv6-static.patch
@@ -0,0 +1,165 @@
+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 = "";
+ 
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list