I am trying to create a brew formula to make it easy to install DAKOTA on osx. To install DAKOTA, I need to run the cmake file configuration file. Here is my attempt to create a propper brew formula, although I'm not sure how to implement the cmake step. I'm also not sure how to set homegrown flags during the "depends on" steps. Am I implementing the installation options correctly? How to change formula layouts to "system"?
Here is my attempt at the moment, although I'm not sure about the definition of layout=system in depends_on implementations, and I cannot find documentation on how to use cmake in the brew formula.
class DAKOTA < Formula desc "Sandia Lab DAKOTA" homepage "https://dakota.sandia.gov" url "https://dakota.sandia.gov/sites/default/files/distributions/public/dakota-6.2-public.src.tar.gz" sha256 "53953e477a37d2e870e3be4b22f519474c24537b0e6eb1633e3402273a684a98" depends_on "gcc" => ["without-multilib"] depends_on "gcc-4.9" => ["without-multilib"] depends_on "open-mpi" => ["--C++11"] system "export", "HOMEBREW_CC=gcc-4.9" system "export", "HOMEBREW_CXX=gcc-4.9" depends_on "boost" => ["C++11", "with-mpi", "without-single"] # can't have layout=tagged, need layout=system def install system "cmake", "-C", "Buildak.cmake" # not sure how to implement this system "make", "install" system 'echo', 'echo "export PATH=$PATH:/usr/local/dakota/Cellar/bin:/usr/local/Cellar/dakota/test:/usr/local/Cellar/dakota/lib;export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/usr/local/Cellar/dakota/bin:/usr/local/Cellar/dakota/lib" >> ~/.bash_profile' # following sandia installation instructions. editing DYLD_LIBRARY_PATH is frowned on by brew doctor, not sure what to do about this.... end test do system "dakota", "-v" system "dakota", "-i", "/usr/local/Cellar/dakota/test/dakota_rosenbrock.in" end end
source share