From 63844e673e3c5348fcfab0f4d0817d9fbf4f1985 Mon Sep 17 00:00:00 2001 From: makc Date: Sun, 25 Apr 2010 15:31:17 +0000 Subject: Some utils link with gmp library if exists. Add optional dependency on math/gmp and disable gmp support properly when it's not needed. PR: ports/146027 Reported by: Craig Leres --- sysutils/coreutils/Makefile | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'sysutils') diff --git a/sysutils/coreutils/Makefile b/sysutils/coreutils/Makefile index 1b0086fd3f89..b3d9253c2808 100644 --- a/sysutils/coreutils/Makefile +++ b/sysutils/coreutils/Makefile @@ -24,14 +24,6 @@ USE_GMAKE= yes USE_LDCONFIG= yes #USE_BISON= yes -.if defined(WITHOUT_NLS) -CONFIGURE_ARGS+=--disable-nls -PLIST_SUB+= NLS="@comment " -.else -USE_GETTEXT= yes -PLIST_SUB+= NLS="" -.endif - INFO= coreutils MAN1= gbasename.1 gcat.1 gchcon.1 gchgrp.1 gchmod.1 gchown.1 gchroot.1 \ @@ -49,6 +41,24 @@ MAN1= gbasename.1 gcat.1 gchcon.1 gchgrp.1 gchmod.1 gchown.1 gchroot.1 \ gusers.1 gvdir.1 gwc.1 gwho.1 gwhoami.1 gyes.1 gbase64.1 gsha224sum.1 \ gsha256sum.1 gsha384sum.1 gsha512sum.1 gshuf.1 +OPTIONS= GMP "Build with GNU Multiple Precision Arithmetic Library" off + +.include + +.if defined(WITHOUT_NLS) +CONFIGURE_ARGS+=--disable-nls +PLIST_SUB+= NLS="@comment " +.else +USE_GETTEXT= yes +PLIST_SUB+= NLS="" +.endif + +.if defined(WITH_GMP) +LIB_DEPENDS+= gmp.10:${PORTSDIR}/math/gmp +.else +CONFIGURE_ARGS+=--without-gmp +.endif + .include .if ${OSVERSION} >= 800039 -- cgit