Skip to content

Commit b939eae

Browse files
committed
First commit.
0 parents  commit b939eae

File tree

7 files changed

+1000
-0
lines changed

7 files changed

+1000
-0
lines changed

LICENSE

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# homebrew-supportingsoftware
2+
3+
Homebrew recipes for the supporting software required to compile or install fluidity on Mac OS X. Existing homebrew users should tap the repository with:
4+
5+
`brew tap FluidityProject/supportingsoftware`
6+
7+
A Fluidity installation should then be available with:
8+
9+
`brew install fluidity`

fluidity.rb

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
2+
class Fluidity < Formula
3+
desc ""
4+
homepage "http://FluidityProject.github.io"
5+
url "https://github.com/FluidityProject/fluidity.git", :branch => "ElCapitanFixes"
6+
sha256 ""
7+
version "4.13"
8+
9+
depends_on :mpi => [:cc, :cxx, :f77, :f90]
10+
depends_on :fortran
11+
depends_on :x11
12+
depends_on "FluidityProject/supportingsoftware/petsc-fluidity"
13+
depends_on "FluidityProject/supportingsoftware/zoltan"
14+
depends_on "python"
15+
depends_on "numpy"
16+
depends_on "udunits"
17+
depends_on "gnu-sed"
18+
depends_on "vtk5"
19+
depends_on "judy"
20+
depends_on "spatialindex"
21+
depends_on "FluidityProject/supportingsoftware/libspud"
22+
23+
option "enable-2d-adaptivity", "Build and link libmba2 for 2d adaptivity"
24+
option "enable-debug", "Build debug version"
25+
26+
keg_only "Lets test this first!"
27+
28+
fails_with :llvm
29+
fails_with :gcc_4_0
30+
31+
def oprefix(f)
32+
Formula[f].opt_prefix
33+
end
34+
35+
def install
36+
# ENV.deparallelize # if your formula fails when building in parallel
37+
38+
ENV["CPPFLAGS"] = "-I#{oprefix("origimbo/tools/zoltan")}/include -I#{oprefix("vtk5")}/include/vtk-5.10"
39+
ENV["LDFLAGS"] = "-L#{oprefix("vtk5")}/lib/vtk-5.10 -lvtkIO -lvtkHybrid -lvtkGraphics -lvtkRendering -lvtkFiltering -lvtkCommon"
40+
41+
ENV["PETSC_DIR"] = "#{HOMEBREW_PREFIX}/opt/petsc-fluidity"
42+
43+
system "./configure", "--prefix=#{prefix}",
44+
"--with-libspud-root=#{HOMEBREW_PREFIX}",
45+
"--with-spatialindex-root=#{HOMEBREW_PREFIX}",
46+
"--with-judy=#{oprefix("judy")}/lib/libjudy.a"
47+
system "make"
48+
system "make", "install"
49+
end
50+
51+
end

libspud.rb

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Documentation: https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Formula-Cookbook.md
2+
# http://www.rubydoc.info/github/Homebrew/homebrew/master/Formula
3+
# PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST!
4+
5+
class Libspud < Formula
6+
desc ""
7+
homepage ""
8+
url "lp:spud", :using => :bzr
9+
sha256 ""
10+
version "1.1"
11+
12+
# depends_on "cmake" => :build
13+
depends_on "libxml2"
14+
depends_on "python"
15+
depends_on "trang"
16+
depends_on "pygtk" => "with-libglade"
17+
depends_on :fortran
18+
19+
bottle do
20+
root_url "https://github.com/FluidityProject/homebrew-supportingsoftware/releases/download/v1.0/"
21+
cellar :any_skip_relocation
22+
sha256 "caec3fe5d64de3500520d86d8460aec1002dc284a42b1066b8e47d566701105d" => :mavericks
23+
end
24+
25+
env :std
26+
27+
fails_with :llvm
28+
29+
def install
30+
# ENV.deparallelize # if your formula fails when building in parallel
31+
32+
# Remove unrecognized options if warned by configure
33+
system "./configure", "--prefix=#{prefix}"
34+
system "make"
35+
system "make", "install" # if this fails, try separate make/make install steps
36+
37+
inreplace "#{bin}/diamond", "/usr/share/diamond/gui/diamond.svg", "#{prefix}/share/diamond/gui/diamond.svg"
38+
39+
end
40+
41+
test do
42+
system "true"
43+
end
44+
end

