- Fix gmp version 5 support for php52

PR:		ports/146041
Submitted by:	myself
Approved by:	maintainer
This commit is contained in:
Martin Matuska 2010-04-25 19:27:08 +00:00
parent 9edb10042a
commit bde42a0385
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=253240
3 changed files with 14 additions and 1 deletions

View File

@ -121,7 +121,7 @@ USE_GETTEXT= yes
.endif
.if ${PHP_MODNAME} == "gmp"
LIB_DEPENDS+= gmp.8:${PORTSDIR}/math/libgmp4
LIB_DEPENDS+= gmp.10:${PORTSDIR}/math/gmp
CONFIGURE_ARGS+=--with-gmp=${LOCALBASE}
.endif

View File

@ -5,6 +5,8 @@
# $FreeBSD$
#
PORTREVISION= 1
CATEGORIES= math
MASTERDIR= ${.CURDIR}/../../lang/php52

View File

@ -0,0 +1,11 @@
--- gmp.c.orig 2010-04-21 22:00:31.841602968 +0000
+++ gmp.c 2010-04-21 22:00:46.412804473 +0000
@@ -1396,7 +1396,7 @@
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);
}