# $Id: Portfile,v 1.26 2006/05/23 16:29:24 gwright Exp $

PortSystem 1.0
name		gmp
version		4.2.1
revision	4
categories	devel math
maintainers	gwright@opendarwin.org
platforms	darwin freebsd
description	GNU multiple precision arithmetic library
long_description	\
		GNU MP is a library for arbitrary precision arithmetic,	\
		operating on signed integers, rational numbers, and	\
		floating point numbers.  It has a rich set of		\
		functions, and the functions have a regular interface.	\
		GNU MP is designed to be as fast as possible, both for	\
		small operands and for huge operands.  The speed is	\
		achieved by using fullwords as the basic arithmetic	\
		type, by using fast algorithms, by carefully optimized	\
		assembly code for the most common inner loops for a	\
		lots of CPUs, and by a general emphasis on speed	\
		(instead of simplicity or elegance).

homepage	http://www.swox.com/gmp/

master_sites	gnu

checksums	md5  091c56e0e1cca6b09b17b69d47ef18e3 \
		sha1 00a97f0ec1eb1d9429ab5c64be6889e8a497425e

use_bzip2	yes

configure.env	ABI=32
configure.args	--infodir=\\\${prefix}/share/info	\
		--enable-shared				\
		--enable-cxx

post-destroot	{ system "ranlib ${destroot}${prefix}/lib/libgmp.a"
		  ui_msg "running ranlib on static libraries"

		  file delete ${destroot}${prefix}/include/gmpxx.h

		  file delete ${destroot}${prefix}/lib/libgmpxx.a
		  file delete ${destroot}${prefix}/lib/libgmpxx.la
		  file delete ${destroot}${prefix}/lib/libgmpxx.dylib
		  file delete ${destroot}${prefix}/lib/libgmpxx.3.dylib
		  file delete ${destroot}${prefix}/lib/libgmpxx.3.1.1.dylib
                }

default_variants	+test
variant test	{ test.run	yes
		  test.cmd	make
		  test.target	check
		}

platform darwin x86	{
	configure.env-delete	ABI=32
	configure.args-append	--host=none-apple-darwin
}

platform darwin i386	{
	configure.env-delete	ABI=32
	configure.args-append	--host=none-apple-darwin
}