petsc-fluidity.rb

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# Documentation: https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Formula-Cookbook.md
2+
# http://www.rubydoc.info/github/Homebrew/homebrew/master/Formula
3+
4+
class PetscFluidity < Formula
5+
desc ""
6+
homepage ""
7+
url "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-3.6.3.tar.gz"
8+
version "3.6.3-fluidity"
9+
sha256 "2458956c876496f3c8160591324459be7c11f2e1ce09ad98347394c67a46d858"
10+
11+
depends_on "cmake" => :build
12+
depends_on :x11 # if your formula requires any X11/XQuartz components
13+
depends_on "hypre"
14+
depends_on "metis"
15+
depends_on "parmetis"
16+
depends_on "scalapack"
17+
depends_on "suite-sparse"
18+
depends_on "mumps"
19+
depends_on "hwloc"
20+
depends_on "netcdf" => "with-fortran"
21+
depends_on "hdf5" => "with-mpi"
22+
depends_on "valgrind"
23+
depends_on :mpi => [:cc, :cxx, :f77, :f90]
24+
depends_on :fortran
25+
26+
bottle do
27+
root_url "https://github.com/FluidityProject/homebrew-supportingsoftware/releases/download/v1.0/"
28+
sha256 "952c231f62acbf308fbe0f42cb42e17a72b2dcc79edeb6295f9c78cb2128dc3b" => :mavericks
29+
end
30+
31+
keg_only "Don't conflict with default homebrew petsc installation."
32+
33+
fails_with :llvm
34+
fails_with :gcc_4_0
35+
36+
def oprefix(f)
37+
Formula[f].opt_prefix
38+
end
39+
40+
41+
42+
def install
43+
ENV.deparallelize
44+
45+
ENV.delete "CC"
46+
ENV.delete "CXX"
47+
ENV.delete "F77"
48+
ENV.delete "FC"
49+
50+
ENV["PETSC_DIR"] = Dir.getwd
51+
52+
system "./configure", "--with-shared-libraries=0",
53+
"CC=#{ENV["MPICC"]}",
54+
"CXX=#{ENV["MPICXX"]}",
55+
"FC=#{ENV["MPIF77"]}",
56+
"F77=#{ENV["MPIFC"]}",
57+
"--with-debugging=0",
58+
"--with-fortran-interfaces=1",
59+
"--download-blacs",
60+
"--with-hypre-dir=#{oprefix("hypre")}",
61+
"--download-ml",
62+
"--download-ctetgen",
63+
"--download-chaco",
64+
"--with-metis-dir=#{oprefix("metis")}",
65+
"--with-parmetis-dir=#{oprefix("parmetis")}",
66+
"--with-netcdf=1",
67+
"--with-netcdf-dir=#{oprefix("netcdf")}",
68+
"--with-hdf5",
69+
"--with-hdf5-dir=#{oprefix("hdf5")}",
70+
"--with-mumps-dir=#{oprefix("mumps")}/libexec",
71+
"--with-scalapack-dir=#{oprefix("scalapack")}",
72+
"--with-suitesparse-dir=#{oprefix("suite-sparse")}",
73+
"--with-scalar-type=real",
74+
"--with-hwloc-dir=#{oprefix("hwloc")}",
75+
"--prefix=#{prefix}"
76+
system "make", "all"
77+
system "make", "install"
78+
79+
end
80+
81+
test do
82+
# `test do` will create, run in and delete a temporary directory.
83+
#
84+
# This test will fail and we won't accept that! It's enough to just replace
85+
# "false" with the main program this formula installs, but it'd be nice if you
86+
# were more thorough. Run the test with `brew test petsc-lite`. Options passed
87+
# to `brew install` such as `--HEAD` also need to be provided to `brew test`.
88+
#
89+
# The installed folder is not in the path, so use the entire path to any
90+
# executables being tested: `system "#{bin}/program", "do", "something"`.
91+
system "false"
92+
end
93+
end

