Re: [OpenWrt-Devel] [PATCH] [packages] php4: add compatibility fix for gmp

2013-03-11 Thread Florian Fainelli



On 02/24/2013 01:26 PM, Russell Senior wrote:


gmp modified some if it's internal constants, in particular
__GMP_BITS_PER_MP_LIMB.  Added a patch to substitute GMP_LIMB_BITS.

Also bumped release number and copyright date.

Signed-off-by: Russell Senior russ...@personaltelco.net


Applied in r35955, thanks!
--
Florian
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] [packages] php4: add compatibility fix for gmp

2013-02-24 Thread Russell Senior

gmp modified some if it's internal constants, in particular
__GMP_BITS_PER_MP_LIMB.  Added a patch to substitute GMP_LIMB_BITS.

Also bumped release number and copyright date.

Signed-off-by: Russell Senior russ...@personaltelco.net
---
 lang/php4/Makefile |4 ++--
 lang/php4/patches/120-gmp-compat.patch |   11 +++
 2 files changed, 13 insertions(+), 2 deletions(-)
 create mode 100644 lang/php4/patches/120-gmp-compat.patch

diff --git a/lang/php4/Makefile b/lang/php4/Makefile
index 2ba1bf3..78c1c50 100644
--- a/lang/php4/Makefile
+++ b/lang/php4/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2010 OpenWrt.org
+# Copyright (C) 2006-2013 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=php4
 PKG_VERSION:=4.4.9
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=php-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://www.php.net/distributions/
diff --git a/lang/php4/patches/120-gmp-compat.patch 
b/lang/php4/patches/120-gmp-compat.patch
new file mode 100644
index 000..76672c3
--- /dev/null
+++ b/lang/php4/patches/120-gmp-compat.patch
@@ -0,0 +1,11 @@
+--- a/ext/gmp/gmp.c
 b/ext/gmp/gmp.c
+@@ -1159,7 +1159,7 @@ ZEND_FUNCTION(gmp_random)
+ 
+   GMPG(rand_initialized) = 1;
+   }
+-  mpz_urandomb(*gmpnum_result, GMPG(rand_state), GMP_ABS (limiter) * 
__GMP_BITS_PER_MP_LIMB);
++  mpz_urandomb(*gmpnum_result, GMPG(rand_state), GMP_ABS (limiter) * 
GMP_LIMB_BITS);
+ 
+   ZEND_REGISTER_RESOURCE(return_value, gmpnum_result, le_gmp);
+ }
-- 
1.7.10.4



-- 
Russell Senior, President
russ...@personaltelco.net
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel