From 03a1c3ccad0e3dbd37d7cfc456ae455f87d258b8 Mon Sep 17 00:00:00 2001 From: Maxime Henrion Date: Sat, 10 Feb 2007 14:54:55 +0000 Subject: [PATCH] Add an OPTIONS to optionally depend on p5-Math-BigInt-GMP, defaulting to on, and bump PORTREVISION. The rationale for this is that using the Net::SSH::Perl module without the optimized Math::BigInt::GMP backend for bignum computations is very slow (for instance, just logging to a box takes ~15s eating all the CPU on a fast Core 2 Duo laptop). Reviewed by: tobez --- net/p5-Net-SSH-Perl/Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/net/p5-Net-SSH-Perl/Makefile b/net/p5-Net-SSH-Perl/Makefile index 40d54f9e6c0d..198c5c42aac5 100644 --- a/net/p5-Net-SSH-Perl/Makefile +++ b/net/p5-Net-SSH-Perl/Makefile @@ -7,6 +7,7 @@ PORTNAME= Net-SSH-Perl PORTVERSION= 1.30 +PORTREVISION= 1 CATEGORIES= net perl5 MASTER_SITES= ${MASTER_SITE_PERL_CPAN} MASTER_SITE_SUBDIR= Net @@ -71,10 +72,18 @@ MAN3= Net::SSH::Perl.3 \ CONFIGURE_ENV+= PERL_MM_USE_DEFAULT="1" PERL_CONFIGURE= yes +OPTIONS= GMP "Use the optimized Math::BigInt::GMP backend" on + .include .if ${PERL_LEVEL} < 500600 IGNORE= needs Perl 5.6.0 or greater, please upgrade your Perl .endif +.if !defined(WITHOUT_GMP) +GMP_DEPEND= ${SITE_PERL_ARCH}/Math/BigInt/GMP.pm:${PORTSDIR}/math/p5-BigInt-GMP +BUILD_DEPENDS+= ${GMP_DEPEND} +RUN_DEPENDS+= ${GMP_DEPEND} +.endif + .include