From e7f619ac94ad835f3fbb8f575fd26392df3ced59 Mon Sep 17 00:00:00 2001 From: Olivier Parcollet Date: Sun, 1 Sep 2013 00:15:20 +0200 Subject: [PATCH] brew formula for triqs and an application ok - triqs and triqs_cthyb_matrix formula work but unisntallation is not perfect. --- packaging/os_x/triqs.rb | 34 ++++++++++++++++++++++------ packaging/os_x/triqs_cthyb_matrix.rb | 13 ++++++++--- 2 files changed, 37 insertions(+), 10 deletions(-) diff --git a/packaging/os_x/triqs.rb b/packaging/os_x/triqs.rb index 2e8c0083..42b39f1e 100644 --- a/packaging/os_x/triqs.rb +++ b/packaging/os_x/triqs.rb @@ -2,30 +2,50 @@ require 'formula' class Triqs < Formula homepage 'ipht.cea.fr/triqs/' - head 'https://github.com/tomaok/TRIQS.git' ##Thomas'temporary fork where on-site compilation NOT required + version '1.0' + url 'file:///Users/parcolle/triqs/src/libs', :using => :git + #head 'https://github.com/tomaok/TRIQS.git' ##Thomas'temporary fork where on-site compilation NOT required #url 'https://github.com/TRIQS/TRIQS/archive/master.zip' ##once the on-site compilation requirement has been removed #sha1 '' depends_on 'cmake' => :build depends_on 'gfortran' - depends_on 'hdf5' - depends_on 'open-mpi' + #depends_on 'hdf5' + #depends_on 'open-mpi' depends_on 'fftw' depends_on 'gmp' depends_on 'gsl' - depends_on 'python' - depends_on 'doxygen' - depends_on 'zmq' + #depends_on 'python' + #depends_on 'doxygen' + #depends_on 'zmq' depends_on 'boost' + # python package needed + #depends_on :python => 'numpy' + #depends_on :python => 'scipy' + #depends_on :python => 'h5py' + #depends_on :python => 'cython' + #depends_on :python => 'matplotlib' + def install - args=["-DPYTHON_INTERPRETER=/usr/local/bin/python", "-DALLOW_COMPILATION_IN_SOURCES" , "-DCMAKE_INSTALL_PREFIX=/usr/local"] + args=["-DPYTHON_INTERPRETER=/usr/local/bin/python", "-DALLOW_COMPILATION_IN_SOURCES=ON" , "-DCMAKE_INSTALL_PREFIX=/usr/local"] system "cmake", ".", *args system "make -j8 " # if this fails, try separate make/make install steps system "make test" system "make -j8 install" # if this fails, try separate make/make install steps end + + def caveats + s = <<-EOS.undent + ********************************************************************** + Uninstalling requires to clean manually as : + find /usr/local/ -name "*triqs*" |grep -v Library |xargs rm -rf + ********************************************************************** + EOS + return s + end + #def test # system "pytriqs" #end diff --git a/packaging/os_x/triqs_cthyb_matrix.rb b/packaging/os_x/triqs_cthyb_matrix.rb index ecfca09b..916ebcab 100644 --- a/packaging/os_x/triqs_cthyb_matrix.rb +++ b/packaging/os_x/triqs_cthyb_matrix.rb @@ -1,11 +1,14 @@ require 'formula' -class Triqs_cthyb_matrix < Formula +class TriqsCthybMatrix < Formula homepage 'ipht.cea.fr/triqs/XXX' - head 'https://github.com/TRIQS/cthyb_matrix.git' - url 'https://github.com/TRIQS/cthyb_matrix/XXXXX.tar.gz' + #head 'https://github.com/TRIQS/cthyb_matrix.git' + version '1.0' + url 'file:///Users/parcolle/triqs/src/cthyb_matrix', :using => :git + #url 'https://github.com/TRIQS/cthyb_matrix/XXXXX.tar.gz' #sha1 '' + depends_on 'cmake' => :build depends_on 'triqs' def install @@ -16,4 +19,8 @@ class Triqs_cthyb_matrix < Formula system "make -j8 install" # if this fails, try separate make/make install steps end + def uninstall + system "rm /usr/local/bin/pytriqs" + end + end