transfig.rb

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
class Transfig < Formula
2+
homepage 'http://www.xfig.org'
3+
url 'https://downloads.sourceforge.net/mcj/transfig.3.2.5e.tar.gz'
4+
version '3.2.5e'
5+
6+
depends_on 'homebrew/x11/imake' => :build
7+
depends_on 'jpeg'
8+
depends_on 'ghostscript'
9+
depends_on :x11
10+
depends_on 'gcc'
11+
12+
fails_with :clang do
13+
cause "clang fails to process xfig's imake rules"
14+
end
15+
fails_with :llvm
16+
fails_with :gcc_4_0
17+
18+
env :std
19+
20+
def install
21+
# transfig does not like to execute makefiles in parallel
22+
ENV.deparallelize
23+
24+
# Patch tranfig/Imakefile
25+
inreplace "transfig/Imakefile", "XCOMM BINDIR = /usr/bin/X11",
26+
"BINDIR = #{bin}\n"+ # set install dir for bin
27+
"USRLIBDIR = #{lib}\n" # set install dir for lib
28+
inreplace "transfig/Imakefile", "XCOMM MANDIR = $(MANSOURCEPATH)$(MANSUFFIX)",
29+
"MANDIR = #{man}$(MANSUFFIX)"
30+
inreplace "transfig/Imakefile", "XCOMM USELATEX2E = -DLATEX2E",
31+
"USELATEX2E = -DLATEX2E"
32+
33+
# Patch fig2dev/Imakefile
34+
inreplace "fig2dev/Imakefile", "XCOMM BINDIR = /usr/bin/X11",
35+
"BINDIR = #{bin}\n"+ # set install dir for bin
36+
"USRLIBDIR = #{lib}\n" # set install dir for lib
37+
inreplace "fig2dev/Imakefile", "XCOMM MANDIR = $(MANSOURCEPATH)$(MANSUFFIX)",
38+
"MANDIR = #{man}$(MANSUFFIX)"
39+
inreplace "fig2dev/Imakefile", "XFIGLIBDIR = /usr/local/lib/X11/xfig",
40+
"XFIGLIBDIR = #{share}"
41+
inreplace "fig2dev/Imakefile","XCOMM USEINLINE = -DUSE_INLINE",
42+
"USEINLINE = -DUSE_INLINE"
43+
inreplace "fig2dev/Imakefile", "RGB = $(LIBDIR)/rgb.txt", "RGB = #{MacOS::X11.share}/X11/rgb.txt"
44+
inreplace "fig2dev/Imakefile", "PNGINC = -I/usr/include/X11","PNGINC = -I#{MacOS::X11.include}"
45+
inreplace "fig2dev/Imakefile", "PNGLIBDIR = $(USRLIBDIR)","PNGLIBDIR = #{MacOS::X11.lib}"
46+
inreplace "fig2dev/Imakefile", "ZLIBDIR = $(USRLIBDIR)", "ZLIBDIR = /usr/lib"
47+
inreplace "fig2dev/Imakefile", "XPMLIBDIR = $(USRLIBDIR)", "XPMLIBDIR = #{MacOS::X11.lib}"
48+
inreplace "fig2dev/Imakefile", "XPMINC = -I/usr/include/X11", "XPMINC = -I#{MacOS::X11.include}/X11"
49+
inreplace "fig2dev/Imakefile", "XCOMM DDA4 = -DA4", "DDA4 = -DA4"
50+
inreplace "fig2dev/Imakefile", "FIG2DEV_LIBDIR = /usr/local/lib/fig2dev",
51+
"FIG2DEV_LIBDIR = #{lib}/fig2dev"
52+
53+
# generate Makefiles
54+
system "make clean"
55+
system "xmkmf"
56+
system "make Makefiles"
57+
58+
# build everything
59+
system "make", "CC=#{ENV["CC"]}", "CXX=#{ENV["CXX"]}", 'CCOPTIONS=""'
60+
61+
# install everything
62+
system "make install"
63+
system "make install.man"
64+
65+
end
66+
67+
test do
68+
69+
system "echo hello"
70+
71+
end
72+
73+
end

zoltan.rb

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
class Zoltan < Formula
2+
homepage "http://www.cs.sandia.gov/Zoltan"
3+
url "http://www.cs.sandia.gov/~kddevin/Zoltan_Distributions/zoltan_distrib_v3.81.tar.gz"
4+
sha256 "9d6f2f9e2b37456cab7fe6714d51cd6d613374e915e6cc9f7fddcd72e3f38780"
5+
6+
option "without-check", "Skip build-time tests (not recommended)"
7+
8+
depends_on 'parmetis'
9+
depends_on :fortran
10+
11+
mpilang = [:cc, :cxx, :f90]
12+
depends_on :mpi => mpilang
13+
14+
bottle do
15+
root_url "https://github.com/FluidityProject/homebrew-supportingsoftware/releases/download/v1.0/"
16+
sha256 "7ecf099174c6e0687921605777f2a4c666aa83a1f8e8970678156f2dcc8eae90" => :mavericks
17+
end
18+
19+
20+
fails_with :llvm
21+
fails_with :gcc_4_0
22+
23+
ENV["OMPI_FC"] = ENV["FC"]
24+
25+
def oprefix(f)
26+
Formula[f].opt_prefix
27+
end
28+
29+
def install
30+
ENV.deparallelize
31+
32+
args = [
33+
"--prefix=#{prefix}",
34+
"CC=#{ENV["MPICC"]}",
35+
"CXX=#{ENV["MPICXX"]}",
36+
]
37+
args << "--with-parmetis"
38+
args << "--enable-zoltan-cppdriver"
39+
args << "--enable-mpi"
40+
args << "--with-mpi-compilers=yes"
41+
args << "--with-gnumake"
42+
args << "--enable-zoltan-cppdriver"
43+
args << "--disable-examples"
44+
args << "--with-parmetis-libdir=#{oprefix("parmetis")}/lib/"
45+
args << "--with-parmetis-incdir=#{oprefix("parmetis")}/include"
46+
args << "--enable-f90interface"
47+
args << "FC=#{ENV["MPIFC"]}"
48+
49+
mkdir "zoltan-build" do
50+
system "../configure", *args
51+
system "make", "everything"
52+
system "make", "check" if build.with? "check"
53+
system "make", "install"
54+
end
55+
end
56+
end

0 commit comments

Comments
 (0)