# $Id: Portfile,v 1.9 2006/04/13 19:20:53 gwright Exp $

PortSystem 1.0
name		xloops
version		current
revision	8
categories	science
platforms	darwin
maintainers	gwright@opendarwin.org
description	A Program for Calculating Feynman Diagrams
long_description	\
		The aim of xloops is to calculate one-particle		\
		irreducible Feynman diagrams with one or two closed	\
		loops for arbitrary processes in the Standard Model	\			of particles and related theories. Results can be	\
		returned both algebraically and numerically.		\
		All necessary tensor integrals are treated for		\
		arbitrary masses and momenta.

homepage	http://wwwthep.physik.uni-mainz.de/~xloops/

fetch.type	cvs
cvs.password	anoncvs
cvs.root	:pserver:anoncvs@cvsthep.physik.uni-mainz.de:/home/cvs
cvs.module	${name}
cvs.date	20060413

set worksrcdir	${name}

depends_lib	lib:ginac:GiNaC		\
		lib:nestedsums:nestedsums

patchfiles	patch-Makefile.am	\
		patch-ginsh-Makefile.am	\
		patch-fcntimer.cpp	\
		patch-ginsh_parser.yy	\
		patch-two_loop_two_point.cpp

pre-configure	{ cd ${worksrcpath}
		  reinplace s|%%DP_ACLOCAL%%|${prefix}/share/aclocal| Makefile.am
		  system "LIBTOOLIZE=glibtoolize autoreconf -i"
}

platform darwin 6 {
		ui_msg "xloops is not supported on Jaguar (OS X 10.2.x)"
		exit 1
}

platform darwin 7 {
		depends_build	port:gcc40

		configure.env-append	CXX=g++-dp-4.0
}

configure.env	CPPFLAGS="-I${prefix}/include"	\
		LDFLAGS="-L${prefix}/lib"

build.target	{ }

#user_notes	Not all of the two loops tests pass yet. The ones that	\
#		do not are commented out.				\
#									\
#		Some of the functions in the cvs version take different	\
#		arguments than are specified in the documentation.	\
#		As always, the source code is your friend in these	\
#		situations.						\
#									\
#		Remember, you must build your programs that include	\
#		the xloop library with the same C++ compiler as was	\
#		used to build xloops (g++ 4.0, most recently).

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

