Last active
December 1, 2015 10:26
-
-
Save kozo2/f96ac42864006fe18602 to your computer and use it in GitHub Desktop.
linuxbrew formula for ecell4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # additional prerequisites for ubuntu | |
| # apt-get install python-setuptools python-dev | |
| # additional prerequisties for centos7 | |
| # linuxbrew does NOT figure out gcc and g++ in centos. you need to symlink with | |
| # ln -s `which gcc` `brew --prefix`/bin/gcc-4.8 | |
| # ln -s `which g++` `brew --prefix`/bin/g++-4.8 | |
| # yum install python-setuptools python-devel | |
| class Ecell4 < Formula | |
| desc "A multi-algorithm, multi-timescale biochemical simulation environment" | |
| homepage "https://github.com/ecell/ecell4" | |
| url "http://dev.e-cell.org/downloads/ecell4.zip" | |
| sha256 "bdbd8f406e230cbb2d566b9795bdfd3953cda67160d186bd0ca8ed8a3cf604b4" | |
| head "https://github.com/ecell/ecell4.git" | |
| depends_on "cmake" => :build | |
| depends_on "gsl" | |
| depends_on "boost" | |
| depends_on "homebrew/science/hdf5" | |
| resource "cython" do | |
| url "http://cython.org/release/Cython-0.23.4.zip" | |
| sha256 "44444591133c92a30d78a6ec52ea4afd902ee4548ca5e83d94388f6a99f6c9ae" | |
| end | |
| def install | |
| args = %W[ | |
| . | |
| -DCMAKE_INSTALL_PREFIX=#{prefix} | |
| ] | |
| ENV["CPATH"] = "#{HOMEBREW_PREFIX}/include:#{buildpath}" | |
| system "cmake", *args | |
| system "make", "BesselTables" | |
| resource("cython").stage do | |
| system "python", *Language::Python.setup_install_args(buildpath/"vendor") | |
| end | |
| ENV.prepend_path "PYTHONPATH", buildpath/"vendor/lib/python2.7/site-packages | |
| # centos needs lib64 path | |
| ENV.prepend_path "PYTHONPATH", buildpath/"vendor/lib64/python2.7/site-packages | |
| ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages" | |
| cd "python" do | |
| system "python", "setup.py", "build_ext" | |
| system "python", *Language::Python.setup_install_args(libexec) | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment