[37202] trunk/dports/math
mmoll at macports.org
mmoll at macports.org
Thu May 29 11:23:36 PDT 2008
Revision: 37202
http://trac.macosforge.org/projects/macports/changeset/37202
Author: mmoll at macports.org
Date: 2008-05-29 11:23:35 -0700 (Thu, 29 May 2008)
Log Message:
-----------
math/petsc: new port
Added Paths:
-----------
trunk/dports/math/petsc/
trunk/dports/math/petsc/Portfile
trunk/dports/math/petsc/files/
trunk/dports/math/petsc/files/patch-configure.py.diff
trunk/dports/math/petsc/files/patch-makefile.diff
Added: trunk/dports/math/petsc/Portfile
===================================================================
--- trunk/dports/math/petsc/Portfile (rev 0)
+++ trunk/dports/math/petsc/Portfile 2008-05-29 18:23:35 UTC (rev 37202)
@@ -0,0 +1,53 @@
+# $Id$
+
+PortSystem 1.0
+
+name petsc
+version 2.3.3-p13
+categories math science
+maintainers mmoll
+description Portable, Extensible Toolkit for Scientific Computation
+long_description PETSc, pronounced PET-see (the S is silent), is a suite \
+ of data structures and routines for the scalable (parallel) solution \
+ of scientific applications modeled by partial differential equations. \
+ It employs the MPI standard for all message-passing communication.
+platforms darwin
+homepage http://www-unix.mcs.anl.gov/petsc/petsc-as/
+master_sites ftp://ftp.mcs.anl.gov/pub/petsc/release-snapshots/
+distname ${name}-lite-${version}
+worksrcdir ${name}-${version}
+patchfiles patch-configure.py.diff patch-makefile.diff
+
+checksums md5 86073f3340cac5949a4fa4b2d338d30b \
+ sha1 914c2b355ef9bf06b6ba15ca3b8a4c852ec296e8
+
+depends_lib-append port:openmpi
+
+configure.env-append PETSC_DIR=${worksrcpath}
+configure.cmd ${worksrcpath}/config/configure.py
+configure.args --with-petsc-arch=darwin --with-python --with-debugging=0 \
+ --with-c-support=1 --with-c++-support=1 \
+ --prefix=${prefix}/lib/petsc \
+ --with-cc=${prefix}/bin/openmpicc \
+ --with-cxx=${prefix}/bin/openmpicxx \
+ COPTFLAGS=-O3 CXXOPTFLAGS=-O3 FOPTFLAGS=-O3
+build.env PETSC_DIR=${worksrcpath} PETSC_ARCH=darwin
+destroot.env PETSC_DIR=${worksrcpath} PETSC_ARCH=darwin
+destroot.destdir INSTALL_DIR=${destroot}${prefix}/lib/petsc
+
+variant fftw description {build with fftw support} {
+ configure.args-append --with-fftw=1 --with-fftw-dir=${prefix}
+ depends_lib-append port:fftw-3
+}
+
+post-activate {
+ ui_msg "********************************************************"
+ ui_msg "* Add the following lines to your .bash_profile if you *"
+ ui_msg "* plan to use the PETSC makefile rules in *"
+ ui_msg "* $prefix/lib/petsc/bmake: *"
+ ui_msg "* *"
+ ui_msg "* export PETSC_DIR=${prefix}/lib/petsc *"
+ ui_msg "* export PETSC_ARCH=darwin *"
+ ui_msg "* *"
+ ui_msg "********************************************************"
+}
Property changes on: trunk/dports/math/petsc/Portfile
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added: trunk/dports/math/petsc/files/patch-configure.py.diff
===================================================================
--- trunk/dports/math/petsc/files/patch-configure.py.diff (rev 0)
+++ trunk/dports/math/petsc/files/patch-configure.py.diff 2008-05-29 18:23:35 UTC (rev 37202)
@@ -0,0 +1,20 @@
+--- config/configure.py.orig 2008-03-27 08:54:31.000000000 -0500
++++ config/configure.py 2008-03-27 08:55:26.000000000 -0500
+@@ -116,17 +116,6 @@
+ if name.find('=') == -1: sys.argv[l] = sys.argv[l]+'=0'
+ elif name.endswith('=1'): sys.argv[l].replace('=1','=0')
+
+- # Check for sudo
+- if os.getuid() == 0:
+- print '================================================================================='
+- print ' *** Do not run configure as root, or using sudo. ***'
+- print ' *** Use the --with-sudo=sudo option to have ***'
+- print ' *** installs of external packages done with sudo ***'
+- print ' *** use only with --prefix= when installing in ***'
+- print ' *** system directories ***'
+- print '================================================================================='
+- sys.exit(3)
+-
+ # Check for broken cygwin
+ if chkbrokencygwin():
+ print '================================================================================='
Added: trunk/dports/math/petsc/files/patch-makefile.diff
===================================================================
--- trunk/dports/math/petsc/files/patch-makefile.diff (rev 0)
+++ trunk/dports/math/petsc/files/patch-makefile.diff 2008-05-29 18:23:35 UTC (rev 37202)
@@ -0,0 +1,15 @@
+--- makefile.orig 2008-03-27 08:54:20.000000000 -0500
++++ makefile 2008-03-27 08:55:26.000000000 -0500
+@@ -16,12 +16,6 @@
+ # Basic targets to build PETSc libraries.
+ # all: builds the c, fortran, and f90 libraries
+ all:
+- @if [ "`whoami`" = "root" ]; then \
+- echo "********************************************************************"; \
+- echo " Do not run configure as root, or using sudo.";\
+- echo " That should be reserved for installation";\
+- echo "********************************************************************"; \
+- exit 1; fi
+ @${OMAKE} PETSC_ARCH=${PETSC_ARCH} chkpetsc_dir
+ -@${OMAKE} all_build 2>&1 | tee make_log_${PETSC_ARCH}
+ - at egrep -i "( error | error:)" make_log_${PETSC_ARCH} > /dev/null; if [ "$$?" = "0" ]; then \
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080529/1eb307f5/attachment-0001.htm
More information about the macports-changes
mailing list