├── prodigal.rb ├── arow++.rb ├── dadadodo.rb ├── bact.rb ├── clustal-w.rb ├── bedtools.rb ├── cd-hit.rb ├── quicktree.rb ├── mpsolve.rb ├── sllib.rb ├── bioawk.rb ├── colpack.rb ├── cminpack.rb ├── seqan.rb ├── seqtk.rb ├── armadillo.rb ├── primer3.rb ├── minia.rb ├── bwa.rb ├── elph.rb ├── tmv-cpp.rb ├── mathomatic.rb ├── glpk.rb ├── liblbfgs.rb ├── rainbow.rb ├── parmetis.rb ├── libsequence.rb ├── niftilib.rb ├── clustal-omega.rb ├── plink.rb ├── fermi.rb ├── masurca.rb ├── gtsam.rb ├── crfsuite.rb ├── metis.rb ├── quip.rb ├── soapdenovo.rb ├── fastqc.rb ├── tabix.rb ├── spades.rb ├── bowtie2.rb ├── ann.rb ├── unafold.rb ├── bamutil.rb ├── petsc.rb ├── bowtie.rb ├── cddlib.rb ├── galib.rb ├── cdsclient.rb ├── metis4.rb ├── quast.rb ├── allpaths-lg.rb ├── gfan.rb ├── picard-tools.rb ├── mrfast.rb ├── sickle.rb ├── snp_sites.rb ├── infernal.rb ├── prank.rb ├── bwtdisk.rb ├── lastz.rb ├── libtsnnls.rb ├── sratoolkit.rb ├── edena.rb ├── celera-assembler.rb ├── jellyfish.rb ├── kmergenie.rb ├── seq-gen.rb ├── mtl.rb ├── raxml.rb ├── ceres-solver.rb ├── seqdb.rb ├── coinutils.rb ├── meme.rb ├── transtermhp.rb ├── igraph.rb ├── mcl.rb ├── bam-readcount.rb ├── sextractor.rb ├── vcftools.rb ├── radx.rb ├── fasta.rb ├── coinmp.rb ├── vigra.rb ├── novoalign.rb ├── bamtools.rb ├── viennarna.rb ├── paml.rb ├── bedops.rb ├── bitseq.rb ├── bali-phy.rb ├── voro++.rb ├── cgns.rb ├── emboss.rb ├── mallet.rb ├── ray.rb ├── gmap-gsnap.rb ├── nco.rb ├── blat.rb ├── README.md ├── fastx_toolkit.rb ├── perf.rb ├── atlas.rb ├── fast-statistical-alignment.rb ├── insighttoolkit.rb ├── scotch.rb ├── nauty.rb ├── snpeff.rb ├── sga.rb ├── triangle.rb ├── populations.rb ├── phyml.rb ├── tophat.rb ├── rml-mmc.rb ├── muscle.rb ├── wxmaxima.rb ├── fasttree.rb ├── adol-c.rb ├── scalapack.rb ├── dssp.rb ├── vips.rb ├── pmw.rb ├── mafft.rb ├── hmmer.rb ├── trnascan.rb ├── cufflinks.rb ├── flann.rb ├── velvet.rb ├── blast.rb ├── amos.rb ├── symphony.rb ├── trinity.rb ├── mira.rb ├── wcstools.rb ├── analysis.rb ├── openblas.rb ├── abyss.rb ├── samtools.rb ├── phylip.rb ├── wcslib.rb ├── velvetoptimiser.rb ├── gal-sim.rb ├── astrometry.net.rb ├── suite-sparse.rb ├── maxima.rb ├── fann.rb ├── qhull.rb ├── trilinos.rb ├── mathgl.rb ├── mrbayes.rb ├── glimmer3.rb ├── kalign.rb ├── spatialite-gis.rb ├── opencv.rb ├── hopdm.rb ├── beagle.rb ├── shogun.rb ├── ucsc-genome-browser.rb ├── xmgredit.rb ├── mummer.rb ├── pymol.rb ├── hyphy.rb ├── octave.rb ├── qgis.rb ├── vtk.rb ├── openimageio.rb ├── lp_solve.rb └── lammps.rb /prodigal.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Prodigal < Formula 4 | homepage 'http://prodigal.ornl.gov/' 5 | url 'http://prodigal.googlecode.com/files/prodigal.v2_60.tar.gz' 6 | sha1 '23a45dafedd98c04f9a4edbe82b037120644eaa2' 7 | 8 | def install 9 | system "make" 10 | bin.install 'prodigal' 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /arow++.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Arowxx < Formula 4 | homepage 'http://code.google.com/p/arowpp/' 5 | url 'http://arowpp.googlecode.com/files/AROW%2B%2B-0.1.2.tar.gz' 6 | sha1 '82d3a25ea30db1b3b412a0ba723f6196ebb69d52' 7 | 8 | def install 9 | system "./configure", "--prefix=#{prefix}" 10 | system "make install" 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /dadadodo.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Dadadodo < Formula 4 | homepage 'http://www.jwz.org/dadadodo/' 5 | url 'http://www.jwz.org/dadadodo/dadadodo-1.04.tar.gz' 6 | sha1 '20b3c802db70c8c4fddf751e668aa6218c085643' 7 | 8 | def install 9 | system "make", "CC=#{ENV.cc}", "CFLAGS=#{ENV.cflags}", "LDFLAGS=#{ENV.ldflags}" 10 | bin.install "dadadodo" 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /bact.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Bact < Formula 4 | homepage 'http://chasen.org/~taku/software/bact/' 5 | url 'http://chasen.org/~taku/software/bact/bact-0.13.tar.gz' 6 | sha1 'cdc8815e9258868699d98449598058011e993218' 7 | 8 | def install 9 | system "make" 10 | system "make test" 11 | bin.install "bact_learn", "bact_classify","bact_mkmodel" 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /clustal-w.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class ClustalW < Formula 4 | homepage 'http://www.clustal.org/clustal2/' 5 | url 'http://www.clustal.org/download/2.1/clustalw-2.1.tar.gz' 6 | sha1 'f29784f68585544baa77cbeca6392e533d4cf433' 7 | 8 | def install 9 | system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" 10 | system "make install" 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /bedtools.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Bedtools < Formula 4 | homepage 'http://code.google.com/p/bedtools/' 5 | url 'http://bedtools.googlecode.com/files/BEDTools.v2.17.0.tar.gz' 6 | sha1 '1b1de3c35394a423f9ad98a9957a8853b426a578' 7 | 8 | head 'https://github.com/arq5x/bedtools.git' 9 | 10 | def install 11 | system "make all" 12 | prefix.install 'bin' 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /cd-hit.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class CdHit < Formula 4 | homepage 'https://code.google.com/p/cdhit/' 5 | url 'https://cdhit.googlecode.com/files/cd-hit-v4.6.1-2012-08-27.tgz' 6 | version '4.6.1' 7 | sha1 '744be987a963e368ad46efa59227ea313c35ef5d' 8 | 9 | def install 10 | system "make" 11 | bin.mkpath 12 | system "make", "PREFIX=#{bin}", "install" 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /quicktree.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Quicktree < Formula 4 | url 'ftp://ftp.sanger.ac.uk/pub4/resources/software/quicktree/quicktree.tar.gz' 5 | version '1.1' 6 | homepage 'http://www.sanger.ac.uk/resources/software/quicktree/' 7 | sha1 '9924d51801149d59fd90f704aa7e5802f7b1ef31' 8 | 9 | def install 10 | system "make" 11 | bin.install "bin/quicktree" 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /mpsolve.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Mpsolve < Formula 4 | homepage 'http://www.dm.unipi.it/cluster-pages/mpsolve/index.htm' 5 | url 'http://www.dm.unipi.it/cluster-pages/mpsolve/mpsolve.tgz' 6 | sha1 '7b445f835325c62928deb99155b7ca9e646e6f97' 7 | version '2.2' 8 | 9 | depends_on 'gmp' 10 | 11 | def install 12 | system 'make' 13 | bin.install 'unisolve' 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /sllib.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Sllib < Formula 4 | url "http://www.ir.isas.jaxa.jp/~cyamauch/sli/sllib-1.4.2e.tar.gz" 5 | homepage 'http://www.ir.isas.jaxa.jp/~cyamauch/sli/index.html' 6 | sha1 'b55522796ac43fa6f9c8341fc54367f1cf334a28' 7 | 8 | def install 9 | system "sh", "configure", "--prefix=#{prefix}" 10 | system "make" 11 | system "make", "install" 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /bioawk.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Bioawk < Formula 4 | homepage 'https://github.com/lh3/bioawk' 5 | head 'https://github.com/lh3/bioawk.git' 6 | 7 | def install 8 | ENV.j1 9 | system 'make' 10 | bin.install 'bioawk' 11 | doc.install 'README.md' 12 | man1.install({'awk.1' => 'bioawk.1'}) 13 | end 14 | 15 | test do 16 | system 'bioawk --version' 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /colpack.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Colpack < Formula 4 | homepage 'http://www.cscapes.org/coloringpage/software.htm' 5 | url 'http://cscapes.cs.purdue.edu/download/ColPack/ColPack-1.0.9.tar.gz' 6 | sha1 'c963424c3e97a7bc3756d3feb742418e89721e48' 7 | 8 | def install 9 | system './configure', "--prefix=#{prefix}", '--disable-dependency-tracking' 10 | system "make install" 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /cminpack.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Cminpack < Formula 4 | homepage 'http://devernay.free.fr/hacks/cminpack/cminpack.html' 5 | url 'http://devernay.free.fr/hacks/cminpack/cminpack-1.3.0.tar.gz' 6 | sha1 '8bf19ce37b486707c402a046c33d823c9e359410' 7 | 8 | depends_on 'cmake' => :build 9 | 10 | def install 11 | system "cmake", ".", *std_cmake_args 12 | system "make install" 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /seqan.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Seqan < Formula 4 | homepage 'http://www.seqan.de/' 5 | url 'http://packages.seqan.de/seqan-library/seqan-library-1.4.1.tar.bz2' 6 | sha1 'a7d33813d34f999015e4f27bb398255436b202b2' 7 | head 'http://svn.seqan.de/seqan/trunk/core' 8 | 9 | def install 10 | include.install 'include/seqan' 11 | doc.install Dir['share/doc/seqan/*'] unless build.head? 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /seqtk.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Seqtk < Formula 4 | homepage 'https://github.com/lh3/seqtk' 5 | url 'https://github.com/lh3/seqtk/archive/1.0.tar.gz' 6 | sha1 '926ec33df2c4dace334d2a01db072b3d5411bcc9' 7 | head 'https://github.com/lh3/seqtk.git' 8 | 9 | def install 10 | system 'make' 11 | bin.install 'seqtk' 12 | end 13 | 14 | test do 15 | system 'seqtk 2>&1 |grep -q seqtk' 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /armadillo.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Armadillo < Formula 4 | homepage 'http://arma.sourceforge.net/' 5 | url 'http://downloads.sourceforge.net/project/arma/armadillo-3.900.1.tar.gz' 6 | sha1 '06863576978e2e341471cbf45fa24889c1e787a6' 7 | 8 | depends_on 'cmake' => :build 9 | depends_on 'boost' 10 | 11 | def install 12 | system "cmake", ".", *std_cmake_args 13 | system "make install" 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /primer3.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Primer3 < Formula 4 | homepage 'http://primer3.sourceforge.net/' 5 | url 'https://downloads.sourceforge.net/project/primer3/primer3/2.3.4/primer3-2.3.4.tar.gz' 6 | sha1 '850d8e5cfbe84cdf3e4955a3974a6531a8ac6516' 7 | 8 | def install 9 | cd "src" do 10 | system "make all" 11 | bin.install %w(primer3_core ntdpal oligotm long_seq_tm_test) 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /minia.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Minia < Formula 4 | homepage 'http://minia.genouest.org/' 5 | url 'http://minia.genouest.org/files/minia-1.5418.tar.gz' 6 | sha1 '25299d6d236b80c044f153c101c4266c88698a87' 7 | 8 | def install 9 | system 'make' 10 | bin.install 'minia' 11 | doc.install 'README', 'manual/manual.pdf' 12 | end 13 | 14 | test do 15 | system 'minia 2>&1 |grep -q minia' 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /bwa.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Bwa < Formula 4 | homepage 'http://bio-bwa.sourceforge.net/' 5 | url 'http://downloads.sourceforge.net/project/bio-bwa/bwa-0.7.5a.tar.bz2' 6 | sha1 '3ba4a2df24dc2a2578fb399dc77b3c240a5a18be' 7 | 8 | head 'https://github.com/lh3/bwa.git' 9 | 10 | def install 11 | system "make", "CC=#{ENV.cc}", "CFLAGS=#{ENV.cflags}" 12 | bin.install "bwa" 13 | man1.install "bwa.1" 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /elph.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Elph < Formula 4 | homepage 'http://cbcb.umd.edu/software/ELPH/' 5 | url 'ftp://ftp.cbcb.umd.edu/pub/software/elph/ELPH-1.0.1.tar.gz' 6 | sha1 '9c8bf6ac54ade29daa15dc07aeeb94747626298a' 7 | 8 | def install 9 | cd 'sources' do 10 | system 'make' 11 | bin.install 'elph' 12 | end 13 | end 14 | 15 | def test 16 | system "#{bin}/elph -h 2>&1 | grep elph" 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /tmv-cpp.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class TmvCpp < Formula 4 | homepage 'http://code.google.com/p/tmv-cpp/' 5 | url 'http://tmv-cpp.googlecode.com/files/tmv0.71.tar.gz' 6 | sha1 'd407748ff4f6a0689edca006b070ff883ec59bbe' 7 | 8 | depends_on 'scons' => :build 9 | 10 | def install 11 | # ENV.j1 # if your formula's build system can't parallelize 12 | system "scons" 13 | system "scons install PREFIX=#{prefix}" 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /mathomatic.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Mathomatic < Formula 4 | homepage 'http://www.mathomatic.org/' 5 | url 'http://mathomatic.org/mathomatic-16.0.5.tar.bz2' 6 | sha1 'aaaf4df4aa3dc9ea748211278e657c2195858c24' 7 | 8 | def install 9 | ENV['prefix'] = prefix 10 | system "make READLINE=1" 11 | system "make m4install" 12 | cd 'primes' do 13 | system 'make' 14 | system 'make install' 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /glpk.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Glpk < Formula 4 | homepage 'http://www.gnu.org/software/glpk/' 5 | url 'http://ftpmirror.gnu.org/glpk/glpk-4.48.tar.gz' 6 | mirror 'http://ftp.gnu.org/gnu/glpk/glpk-4.48.tar.gz' 7 | sha1 'e00c92faa38fd5d865fa27206abbb06680bab7bb' 8 | 9 | def install 10 | system "./configure", "--disable-dependency-tracking", 11 | "--prefix=#{prefix}" 12 | system "make install" 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /liblbfgs.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Liblbfgs < Formula 4 | homepage 'http://www.chokkan.org/software/liblbfgs' 5 | url 'https://github.com/downloads/chokkan/liblbfgs/liblbfgs-1.10.tar.gz' 6 | sha1 'fde08e7b842cd125364cb9db9d66fd61dcf37d21' 7 | 8 | def install 9 | system "./configure", "--disable-debug", "--disable-dependency-tracking", 10 | "--prefix=#{prefix}" 11 | system "make", "install" 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /rainbow.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Rainbow < Formula 4 | homepage 'http://sourceforge.net/projects/bio-rainbow/' 5 | url 'http://downloads.sourceforge.net/project/bio-rainbow/rainbow_2.0.2.tar.gz' 6 | sha1 'e3b91dd0900d9ec3e033a844eee1d156a4b33b71' 7 | 8 | def install 9 | system 'make' 10 | bin.install %w{rainbow ezmsim rbasm rbmergetag} 11 | end 12 | 13 | test do 14 | system 'rainbow 2>&1 |grep -q rainbow' 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /parmetis.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Parmetis < Formula 4 | homepage 'http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview' 5 | url 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/parmetis-4.0.3.tar.gz' 6 | sha1 'e0df69b037dd43569d4e40076401498ee5aba264' 7 | 8 | depends_on 'cmake' => :build 9 | depends_on :mpi => :cc 10 | 11 | def install 12 | system "make", "config", "prefix=#{prefix}" 13 | system 'make install' 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /libsequence.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Libsequence < Formula 4 | homepage 'http://molpopgen.org/software/libsequence.html' 5 | url 'http://molpopgen.org/software/libsequence/libsequence-1.7.6.tar.gz' 6 | sha1 '19c96a60767a317d1f4ac76cebb32cd07bd23f01' 7 | 8 | depends_on 'boost' => :build 9 | 10 | def install 11 | system "./configure", "--enable-shared=no", "--prefix=#{prefix}" 12 | system "make" 13 | system "make install" 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /niftilib.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Niftilib < Formula 4 | homepage 'http://niftilib.sourceforge.net' 5 | url 'http://downloads.sourceforge.net/project/niftilib/nifticlib/nifticlib_2_0_0/nifticlib-2.0.0.tar.gz' 6 | sha1 '3a6187cb09767f97cef997cf492d89ac3db211df' 7 | 8 | def install 9 | ENV.deparallelize 10 | system "make" 11 | bin.install Dir['bin/*'] 12 | lib.install Dir['lib/*'] 13 | include.install Dir['include/*'] 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /clustal-omega.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class ClustalOmega < Formula 4 | homepage 'http://www.clustal.org/omega/' 5 | url 'http://www.clustal.org/omega/clustal-omega-1.1.0.tar.gz' 6 | sha1 'b8c8ac500811c50a335c9dc2fcaf47a7245fa6a0' 7 | 8 | depends_on 'argtable' 9 | 10 | def install 11 | system "./configure", "--disable-debug", "--disable-dependency-tracking", 12 | "--prefix=#{prefix}" 13 | system "make install" 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /plink.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Plink < Formula 4 | url 'http://pngu.mgh.harvard.edu/~purcell/plink/dist/plink-1.07-src.zip' 5 | homepage 'http://pngu.mgh.harvard.edu/~purcell/plink/' 6 | sha1 'd41a2d014ebc02bf11e5235292b50fad6dedd407' 7 | 8 | def install 9 | ENV.deparallelize 10 | inreplace "Makefile", "SYS = UNIX", "SYS = MAC" 11 | system "make" 12 | (share+'plink').install %w{test.map test.ped} 13 | bin.install "plink" 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /fermi.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Fermi < Formula 4 | homepage 'https://github.com/lh3/fermi' 5 | url 'https://github.com/lh3/fermi/archive/1.1.tar.gz' 6 | sha1 '95d9a78df345def9ac781be0485b5c7680e0ad04' 7 | head 'https://github.com/lh3/fermi.git' 8 | 9 | def install 10 | system 'make' 11 | prefix.install 'README.md' 12 | bin.install 'fermi', 'run-fermi.pl' 13 | end 14 | 15 | test do 16 | system 'fermi 2>&1 |grep -q fermi' 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /masurca.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Masurca < Formula 4 | homepage 'http://www.genome.umd.edu/masurca.html' 5 | url 'ftp://ftp.genome.umd.edu/pub/MaSuRCA/MaSuRCA-2.0.4.tar.gz' 6 | sha1 '7e36afd82bd581566d46fd4dedd7ffc6cd751fb2' 7 | 8 | keg_only 'MaSuRCA conflicts with jellyfish.' 9 | 10 | def install 11 | ENV.j1 12 | ENV['DEST'] = prefix 13 | system './install.sh' 14 | end 15 | 16 | test do 17 | system "#{bin}/runSRCA.pl" 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /gtsam.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Gtsam < Formula 4 | homepage 'https://collab.cc.gatech.edu/borg/gtsam/' 5 | url 'https://research.cc.gatech.edu/borg/sites/edu.borg/files/downloads/gtsam-2.3.0.tgz' 6 | sha1 'ec1a3e8a91365a9680ba92349705b37c98555e7c' 7 | 8 | depends_on 'cmake' => :build 9 | depends_on 'boost' 10 | 11 | def install 12 | mkdir 'build' do 13 | system "cmake", "..", *std_cmake_args 14 | system "make", "install" 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /crfsuite.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Crfsuite < Formula 4 | homepage 'http://www.chokkan.org/software/crfsuite' 5 | url 'https://github.com/downloads/chokkan/crfsuite/crfsuite-0.12.tar.gz' 6 | sha1 'd27f6a056c30ddc53c469fd5d92e6631614bdcc2' 7 | 8 | depends_on 'liblbfgs' 9 | 10 | def install 11 | system "./configure", "--disable-debug", "--disable-dependency-tracking", 12 | "--prefix=#{prefix}" 13 | system "make", "install" 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /metis.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Metis < Formula 4 | homepage 'http://glaros.dtc.umn.edu/gkhome/views/metis' 5 | url 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.0.2.tar.gz' 6 | sha1 'b5a278fa06c581e068a8296d158576a4b750f983' 7 | 8 | option :universal 9 | 10 | depends_on 'cmake' => :build 11 | 12 | def install 13 | ENV.universal_binary if build.universal? 14 | system "make", "config", "prefix=#{prefix}" 15 | system "make install" 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /quip.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Quip < Formula 4 | homepage 'http://homes.cs.washington.edu/~dcjones/quip/' 5 | url 'http://homes.cs.washington.edu/~dcjones/quip/quip-1.1.8.tar.gz' 6 | sha1 '686af763dce1ae29a59bcff8ddab4dc2d6c7c33f' 7 | 8 | def install 9 | system './configure', '--disable-debug', '--disable-dependency-tracking', 10 | "--prefix=#{prefix}" 11 | system 'make', 'install' 12 | end 13 | 14 | test do 15 | system 'quip --version' 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /soapdenovo.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Soapdenovo < Formula 4 | homepage 'http://soap.genomics.org.cn/soapdenovo.html' 5 | url 'http://soap.genomics.org.cn/down/SOAPdenovo-V1.05.src.tgz' 6 | version '1.05' 7 | sha1 'e7d8fc337de43cc6b96b2b24acbe5454cf0eadfe' 8 | 9 | def install 10 | system 'make all install' 11 | prefix.install 'LICENSE', 'MANUAL' 12 | bin.install Dir['bin/*'] 13 | end 14 | 15 | test do 16 | system "#{bin}/SOAPdenovo-31mer" 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /fastqc.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Fastqc < Formula 4 | homepage 'http://www.bioinformatics.babraham.ac.uk/projects/fastqc/' 5 | url 'http://www.bioinformatics.babraham.ac.uk/projects/fastqc/fastqc_v0.10.1.zip' 6 | sha1 'd1d9c1489c46458614fcedcbbb30e799a0e796a2' 7 | 8 | def install 9 | chmod 0755, 'fastqc' 10 | prefix.install Dir['*'] 11 | mkdir_p bin 12 | ln_s prefix/'fastqc', bin/'fastqc' 13 | end 14 | 15 | def test 16 | system "fastqc", "-h" 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /tabix.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Tabix < Formula 4 | homepage 'http://samtools.sourceforge.net/' 5 | url 'http://downloads.sourceforge.net/project/samtools/tabix/tabix-0.2.6.tar.bz2' 6 | sha1 '4f0cac0da585abddc222956cac1b6e508ca1c49e' 7 | 8 | head 'https://samtools.svn.sourceforge.net/svnroot/samtools/trunk/tabix' 9 | 10 | def install 11 | system "make" 12 | bin.install %w{tabix bgzip} 13 | man1.install 'tabix.1' 14 | ln_s man1+'tabix.1', man1+'bgzip.1' 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /spades.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Spades < Formula 4 | homepage 'http://bioinf.spbau.ru/spades/' 5 | url 'http://spades.bioinf.spbau.ru/release2.5.1/SPAdes-2.5.1.tar.gz' 6 | sha1 '10ea07038cf47ad0a5a9d55c2a2664c0be2fbf52' 7 | 8 | depends_on 'cmake' => :build 9 | 10 | def install 11 | mkdir 'src/build' do 12 | system 'cmake', '..', *std_cmake_args 13 | system 'make', 'install' 14 | end 15 | end 16 | 17 | test do 18 | system 'spades.py --help' 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /bowtie2.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Bowtie2 < Formula 4 | homepage 'http://bowtie-bio.sourceforge.net/bowtie2/index.shtml' 5 | url 'http://downloads.sourceforge.net/project/bowtie-bio/bowtie2/2.1.0/bowtie2-2.1.0-source.zip' 6 | sha256 '90a9d3a6bd19ddc3a8f90b935c6a2288478572de2ad4039b29f91016b95ef4b0' 7 | 8 | def install 9 | system "make" 10 | bin.install %W(bowtie2 bowtie2-align bowtie2-build bowtie2-inspect) 11 | end 12 | 13 | def test 14 | system "bowtie2", "--version" 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /ann.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Ann < Formula 4 | homepage 'http://www.cs.umd.edu/~mount/ANN/' 5 | url 'http://www.cs.umd.edu/~mount/ANN/Files/1.1.2/ann_1.1.2.zip' 6 | sha1 '622be90314a603ef9b2abadcf62379f73f28f46c' 7 | 8 | def install 9 | system "make", "macosx-g++" 10 | prefix.install "bin", "lib", "sample", "doc", "include" 11 | end 12 | 13 | def test 14 | cd "#{prefix}/sample" do 15 | system "#{bin}/ann_sample", "-df", "data.pts", "-qf", "query.pts" 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /unafold.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Unafold < Formula 4 | homepage 'http://mfold.rna.albany.edu/' 5 | url 'http://mfold.rna.albany.edu/cgi-bin/UNAFold-download.cgi?unafold-3.8.tar.gz' 6 | sha1 'b4f0296af9809ecb9f067f5adf17249315a50b7d' 7 | 8 | depends_on 'gd' 9 | depends_on 'gnuplot' 10 | 11 | def install 12 | system "./configure", "--disable-debug", "--disable-dependency-tracking", 13 | "--prefix=#{prefix}" 14 | system "make" 15 | system "make install" 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /bamutil.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Bamutil < Formula 4 | homepage 'http://genome.sph.umich.edu/wiki/BamUtil' 5 | url 'http://genome.sph.umich.edu/w/images/5/52/BamUtilLibStatGen.1.0.9.tgz' 6 | sha1 '5997481f5668d6cc1c9570f3aae1383262af28c3' 7 | head 'https://github.com/statgen/bamUtil.git' 8 | 9 | def install 10 | ENV.j1 11 | system 'make', 'cloneLib' if build.head? 12 | system 'make', 'install', "INSTALLDIR=#{bin}" 13 | end 14 | 15 | test do 16 | system 'bam 2>&1 |grep -q BAM' 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /petsc.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Petsc < Formula 4 | homepage 'http://www.mcs.anl.gov/petsc/index.html' 5 | url 'http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.3-p5.tar.gz' 6 | sha1 'ac8e64b1b266c3b8779a6dd91f21e09cf3442321' 7 | 8 | depends_on :mpi => :cc 9 | depends_on :fortran 10 | 11 | def install 12 | ENV.deparallelize 13 | system "./configure", "--with-debugging=0", "--prefix=#{prefix}" 14 | system "make all" 15 | system "make test" 16 | system "make install" 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /bowtie.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Bowtie < Formula 4 | homepage 'http://bowtie-bio.sourceforge.net/index.shtml' 5 | url 'http://downloads.sourceforge.net/project/bowtie-bio/bowtie/1.0.0/bowtie-1.0.0-src.zip' 6 | sha256 '51e434a78e053301f82ae56f4e94f71f97b19f7175324777a7305c8f88c5bac5' 7 | 8 | head 'https://github.com/BenLangmead/bowtie.git' 9 | 10 | def install 11 | system "make" 12 | bin.install %W(bowtie bowtie-build bowtie-inspect) 13 | end 14 | 15 | def test 16 | system "bowtie", "--version" 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /cddlib.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Cddlib < Formula 4 | homepage 'http://www.inf.ethz.ch/personal/fukudak/cdd_home/' 5 | url 'ftp://ftp.ifor.math.ethz.ch/pub/fukuda/cdd/cddlib-094g.tar.gz' 6 | sha1 '4ef38ca6efbf3d54a7a753c63ff25a8c95e5fc5f' 7 | 8 | depends_on 'gmp' 9 | 10 | def install 11 | system "./configure", "--disable-dependency-tracking", 12 | "--prefix=#{prefix}" 13 | system "make", "install" 14 | doc.install Dir['doc/*'] 15 | share.install Dir['examples*'] 16 | end 17 | 18 | end 19 | -------------------------------------------------------------------------------- /galib.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Galib < Formula 4 | homepage 'http://lancet.mit.edu/ga/' 5 | url 'http://lancet.mit.edu/ga/dist/galib247.tgz' 6 | sha1 '3411da19d6b5b67638eddc4ccfab37a287853541' 7 | 8 | def install 9 | # To avoid that 'libga.a' will be install as 'lib' and not *into* lib: 10 | lib.mkpath 11 | 12 | # Sometime builds fail. It's fast anyway, so lets deparallelize 13 | ENV.deparallelize 14 | system "make" 15 | system "make test" 16 | system "make", "DESTDIR=#{prefix}", "install" 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /cdsclient.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Cdsclient < Formula 4 | homepage 'http://cdsarc.u-strasbg.fr/doc/cdsclient.html' 5 | url 'http://cdsarc.u-strasbg.fr/ftp/pub/sw/cdsclient-3.71.tar.gz' 6 | sha1 '67639a1bb14f4ad5e48444950f42bcfa123af0a0' 7 | 8 | def install 9 | system "./configure", "--disable-debug", "--disable-dependency-tracking", 10 | "--prefix=#{prefix}" 11 | system "make", "install" 12 | end 13 | 14 | test do 15 | system 'findusnob1 -help 2>&1 | grep -q findusnob1' 16 | end 17 | 18 | end 19 | -------------------------------------------------------------------------------- /metis4.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Metis4 < Formula 4 | url 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/OLD/metis-4.0.3.tar.gz' 5 | homepage 'http://glaros.dtc.umn.edu/gkhome/views/metis' 6 | sha1 '63303786414a857eaeea2b2a006521401bccda5e' 7 | 8 | keg_only "Conflicts with metis (5.x)." 9 | 10 | def install 11 | system "make" 12 | bin.install %w(pmetis kmetis oemetis onmetis partnmesh partdmesh mesh2nodal mesh2dual graphchk Graphs/mtest) 13 | lib.install 'libmetis.a' 14 | include.install Dir['Lib/*.h'] 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /quast.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Quast < Formula 4 | homepage 'http://bioinf.spbau.ru/en/quast' 5 | url 'http://downloads.sourceforge.net/project/quast/quast-2.2.tar.gz' 6 | sha1 '86b28a1bdb7d11626f79fdb2be68330db0cb2370' 7 | 8 | depends_on 'matplotlib' => :python 9 | 10 | def install 11 | libexec.install 'quast.py', 'metaquast.py', 'libs' 12 | bin.install_symlink '../libexec/quast.py', '../libexec/metaquast.py' 13 | doc.install 'manual.html' 14 | end 15 | 16 | test do 17 | system 'quast.py 2>&1 |grep -q quast' 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /allpaths-lg.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class AllpathsLg < Formula 4 | homepage 'http://www.broadinstitute.org/software/allpaths-lg/blog/' 5 | url 'ftp://ftp.broadinstitute.org/pub/crd/ALLPATHS/Release-LG/latest_source_code/allpathslg-47032.tar.gz' 6 | sha1 'c53cfe3443d769ddd2a77b61e2c600b3cb49bb2a' 7 | 8 | def install 9 | system './configure', '--disable-debug', '--disable-dependency-tracking', 10 | "--prefix=#{prefix}" 11 | system 'make', 'install' 12 | end 13 | 14 | test do 15 | system "#{bin}/RunAllPathsLG", '--version' 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /gfan.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Gfan < Formula 4 | homepage 'http://home.imf.au.dk/jensen/software/gfan/gfan.html' 5 | url 'http://home.imf.au.dk/jensen/software/gfan/gfan0.5.tar.gz' 6 | sha1 'ba4f3e4fac6bcafdfdd2244329d925e958d9ee63' 7 | 8 | depends_on 'gmp' 9 | depends_on 'cddlib' 10 | 11 | def install 12 | system "make" 13 | system "make PREFIX=#{prefix} install" 14 | doc.install Dir['doc/*'] 15 | share.install Dir['examples', 'homepage', 'testsuite'] 16 | end 17 | 18 | def test 19 | system "gfan --help" 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /picard-tools.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class PicardTools < Formula 4 | homepage 'http://picard.sourceforge.net/' 5 | url 'http://downloads.sourceforge.net/project/picard/picard-tools/1.82/picard-tools-1.82.zip' 6 | sha1 '89ab83988425560acbbd2294763d4f8429a7e70d' 7 | 8 | def install 9 | (share/'java').install Dir['*.jar'] 10 | (share/'java').install Dir['picard-tools-1.82/*.jar'] 11 | end 12 | 13 | def caveats 14 | <<-EOS.undent 15 | The Java JAR files are installed to 16 | #{HOMEBREW_PREFIX}/share/java 17 | EOS 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /mrfast.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Mrfast < Formula 4 | homepage 'http://mrfast.sourceforge.net/' 5 | url 'http://downloads.sourceforge.net/project/mrfast/mrfast/mrfast-2.6.0.1.tar.gz' 6 | sha256 '8635a217a91dcc1d16a21d4ad34898bd4e9a0080cc101f9cf7c28b172db31e8b' 7 | 8 | def install 9 | system "make", "CC=#{ENV.cc}", "CFLAGS=-c #{ENV.cflags}" 10 | bin.install 'mrfast' 11 | end 12 | 13 | def test 14 | actual = `#{bin}/mrfast -h`.split("\n").first 15 | expect = "mrFAST : Micro-Read Fast Alignment Search Tool." 16 | expect.eql? actual 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /sickle.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Sickle < Formula 4 | homepage 'https://github.com/najoshi/sickle' 5 | url 'https://github.com/najoshi/sickle/archive/v1.2.tar.gz' 6 | sha1 'ea69b11f45336a5232f940af94c7ad2d18e9aebc' 7 | head 'https://github.com/najoshi/sickle.git' 8 | 9 | # Fix a linker error 10 | def patches 11 | 'https://github.com/sjackman/sickle/commit/895207a.diff' unless build.head? 12 | end 13 | 14 | def install 15 | system 'make' 16 | bin.install 'sickle' 17 | end 18 | 19 | def test 20 | system "#{bin}/sickle", '--version' 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /snp_sites.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class SnpSites < Formula 4 | homepage 'https://github.com/sanger-pathogens/snp_sites' 5 | url 'ftp://ftp.sanger.ac.uk/pub/pathogens/software/snp_sites/snp_sites-1.tar.gz' 6 | sha1 'ee4ded1bcb9486b0ee454cf592b4286e891269ab' 7 | head 'https://github.com/sanger-pathogens/snp_sites.git' 8 | 9 | def install 10 | system "./configure", "--disable-debug", "--disable-dependency-tracking", 11 | "--prefix=#{prefix}" 12 | system "make", "install" 13 | end 14 | 15 | test do 16 | system "snp_sites" 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /infernal.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Infernal < Formula 4 | homepage 'http://infernal.janelia.org/' 5 | url 'ftp://selab.janelia.org/pub/software/infernal/infernal-1.1rc1.tar.gz' 6 | sha1 '89077437c53d36fac37ba1e677ce05c112cd7588' 7 | 8 | option 'check', 'Run the test suite (`make check`). Takes a couple of minutes.' 9 | 10 | def install 11 | system "./configure", "--prefix=#{prefix}" 12 | system "make" 13 | system "make check" if build.include? 'check' 14 | system "make install" 15 | end 16 | 17 | def test 18 | system "cmsearch", "-h" 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /prank.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Prank < Formula 4 | homepage 'http://code.google.com/p/prank-msa/' 5 | url 'http://prank-msa.googlecode.com/files/prank.src.130410.tgz' 6 | sha1 '8bfaec6e9bed1b0276188752609e753088e28acf' 7 | 8 | head 'https://code.google.com/p/prank-msa/', :using => :git 9 | 10 | depends_on 'mafft' 11 | depends_on 'exonerate' 12 | 13 | def install 14 | cd "src" do 15 | system "make" 16 | bin.install "prank" 17 | man1.install "prank.1" 18 | end 19 | end 20 | 21 | def test 22 | system "#{bin}/prank", "-help" 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /bwtdisk.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Bwtdisk < Formula 4 | homepage 'http://people.unipmn.it/manzini/bwtdisk/' 5 | url 'http://people.unipmn.it/manzini/bwtdisk/bwtdisk.0.9.0.tgz' 6 | sha1 '4cdfd9fc826df7c11abb45ccd802e3f71c64901c' 7 | 8 | def install 9 | system 'make' 10 | bin.install %w'bwte text_conv text_count text_rev unbwti' 11 | doc.install %w'CHANGES COPYING README doc/bwtdisk.pdf' 12 | include.install 'bwtext_defs.h' 13 | lib.install 'bwtext.a' => 'libbwtext.a' 14 | end 15 | 16 | test do 17 | system "#{bin}/bwte 2>&1 |grep -q bwte" 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /lastz.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Lastz < Formula 4 | homepage 'http://www.bx.psu.edu/~rsharris/lastz/' 5 | url 'http://www.bx.psu.edu/miller_lab/dist/lastz-1.02.00.tar.gz' 6 | sha1 '49680c6e18e2b1a417953107eedf41b2aece974d' 7 | devel do 8 | url 'http://www.bx.psu.edu/~rsharris/lastz/newer/lastz-1.03.34.tar.gz' 9 | sha1 'febf450ff44c377ba104dd4e286a848d0b6b2e47' 10 | end 11 | 12 | def install 13 | system 'make definedForAll=-Wall' 14 | bin.install %w(src/lastz src/lastz_D) 15 | end 16 | 17 | test do 18 | system 'lastz --help |grep -q lastz' 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /libtsnnls.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Libtsnnls < Formula 4 | homepage 'http://www.jasoncantarella.com/' 5 | url 'http://www.jasoncantarella.com/downloads/libtsnnls-2.3.3.tar.gz' 6 | sha1 '31a7c60788fc224daded30d308e2b3b6682a8278' 7 | 8 | #depends_on :x11 9 | 10 | def install 11 | # ENV.j1 # if your formula's build system can't parallelize 12 | system "./configure", "--disable-debug", "--disable-dependency-tracking", 13 | "--prefix=#{prefix}" 14 | system "make", "install" 15 | end 16 | 17 | test do 18 | system "true" 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /sratoolkit.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Sratoolkit < Formula 4 | homepage 'http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=software' 5 | url 'http://ftp-trace.ncbi.nlm.nih.gov/sra/sdk/2.3.2-4/sra_sdk-2.3.2-4.tar.gz' 6 | sha1 'fb483457ae12c6f34ffecb70cf3515b5b91a9b2e' 7 | head 'https://github.com/NCBITools/sratoolkit.git' 8 | 9 | def install 10 | ENV.j1 11 | system 'make', 'static', 'release' 12 | system 'make' 13 | bin.mkdir 14 | cp Dir['bin64/*[a-z]'].select {|x| File.symlink? x}, bin 15 | end 16 | 17 | test do 18 | system 'fastq-dump --version' 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /edena.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Edena < Formula 4 | homepage 'http://www.genomic.ch/edena.php' 5 | url 'http://www.genomic.ch/edena/EdenaV3.130110.tar.gz' 6 | sha1 '6d3033ecc7b3dd06bb26696dff2b7d6fcdcaa7e8' 7 | 8 | def install 9 | ENV.deparallelize 10 | system 'make' 11 | bin.install 'src/edena' 12 | doc.install 'COPYING', 'referenceManual.pdf' 13 | end 14 | 15 | def caveats 16 | <<-EOS.undent 17 | The documentation installed into 18 | #{HOMEBREW_PREFIX}/share/doc/#{name} 19 | EOS 20 | end 21 | 22 | test do 23 | system 'edena' 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /celera-assembler.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class CeleraAssembler < Formula 4 | homepage 'http://wgs-assembler.sourceforge.net/' 5 | url 'http://downloads.sourceforge.net/project/wgs-assembler/wgs-assembler/wgs-7.0/wgs-7.0.tar.bz2' 6 | sha1 'a5148b73040d94d80ed48df57b61f6d64504f1b4' 7 | 8 | def install 9 | ENV.j1 10 | system *%w[make -C kmer install] 11 | system *%w[make -C src] 12 | arch = Pathname.new(Dir['*/bin'][0]).dirname 13 | libexec.install arch 14 | bin.install_symlink libexec / arch / 'bin/runCA' 15 | end 16 | 17 | test do 18 | system "#{bin}/runCA" 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /jellyfish.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Jellyfish < Formula 4 | homepage 'http://www.cbcb.umd.edu/software/jellyfish/' 5 | url 'http://www.cbcb.umd.edu/software/jellyfish/jellyfish-1.1.10.tar.gz' 6 | sha1 '3e55b078623de02d88f1b3be825271215c243d52' 7 | 8 | fails_with :clang do 9 | build 425 10 | cause <<-EOS.undent 11 | The cause of this is __int128 failing with clang; the author of 12 | Jellyfish is aware of this issue. 13 | EOS 14 | end 15 | 16 | def install 17 | system "./configure", "--prefix=#{prefix}" 18 | system "make" 19 | system "make install" 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /kmergenie.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Kmergenie < Formula 4 | homepage 'http://kmergenie.bx.psu.edu/' 5 | url 'http://kmergenie.bx.psu.edu/kmergenie-1.5351.tar.gz' 6 | sha1 '08591e3a644b0da10e6104f36fda80a149980268' 7 | 8 | depends_on 'r' 9 | 10 | def install 11 | system 'make' 12 | libexec.install 'kmergenie', 'specialk', 13 | 'scripts', 'third_party' 14 | bin.install_symlink '../libexec/kmergenie' 15 | doc.install 'CHANGELOG', 'LICENSE', 'README' 16 | end 17 | 18 | test do 19 | system "#{bin}/kmergenie 2>&1 |grep -q kmergenie" 20 | system "#{libexec}/specialk" 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /seq-gen.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class SeqGen < Formula 4 | homepage 'http://tree.bio.ed.ac.uk/software/seqgen/' 5 | url 'http://tree.bio.ed.ac.uk/download.php?id=85' 6 | sha1 'b96d353c963766d78bde47761bc6cecd6dae0372' 7 | version '1.3.3' 8 | 9 | def install 10 | cd 'source' do 11 | system 'make' 12 | bin.install 'seq-gen' 13 | end 14 | (share/'seq-gen').install ['examples', 'documentation'] 15 | end 16 | 17 | def caveats 18 | "The manual and examples are installed to #{HOMEBREW_PREFIX}/share/seq-gen." 19 | end 20 | 21 | def test 22 | system "#{bin}/seq-gen", "-h" 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /mtl.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Mtl < Formula 4 | homepage 'http://www.simunova.com' 5 | url 'http://www.simunova.com/downloads/mtl4/MTL-4.0.9470-Linux.tar.bz2' 6 | sha1 '33b27dd5d983f411f4020795ed906b4687ca0df9' 7 | head 'https://simunova.zih.tu-dresden.de/svn/mtl4/trunk', :using => :svn 8 | 9 | depends_on 'cmake' => :build if build.head? 10 | depends_on 'boost' => :build 11 | 12 | def install 13 | if build.head? 14 | system 'cmake', '-DENABLE_TESTS=OFF', '.', *std_cmake_args 15 | system 'make', 'install' 16 | else 17 | prefix.install 'usr/include', 'usr/share' 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /raxml.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Raxml < Formula 4 | homepage 'http://sco.h-its.org/exelixis/software.html' 5 | url 'http://sco.h-its.org/exelixis/countSource728.php' 6 | version '7.2.8-alpha' 7 | sha1 '06088d8db5e66193604b6837cb1aec226895aa58' 8 | 9 | head 'https://github.com/stamatak/standard-RAxML.git' 10 | 11 | def install 12 | system "make", "-f", "Makefile.SSE3.gcc" 13 | system "make", "-f", "Makefile.SSE3.PTHREADS.gcc" 14 | bin.install("raxmlHPC-SSE3", "raxmlHPC-PTHREADS-SSE3") 15 | end 16 | 17 | def test 18 | system "raxmlHPC-SSE3", "-v" 19 | system "raxmlHPC-PTHREADS-SSE3", "-v" 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /ceres-solver.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class CeresSolver < Formula 4 | homepage 'http://code.google.com/p/ceres-solver/' 5 | url 'http://ceres-solver.googlecode.com/files/ceres-solver-1.6.0.tar.gz' 6 | sha1 '0fdd7a931498bd09dc167827f4412c368f89bd25' 7 | head 'https://ceres-solver.googlesource.com/ceres-solver.git' 8 | 9 | depends_on 'cmake' => :build 10 | depends_on 'glog' 11 | depends_on 'gflags' 12 | depends_on 'eigen' 13 | depends_on 'suite-sparse' => :recommended 14 | depends_on 'protobuf' => :optional 15 | 16 | def install 17 | system "cmake", ".", *std_cmake_args 18 | system "make", "install" 19 | end 20 | 21 | end 22 | -------------------------------------------------------------------------------- /seqdb.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Seqdb < Formula 4 | homepage 'https://bitbucket.org/mhowison/seqdb' 5 | url 'https://bitbucket.org/mhowison/seqdb/downloads/seqdb-0.2.0.tar.gz' 6 | sha1 'd0bc522dee53a0560fefefebcdad53f627bcc540' 7 | 8 | fails_with :clang do 9 | build 425 10 | cause <<-EOS.undent 11 | clang does not support OpenMP, and configure can't find OpenMP 12 | EOS 13 | end 14 | 15 | depends_on 'hdf5' 16 | 17 | def install 18 | system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" 19 | system "make install" 20 | end 21 | 22 | def test 23 | system "seqdb" 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /coinutils.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Coinutils < Formula 4 | homepage 'http://www.coin-or.org/projects/CoinUtils.xml' 5 | url 'http://www.coin-or.org/download/source/CoinUtils/CoinUtils-2.9.0.tgz' 6 | sha1 '2748dbae9db3df3818d56016ef964e82a942d697' 7 | 8 | depends_on :fortran 9 | 10 | conflicts_with 'coinmp', :because => 'CoinMP already provides CoinUtils (and more).' 11 | 12 | def install 13 | system "./configure", "--disable-debug", "--disable-dependency-tracking", 14 | "--prefix=#{prefix}" 15 | system "make" 16 | ENV.deparallelize # make install fails in parallel. 17 | system "make install" 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /meme.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Meme < Formula 4 | homepage 'http://meme.nbcr.net/meme/' 5 | url 'http://ebi.edu.au/ftp/software/MEME/4.9.0/meme_4.9.0_4.tar.gz' 6 | sha1 '1419ca428ce7b0053cf3d67b99ffff97e5985d39' 7 | version '4.9.0-p4' 8 | 9 | keg_only <<-EOF.undent 10 | MEME installs many commands, and some conflict 11 | with other packages. 12 | EOF 13 | 14 | def install 15 | system "./configure", "--disable-debug", "--disable-dependency-tracking", 16 | "--prefix=#{prefix}" 17 | system "make", "install" 18 | end 19 | 20 | test do 21 | system "#{bin}/meme", "#{bin}/../doc/lipo.fasta" 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /transtermhp.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Transtermhp < Formula 4 | homepage 'http://transterm.cbcb.umd.edu/' 5 | url 'http://transterm.cbcb.umd.edu/transterm_hp_v2.09.zip' 6 | sha1 '492f4246f4c6629a315f921dae53526e0aaaa93a' 7 | 8 | def install 9 | system "make" 10 | bin.install %W(transterm calibrate.sh) 11 | (share/'transtermhp').install 'USAGE.txt' 12 | end 13 | 14 | def caveats 15 | "Usage information: #{HOMEBREW_PREFIX}/share/transtermhp/USAGE.txt" 16 | end 17 | 18 | def test 19 | # `transterm -h` sends to stderr, so we send it to stdin of grep 20 | system "#{bin}/transterm -h 2>&1 | grep 'usage: transterm'" 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /igraph.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Igraph < Formula 4 | homepage 'http://igraph.sourceforge.net' 5 | url 'http://downloads.sourceforge.net/sourceforge/igraph/igraph-0.6.5.tar.gz' 6 | sha1 'f1605c5592e8bf3c97473f7781e77b6608448f78' 7 | 8 | option :universal 9 | 10 | # GMP is optional, and doesn't have a universal build 11 | depends_on 'gmp' => :optional unless build.universal? 12 | 13 | def install 14 | ENV.universal_binary if build.universal? 15 | 16 | system "./configure", "--disable-debug", 17 | "--disable-dependency-tracking", 18 | "--prefix=#{prefix}" 19 | system "make install" 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /mcl.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Mcl < Formula 4 | homepage 'http://micans.org/mcl' 5 | url 'http://micans.org/mcl/src/mcl-12-135.tar.gz' 6 | version '12-135' 7 | sha1 '27e7bc08fe5f0d3361bbc98d343c9d045712e406' 8 | 9 | def install 10 | # Force the compiler to run in C89 mode because one of the source 11 | # files uses "restrict" as a variable name and this is a restricted 12 | # keyword in C99 13 | ENV.append_to_cflags '-std=c89' 14 | 15 | bin.mkpath 16 | system "./configure", "--disable-dependency-tracking", 17 | "--prefix=#{prefix}", 18 | "--enable-blast" 19 | system "make install" 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /bam-readcount.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class BamReadcount < Formula 4 | homepage 'https://github.com/genome/bam-readcount' 5 | url 'https://github.com/genome/bam-readcount.git', :tag => 'v0.4.5' 6 | 7 | head 'https://github.com/genome/bam-readcount.git' 8 | 9 | depends_on 'cmake' => :build 10 | depends_on 'samtools' 11 | 12 | def install 13 | samtools = Formula.factory('samtools').opt_prefix 14 | ENV['SAMTOOLS_ROOT'] = "#{samtools}:#{samtools}/include/bam" 15 | system 'cmake', '.', *std_cmake_args 16 | system 'make' 17 | bin.install 'bin/bam-readcount' 18 | end 19 | 20 | test do 21 | system 'bam-readcount 2>&1 |grep -q bam-readcount' 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /sextractor.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Sextractor < Formula 4 | homepage 'http://www.astromatic.net/software/sextractor' 5 | url 'http://www.astromatic.net/download/sextractor/sextractor-2.8.6.tar.gz' 6 | sha1 '103ac2d51d9bae9fcbc5dda3031d82cd127f8250' 7 | 8 | depends_on 'fftw' 9 | depends_on 'atlas' 10 | # Although MacOS ships with ATLAS, it doesn't include the LAPACK parts. 11 | 12 | def install 13 | 14 | system "./configure", "--disable-debug", "--disable-dependency-tracking", 15 | "--prefix=#{prefix}", "--with-atlas=/usr/local/lib" 16 | 17 | system "make install" 18 | end 19 | def test 20 | system "#{bin}/sex", "--version" 21 | end 22 | end 23 | 24 | -------------------------------------------------------------------------------- /vcftools.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Vcftools < Formula 4 | homepage 'http://vcftools.sourceforge.net/index.html' 5 | url 'http://downloads.sourceforge.net/project/vcftools/vcftools_0.1.11.tar.gz' 6 | sha1 '00081e99c0f66316d92ee356580885331cadb46f' 7 | 8 | def install 9 | system "make", "install", "PREFIX=#{prefix}", "CPP=#{ENV.cxx}" 10 | end 11 | 12 | def caveats; <<-EOS.undent 13 | To use the Perl modules, make sure Vcf.pm, VcfStats.pm, and FaSlice.pm 14 | are included in your PERL5LIB environment variable: 15 | export PERL5LIB=#{HOMEBREW_PREFIX}/lib/perl5/site_perl:${PERL5LIB} 16 | EOS 17 | end 18 | 19 | def test 20 | system "#{bin}/vcftools" 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /radx.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Radx < Formula 4 | homepage 'http://www.ral.ucar.edu/projects/titan/docs/radial_formats/radx.html' 5 | url 'ftp://ftp.rap.ucar.edu/pub/titan/radx/Radx-20130712.src.tgz' 6 | mirror 'ftp://ftp.rap.ucar.edu/pub/titan/radx/previous_releases/Radx-20130712.src.tgz' 7 | version '20130712' 8 | sha1 '0d077891b43e363beeb2926e2464760186158568' 9 | 10 | depends_on 'hdf5' 11 | depends_on 'udunits' 12 | depends_on 'netcdf' => 'enable-cxx-compat' 13 | depends_on 'fftw' 14 | 15 | def install 16 | system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" 17 | system "make install" 18 | end 19 | 20 | def test 21 | system "#{bin}/RadxPrint", "-h" 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /fasta.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Fasta < Formula 4 | homepage 'http://faculty.virginia.edu/wrpearson/fasta/' 5 | url 'http://faculty.virginia.edu/wrpearson/fasta/fasta36/fasta-36.3.6.tar.gz' 6 | sha1 '7f5078135793d6d6cace0f7073368c2c5cab69b7' 7 | 8 | def install 9 | cd 'src' do 10 | system 'make', '-f', case RUBY_PLATFORM.downcase 11 | when /darwin/ 12 | '../make/Makefile.os_x86_64' 13 | when /linux/ 14 | '../make/Makefile.linux64_sse2' 15 | else 16 | raise "The system `#{`uname`.chomp}' is not supported." 17 | end 18 | end 19 | bin.install Dir['bin/*'] 20 | doc.install Dir['doc/*'] 21 | end 22 | 23 | test do 24 | system "#{bin}/fasta36" 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /coinmp.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Coinmp < Formula 4 | homepage 'http://www.coin-or.org/projects/CoinMP.xml' 5 | url 'http://www.coin-or.org/download/source/CoinMP/CoinMP-1.6.0.tgz' 6 | sha1 '1f9dd57e4cdb4d0fa1594851ae411d366c3e8836' 7 | 8 | depends_on :fortran 9 | 10 | conflicts_with 'coinutils', :because => 'CoinMP includes CoinUtils.' 11 | 12 | def install 13 | system "./configure", "--disable-debug", "--disable-dependency-tracking", 14 | "--prefix=#{prefix}" 15 | system "make" 16 | ENV.deparallelize # make install fails in parallel. 17 | system "make install" 18 | 19 | # The following hack should be fixed upstream soon. 20 | (include+'coin').install Dir['Clp/src/*.hpp'] 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /vigra.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Vigra < Formula 4 | homepage 'http://hci.iwr.uni-heidelberg.de/vigra/' 5 | url 'http://hci.iwr.uni-heidelberg.de/vigra/vigra-1.9.0-src.tar.gz' 6 | sha1 '6e4981f4ce75932ec62df6523f577c327f885ba0' 7 | 8 | depends_on :python => ['numpy', :optional] 9 | depends_on 'cmake' => :build 10 | depends_on 'jpeg' 11 | depends_on :libpng 12 | depends_on 'libtiff' 13 | depends_on 'hdf5' 14 | depends_on 'fftw' => :recommended 15 | depends_on 'openexr' => :optional 16 | 17 | def install 18 | cmake_args = std_cmake_args 19 | cmake_args << '-DWITH_OPENEXR=1' if build.with? 'openexr' 20 | mkdir 'build' do 21 | system "cmake", "..", *cmake_args 22 | system "make", "install" 23 | end 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /novoalign.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Novoalign < Formula 4 | homepage 'http://www.novocraft.com/' 5 | version '3.00.05' 6 | url 'http://www.novocraft.com/homebrew/novocraftV%s.%s.tar.gz' % 7 | [version, if MACOS then 'MacOSX' else 'gcc' end] 8 | sha1(if MACOS then 'fde9f3e0d5aeb0fd6b7ac81e61c4a0163c19b2d7' 9 | else 'e3856070e91a86e693f14d36c16b478f4cc4b80d' end) 10 | 11 | def install 12 | bin.install %w[isnovoindex novo2maq novo2paf novoalign novobarcode 13 | novoindex novomethyl novope2bed.pl novorun.pl novosort novoutil] 14 | # Conflicts with samtools 15 | #bin.install 'novo2sam.pl' 16 | doc.install Dir['*.pdf', '*.txt'] 17 | end 18 | 19 | test do 20 | system 'novoalign --version 2>&1 |grep -q Novoalign' 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /bamtools.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Bamtools < Formula 4 | homepage 'https://github.com/pezmaster31/bamtools' 5 | url 'https://github.com/pezmaster31/bamtools/archive/v2.3.0.tar.gz' 6 | sha1 '397d595b373ccc11503856d7e2804833aa8ea811' 7 | head 'https://github.com/pezmaster31/bamtools.git' 8 | 9 | depends_on 'cmake' => :build 10 | 11 | def patches 12 | # Install libbamtools in /usr/local/lib. 13 | # https://github.com/pezmaster31/bamtools/pull/82 14 | 'https://github.com/sjackman/bamtools/commit/3b6b89d.diff' 15 | end 16 | 17 | def install 18 | mkdir 'default' do 19 | system "cmake", "..", *std_cmake_args 20 | system "make install" 21 | end 22 | end 23 | 24 | def test 25 | system "#{bin}/bamtools", "--version" 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /viennarna.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Viennarna < Formula 4 | homepage 'http://www.tbi.univie.ac.at/~ronny/RNA/' 5 | url 'http://www.tbi.univie.ac.at/~ronny/RNA/packages/source/ViennaRNA-2.1.3.tar.gz' 6 | sha256 'b2cd1141fada1f33dbf334fc0e797ef45939ce31d80b7da28fa22c309a39d767' 7 | 8 | option 'with-perl', 'Build and install Perl interface' 9 | 10 | def install 11 | ENV['ARCHFLAGS'] = "-arch x86_64" 12 | args = ["./configure", "--disable-debug", "--disable-dependency-tracking", 13 | "--prefix=#{prefix}", "--disable-openmp"] 14 | args << '--without-perl' unless build.include? 'with-perl' 15 | system(*args) 16 | system "make install" 17 | end 18 | 19 | test do 20 | system "echo 'CGACGUAGAUGCUAGCUGACUCGAUGC' | #{bin}/RNAfold --MEA -p" 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /paml.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Paml < Formula 4 | homepage 'http://abacus.gene.ucl.ac.uk/software/paml.html' 5 | url 'http://abacus.gene.ucl.ac.uk/software/paml4.7.tgz' 6 | sha1 '908cae1e81659f653df1030f4cdf62178947fd64' 7 | 8 | def install 9 | cd 'src' do 10 | system "make", "CC=#{ENV.cc}", "CFLAGS=#{ENV.cflags}" 11 | bin.install %w[baseml basemlg codeml pamp evolver yn00 chi2] 12 | end 13 | 14 | (share+'paml').install 'dat' 15 | (share+'paml').install Dir['*.ctl'] 16 | doc.install Dir['doc/*'] 17 | doc.install 'examples' 18 | end 19 | 20 | def caveats 21 | <<-EOS.undent 22 | Documentation and examples: 23 | #{HOMEBREW_PREFIX}/share/doc/paml 24 | Dat and ctl files: 25 | #{HOMEBREW_PREFIX}/share/paml 26 | EOS 27 | end 28 | end 29 | -------------------------------------------------------------------------------- /bedops.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Bedops < Formula 4 | homepage 'https://code.google.com/p/bedops/' 5 | url 'https://bedops.googlecode.com/files/bedops_macosx_intel_fat-v2.0.0b.tgz' 6 | sha1 '4ca3844e626dae4b16a710078a3a37994fab0e69' 7 | 8 | def install 9 | bin.install 'bedops' 10 | libexec.install %W(bam2bed bam2starch bbms bbms.py bedextract 11 | bedmap closest-features gff2bed gtf2bed sam2bed sam2starch 12 | sort-bed starch starchcat starchcluster starchcluster.gnu_parallel 13 | unstarch vcf2bed wig2bed) 14 | end 15 | 16 | def caveats 17 | <<-EOS.undent 18 | `bedops` is installed in 19 | #{bin} 20 | and other executables are installed in 21 | #{libexec} 22 | EOS 23 | end 24 | 25 | test do 26 | system 'bedops', '--help' 27 | end 28 | end 29 | -------------------------------------------------------------------------------- /bitseq.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Bitseq < Formula 4 | homepage 'http://code.google.com/p/bitseq/' 5 | url 'http://bitseq.googlecode.com/files/BitSeq-0.4.3.tar.gz' 6 | sha1 '603feb5fccdd95d496c27fe78e7f1f81e46bc1ed' 7 | 8 | def install 9 | system "make" 10 | bin.install "convertSamples", 11 | "estimateDE", 12 | "estimateExpression", 13 | "estimateHyperPar", 14 | "extractSamples", 15 | "getFoldChange", 16 | "getGeneExpression", 17 | "getPPLR", 18 | "getVariance", 19 | "getWithinGeneExpression", 20 | "parseAlignment", 21 | "transposeLargeFile" 22 | end 23 | 24 | test do 25 | system "#{bin}/parseAlignment --help" 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /bali-phy.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class BaliPhy < Formula 4 | homepage 'http://www.bali-phy.org/' 5 | url 'http://www.bali-phy.org/bali-phy-2.1.1.tar.gz' 6 | sha1 'e72073a1c5b05c797668e476bfd8517594f074e6' 7 | 8 | depends_on 'pkg-config' => :build 9 | depends_on 'cairo' 10 | depends_on 'gsl' 11 | 12 | fails_with :clang do 13 | build 425 14 | cause <<-EOS.undent 15 | io.H:25:31: error: use of undeclared identifier 'push_back' 16 | void operator()(const T& t){push_back(t);} 17 | EOS 18 | end 19 | 20 | def install 21 | mkdir 'macbuild' do 22 | system "../configure", "--disable-debug", "--disable-dependency-tracking", 23 | "--prefix=#{prefix}", 24 | "--enable-cairo" 25 | system "make install" 26 | end 27 | end 28 | end 29 | -------------------------------------------------------------------------------- /voro++.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Voroxx < Formula 4 | homepage 'http://math.lbl.gov/voro++' 5 | url 'http://math.lbl.gov/voro++/download/dir/voro++-0.4.5.tar.gz' 6 | sha1 '64f8431aa034085dda567fc6a9b14a4fdb7a62a3' 7 | head 'https://codeforge.lbl.gov/anonscm/voro/trunk', :using => :svn 8 | 9 | def install 10 | # configure the prefix 11 | inreplace 'config.mk' do |s| 12 | s.change_make_var! "PREFIX", prefix 13 | end 14 | 15 | system 'make' 16 | system 'make', 'install' 17 | 18 | (share/'voro++').install('examples') 19 | mv prefix/'man', share/'man' 20 | end 21 | 22 | def test 23 | system 'voro++','-h' 24 | end 25 | 26 | def caveats 27 | <<-EOS.undent 28 | Example scripts are installed here: 29 | #{HOMEBREW_PREFIX}/share/voro++/examples 30 | EOS 31 | end 32 | end 33 | -------------------------------------------------------------------------------- /cgns.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Cgns < Formula 4 | homepage 'http://cgns.sourceforge.net' 5 | url 'http://downloads.sourceforge.net/project/cgns/cgnslib_3.1/cgnslib_3.1.3-4.tar.gz' 6 | version '3.1.3.4' # Release d of version a.b.c (we add the release to the version) 7 | sha1 '148396af2b9f6b6b273561cf4e474e667adc7508' 8 | 9 | depends_on :fortran 10 | depends_on 'cmake' => :build 11 | depends_on 'hdf5' 12 | 13 | def install 14 | args = std_cmake_args + [ 15 | '-DENABLE_FORTRAN=YES', 16 | '-DENABLE_HDF5=YES', 17 | '-DHDF5_NEED_ZIP=YES', 18 | '-DCMAKE_SHARED_LINKER_FLAGS=-lhdf5' 19 | ] 20 | 21 | args << '-DENABLE64_BIT' if Hardware.is_64_bit? and MacOS.version >= 10.6 22 | 23 | mkdir 'build' do 24 | system 'cmake', '..', *args 25 | system 'make install' 26 | end 27 | end 28 | end 29 | -------------------------------------------------------------------------------- /emboss.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Emboss < Formula 4 | homepage 'http://emboss.sourceforge.net/' 5 | url 'ftp://emboss.open-bio.org/pub/EMBOSS/EMBOSS-6.6.0.tar.gz' 6 | sha1 '93749ebd0a777efd3749974d2401c3a2a013a3fe' 7 | 8 | option 'without-x', 'Build without X11 support' 9 | 10 | depends_on 'pkg-config' => :build 11 | depends_on 'libharu' => :optional 12 | depends_on 'gd' => :optional 13 | depends_on :libpng => :recommended 14 | depends_on :x11 unless build.include? 'without-x' 15 | 16 | def install 17 | args = %W[ 18 | --disable-debug 19 | --disable-dependency-tracking 20 | --prefix=#{prefix} 21 | --enable-64 22 | --with-thread 23 | ] 24 | args << '--without-x' if build.include? 'without-x' 25 | system './configure', *args 26 | system 'make install' 27 | end 28 | end 29 | -------------------------------------------------------------------------------- /mallet.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Mallet < Formula 4 | homepage 'http://mallet.cs.umass.edu/' 5 | url 'http://mallet.cs.umass.edu/dist/mallet-2.0.7.tar.gz' 6 | sha1 '45f6ad87ad7605d9f009be5f47b0bbf2ca47d89e' 7 | 8 | # Creates a wrapper to set the classpath before executing 9 | # the utility. 10 | def startup_script(name) 11 | <<-EOS.undent 12 | #!/bin/sh 13 | CLASSPATH=$CLASSPATH:#{libexec}/class:#{libexec}/lib/mallet-deps.jar "#{libexec}/bin/#{name}" "$@" 14 | EOS 15 | end 16 | 17 | def install 18 | rm Dir['bin/*.{bat,dll,exe}'] # Remove all windows files 19 | prefix.install_metafiles 20 | libexec.install Dir['*'] 21 | cd libexec+'bin' do 22 | Dir['*'].each do |file| 23 | fn = File.basename(file) 24 | (bin+fn).write startup_script(fn) 25 | end 26 | end 27 | end 28 | end 29 | -------------------------------------------------------------------------------- /ray.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Ray < Formula 4 | homepage 'http://denovoassembler.sourceforge.net' 5 | url 'http://downloads.sourceforge.net/project/denovoassembler/Ray-v2.2.0.tar.bz2' 6 | sha1 'c7e095bae64b0b14a35dbf05fe54e449a7117a3c' 7 | # The head does not build right now. Can you help us? 8 | # head 'https://github.com/sebhtml/ray.git' 9 | 10 | depends_on :mpi => :cxx 11 | 12 | fails_with :llvm do 13 | build 2336 14 | cause '"___gxx_personality_v0" ... ld: symbol(s) not found for architecture x86_64' 15 | end 16 | 17 | def install 18 | system "make", "PREFIX=#{prefix}" 19 | system "make install" 20 | # The binary 'Ray' is installed in the prefix, but we want it in bin: 21 | bin.install 'Ray' 22 | rm prefix/'Ray' 23 | end 24 | 25 | test do 26 | system bin/'Ray', '--version' 27 | end 28 | end 29 | -------------------------------------------------------------------------------- /gmap-gsnap.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class GmapGsnap < Formula 4 | homepage 'http://research-pub.gene.com/gmap/' 5 | url 'http://research-pub.gene.com/gmap/src/gmap-gsnap-2013-07-20.tar.gz' 6 | sha1 '67dcf72a71798ec9f2814b33e4c92ad23a2b238e' 7 | version '2013-07-20' 8 | 9 | depends_on "samtools" 10 | 11 | def install 12 | system "./configure", "--prefix=#{prefix}" 13 | system "make" 14 | system "make check" 15 | system "make install" 16 | end 17 | 18 | def caveats; <<-EOF.undent 19 | You will need to either download or build indexed search databases. 20 | See the readme file for how to do this: 21 | http://research-pub.gene.com/gmap/src/README 22 | 23 | Databases will be installed to: 24 | #{share} 25 | EOF 26 | end 27 | 28 | def test 29 | system "#{bin}/gsnap", "--version" 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /nco.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | # NCO: Tools for slicing and dicing NetCDF files. 4 | 5 | class Nco < Formula 6 | homepage 'http://nco.sourceforge.net' 7 | url 'http://nco.sourceforge.net/src/nco-4.3.1.tar.gz' 8 | sha1 '0f8cb342905bb310f54c45179ee2c0d0479f905a' 9 | 10 | depends_on 'netcdf' 11 | depends_on 'gsl' 12 | depends_on 'udunits' 13 | 14 | # NCO requires the C++ interface in Antlr2. 15 | depends_on 'homebrew/versions/antlr2' 16 | 17 | def install 18 | inreplace 'configure' do |s| 19 | # The Antlr 2.x program installed by Homebrew is called antlr2 20 | s.gsub! 'for ac_prog in runantlr antlr', 'for ac_prog in runantlr antlr2' 21 | end 22 | 23 | system "./configure", "--disable-debug", "--disable-dependency-tracking", 24 | "--prefix=#{prefix}", "--enable-netcdf4" 25 | system "make install" 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /blat.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Blat < Formula 4 | homepage 'http://genome.ucsc.edu/FAQ/FAQblat.html' 5 | url 'http://users.soe.ucsc.edu/~kent/src/blatSrc35.zip' 6 | sha1 'a2cae7407e512166bf7b1ed300db9be6649693bd' 7 | 8 | depends_on 'libpng' => :build 9 | 10 | def install 11 | bin.mkpath 12 | system "make", "MACHTYPE=darwin", "BINDIR=#{bin}" 13 | end 14 | 15 | def test 16 | mktemp do 17 | Pathname.new('db.fa').write <<-EOF.undent 18 | >gi|5524211|gb|AAD44166.1| cytochrome b [Elephas maximus maximus] 19 | LCLYTHIGRNIYYGSYLYSETWNTGIMLLLITMATAFMGYVLPWGQMSFWGATVITNLFSAIPYIGTNLV 20 | EOF 21 | Pathname.new('query.fa').write <<-EOF.undent 22 | >spam 23 | CLYTHIGRNIYYGSY 24 | EOF 25 | system "#{bin}/blat", "-prot", "db.fa", "query.fa", "out.fa" 26 | system "cat out.fa | grep spam" 27 | end 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Homebrew-science 2 | ================ 3 | 4 | [![For science.](http://i.imgur.com/Bswp1.png) ](http://xkcd.com/585) 5 | 6 | These formulae provide software tailored to scientific endeavors. Need to store 7 | large amounts of data in a sparse matrix, solve a huge optimization problem or 8 | process the images from your space telescope? Maybe we can help! 9 | 10 | How do I install these formulae? 11 | -------------------------------- 12 | Just `brew tap homebrew/science` and then `brew install `. 13 | 14 | If the formula conflicts with one from mxcl/master or another tap, you can `brew install homebrew/science/`. 15 | 16 | You can also install via URL: 17 | 18 | 19 | brew install https://raw.github.com/Homebrew/homebrew-science/master/.rb 20 | 21 | 22 | Docs 23 | ---- 24 | `brew help`, `man brew`, or the Homebrew [wiki][]. 25 | 26 | [wiki]:http://wiki.github.com/mxcl/homebrew 27 | -------------------------------------------------------------------------------- /fastx_toolkit.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class FastxToolkit < Formula 4 | homepage 'http://hannonlab.cshl.edu/fastx_toolkit/' 5 | url 'http://hannonlab.cshl.edu/fastx_toolkit/fastx_toolkit-0.0.13.2.tar.bz2' 6 | sha1 '51fd9ddc1fc1ffea29d7cabc02e46dd8a1b860ec' 7 | 8 | depends_on 'pkg-config' => :build 9 | depends_on 'libgtextutils' 10 | 11 | def install 12 | # --disable-debug causes fastx_trimmer to crash. See #216. 13 | system './configure', '--disable-dependency-tracking', 14 | "--prefix=#{prefix}" 15 | system "make install" 16 | end 17 | 18 | def test 19 | fixture = <<-EOS.undent 20 | >MY-ID 21 | AAAAAGGGGG 22 | CCCCCTTTTT 23 | AGCTN 24 | EOS 25 | expect = <<-EOS.undent 26 | >MY-ID 27 | AAAAAGGGGGCCCCCTTTTTAGCTN 28 | EOS 29 | actual = `echo "#{fixture}" | #{bin}/fasta_formatter` 30 | actual == expect 31 | end 32 | end 33 | -------------------------------------------------------------------------------- /perf.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Perf < Formula 4 | homepage 'http://osmot.cs.cornell.edu/kddcup/software.html' 5 | url 'http://osmot.cs.cornell.edu/kddcup/perf/perf.src.tar.gz' 6 | sha1 '7fc1c8c94d05bbee06bc4dd6e00f1108d6334551' 7 | version '5.11' 8 | 9 | def install 10 | system "rm perf" 11 | system "make" 12 | bin.install "perf" 13 | end 14 | 15 | test do 16 | (testpath/'test.data').write <<-EOS.undent 17 | 1 0.80962 18 | 0 0.48458 19 | 1 0.65812 20 | 0 0.16117 21 | 0 0.47375 22 | 0 0.26587 23 | 1 0.71517 24 | 1 0.63866 25 | 0 0.36296 26 | 1 0.89639 27 | 0 0.35936 28 | 0 0.22413 29 | 0 0.36402 30 | 1 0.41459 31 | 1 0.83148 32 | 0 0.23271 33 | EOS 34 | 35 | output = `#{bin}/perf -ACC < test.data` 36 | 37 | output == "ACC 0.93750 pred_thresh 0.500000\n" 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /atlas.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Atlas < Formula 4 | homepage 'http://math-atlas.sourceforge.net/' 5 | url 'http://sourceforge.net/projects/math-atlas/files/Stable/3.10.0/atlas3.10.0.tar.bz2' 6 | sha1 '085e8219d01626485079b785309d4d6502ab1ac0' 7 | 8 | def install 9 | ENV.j1 # Atlas does its own parallel build 10 | ENV.fortran # pull in gfortran 11 | # set FC environment variable to use different gfortran 12 | 13 | system "mkdir -p BUILD" 14 | cd "BUILD" 15 | # pull in netlib LAPACK because the default Apple LAPACK doesn't include 16 | system "curl", "-C", "-", "-o", "lapack-3.4.2.tgz", "http://www.netlib.org/lapack/lapack-3.4.2.tgz" 17 | 18 | system "../configure", 19 | "--with-netlib-lapack-tarfile=" + pwd() + "/lapack-3.4.2.tgz", 20 | "--prefix=#{prefix}" 21 | 22 | system "make build" 23 | system "make check" 24 | system "make install" 25 | end 26 | end 27 | 28 | -------------------------------------------------------------------------------- /fast-statistical-alignment.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class FastStatisticalAlignment < Formula 4 | homepage 'http://fsa.sourceforge.net/' 5 | url 'http://downloads.sourceforge.net/project/fsa/fsa-1.15.7.tar.gz' 6 | sha1 '322c8270d027b573b0781d8729f0917206e9d775' 7 | 8 | fails_with :clang do 9 | build 421 10 | cause <<-EOS.undent 11 | In file included from ../../src/annealing/dotplot.h:14: 12 | ../../src/util/array2d.h:258:82: error: member reference base type 'array2d_type *const' (aka 'array2d *const') is not a 13 | structure or union 14 | Column_iterator end() const { return Column_iterator (_array, _col, _array.rows()); } 15 | EOS 16 | end 17 | 18 | def install 19 | system "./configure", "--disable-debug", "--disable-dependency-tracking", 20 | "--prefix=#{prefix}" 21 | system "make install" 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /insighttoolkit.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Insighttoolkit < Formula 4 | homepage 'http://www.itk.org' 5 | url 'http://downloads.sourceforge.net/project/itk/itk/4.3/InsightToolkit-4.3.2.tar.gz' 6 | sha1 '1c8ff03a92fd9c67e58fdfa704b95a10d3ed4c97' 7 | 8 | head 'git://itk.org/ITK.git' 9 | 10 | option 'examples', 'Compile and install various examples' 11 | option 'with-opencv-bridge', 'Include OpenCV bridge' 12 | 13 | depends_on 'cmake' => :build 14 | 15 | def install 16 | args = std_cmake_args + %W[ 17 | -DBUILD_TESTING=OFF 18 | -DBUILD_SHARED_LIBS=ON 19 | ] 20 | args << ".." 21 | args << '-DBUILD_EXAMPLES=' + ((build.include? 'examples') ? 'ON' : 'OFF') 22 | args << '-DModule_ITKVideoBridgeOpenCV=' + ((build.include? 'with-opencv-bridge') ? 'ON' : 'OFF') 23 | 24 | mkdir 'itk-build' do 25 | system "cmake", *args 26 | system "make install" 27 | end 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /scotch.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Scotch < Formula 4 | homepage 'https://gforge.inria.fr/projects/scotch' 5 | url 'https://gforge.inria.fr/frs/download.php/31831/scotch_6.0.0.tar.gz' 6 | sha1 'eb32d846bb14449245b08c81e740231f7883fea6' 7 | 8 | depends_on :mpi => :cc 9 | 10 | def install 11 | cd 'src' do 12 | ln_s 'Make.inc/Makefile.inc.i686_mac_darwin8', 'Makefile.inc' 13 | 14 | inreplace 'Makefile.inc' do |s| 15 | s.change_make_var! 'CCS', ENV['CC'] 16 | s.change_make_var! 'CCP', ENV['MPICC'] 17 | s.change_make_var! 'CCD', ENV['MPICC'] 18 | # OS X doesn't implement pthread_barriers required by Scotch 19 | s.slice! '-DCOMMON_PTHREAD' 20 | s.slice! '-DSCOTCH_PTHREAD' 21 | end 22 | system 'make', 'scotch','VERBOSE=ON' 23 | system 'make', 'ptscotch','VERBOSE=ON' 24 | system 'make', 'install', "prefix=#{prefix}" 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /nauty.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Nauty < Formula 4 | homepage 'http://cs.anu.edu.au/~bdm/nauty/' 5 | url 'http://cs.anu.edu.au/~bdm/nauty/nauty24r2.tar.gz' 6 | version '24r2' 7 | sha1 '3f012beb399a9340f77d0104bf1c9bf1100e8286' 8 | 9 | option 'run-tests', "Runs the included test programs" 10 | 11 | def install 12 | system "./configure", "--disable-debug", "--disable-dependency-tracking", 13 | "--prefix=#{prefix}" 14 | system "make all" 15 | system "make checks" if build.include? 'run-tests' 16 | 17 | bin.install %w{ NRswitchg addedgeg amtog biplabg catg complg copyg countg 18 | deledgeg directg dreadnaut dretog genbg geng genrang gentourng labelg 19 | listg multig newedgeg pickg planarg shortg showg } 20 | 21 | prefix.install 'nug.pdf' 22 | end 23 | 24 | def caveats; <<-EOS.undent 25 | User guide was saved locally to: 26 | #{prefix}/nug.pdf 27 | EOS 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /snpeff.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Snpeff < Formula 4 | homepage 'http://snpeff.sourceforge.net/' 5 | url 'http://downloads.sourceforge.net/project/snpeff/snpEff_v3_3_core.zip' 6 | version '3.3H' 7 | sha1 'ae69eee82e1c5a859c1fd0eb185cf2d5c81b38ba' 8 | 9 | def install 10 | java = share / 'java' 11 | java.install 'snpEff.jar', 'SnpSift.jar', 'snpEff.config' 12 | # Install a shell script to launch snpEff. 13 | bin.mkdir 14 | open(bin / 'snpeff', 'w') do |file| 15 | file.write <<-EOS.undent 16 | #!/bin/sh 17 | exec java -jar #{java}/snpEff.jar "$@" -c #{java}/snpEff.config 18 | EOS 19 | end 20 | end 21 | 22 | def caveats 23 | puts <<-EOS.undent 24 | Download the human database using the command 25 | snpeff download -v GRCh37.71 26 | The databases will be installed in ~/snpEff/data 27 | EOS 28 | end 29 | 30 | test do 31 | system "#{bin}/snpeff 2>&1 |grep -q snpEff" 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /sga.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Sga < Formula 4 | homepage 'https://github.com/jts/sga' 5 | url 'https://github.com/jts/sga/archive/v0.9.42.tar.gz' 6 | sha1 '99b2de74edc70c8c7d945374490f06777bd9eab7' 7 | head 'https://github.com/jts/sga.git' 8 | 9 | depends_on :autoconf => :build 10 | depends_on :automake => :build 11 | # Only header files are used, so :build is appropriate 12 | depends_on 'google-sparsehash' => :build 13 | depends_on 'bamtools' 14 | 15 | def install 16 | cd 'src' do 17 | system "./autogen.sh" 18 | system "./configure", "--disable-dependency-tracking", 19 | "--prefix=#{prefix}", 20 | "--with-bamtools=#{Formula.factory('bamtools').opt_prefix}", 21 | "--with-sparsehash=#{Formula.factory('google-sparsehash').opt_prefix}/header" 22 | system "make install" 23 | end 24 | end 25 | 26 | test do 27 | system "#{bin}/sga", "--version" 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /triangle.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Triangle < Formula 4 | homepage 'http://www.cs.cmu.edu/~quake/triangle.html' 5 | url 'http://www.netlib.org/voronoi/triangle.zip' 6 | sha1 '63d11e0b5bf097eb946a4da4ee18ddf279e16fc4' 7 | version '1.6' 8 | 9 | depends_on :x11 10 | 11 | def install 12 | inreplace 'makefile' do |s| 13 | s.gsub! '-DLINUX', '' 14 | s.remove_make_var! 'CC' 15 | end 16 | 17 | system 'make' 18 | system 'make', 'trilibrary' 19 | system 'ar', 'r', 'libtriangle.a', 'triangle.o' 20 | 21 | bin.install %w(triangle showme) 22 | lib.install 'libtriangle.a' 23 | include.install 'triangle.h' 24 | doc.install %w(README A.poly tricall.c) 25 | end 26 | 27 | def caveats; <<-EOS.undent 28 | Triangle is distributed under a license that places restrictions on how 29 | the code or library may be used in commercial products. See the README 30 | file for more info: 31 | #{prefix}/README 32 | EOS 33 | end 34 | end 35 | -------------------------------------------------------------------------------- /populations.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Populations < Formula 4 | homepage 'http://bioinformatics.org/~tryphon/populations/' 5 | url 'https://launchpad.net/~olivier-langella/+archive/ppa/+files/populations_1.2.33-2.tar.gz' 6 | sha1 'ff190be19352e2bb66f7decb87aed311b924529c' 7 | version '1.2.33-2' 8 | 9 | depends_on 'cmake' => :build 10 | depends_on 'gettext' 11 | depends_on 'qt' 12 | 13 | def patches 14 | # Fix a compiler error. 15 | DATA 16 | end 17 | 18 | def install 19 | system 'cmake', '.', *std_cmake_args 20 | system 'make', 'install' 21 | end 22 | 23 | def test 24 | system "echo 0 | #{bin}/populations" 25 | end 26 | end 27 | 28 | __END__ 29 | diff --git a/src/vecteurs.h b/src/vecteurs.h 30 | index 2279570..ce70e59 100644 31 | --- a/src/vecteurs.h 32 | +++ b/src/vecteurs.h 33 | @@ -86,7 +86,7 @@ public: 34 | } 35 | 36 | void Suppr(unsigned long pos) { 37 | - erase(vector::begin() + pos); 38 | + this->erase(vector::begin() + pos); 39 | } 40 | 41 | }; 42 | -------------------------------------------------------------------------------- /phyml.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Phyml < Formula 4 | homepage 'http://www.atgc-montpellier.fr/phyml/' 5 | url 'https://phyml.googlecode.com/files/phyml-20120412.tar.gz' 6 | sha1 '8a4699ad2bba7e2f76c8eefa277d29290f92071c' 7 | 8 | def install 9 | # separate steps required 10 | system "./configure", "--prefix=#{prefix}" 11 | system "make" 12 | 13 | system "./configure", "--prefix=#{prefix}", "--enable-phytime" 14 | system "make" 15 | 16 | bin.install %w(src/phyml src/phytime) 17 | doc.install Dir['doc/phyml-manual.pdf'] 18 | rm_rf Dir['examples/.svn'] 19 | chmod 0644, Dir['examples/*'] 20 | share.install Dir['examples/*'] 21 | end 22 | 23 | def caveats; <<-EOS.undent 24 | Examples have been installed here: 25 | #{share} 26 | 27 | See options for phyml by running: 28 | phmyl --help 29 | 30 | PhyML must be run with the "-i" option to specify an input or it will 31 | segfault. Example: 32 | phyml -i #{share}/nucleic 33 | EOS 34 | end 35 | end 36 | -------------------------------------------------------------------------------- /tophat.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Tophat < Formula 4 | homepage 'http://tophat.cbcb.umd.edu/' 5 | url 'http://tophat.cbcb.umd.edu/downloads/tophat-2.0.9.tar.gz' 6 | sha1 '6ca77ae70caf44cf78adca240987300baa72b3c5' 7 | 8 | depends_on 'samtools' 9 | depends_on 'boost' 10 | 11 | def install 12 | # Variable length arrays using non-POD element types. Initialize with length=1 13 | # Reported upstream via email to tophat-cufflinks@gmail.com on 28OCT2012 14 | inreplace 'src/tophat_reports.cpp', '[num_threads]', '[1]' 15 | 16 | # This can only build serially, otherwise it errors with no make target. 17 | ENV.deparallelize 18 | 19 | # Must add this to fix missing boost symbols. Autoconf doesn't include it. 20 | ENV.append 'LIBS', '-lboost_system-mt -lboost_thread-mt' 21 | 22 | system "./configure", "--disable-dependency-tracking", 23 | "--prefix=#{prefix}" 24 | system "make install" 25 | end 26 | 27 | test do 28 | system "#{bin}/tophat", "--version" 29 | end 30 | end 31 | -------------------------------------------------------------------------------- /rml-mmc.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class RmlMmc < Formula 4 | homepage 'http://www.ida.liu.se/labs/pelab/rml' 5 | url 'http://build.openmodelica.org/apt/pool/contrib/rml-mmc_255.orig.tar.gz' 6 | version '2.5.5' 7 | sha1 'ab173438a56f344904f6d02ccc8d6a360896219d' 8 | 9 | # Attention, has a self-signed certificate and svn will prompt you, so 10 | # do not use --HEAD as a dependency or automatic installation (built-bot). 11 | head 'https://openmodelica.org/svn/MetaModelica/trunk', :using => :svn 12 | 13 | depends_on 'smlnj' 14 | 15 | def install 16 | ENV.j1 17 | # Change the next lines to Formula.factory("smlnj").prefix/'SMLNJ_HOME' 18 | # once https://github.com/mxcl/homebrew/pull/16355 is pulled! 19 | # Setting the path will no longer be necessary, then. 20 | ENV['SMLNJ_HOME'] = Formula.factory("smlnj").libexec 21 | ENV.append 'PATH', "#{ENV['SMLNJ_HOME']}/bin" 22 | 23 | system "./configure --prefix=#{prefix}" 24 | system "make install" 25 | end 26 | 27 | def test 28 | system "#{bin}/rml", "-v" 29 | end 30 | end 31 | -------------------------------------------------------------------------------- /muscle.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Muscle < Formula 4 | homepage 'http://www.drive5.com/muscle/' 5 | url 'http://www.drive5.com/muscle/downloads3.8.31/muscle3.8.31_src.tar.gz' 6 | version '3.8.31' 7 | sha1 '2fe55db73ff4e7ac6d4ca692f8f213d1c5071dac' 8 | 9 | # This patch makes 3.8.31 build on OSX >= Lion. 10 | # It has been reported upstream but not fixed yet. 11 | def patches 12 | DATA 13 | end 14 | 15 | def install 16 | cd "src" do 17 | system "make" 18 | bin.install "muscle" 19 | end 20 | end 21 | end 22 | 23 | __END__ 24 | --- a/src/globalsosx.cpp 2010-04-28 16:43:42.000000000 -0700 25 | +++ b/src/globalsosx.cpp 2012-11-20 15:53:14.000000000 -0800 26 | @@ -13,10 +13,10 @@ 27 | #include 28 | #include 29 | #include 30 | +#include 31 | #include 32 | #include 33 | #include 34 | -#include 35 | 36 | const double DEFAULT_RAM = 1e9; 37 | const double DEFAULT_MEM_USE = 1e6; 38 | -------------------------------------------------------------------------------- /wxmaxima.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Wxmaxima < Formula 4 | homepage 'http://andrejv.github.io/wxmaxima' 5 | url 'https://downloads.sourceforge.net/project/wxmaxima/wxMaxima/12.09.0/wxMaxima-12.09.0.tar.gz' 6 | sha1 '9b56f674392eabb75183b228757df8834b45b2a6' 7 | 8 | depends_on 'wxmac' 9 | 10 | def install 11 | system "./configure", "--disable-dependency-tracking", 12 | "--prefix=#{prefix}" 13 | system 'make' 14 | cd 'locales' do 15 | system 'make', 'allmo' 16 | end 17 | system 'make', 'wxMaxima.app' 18 | prefix.install 'wxMaxima.app' 19 | system "make install" 20 | end 21 | 22 | def caveats 23 | <<-EOS.undent 24 | The program you want to run is wxmaxima.app, and it gets installed into: 25 | #{prefix} 26 | 27 | To symlink it into Applications, you can type: 28 | ln -s #{prefix}/wxmaxima.app /Applications 29 | 30 | When you start wxmaxima the first time, you have to open Preferences, 31 | and tell it where maxima is located. 32 | 33 | EOS 34 | end 35 | end 36 | -------------------------------------------------------------------------------- /fasttree.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Fasttree < Formula 4 | homepage 'http://meta.microbesonline.org/fasttree/' 5 | url 'http://www.microbesonline.org/fasttree/FastTree-2.1.7.c' 6 | sha1 'd9381924829e7d19d56154ebbde0e44044b4b7ab' 7 | 8 | fails_with :clang do 9 | build 425 10 | cause "segmentation fault when running Fasttree" 11 | # See also discussion to use -DNO_SSE (https://github.com/Homebrew/homebrew-science/pull/96) 12 | end 13 | 14 | def install 15 | system "#{ENV.cc} -O3 -finline-functions -funroll-loops -Wall -o FastTree FastTree-#{version}.c -lm" 16 | bin.install "FastTree" 17 | end 18 | 19 | test do 20 | Pathname.new('test.fa').write <<-EOF.undent 21 | >1 22 | LCLYTHIGRNIYYGSYLYSETWNTTTMLLLITMATAFMGYVLPWGQMSFWGATVITNLFSAIPYIGTNLV 23 | >2 24 | LCLYTHIGRNIYYGSYLYSETWNTGIMLLLITMATAFMGYVLPWGQMSFWGATVITNLFSAIPYIGTNLV 25 | >3 26 | LCLYTHIGRNIYYGSYLYSETWNTGIMLLLITMATAFMGTTLPWGQMSFWGATVITNLFSAIPYIGTNLV 27 | EOF 28 | `#{bin}/FastTree test.fa` =~ /1:0.\d+,2:0.\d+,3:0.\d+/ ? true : false 29 | end 30 | end 31 | -------------------------------------------------------------------------------- /adol-c.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class AdolC < Formula 4 | homepage 'https://projects.coin-or.org/ADOL-C' 5 | url 'http://www.coin-or.org/download/source/ADOL-C/ADOL-C-2.3.0.tgz' 6 | sha1 'd9124ce0b199cb8b841a9a9ec10d1fb31ed11b49' 7 | 8 | head 'https://projects.coin-or.org/svn/ADOL-C/trunk/', :using => :svn 9 | 10 | depends_on 'colpack' 11 | 12 | def install 13 | # Make our own realpath script 14 | (buildpath/'realpath').write <<-EOS.undent 15 | #!/usr/bin/python 16 | import os,sys 17 | print os.path.realpath(sys.argv[1]) 18 | EOS 19 | system "chmod +x ./realpath" 20 | 21 | # Configure may get automatically regenerated. So patch configure.ac also. 22 | inreplace %w(configure configure.ac) do |s| 23 | s.gsub! "readlink -f", "/#{buildpath}/realpath" 24 | s.gsub! "lib64", "lib" 25 | end 26 | 27 | system "./configure", "--prefix=#{prefix}", 28 | "--enable-sparse", 29 | "--with-colpack=#{HOMEBREW_PREFIX}" 30 | system "make install" 31 | system "make test" 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /scalapack.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Scalapack < Formula 4 | homepage 'http://www.netlib.org/scalapack/' 5 | url 'http://www.netlib.org/scalapack/scalapack-2.0.2.tgz' 6 | sha1 'ff9532120c2cffa79aef5e4c2f38777c6a1f3e6a' 7 | 8 | option 'test', 'Verify the build with make test' 9 | 10 | depends_on :mpi => [:cc, :f90] 11 | depends_on 'cmake' => :build 12 | depends_on 'openblas' => :recommended 13 | depends_on 'dotwrp' if build.without? 'openblas' 14 | depends_on :fortran 15 | 16 | def install 17 | if build.with? 'openblas' 18 | args = std_cmake_args + [ 19 | '-DBLAS_LIBRARIES=-lopenblas', 20 | '-DLAPACK_LIBRARIES=-lopenblas', 21 | ] 22 | else 23 | args = std_cmake_args + [ 24 | '-DBLAS_LIBRARIES=-ldotwrp -Wl,-framework -Wl,Accelerate', 25 | '-DLAPACK_LIBRARIES=-ldotwrp -Wl,-framework -Wl,Accelerate', 26 | ] 27 | end 28 | 29 | mkdir "build" do 30 | system 'cmake', '..', *args 31 | system 'make all' 32 | system 'make test' if build.include? 'test' 33 | system 'make install' 34 | end 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /dssp.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Dssp < Formula 4 | homepage 'http://swift.cmbi.ru.nl/gv/dssp/' 5 | url 'ftp://ftp.cmbi.ru.nl/pub/software/dssp/dssp-2.1.0.tgz' 6 | sha1 'ac943f49e2bdce73b3523434ec811857e50d82a2' 7 | 8 | depends_on 'boost' 9 | 10 | def install 11 | # Create a make.config file that contains the configuration for boost 12 | boost = Formula.factory('boost').opt_prefix 13 | File.open('make.config', 'w') do |makeconf| 14 | makeconf.puts "BOOST_LIB_SUFFIX = -mt" 15 | makeconf.puts "BOOST_LIB_DIR = #{boost / 'lib'}" 16 | makeconf.puts "BOOST_INC_DIR = #{boost / 'include'}" 17 | end 18 | 19 | # There is no need for the build to be static and static build causes 20 | # an error: ld: library not found for -lcrt0.o 21 | inreplace 'makefile' do |s| 22 | s.gsub! /-static/, '' 23 | end 24 | 25 | # The makefile ask for g++ as a compiler but that causes a error at link 26 | # time: ld: library not found for -lgcc_ext.10.5 27 | system "make", "install", "DEST_DIR=#{prefix}", "MAN_DIR=#{man1}", "CXX=c++" 28 | end 29 | 30 | test do 31 | system 'mkdssp --version' 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /vips.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Vips < Formula 4 | homepage 'http://www.vips.ecs.soton.ac.uk/' 5 | url 'http://www.vips.ecs.soton.ac.uk/supported/7.32/vips-7.32.1.tar.gz' 6 | sha1 'f07cb324c9695129d2de0c140943865dcb99268f' 7 | 8 | depends_on 'pkg-config' => :build 9 | depends_on :libpng 10 | depends_on :fontconfig 11 | depends_on 'gettext' 12 | depends_on 'glib' 13 | # Removed the optional flag to jpeg library as a temporary workaround since it fails to build 14 | # Already reported on project here https://github.com/jcupitt/libvips/issues/57 15 | depends_on 'jpeg' 16 | depends_on 'openslide' => :optional 17 | depends_on 'libtiff' => :optional 18 | depends_on 'imagemagick' => :optional 19 | depends_on 'fftw' => :optional 20 | depends_on 'little-cms' => :optional 21 | depends_on 'pango' => :optional 22 | depends_on 'libexif' => :optional 23 | depends_on 'liboil' => :optional 24 | depends_on 'openexr' => :optional 25 | depends_on 'cfitsio' => :optional 26 | 27 | def install 28 | system "./configure", "--disable-dependency-tracking", 29 | "--prefix=#{prefix}" 30 | system "make install" 31 | end 32 | end 33 | -------------------------------------------------------------------------------- /pmw.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Pmw < Formula 4 | homepage 'http://pmw.sourceforge.net' 5 | url 'http://downloads.sourceforge.net/project/pmw/Pmw/Pmw.1.3.3/Pmw.1.3.3.tar.gz' 6 | sha1 '0ff7f03245640da4f37a97167967de8d09e4c6a6' 7 | 8 | depends_on 'Tkinter' => :python 9 | 10 | devel do 11 | url 'http://downloads.sourceforge.net/project/pmw/Pmw2/Pmw.2.0.0-alpha/Pmw.2.0.0.tar.gz' 12 | sha1 '88cd160c32617a2da1b06d567710336156ac0a71' 13 | end 14 | 15 | def install 16 | # Pmw cannot be installed with pip because it is not in PyPI and 17 | # `pip install ${URL}` fails. This is probably because of the 18 | # strange directory tree, which puts everythin into a "src/" dir 19 | temp_site_packages = lib/which_python/'site-packages' 20 | mkdir_p temp_site_packages 21 | 22 | args = [ 23 | "build", 24 | "install", 25 | "--install-lib=#{temp_site_packages}", 26 | ] 27 | 28 | system "python", "-s", "setup.py", *args 29 | 30 | end 31 | 32 | def test 33 | system "python", "-c", "import Pmw" 34 | end 35 | 36 | def which_python 37 | "python" + `python -c 'import sys;print(sys.version[:3])'`.strip 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /mafft.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Mafft < Formula 4 | homepage 'http://mafft.cbrc.jp/alignment/software/index.html' 5 | url 'http://mafft.cbrc.jp/alignment/software/mafft-7.037-with-extensions-src.tgz' 6 | sha1 '9bfbd95873be90761e474c807de0527168a71b18' 7 | 8 | fails_with :clang do 9 | build 421 10 | cause <<-EOS.undent 11 | Clang does not allow default arguments in out-of-line definitions of 12 | class template members. 13 | EOS 14 | end 15 | 16 | def install 17 | cd 'core' do 18 | system "make", "CC=#{ENV.cc}", 19 | "CFLAGS=#{ENV.cflags}", 20 | "PREFIX=#{prefix}", 21 | "MANDIR=#{man1}", 22 | "install" 23 | end 24 | 25 | cd 'extensions' do 26 | system "make", "CC=#{ENV.cc}", 27 | "CXX=#{ENV.cxx}", 28 | "CXXFLAGS=#{ENV.cxxflags}", 29 | "CFLAGS=#{ENV.cflags}", 30 | "PREFIX=#{prefix}", 31 | "MANDIR=#{man1}", 32 | "install" 33 | end 34 | end 35 | 36 | def test 37 | system 'mafft --version 2>&1 |grep -q mafft' 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /hmmer.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Hmmer < Formula 4 | homepage 'http://hmmer.janelia.org/' 5 | url 'http://selab.janelia.org/software/hmmer3/3.0/hmmer-3.0.tar.gz' 6 | sha1 '77803c0bdb3ab07b7051a4c68c0564de31940c6d' 7 | 8 | head 'https://svn.janelia.org/eddylab/eddys/src/hmmer/trunk' 9 | 10 | devel do 11 | url 'http://selab.janelia.org/software/hmmer3/3.1b1/hmmer-3.1b1.tar.gz' 12 | sha1 'e05907d28b7f03d4817bb714ff0a8b2ef0210220' 13 | end 14 | 15 | depends_on :autoconf if build.head? 16 | 17 | def install 18 | system "autoconf" if build.head? 19 | system "./configure", "--prefix=#{prefix}" 20 | system "make" if build.devel? or build.head? 21 | system "make install" 22 | 23 | unless build.devel? or build.head? 24 | # Install man pages manually as long as automatic man page install 25 | # is deactivated in the HMMER 3.0 makefile. 26 | 27 | cd "documentation/man" do 28 | # rename all *.man files to *.1 and install them into man1 section 29 | Dir["*.man"].each do |f| 30 | man1.install f => f.sub(/\.man/, ".1") 31 | end 32 | end 33 | end 34 | end 35 | 36 | test do 37 | system "#{bin}/hmmsearch", "-h" 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /trnascan.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Trnascan < Formula 4 | homepage 'http://selab.janelia.org/tRNAscan-SE/' 5 | url 'http://selab.janelia.org/software/tRNAscan-SE/tRNAscan-SE.tar.Z' 6 | sha1 'fd2db5b1bb059dfdcf0fced1c865909da601d71f' 7 | version '1.23' 8 | 9 | def install 10 | inreplace 'makefile' do |s| 11 | s.change_make_var! 'CFLAGS', '-D_POSIX_C_SOURCE=1' 12 | s.change_make_var! 'LIBDIR', libexec 13 | s.change_make_var! 'BINDIR', bin 14 | end 15 | system 'make all' 16 | 17 | bin.install %w[coves-SE covels-SE eufindtRNA trnascan-1.4] 18 | bin.install 'tRNAscan-SE.src'.sub(/\.src/, '') 19 | 20 | (share/name).install Dir.glob('Demo/*.fa') 21 | (share/name).install 'testrun.ref' 22 | 23 | libexec.install Dir.glob('gcode.*') 24 | libexec.install Dir.glob('*.cm') 25 | libexec.install Dir.glob('*signal') 26 | 27 | File.rename('tRNAscan-SE.man','tRNAscan-SE.1') 28 | man1.install 'tRNAscan-SE.1' 29 | end 30 | 31 | test do 32 | system "tRNAscan-SE -d -y -o test.out #{share}/#{name}/F22B7.fa" 33 | if FileTest.exists? 'test.out' 34 | %x(diff test.out #{share}/#{name}/testrun.ref).empty? ? true : false 35 | else 36 | false 37 | end 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /cufflinks.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Cufflinks < Formula 4 | homepage 'http://cufflinks.cbcb.umd.edu/' 5 | url 'http://cufflinks.cbcb.umd.edu/downloads/cufflinks-2.1.1.tar.gz' 6 | sha1 '9c5bf3d3872e8dd358ba7d7407644ab2cbbfdcb6' 7 | 8 | depends_on 'boost' => :build 9 | depends_on 'samtools' => :build 10 | depends_on 'eigen' => :build 11 | 12 | fails_with :clang do 13 | build 425 14 | end 15 | 16 | def install 17 | ENV['EIGEN_CPPFLAGS'] = '-I'+Formula.factory('eigen').include/'eigen3' 18 | ENV.append 'LIBS', '-lboost_system-mt -lboost_thread-mt' 19 | cd 'src' do 20 | # Fixes 120 files redefining `foreach` that break building with boost 21 | # See http://seqanswers.com/forums/showthread.php?t=16637 22 | `for x in *.cpp *.h; do sed 's/foreach/for_each/' $x > x; mv x $x; done` 23 | inreplace 'common.h', 'for_each.hpp', 'foreach.hpp' 24 | end 25 | system "./configure", "--disable-debug", "--disable-dependency-tracking", 26 | "--prefix=#{prefix}", 27 | "--mandir=#{man}" 28 | system 'make' 29 | ENV.j1 30 | system 'make install' 31 | end 32 | 33 | test do 34 | system "#{bin}/cuffdiff 2>&1 |grep -q cuffdiff" 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /flann.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Flann < Formula 4 | homepage 'http://www.cs.ubc.ca/~mariusm/index.php/FLANN/FLANN' 5 | url 'http://people.cs.ubc.ca/~mariusm/uploads/FLANN/flann-1.8.4-src.zip' 6 | sha1 'e03d9d458757f70f6af1d330ff453e3621550a4f' 7 | 8 | option 'enable-python', 'Enable python bindings' 9 | option 'enable-matlab', 'Enable matlab/octave bindings' 10 | option 'with-examples', 'Build and install example binaries' 11 | 12 | depends_on 'cmake' => :build 13 | depends_on 'hdf5' 14 | 15 | depends_on 'octave' if build.include? 'enable-matlab' 16 | depends_on 'numpy' => :python if build.include? 'enable-python' 17 | 18 | def install 19 | args = std_cmake_args 20 | if build.include? 'enable-matlab' 21 | args << '-DBUILD_MATLAB_BINDINGS:BOOL=ON' 22 | else 23 | args << '-DBUILD_MATLAB_BINDINGS:BOOL=OFF' 24 | end 25 | 26 | if build.include? 'enable-python' 27 | args << '-DBUILD_PYTHON_BINDINGS:BOOL=ON' 28 | else 29 | args << '-DBUILD_PYTHON_BINDINGS:BOOL=OFF' 30 | end 31 | 32 | inreplace 'CMakeLists.txt', 'add_subdirectory( examples )', '' unless build.include? 'with-examples' 33 | 34 | mkdir 'build' do 35 | system 'cmake', '..', *args 36 | system 'make install' 37 | end 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /velvet.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Velvet < Formula 4 | homepage 'http://www.ebi.ac.uk/~zerbino/velvet/' 5 | url 'http://www.ebi.ac.uk/~zerbino/velvet/velvet_1.2.09.tgz' 6 | sha1 'e40d59806599ac06e4b13408205b8978427177d0' 7 | 8 | head 'https://github.com/dzerbino/velvet.git' 9 | 10 | def install 11 | inreplace 'Makefile' do |s| 12 | # recommended in Makefile for compiling on Mac OS X 13 | s.change_make_var! "CFLAGS", "-Wall -m64" 14 | end 15 | 16 | args = ["OPENMP=1", "LONGSEQUENCES=1"] 17 | if ENV['MAXKMERLENGTH'] 18 | args << ("MAXKMERLENGTH=" + ENV['MAXKMERLENGTH']) 19 | end 20 | 21 | system "make", "velveth", "velvetg", *args 22 | bin.install 'velveth', 'velvetg' 23 | 24 | # install additional contributed scripts 25 | (share/'velvet/contrib').install Dir['contrib/shuffleSequences_fasta/shuffleSequences_*'] 26 | end 27 | 28 | def caveats 29 | <<-EOS.undent 30 | If you want to build with a different kmer length, you can set 31 | MAXKMERLENGTH=X to a value (X) *before* you brew this formula. 32 | 33 | Some additional user contributed scripts are installed here: 34 | #{share}/velvet/contrib 35 | EOS 36 | end 37 | 38 | def test 39 | system "velveth --help" 40 | system "velvetg --help" 41 | end 42 | end 43 | -------------------------------------------------------------------------------- /blast.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Blast < Formula 4 | homepage 'http://blast.ncbi.nlm.nih.gov/' 5 | url 'ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.2.28/ncbi-blast-2.2.28+-src.tar.gz' 6 | version '2.2.28' 7 | sha1 '6941d2b83c410b2e2424266d8ee29ee7581c23d6' 8 | 9 | depends_on 'gnutls' => :optional 10 | 11 | option 'with-dll', "Create dynamic binaries instead of static" 12 | 13 | def patches 14 | # Support recent versions of gnutls 15 | 'http://www.ncbi.nlm.nih.gov/viewvc/v1/trunk/c%2B%2B/src/connect/ncbi_gnutls.c?view=patch&r1=57856&r2=57915' 16 | end 17 | 18 | def install 19 | args = ["--prefix=#{prefix}"] 20 | args << "--with-dll" if build.include? 'with-dll' 21 | 22 | cd 'c++' do 23 | system './configure', '--without-debug', '--with-mt', *args 24 | system "make" 25 | system "make install" 26 | end 27 | end 28 | 29 | def caveats; <<-EOS.undent 30 | Using the option '--with-dll' will create dynamic binaries instead of 31 | static. The NCBI Blast static installation is approximately 7 times larger 32 | than the dynamic. 33 | 34 | Static binaries should be used for speed if the executable requires 35 | fast startup time, such as if another program is frequently restarting 36 | the blast executables. 37 | EOS 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /amos.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Amos < Formula 4 | homepage 'http://sourceforge.net/apps/mediawiki/amos/index.php?title=AMOS' 5 | url 'http://downloads.sourceforge.net/project/amos/amos/3.1.0/amos-3.1.0.tar.gz' 6 | sha1 '28e799e37713594ba7147d300ecae6574beb14a4' 7 | 8 | depends_on 'blat' => :optional # for minimus2-blat 9 | depends_on 'boost' => :recommended # for Bambus 2 10 | depends_on 'mummer' => :recommended # for minimus2 11 | depends_on 'qt' => [:optional, 'with-qt3support'] # for AMOS GUIs 12 | depends_on 'Statistics::Descriptive' => [:perl, :recommended] 13 | 14 | def install 15 | ENV.deparallelize 16 | system "./configure", "--prefix=#{prefix}", 17 | "--with-Boost-dir=#{Formula.factory('boost').opt_prefix}", 18 | "--with-qmake-qt4=#{Formula.factory('qt').opt_prefix}/bin/qmake", 19 | "BLAT=#{Formula.factory('blat').opt_prefix}/bin/blat", 20 | "DELTAFILTER=#{Formula.factory('mummer').opt_prefix}/libexec/delta-filter", 21 | "SHOWCOORDS=#{Formula.factory('mummer').opt_prefix}/libexec/show-coords" 22 | system "make install" 23 | end 24 | 25 | def caveats; <<-EOS.undent 26 | The Perl modules have been installed in 27 | #{lib}/AMOS 28 | #{lib}/TIGR 29 | EOS 30 | end 31 | 32 | def test 33 | system "#{bin}/bank-transact -h" 34 | end 35 | end 36 | -------------------------------------------------------------------------------- /symphony.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Symphony < Formula 4 | homepage 'http://www.coin-or.org/projects/SYMPHONY.xml' 5 | url 'http://www.coin-or.org/download/source/SYMPHONY/SYMPHONY-5.3.3.tgz' 6 | sha1 'afc38ee5655b52fc3fa0a5854b5cc5a7f31618cc' 7 | 8 | option "enable-openmp", "Enable openmp support" 9 | option "with-gmpl", "GNU Modeling Language support via GLPK" 10 | 11 | def install 12 | args = ["--disable-debug", "--disable-dependency-tracking", 13 | "--enable-shared=no", # can't get shared libs to work 14 | "--enable-static-executable", 15 | "--prefix=#{prefix}"] 16 | 17 | if build.include? "with-gmpl" 18 | # Symphony uses a patched version of GLPK for reading MPL files. 19 | # Use a private version rather than require the Homebrew version of GLPK. 20 | cd 'ThirdParty/Glpk' do 21 | system "./get.Glpk" 22 | end 23 | 24 | ENV.append "CPPFLAGS", "-I#{buildpath}/ThirdParty/Glpk/glpk/src" 25 | ENV.append "CDEFS", "-DUSE_GLPMPL" 26 | args << "--with-gmpl" 27 | end 28 | 29 | if build.include? "enable-openmp" 30 | inreplace 'SYMPHONY/config', /^SYM_COMPILE_IN_LP = TRUE/, "SYM_COMPILE_IN_LP = FALSE" 31 | args << "--enable-openmp" 32 | end 33 | 34 | system "./configure", *args 35 | system "make" 36 | system "make install" 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /trinity.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Trinity < Formula 4 | homepage 'http://trinityrnaseq.sourceforge.net' 5 | version 'r2013-02-25' 6 | url 'http://downloads.sourceforge.net/trinityrnaseq/trinityrnaseq_r2013-02-25.tgz' 7 | sha1 '5fdb2682f861828750add2152154ec515e6e78c8' 8 | 9 | depends_on 'bowtie' 10 | 11 | fails_with :clang do 12 | build 425 13 | cause <<-EOS.undent 14 | clang does not support OpenMP, and including omp.h fails 15 | EOS 16 | end 17 | 18 | def install 19 | system "make" 20 | # The Makefile is designed to build in place, so we copy all of the needed 21 | # subdirectories to the prefix. 22 | prefix.install %w(Trinity.pl Inchworm Chrysalis Butterfly trinity-plugins util) 23 | 24 | # Trinity.pl (the main wrapper script) must remain in the prefix directory, 25 | # because it uses relative paths to the in-place build. So we create a 26 | # symlink in bin to put the wrapper in the user's path. 27 | mkdir_p bin 28 | ln_s prefix/'Trinity.pl', bin/'Trinity.pl' 29 | 30 | # Also install a small test case. 31 | (prefix + 'sample_data').install 'sample_data/test_Trinity_Assembly' 32 | end 33 | 34 | def test 35 | ohai "Testing Trinity assembly on a small data set (requires ~2GB of memory)" 36 | cd prefix/'sample_data/test_Trinity_Assembly' 37 | system "./runMe.sh" 38 | system "./cleanme.pl" 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /mira.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Mira < Formula 4 | homepage 'http://sourceforge.net/apps/mediawiki/mira-assembler/' 5 | url 'http://downloads.sourceforge.net/project/mira-assembler/MIRA/stable/mira-3.4.1.1.tar.gz' 6 | sha1 '86bcf87f88296df4c3cce1d871e99a5bc3ca1dfd' 7 | 8 | depends_on 'boost' 9 | depends_on 'google-perftools' 10 | depends_on 'docbook' 11 | # On Xcode-only systems, Mira's configure is unable to find expat 12 | depends_on 'expat' 13 | # FlexLexer.h is not in the 10.8 SDK (only in 10.7 SDK and in xctoolchain/usr/include) 14 | # Further, an ugly patch would be needed to work with OS X's flex (on 10.8) 15 | # http://www.freelists.org/post/mira_talk/Type-mismatch-of-LexerInput-and-LexerOutput-PATCH 16 | depends_on 'flex' 17 | 18 | def install 19 | system "./configure", "--disable-debug", 20 | "--disable-dependency-tracking", 21 | "--prefix=#{prefix}", 22 | "--with-expat=#{Formula.factory('expat').opt_prefix}", 23 | "--with-boost=#{Formula.factory('boost').opt_prefix}" 24 | # Link with boost_system for boost::system::system_category(). 25 | # http://www.freelists.org/post/mira_talk/Linking-requires-boost-system 26 | system "make LIBS=-lboost_system-mt install" 27 | end 28 | 29 | def test 30 | system "#{bin}/mira 2>&1 |grep -q MIRA" 31 | end 32 | end 33 | -------------------------------------------------------------------------------- /wcstools.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | # The wcstools-3.8.6 tarball seems to include a "Man" directory, and a 4 | # "man -> Man" symlink. On a typical cases-insensitive HFS+ Mac 5 | # volume this causes trouble. Tell "tar" not to extract the second 6 | # "man". 7 | class TarIgnoreDuplicates < CurlDownloadStrategy 8 | def stage 9 | safe_system '/usr/bin/tar', 'xkf', @tarball_path, '--exclude', '*/man' 10 | chdir 11 | end 12 | end 13 | 14 | class Wcstools < Formula 15 | homepage 'http://tdc-www.harvard.edu/wcstools/' 16 | url 'http://tdc-www.harvard.edu/software/wcstools/wcstools-3.8.6.tar.gz', :using => TarIgnoreDuplicates 17 | sha1 '2c42eb314d422ccd9c3f1999ac2642e9de480b4c' 18 | 19 | def install 20 | system "make all" 21 | # There doesn't seem to be a Makefile install target, so DIY. 22 | # Don't install the libwcs & libned includes directly in include/ 23 | # because the "fitsfile.h" (and maybe others) conflict with 24 | # cfitsio. 25 | #d = Dir['bin/*'].find_all{|item| item[-5,5] != '.dSYM'} 26 | #print d 27 | #print 28 | #bin.install d 29 | bin.install Dir['bin/*'].find_all{|item| item[-5,5] != '.dSYM'} 30 | (lib + 'libwcs').install 'libwcs/libwcs.a' 31 | (lib + 'libned').install 'libned/libned.a' 32 | (include + 'libwcs').install Dir['libwcs/*.h'] 33 | (include + 'libned').install Dir['libned/*.h'] 34 | man1.install Dir['man/man1/*'] 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /analysis.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Analysis < Formula 4 | homepage 'http://molpopgen.org/software/lseqsoftware.html' 5 | url 'http://molpopgen.org/software/analysis/analysis-0.8.3.tar.gz' 6 | sha1 '83bb4607de2d8a8e8b95ea119da21cf354c77cd5' 7 | 8 | depends_on "boost" 9 | depends_on "gsl" 10 | depends_on "libsequence" 11 | 12 | def patches 13 | # Automake looks for boost_regex, rather than boost_regex-mt 14 | DATA 15 | end 16 | 17 | def install 18 | system "./configure", "--prefix=#{prefix}" 19 | 20 | system "make" 21 | system "make install" 22 | end 23 | 24 | def test 25 | system 'gestimator 2>&1 |grep -q gestimator' 26 | end 27 | end 28 | 29 | 30 | __END__ 31 | --- analysis-0.8.3.orig/src/Makefile.am 32 | +++ analysis-0.8.3/src/Makefile.am 33 | @@ -77,7 +77,7 @@ 34 | GSL= 35 | endif 36 | 37 | -polydNdS_LDADD=-lboost_regex 38 | +polydNdS_LDADD=-lboost_regex-mt 39 | 40 | if HAVE_STRSTREAM 41 | STRSTREAM = -DHAVE_STRSTREAM 42 | 43 | --- analysis-0.8.3.orig/src/Makefile.in 44 | +++ analysis-0.8.3/src/Makefile.in 45 | @@ -330,7 +330,7 @@ 46 | @HAVE_GSL_HEADERS_TRUE@rsq_LDADD = -lgsl -lgslcblas 47 | @HAVE_GSL_HEADERS_FALSE@GSL = 48 | @HAVE_GSL_HEADERS_TRUE@GSL = -DHAVE_GSL 49 | -polydNdS_LDADD = -lboost_regex 50 | +polydNdS_LDADD = -lboost_regex-mt 51 | @HAVE_STRSTREAM_FALSE@STRSTREAM = 52 | @HAVE_STRSTREAM_TRUE@STRSTREAM = -DHAVE_STRSTREAM 53 | @HAVE_SSTREAM_FALSE@SSTREAM = 54 | -------------------------------------------------------------------------------- /openblas.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | # Avoid openblas downloading the LAPACK on demand. 4 | # We want openblas to build LAPACK because it knows how to patch LAPACK, 5 | # but *we* want to download, cache and checksum that! 6 | class OpenblasLapack < Formula 7 | url 'http://www.netlib.org/lapack/lapack-3.4.2.tgz' 8 | sha1 '93a6e4e6639aaf00571d53a580ddc415416e868b' 9 | end 10 | 11 | class Openblas < Formula 12 | homepage 'http://xianyi.github.io/OpenBLAS/' 13 | # Maintainers, remember to update the LAPACK url in OpenblasLapack above. 14 | # See the "LAPACK_URL" in the openblas Makefile for the right version. 15 | url 'https://github.com/xianyi/OpenBLAS/archive/v0.2.6.tar.gz' 16 | sha1 'f5c040660cb83630f9ac3e34a907889dcfac3415' 17 | head "https://github.com/xianyi/OpenBLAS.git", :branch => "develop" 18 | 19 | depends_on :fortran 20 | 21 | # OS X provides the Accelerate.framework, which is a BLAS/LAPACK impl. 22 | keg_only :provided_by_osx 23 | 24 | def install 25 | lapack = OpenblasLapack.new 26 | lapack.brew{} # download and checksum 27 | ohai "Using LAPACK: #{lapack.cached_download}" 28 | 29 | inreplace 'Makefile', 30 | 'LAPACK_URL=http://www.netlib.org/lapack/lapack-3.4.2.tgz', 31 | "LAPACK_URL=file://#{lapack.cached_download}" 32 | 33 | # Must call in two steps 34 | system "make", "FC=#{ENV['FC']}" 35 | system "make", "PREFIX=#{prefix}", "install" 36 | end 37 | end 38 | -------------------------------------------------------------------------------- /abyss.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Abyss < Formula 4 | homepage 'http://www.bcgsc.ca/platform/bioinfo/software/abyss' 5 | url 'http://www.bcgsc.ca/downloads/abyss/abyss-1.3.6.tar.gz' 6 | sha1 'ac5004972c90cedfb116b307dcf051fb30b7a102' 7 | head 'https://github.com/bcgsc/abyss.git' 8 | 9 | option 'disable-popcnt', 'do not use the POPCNT instruction' 10 | MAXK = [32, 64, 96, 128, 256] 11 | MAXK.each do |k| 12 | option "enable-maxk=#{k}", "set the maximum k-mer length to #{k}" 13 | end 14 | 15 | # Only header files are used from these packages, so :build is appropriate 16 | if build.head? 17 | depends_on :autoconf => :build 18 | depends_on :automake => :build 19 | depends_on 'multimarkdown' => :build 20 | end 21 | depends_on 'boost' => :build 22 | depends_on 'google-sparsehash' => :build 23 | depends_on :mpi => :cc 24 | 25 | # strip breaks the ability to read compressed files. 26 | skip_clean 'bin' 27 | 28 | def install 29 | system "./autogen.sh" if build.head? 30 | args = [ 31 | '--disable-dependency-tracking', 32 | "--prefix=#{prefix}"] 33 | args << '--disable-popcnt' if build.include? 'disable-popcnt' 34 | MAXK.each do |k| 35 | args << "--enable-maxk=#{k}" if build.include? "enable-maxk=#{k}" 36 | end 37 | system "./configure", *args 38 | system "make install" 39 | end 40 | 41 | def test 42 | system "#{bin}/ABYSS", "--version" 43 | end 44 | end 45 | -------------------------------------------------------------------------------- /samtools.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Dwgsim < Formula 4 | homepage 'http://sourceforge.net/apps/mediawiki/dnaa/index.php?title=Whole_Genome_Simulation' 5 | url 'http://downloads.sourceforge.net/project/dnaa/dwgsim/dwgsim-0.1.10.tar.gz' 6 | sha1 'f3127e84d54cdc52c9b5c988585358f69b4bb675' 7 | end 8 | 9 | class Samtools < Formula 10 | homepage 'http://samtools.sourceforge.net/' 11 | url 'http://downloads.sourceforge.net/project/samtools/samtools/0.1.19/samtools-0.1.19.tar.bz2' 12 | sha1 'ff3f4cf40612d4c2ad26e6fcbfa5f8af84cbe881' 13 | 14 | head 'https://github.com/samtools/samtools.git' 15 | 16 | option 'with-dwgsim', 'Build with "Whole Genome Simulation"' 17 | 18 | def install 19 | system "make" 20 | system "make razip" 21 | cd 'bcftools' do 22 | system "make" 23 | end 24 | 25 | if build.include? 'with-dwgsim' 26 | ohai "Building dwgsim" 27 | samtools = pwd 28 | Dwgsim.new.brew do 29 | system "ln -s #{samtools} samtools" 30 | system "make" 31 | bin.install %w{dwgsim dwgsim_eval} 32 | end 33 | end 34 | 35 | bin.install %w{samtools razip bcftools/bcftools bcftools/vcfutils.pl} 36 | bin.install %w{misc/maq2sam-long misc/maq2sam-short misc/md5fa misc/md5sum-lite misc/wgsim} 37 | bin.install Dir['misc/*.pl'] 38 | lib.install 'libbam.a' 39 | man1.install %w{samtools.1} 40 | (share+'samtools').install %w{examples} 41 | (include+'bam').install Dir['*.h'] 42 | end 43 | end 44 | -------------------------------------------------------------------------------- /phylip.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Phylip < Formula 4 | homepage 'http://evolution.genetics.washington.edu/phylip.html' 5 | url 'http://evolution.gs.washington.edu/phylip/download/phylip-3.695.tar.gz' 6 | sha1 '1505d1b3bb1378244e1733a6ecb173b3259c3d0f' 7 | 8 | depends_on :x11 9 | 10 | def install 11 | cd 'src' do 12 | system "make -f Makefile.unx all" 13 | system "make -f Makefile.unx put EXEDIR=#{bin}" 14 | # Perhaps one day the Mac apps will work (with cocoa) "make -f Makefile.osx apps" 15 | end 16 | 17 | # Remove installed fonts 18 | bin.cd do 19 | rm Dir['font*'] 20 | end 21 | 22 | (share/'phylip').install ['phylip.html', 'doc'] 23 | end 24 | 25 | def caveats 26 | <<-EOS.undent 27 | The documentation has been installed to #{HOMEBREW_PREFIX}/share/phylip/phylip.html. 28 | EOS 29 | end 30 | 31 | def test 32 | # From http://evolution.genetics.washington.edu/phylip/doc/pars.html 33 | mktemp do 34 | Pathname.new('infile').write <<-EOF.undent 35 | 7 6 36 | Alpha1 110110 37 | Alpha2 110110 38 | Beta1 110000 39 | Beta2 110000 40 | Gamma1 100110 41 | Delta 001001 42 | Epsilon 001110 43 | EOF 44 | Pathname.new('expected').write <<-EOF.undent 45 | (((Epsilon:0.00,Delta:3.00):2.00,Gamma1:0.00):1.00,(Beta2:0.00,Beta1:0.00):2.00,Alpha2:0.00,Alpha1:0.00); 46 | EOF 47 | system "echo 'Y' | #{bin}/pars" 48 | compare_file 'outtree', 'expected' 49 | end 50 | end 51 | end 52 | -------------------------------------------------------------------------------- /wcslib.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Wcslib < Formula 4 | homepage 'http://www.atnf.csiro.au/people/mcalabre/WCS/' 5 | url 'ftp://ftp.atnf.csiro.au/pub/software/wcslib/wcslib-4.19.tar.bz2' 6 | sha1 'b8703b59fa97fa7f7d8aff620b0bd695d613b766' 7 | 8 | option 'with-pgsbox', 'Build PGSBOX, a general curvilinear axis drawing routine for PGPLOT' 9 | option 'with-fortran', "Build Fortran wrappers. Needed for --with-pgsbox." 10 | option 'check', "Perform `make check`. Note, together --with-pgsbox it will display GUI" 11 | 12 | depends_on 'cfitsio' 13 | depends_on 'pgplot' if build.include? 'with-pgsbox' 14 | depends_on :x11 if build.include? 'with-pgsbox' 15 | depends_on :fortran if build.with? 'fortran' or build.with? 'pgsbox' 16 | 17 | def install 18 | args = [ "--disable-debug", 19 | "--disable-dependency-tracking", 20 | "--prefix=#{prefix}", 21 | "--with-cfitsiolib=#{Formula.factory('cfitsio').opt_prefix}/lib", 22 | "--with-cfitsioinc=#{Formula.factory('cfitsio').opt_prefix}/include" ] 23 | 24 | if build.include? 'with-pgsbox' 25 | args << "--with-pgplotlib=#{Formula.factory('pgplot').opt_prefix}/lib" 26 | args << "--with-pgplotinc=#{Formula.factory('pgplot').opt_prefix}/include" 27 | else 28 | args << "--without-pgplot" 29 | args << "--disable-fortran" unless build.with? 'fortran' 30 | end 31 | 32 | system "./configure", *args 33 | 34 | ENV.deparallelize 35 | system "make" 36 | system "make check" if build.include? 'check' 37 | system "make install" 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /velvetoptimiser.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Velvetoptimiser < Formula 4 | homepage 'http://bioinformatics.net.au/software.velvetoptimiser.shtml' 5 | url 'http://www.vicbioinformatics.com/VelvetOptimiser-2.2.5.tar.gz' 6 | sha1 '53015ecd9ca7669d35cc2fe47a2506354a017613' 7 | head 'https://github.com/Victorian-Bioinformatics-Consortium/VelvetOptimiser.git' 8 | 9 | depends_on 'velvet' 10 | depends_on 'Bio::Perl' => :perl 11 | 12 | def install 13 | bin.install 'VelvetOptimiser.pl' 14 | (lib / 'perl').install 'VelvetOpt' 15 | end 16 | 17 | # Fix shebang to use the perl found in PATH. 18 | # Remove GNU-specific flag --preserve-root passed to 'rm'. 19 | def patches 20 | DATA 21 | end 22 | 23 | def test 24 | system 'VelvetOptimiser.pl --version' 25 | end 26 | end 27 | 28 | __END__ 29 | --- VelvetOptimiser-2.2.5/VelvetOptimiser.pl 2012-10-22 22:18:23.000000000 -0400 30 | +++ VelvetOptimiser-2.2.5/VelvetOptimiser.pl.fixed 2013-04-09 12:42:19.000000000 -0400 31 | @@ -1,4 +1,4 @@ 32 | -#!/usr/bin/perl 33 | +#!/usr/bin/env perl 34 | # 35 | # VelvetOptimiser.pl 36 | # 37 | @@ -31,7 +31,7 @@ 38 | # 39 | use POSIX qw(strftime); 40 | use FindBin; 41 | -use lib "$FindBin::Bin"; 42 | +use lib "$FindBin::RealBin/../lib/perl"; 43 | use threads; 44 | use threads::shared; 45 | use VelvetOpt::Assembly; 46 | @@ -386,7 +386,7 @@ 47 | foreach my $key(keys %assemblies){ 48 | unless($key == $bestId){ 49 | my $dir = $assembliesObjs{$key}->{ass_dir}; 50 | - system('rm', '-r', '--preserve-root', $dir); 51 | + system('rm', '-r', $dir); 52 | } 53 | } 54 | unless ($finaldir eq "."){ 55 | -------------------------------------------------------------------------------- /gal-sim.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class GalSim < Formula 4 | homepage 'https://github.com/GalSim-developers/GalSim' 5 | url 'https://github.com/GalSim-developers/GalSim/zipball/v0.5' 6 | sha1 '3f71a354c3aa60f8cf9b45f04d6034b702cccccf' 7 | head 'https://github.com/GalSim-developers/GalSim.git' 8 | 9 | depends_on 'scons' => :build 10 | depends_on 'fftw' 11 | depends_on 'boost' 12 | depends_on 'tmv-cpp' 13 | 14 | # pyfits should come from pip 15 | depends_on 'pyfits' => :python 16 | depends_on 'numpy' => :python 17 | 18 | def install 19 | # This ought to be part of a standard homebrew install; 20 | # required so that homebrew creates symlinks 21 | # lib/pythonX.Y/galsim -> Cellar/gal-sim/0.2/lib/pythonX.Y/galsim 22 | # rather than 23 | # lib/pythonX.Y -> Cellar/gal-sim/0.2/lib/pythonX.Y 24 | pyver = '' 25 | IO.popen("python -c 'import sys; print sys.version[:3]'") {|pv_io| 26 | pyver = pv_io.read.strip 27 | } 28 | ohai "Python version is *#{pyver}*" 29 | mkdir_p "#{HOMEBREW_PREFIX}/lib/python#{pyver}" 30 | 31 | system "scons" 32 | system "scons install PREFIX=#{prefix} PYPREFIX=#{lib}/python#{pyver}" 33 | 34 | ohai "" 35 | ohai "The GalSim installer may warn you that #{lib}/python isn't in your python search path." 36 | ohai "You may want to add all Homebrew python packages to the default paths by running:" 37 | ohai " sudo bash -c 'echo \"/usr/local/lib/python\" >> \\\\" 38 | ohai " /Library/Python/#{pyver}/site-packages/homebrew.pth'" 39 | ohai "Which will create the file /Library/Python/#{pyver}/site-packages/homebrew.pth" 40 | ohai "with contents:" 41 | ohai " /usr/local/lib/python#{pyver}" 42 | ohai "" 43 | end 44 | end 45 | -------------------------------------------------------------------------------- /astrometry.net.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class AstrometryNet < Formula 4 | homepage 'http://astrometry.net' 5 | url 'http://astrometry.net/downloads/astrometry.net-0.43.tar.gz' 6 | sha1 'eef4cfe08b1366e9ee319cc9535a5657dec906d3' 7 | 8 | head 'http://astrometry.net/svn/trunk/src/astrometry', :using => :svn 9 | 10 | depends_on 'swig' => :build 11 | depends_on 'pkg-config' => :build 12 | depends_on 'wget' 13 | depends_on 'netpbm' 14 | depends_on 'cairo' 15 | depends_on 'jpeg' 16 | depends_on 'libpng' 17 | 18 | depends_on 'wcslib' 19 | 20 | # from pip 21 | depends_on 'pyfits' => :python 22 | depends_on 'numpy' => :python 23 | 24 | # this formula includes python bindings 25 | depends_on :python => :recommended 26 | 27 | option 'without-extras', "Don't try to build plotting code (actually it will still try, but homebrew won't halt the install if it fails)" 28 | option 'without-py', "Don't try to build python code" 29 | 30 | def install 31 | ENV['INSTALL_DIR'] = "#{prefix}" 32 | ENV['NETPBM_INC'] = "-I#{HOMEBREW_PREFIX}/include/netpbm" 33 | ENV['NETPBM_LIB'] = "-L#{HOMEBREW_PREFIX}/lib -lnetpbm" 34 | 35 | mkdir_p "#{HOMEBREW_PREFIX}/lib/python" 36 | # Argh, should make Astrometry.net install python to lib/python 37 | 38 | system "make" 39 | if not build.include? 'without-extras' 40 | system "make extra" 41 | end 42 | if not build.include? 'without-py' 43 | system "make py" 44 | end 45 | 46 | system "make install" 47 | 48 | if build.with? 'python': 49 | system "find #{prefix} > /tmp/1" 50 | system "mkdir -p #{prefix}/lib/python && mv #{prefix}/python #{prefix}/lib/" 51 | end 52 | 53 | end 54 | 55 | def test 56 | system "solve-field" 57 | end 58 | end 59 | -------------------------------------------------------------------------------- /suite-sparse.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class SuiteSparse < Formula 4 | homepage 'http://www.cise.ufl.edu/research/sparse/SuiteSparse' 5 | url 'http://www.cise.ufl.edu/research/sparse/SuiteSparse/SuiteSparse-4.2.1.tar.gz' 6 | sha1 '2fec3bf93314bd14cbb7470c0a2c294988096ed6' 7 | 8 | depends_on "tbb" => :recommended 9 | depends_on "openblas" => :optional 10 | # Metis is optional for now because of 11 | # cholmod_metis.c:164:21: error: use of undeclared identifier 'idxtype' 12 | depends_on "metis4" => :optional # metis 5.x is not yet supported by suite-sparse 13 | 14 | def install 15 | # SuiteSparse doesn't like to build in parallel 16 | ENV.j1 17 | 18 | # Switch to the Mac base config, per SuiteSparse README.txt 19 | system "mv SuiteSparse_config/SuiteSparse_config.mk SuiteSparse_config/SuiteSparse_config_orig.mk" 20 | system "mv SuiteSparse_config/SuiteSparse_config_Mac.mk SuiteSparse_config/SuiteSparse_config.mk" 21 | 22 | inreplace "SuiteSparse_config/SuiteSparse_config.mk" do |s| 23 | if build.include? 'with-openblas' 24 | s.change_make_var! "BLAS", "-lopenblas" 25 | s.change_make_var! "LAPACK", "$(BLAS)" 26 | end 27 | 28 | unless build.include? "without-tbb" 29 | s.change_make_var! "SPQR_CONFIG", "-DHAVE_TBB" 30 | s.change_make_var! "TBB", "-ltbb" 31 | end 32 | 33 | if build.include? "with-metis4" 34 | s.remove_make_var! "METIS_PATH" 35 | s.change_make_var! "METIS", Formula.factory("metis4").lib + "libmetis.a" 36 | end 37 | 38 | s.change_make_var! "INSTALL_LIB", lib 39 | s.change_make_var! "INSTALL_INCLUDE", include 40 | end 41 | 42 | system "make library" 43 | 44 | lib.mkpath 45 | include.mkpath 46 | system "make install" 47 | end 48 | end 49 | -------------------------------------------------------------------------------- /maxima.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Maxima < Formula 4 | homepage 'http://maxima.sourceforge.net/' 5 | url 'http://downloads.sourceforge.net/project/maxima/Maxima-source/5.28.0-source/maxima-5.28.0.tar.gz' 6 | sha1 '52d7dad4681711a6ead73b72835b177107363b9c' 7 | 8 | depends_on 'gettext' 9 | depends_on 'sbcl' 10 | depends_on 'gnuplot' 11 | depends_on 'rlwrap' 12 | 13 | # required for maxima help(), describe(), "?" and "??" lisp functionality 14 | skip_clean 'share/info' 15 | 16 | def patches 17 | # fixes 3468021: imaxima.el uses incorrect tmp directory on OS X: 18 | # https://sourceforge.net/tracker/?func=detail&aid=3468021&group_id=4933&atid=104933 19 | DATA 20 | end 21 | 22 | def install 23 | ENV.deparallelize 24 | system "./configure", "--disable-debug", "--disable-dependency-tracking", 25 | "--prefix=#{prefix}", 26 | "--enable-sbcl", 27 | "--enable-gettext" 28 | # Per build instructions 29 | ENV['LANG'] = 'C' 30 | system 'make' 31 | system 'make check' 32 | system 'make install' 33 | end 34 | 35 | def test 36 | system "#{bin}/maxima", "--batch-string='run_testsuite(); quit();'" 37 | end 38 | end 39 | 40 | __END__ 41 | diff --git a/interfaces/emacs/imaxima/imaxima.el b/interfaces/emacs/imaxima/imaxima.el 42 | index e3feaa6..3a52a0b 100644 43 | --- a/interfaces/emacs/imaxima/imaxima.el 44 | +++ b/interfaces/emacs/imaxima/imaxima.el 45 | @@ -296,6 +296,8 @@ nil means no scaling at all, t allows any scaling." 46 | (temp-directory)) 47 | ((eql system-type 'cygwin) 48 | "/tmp/") 49 | + ((eql system-type 'darwin) 50 | + "/tmp/") 51 | (t temporary-file-directory)) 52 | "*Directory used for temporary TeX and image files." 53 | :type '(directory) 54 | -------------------------------------------------------------------------------- /fann.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Fann < Formula 4 | homepage 'http://leenissen.dk/fann/wp/' 5 | url 'http://downloads.sourceforge.net/project/fann/fann/2.2.0/FANN-2.2.0-Source.tar.gz' 6 | sha1 'ff8341e4104bdbc0f3ab7ad39aef33285f8512d4' 7 | 8 | depends_on 'cmake' => :build 9 | option :universal 10 | 11 | def install 12 | ENV.universal_binary if build.universal? 13 | system "cmake", ".", *std_cmake_args 14 | system "make install" 15 | end 16 | 17 | test do 18 | (testpath/'xor.data').write <<-EOS.undent 19 | 4 2 1 20 | -1 -1 21 | -1 22 | -1 1 23 | 1 24 | 1 -1 25 | 1 26 | 1 1 27 | -1 28 | EOS 29 | 30 | (testpath/'test.c').write <<-EOS.undent 31 | #include "fann.h" 32 | int main() 33 | { 34 | const unsigned int num_input = 2; 35 | const unsigned int num_output = 1; 36 | const unsigned int num_layers = 3; 37 | const unsigned int num_neurons_hidden = 3; 38 | const float desired_error = (const float) 0.001; 39 | const unsigned int max_epochs = 500000; 40 | const unsigned int epochs_between_reports = 1000; 41 | struct fann *ann = fann_create_standard(num_layers, num_input, 42 | num_neurons_hidden, num_output); 43 | fann_set_activation_function_hidden(ann, FANN_SIGMOID_SYMMETRIC); 44 | fann_set_activation_function_output(ann, FANN_SIGMOID_SYMMETRIC); 45 | fann_train_on_file(ann, "xor.data", max_epochs, 46 | epochs_between_reports, desired_error); 47 | fann_save(ann, "xor_float.net"); 48 | fann_destroy(ann); 49 | return 0; 50 | } 51 | EOS 52 | system ENV.cc, "-o", "test", "test.c", "-lfann" 53 | system "./test" 54 | system "cat xor_float.net" 55 | end 56 | end 57 | -------------------------------------------------------------------------------- /qhull.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Qhull < Formula 4 | homepage 'http://www.qhull.org/' 5 | url 'http://www.qhull.org/download/qhull-2012.1-src.tgz' 6 | sha1 '60f61580e1d6fbbd28e6df2ff625c98d15b5fbc6' 7 | 8 | depends_on 'cmake' => :build 9 | 10 | def patches 11 | # Patch originally from MacPorts - cosmetic edits to CMakeLists.txt: 12 | # 13 | # * The VERSION property is no longer set on the command line tools. 14 | # Setting this property causes CMake to install `binname-version` along 15 | # with a symlink `binname` that points to `binname-version`. This is 16 | # pointless for something that is managed by a package manager. 17 | # https://trac.macports.org/export/83287/trunk/dports/math/qhull/files/patch-CMakeLists.txt.diff'} 18 | DATA 19 | end 20 | 21 | def install 22 | system "cmake", ".", *std_cmake_args 23 | system "make install" 24 | end 25 | end 26 | 27 | __END__ 28 | --- a/CMakeLists.txt 2012-02-21 19:38:47.000000000 -0800 29 | +++ b/CMakeLists.txt 2012-06-18 09:33:28.000000000 -0700 30 | @@ -312,13 +312,10 @@ 31 | # --------------------------------------- 32 | 33 | add_library(${qhull_STATIC} STATIC ${libqhull_SOURCES}) 34 | -set_target_properties(${qhull_STATIC} PROPERTIES 35 | - VERSION ${qhull_VERSION}) 36 | 37 | add_library(${qhull_STATICP} STATIC ${libqhull_SOURCES}) 38 | set_target_properties(${qhull_STATICP} PROPERTIES 39 | - COMPILE_DEFINITIONS "qh_QHpointer" 40 | - VERSION ${qhull_VERSION}) 41 | + COMPILE_DEFINITIONS "qh_QHpointer") 42 | 43 | if(UNIX) 44 | target_link_libraries(${qhull_STATIC} m) 45 | @@ -331,8 +328,7 @@ 46 | 47 | add_library(${qhull_CPP} STATIC ${libqhullcpp_SOURCES}) 48 | set_target_properties(${qhull_CPP} PROPERTIES 49 | - COMPILE_DEFINITIONS "qh_QHpointer" 50 | - VERSION ${qhull_VERSION}) 51 | + COMPILE_DEFINITIONS "qh_QHpointer") 52 | 53 | # --------------------------------------- 54 | # Define qhull executables linked to qhullstatic library 55 | -------------------------------------------------------------------------------- /trilinos.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Trilinos < Formula 4 | homepage 'http://trilinos.sandia.gov' 5 | url 'http://trilinos.sandia.gov/download/files/trilinos-11.0.3-Source.tar.gz' 6 | sha1 '375319eec8ae06845da126e3def72f13b59bf635' 7 | 8 | option "with-boost", "Enable Boost support" 9 | # We have build failures with scotch. Help us on this, if you can! 10 | # option "with-scotch", "Enable Scotch partitioner" 11 | option "with-netcdf", "Enable Netcdf support" 12 | option "with-teko", "Enable 'Teko' secondary-stable package" 13 | option "with-shylu", "Enable 'ShyLU' experimental package" 14 | 15 | depends_on :mpi => [:cc, :cxx] 16 | depends_on 'cmake' => :build 17 | depends_on 'boost' => :optional 18 | depends_on 'scotch' => :optional 19 | depends_on 'netcdf' => :optional 20 | 21 | def install 22 | 23 | args = std_cmake_args 24 | args << "-DBUILD_SHARED_LIBS=ON" 25 | args << "-DTPL_ENABLE_MPI:BOOL=ON" 26 | args << "-DTPL_ENABLE_BLAS=ON" 27 | args << "-DTPL_ENABLE_LAPACK=ON" 28 | args << "-DTPL_ENABLE_Zlib:BOOL=ON" 29 | args << "-DTrilinos_ENABLE_ALL_PACKAGES=ON" 30 | args << "-DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES=ON" 31 | args << "-DTrilinos_ENABLE_Fortran:BOOL=OFF" 32 | args << "-DTrilinos_ENABLE_EXAMPLES:BOOL=OFF" 33 | args << "-DTrilinos_VERBOSE_CONFIGURE:BOOL=OFF" 34 | args << "-DZoltan_ENABLE_ULLONG_IDS:Bool=ON" 35 | 36 | # Extra non-default packages 37 | args << "-DTrilinos_ENABLE_ShyLU:BOOL=ON" if build.with? 'shylu' 38 | args << "-DTrilinos_ENABLE_Teko:BOOL=ON" if build.with? 'teko' 39 | 40 | # Third-party libraries 41 | args << "-DTPL_ENABLE_Boost:BOOL=ON" if build.with? 'boost' 42 | args << "-DTPL_ENABLE_Scotch:BOOL=ON" if build.with? 'scotch' 43 | args << "-DTPL_ENABLE_Netcdf:BOOL=ON" if build.with? 'netcdf' 44 | 45 | mkdir 'build' do 46 | system "cmake", "..", *args 47 | system "make install" 48 | end 49 | 50 | end 51 | 52 | end 53 | -------------------------------------------------------------------------------- /mathgl.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Mathgl < Formula 4 | homepage 'http://mathgl.sourceforge.net/' 5 | url 'http://downloads.sourceforge.net/mathgl/mathgl-2.1.3.1.tar.gz' 6 | sha1 '09a2cacc146c77c69d007579fc787ec3fb5019a2' 7 | 8 | option 'fltk', 'Build the fltk widget and mglview using X11' 9 | option 'qt4', 'Build the Qt widget, the udav gui, and mglview using Qt4' 10 | option 'wx', 'Build the wxWidget widget' 11 | option 'gif', 'Build support for GIF' 12 | option 'hdf5', 'Build support for hdf5' 13 | 14 | depends_on 'cmake' => :build 15 | depends_on 'gsl' => :recommended 16 | depends_on 'jpeg' => :recommended 17 | depends_on 'libharu' => :recommended 18 | depends_on :libpng => :recommended 19 | depends_on 'hdf5' if build.include? 'hdf5' 20 | depends_on 'fltk' if build.include? 'fltk' 21 | depends_on 'qt' if build.include? 'qt4' 22 | depends_on 'wxmac' if build.include? 'wx' 23 | depends_on 'giflib' if build.include? 'gif' 24 | depends_on :x11 if build.include? 'fltk' 25 | 26 | def install 27 | args = std_cmake_args + %w[ 28 | -Denable-glut=ON 29 | -Denable-gsl=ON 30 | -Denable-jpeg=ON 31 | -Denable-pthread=ON 32 | -Denable-pdf=ON 33 | -Denable-python=OFF 34 | -Denable-octave=OFF 35 | ] 36 | 37 | args << '-Denable-qt=ON' if build.include? 'qt4' 38 | args << '-Denable-gif=ON' if build.include? 'gif' 39 | args << '-Denable-hdf5_18=ON' if build.include? 'hdf5' 40 | args << '-Denable-fltk=ON' if build.include? 'fltk' 41 | args << '-Denable-wx=ON' if build.include? 'wx' 42 | args << '..' 43 | rm 'ChangeLog' if File.exist? 'ChangeLog' # rm this problematic symlink. 44 | mkdir 'brewery' do 45 | system 'cmake', *args 46 | system 'make install' 47 | cd 'examples' do 48 | bin.install Dir['mgl*_example'] 49 | end 50 | end 51 | end 52 | 53 | test do 54 | system "#{bin}/mgl_example" 55 | end 56 | end 57 | -------------------------------------------------------------------------------- /mrbayes.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Mrbayes < Formula 4 | homepage 'http://mrbayes.sourceforge.net/' 5 | url 'http://downloads.sourceforge.net/project/mrbayes/mrbayes/3.2.2/mrbayes-3.2.2.tar.gz' 6 | sha1 '6f469f595a3dbd2f8394cb29bc70ca1773338ac8' 7 | 8 | head 'https://mrbayes.svn.sourceforge.net/svnroot/mrbayes/trunk/' 9 | 10 | option 'with-beagle', 'Build with BEAGLE library support' 11 | option 'with-mpi', 'Build with MPI parallel support' 12 | 13 | depends_on :autoconf => :build 14 | depends_on :automake => :build 15 | depends_on :mpi => [:cc, :optional] 16 | depends_on 'beagle' => :optional 17 | 18 | fails_with :llvm do 19 | build 2336 20 | cause "build hangs at calling `as`: http://sourceforge.net/tracker/index.php?func=detail&aid=3426528&group_id=129302&atid=714418" 21 | end 22 | 23 | def install 24 | args = ["--disable-debug", "--prefix=#{prefix}"] 25 | 26 | if build.with? 'beagle' 27 | args << "--with-beagle=#{Formula.factory('beagle').opt_prefix}" 28 | else 29 | args << "--with-beagle=no" 30 | end 31 | 32 | if build.include? 'with-mpi' 33 | # Open-mpi builds only with llvm-gcc due to a bug (see open-mpi formula) 34 | # therefore open-mpi attempts to run llvm-gcc instead of clang. 35 | # But MrBayes hangs with llvm-gcc! 36 | # https://sourceforge.net/tracker/index.php?func=detail&aid=3426528&group_id=129302&atid=714418 37 | ENV['OMPI_CC'] = ENV.cc 38 | args << "--enable-mpi=yes" 39 | end 40 | 41 | cd 'src' do 42 | system "autoconf" 43 | system "./configure", *args 44 | system "make" 45 | bin.install "mb" 46 | end 47 | 48 | # Doc and examples are not included in the svn 49 | (share/'mrbayes').install ['documentation', 'examples'] unless build.head? 50 | end 51 | 52 | def caveats 53 | unless build.head? 54 | <<-EOS.undent 55 | The documentation and examples are installed to 56 | #{HOMEBREW_PREFIX}/share/mrbayes 57 | EOS 58 | end 59 | end 60 | 61 | def test 62 | system "echo 'version' | #{bin}/mb" 63 | end 64 | end 65 | -------------------------------------------------------------------------------- /glimmer3.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Glimmer3 < Formula 4 | homepage 'http://ccb.jhu.edu/software/glimmer/index.shtml' 5 | url 'http://ccb.jhu.edu/software/glimmer/glimmer302b.tar.gz' 6 | version "3.02b" 7 | sha1 '665ed5c676c6d495e4354893e67ee605ec3e00da' 8 | 9 | depends_on "elph" 10 | 11 | def install 12 | cd 'src' do 13 | system 'make' 14 | end 15 | 16 | cd 'bin' do 17 | # Lots of binaries with kind of common names. We put these in 18 | # libexec and not in bin. The shell scripts (see below) 19 | # know how to call these, because we set the $glimmerpath. 20 | libexec.install %w[window-acgt start-codon-distrib long-orfs 21 | entropy-score build-fixed uncovered score-fixed glimmer3 22 | entropy-profile anomaly multi-extract extract build-icm] 23 | end 24 | 25 | Dir.glob('scripts/*.awk').each do |script| 26 | inreplace script, '/bin/awk', '/usr/bin/awk' 27 | libexec.install script 28 | end 29 | 30 | (share/"#{name}").install Dir.glob('sample-run/*.predict') 31 | (share/"#{name}").install 'sample-run/tpall.fna' 32 | 33 | inreplace 'scripts/g3-iterated.csh', '/nfshomes/adelcher', HOMEBREW_PREFIX 34 | inreplace 'scripts/g3-from-training.csh', '/nfshomes/adelcher', HOMEBREW_PREFIX 35 | 36 | Dir.glob('scripts/*.csh').each do |script| 37 | inreplace script, '/fs/szgenefinding/Glimmer3/scripts', libexec 38 | inreplace script, '/fs/szgenefinding/Glimmer3', HOMEBREW_PREFIX 39 | inreplace script, '$glimmerpath', libexec 40 | bin.install script 41 | end 42 | 43 | end 44 | 45 | def caveats 46 | <<-EOS.undent 47 | Glimmer3 is mostly used by calling the .csh scripts but if you need the 48 | supporting binaries, they are in 49 | #{libexec} 50 | EOS 51 | end 52 | 53 | test do 54 | system "g3-from-scratch.csh #{share}/#{name}/tpall.fna test" 55 | 56 | if FileTest.exists? 'test.predict' 57 | %x(diff test.predict #{share}/#{name}/from-scratch.predict).empty? ? true : false 58 | else 59 | false 60 | end 61 | end 62 | end 63 | -------------------------------------------------------------------------------- /kalign.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Kalign < Formula 4 | homepage 'http://msa.sbc.su.se/' 5 | url 'http://msa.sbc.su.se/downloads/kalign/kalign-2.04.tar.gz' 6 | sha1 '8bf4c1afe90e8d529840c0906c7b740299fe4041' 7 | 8 | def install 9 | # Hard coded prefix: 10 | inreplace "Makefile.in", "/usr/local/bin/", "#{bin}/" 11 | mkdir_p bin 12 | 13 | system "./configure", "--disable-debug", "--disable-dependency-tracking", 14 | "--prefix=#{prefix}" 15 | system "make" 16 | system "make install" 17 | end 18 | 19 | def test 20 | # Make sure kalign can to a simple fasta sequence alignment. 21 | input = <<-EOS.undent 22 | >E8S7Y8 23 | MNSPLTGTVALVAGATRGAGRQIAVQLGAAGATVYATGRTTRERRSEMDRPETIEETAELVTAAGGTGIAVAVDHLDPEQVRGLVERIDAEQGRL 24 | DVLVNDVWGADPLITWEKPVWEQPLDAGFRTLRLAVDTHIITSHFALPLLIRNPGGLVVEVGDGTKEHNDSEYRLSVFYDLAKVSVNRLGFSQAHELAPHGCTAVALTPG 25 | WLRSEAMLEHYGVTEANWRDAATTEPHFVMSETPAFVGRAVAALAADPDRARWNGQSLDSGGLSQVYGFTDVDGSRPHWARYYEEVVKPGKPADPDGYR 26 | >B1K8E8 27 | MATNLFDLTGKIALVTGASRGIGEEIAKLLAEQGAYVIVSSRKLDDCQAVADAIVAAGGRAEALACHVGRLEDIAATFEHIRGKHGRLDI 28 | LVNNAAANPYFGHILDTDLAAYEKTVDVNIRGYFFMSVEAGKLMKTHGGGAIVNTASVNALQPGDRQGIYSITKAAVVNMTKAFAKECGP 29 | LGIRVNALLPGLTKTKFAGALFADKDIYETWMTKIPLRRHAEPREMAGTVLYLVSDAASYTNGECIVVDGGLTI 30 | EOS 31 | output = `echo '#{input}' | #{bin}/kalign -f fasta 2>/dev/null` 32 | correct = <<-EOS.undent 33 | >E8S7Y8 34 | MNS---PLTGTVALVAGATRGAGRQIAVQLGAAGATVYATGRTTRERRSEMDRPETIEET 35 | AELVTAAGGTGIAVAVDHLDPEQVRGLVERIDAEQGRLDVLVNDVWGADPLITWEKPVWE 36 | QPLDAGFRTLRLAVDTHIITSHFALPLLIRNPGGLVVEVGDGTKEHNDSEYRLSV----- 37 | FYDLAKVSVNRLGFSQAHELAPHGCTAVALTPGWLRSE---AMLEHYGVTEANWRDAATT 38 | EPHFVMSETPAFVGRAVAALAADPDRARWNGQSLDSGGLSQVYGFTDVDGSRPHWARYYE 39 | EVVKPGKPADPDGYR 40 | >B1K8E8 41 | MATNLFDLTGKIALVTGASRGIGEEIAKLLAEQGAYVIVSSR----------KLDDCQAV 42 | ADAIVAAGGRAEALACHVGRLEDIAATFEHIRGKHGRLDILVNN--------AAANPYFG 43 | HILDTDLAAYEKTVDVN-IRGYFFMSV---EAGKLMKTHGGGAIVNTASVNALQPGDRQG 44 | IYSITKAAVVNMTKAFAKECGPLGIRVNALLPGLTKTKFAGALFADKDIYET-WMTKIPL 45 | RRH----AEPREMAGTVLYLVSDAASYTNGECIVVDGGLTI------------------- 46 | --------------- 47 | EOS 48 | output == correct 49 | end 50 | end 51 | -------------------------------------------------------------------------------- /spatialite-gis.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class SpatialiteGis < Formula 4 | homepage 'https://www.gaia-gis.it/fossil/spatialite_gis/index' 5 | url 'http://www.gaia-gis.it/gaia-sins/spatialite_gis-1.0.0c.tar.gz' 6 | sha1 '45508b27fbdc7166ef874ce3f79216d6c01f3c4f' 7 | 8 | depends_on 'libspatialite' 9 | depends_on 'librasterlite' 10 | depends_on 'libharu' 11 | depends_on 'wxmac' 12 | 13 | def patches 14 | { 15 | # Upstream fix for bad test of string equality. Remove on next release. 16 | :p0 => 'https://www.gaia-gis.it/fossil/spatialite_gis/vpatch?from=0506d89e65c692d7&to=0783daf1178ee1dc', 17 | # Allow `spatialite_gis` to run without being packaged as an .app bundle. 18 | :p1 => DATA 19 | } 20 | end 21 | 22 | def install 23 | # These libs don't get picked up by configure. 24 | ENV.append 'LDFLAGS', '-lwx_osx_cocoau_aui-2.9 -liconv' 25 | 26 | system "./configure", "--disable-dependency-tracking", 27 | "--prefix=#{prefix}" 28 | system "make install" 29 | end 30 | end 31 | 32 | __END__ 33 | Fix GUI so it can run without needing to construct an app bundle. 34 | 35 | diff --git a/Main.cpp b/Main.cpp 36 | index f90575e..2c6f7a3 100644 37 | --- a/Main.cpp 38 | +++ b/Main.cpp 39 | @@ -39,6 +39,12 @@ 40 | #include 41 | #include 42 | 43 | +#ifdef __WXMAC__ 44 | +// Allow the program to run and recieve focus without creating an app bundle. 45 | +#include 46 | +extern "C" { void CPSEnableForegroundOperation(ProcessSerialNumber* psn); } 47 | +#endif 48 | + 49 | // 50 | // ICONs in XPM format [universally portable] 51 | // 52 | @@ -87,6 +93,21 @@ IMPLEMENT_APP(MyApp) 53 | frame->Show(true); 54 | SetTopWindow(frame); 55 | frame->LoadConfig(path); 56 | + 57 | +#ifdef __WXMAC__ 58 | + // Acquire the necessary resources to run as a GUI app without being inside 59 | + // an app bundle. 60 | + // 61 | + // Credit for this hack goes to: 62 | + // 63 | + // http://www.miscdebris.net/blog/2010/03/30/solution-for-my-mac-os-x-gui-program-doesnt-get-focus-if-its-outside-an-application-bundle 64 | + ProcessSerialNumber psn; 65 | + 66 | + GetCurrentProcess( &psn ); 67 | + CPSEnableForegroundOperation( &psn ); 68 | + SetFrontProcess( &psn ); 69 | +#endif 70 | + 71 | return true; 72 | } 73 | 74 | -------------------------------------------------------------------------------- /opencv.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Opencv < Formula 4 | homepage 'http://opencv.org/' 5 | url 'http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/2.4.6.1/opencv-2.4.6.1.tar.gz' 6 | sha1 'e015bd67218844b38daf3cea8aab505b592a66c0' 7 | 8 | option '32-bit' 9 | option 'with-qt', 'Build the Qt4 backend to HighGUI' 10 | option 'with-tbb', 'Enable parallel code in OpenCV using Intel TBB' 11 | option 'without-opencl', 'Disable gpu code in OpenCV using OpenCL' 12 | 13 | depends_on 'cmake' => :build 14 | depends_on 'pkg-config' => :build 15 | depends_on 'numpy' => :python 16 | depends_on :python 17 | 18 | depends_on 'eigen' => :optional 19 | depends_on 'libtiff' => :optional 20 | depends_on 'jasper' => :optional 21 | depends_on 'tbb' => :optional 22 | depends_on 'qt' => :optional 23 | depends_on :libpng 24 | 25 | # Can also depend on ffmpeg, but this pulls in a lot of extra stuff that 26 | # you don't need unless you're doing video analysis, and some of it isn't 27 | # in Homebrew anyway. Will depend on openexr if it's installed. 28 | 29 | def install 30 | args = std_cmake_args + %W[ 31 | -DCMAKE_OSX_DEPLOYMENT_TARGET= 32 | -DWITH_CUDA=OFF 33 | -DBUILD_ZLIB=OFF 34 | -DBUILD_TIFF=OFF 35 | -DBUILD_PNG=OFF 36 | -DBUILD_JPEG=OFF 37 | -DBUILD_JASPER=OFF 38 | -DBUILD_TESTS=OFF 39 | -DBUILD_PERF_TESTS=OFF 40 | -DPYTHON_INCLUDE_DIR='#{python.incdir}' 41 | -DPYTHON_LIBRARY='#{python.libdir}/lib#{python.xy}.dylib' 42 | -DPYTHON_EXECUTABLE='#{python.binary}' 43 | ] 44 | 45 | if build.build_32_bit? 46 | args << "-DCMAKE_OSX_ARCHITECTURES=i386" 47 | args << "-DOPENCV_EXTRA_C_FLAGS='-arch i386 -m32'" 48 | args << "-DOPENCV_EXTRA_CXX_FLAGS='-arch i386 -m32'" 49 | end 50 | args << '-DWITH_QT=ON' if build.with? 'qt' 51 | args << '-DWITH_TBB=ON' if build.with? 'tbb' 52 | # OpenCL 1.1 is required, but Snow Leopard and older come with 1.0 53 | args << '-DWITH_OPENCL=OFF' if build.without? 'opencl' or MacOS.version < :lion 54 | 55 | args << '..' 56 | mkdir 'macbuild' do 57 | system 'cmake', *args 58 | system "make" 59 | system "make install" 60 | end 61 | end 62 | 63 | 64 | def caveats 65 | python.standard_caveats if python 66 | end 67 | end 68 | -------------------------------------------------------------------------------- /hopdm.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Hopdm < Formula 4 | homepage 'http://www.maths.ed.ac.uk/~gondzio/software/hopdm.html' 5 | url 'http://dl.dropbox.com/u/72178/dist/hopdm-2.13.tar.gz' 6 | sha1 '5d4df64f1a03251c0c22f9d292c26da2f2cea1eb' 7 | 8 | depends_on :fortran 9 | 10 | def patches 11 | DATA 12 | end 13 | 14 | def install 15 | inreplace 'makefile' do |s| 16 | s.remove_make_var! 'FC' 17 | s.change_make_var! 'LIBS', '-Wl,-framework -Wl,Accelerate' 18 | s.remove_make_var! 'FFLAGS' 19 | s.remove_make_var! 'LDFLAGS' 20 | s.remove_make_var! 'CC' 21 | s.remove_make_var! 'CFLAGS' 22 | s.remove_make_var! 'COBJS' 23 | end 24 | 25 | system 'make' 26 | bin.install 'hopdm' 27 | end 28 | end 29 | 30 | __END__ 31 | Patch to disable timing routines. 32 | 33 | diff --git a/mytime.f b/mytime.f 34 | index 55bdaaa..ce024fe 100644 35 | --- a/mytime.f 36 | +++ b/mytime.f 37 | @@ -25,17 +25,17 @@ C SECONDS to store the elapsed time. 38 | C 39 | C 40 | C Only for DOS 41 | - COMMON/IDTM/ IDATIM 42 | - INTEGER*4 IDATIM(9) 43 | +C COMMON/IDTM/ IDATIM 44 | +C INTEGER*4 IDATIM(9) 45 | C 46 | C Only for SUN UNIX 47 | - COMMON /TIME/ ELTIME 48 | - REAL ELTIME(3) 49 | +C COMMON /TIME/ ELTIME 50 | +C REAL ELTIME(3) 51 | C 52 | C Only for IBM UNIX 53 | - COMMON /TIMIBM/ T1,T2 54 | - DOUBLE PRECISION T1,T2 55 | - DOUBLE PRECISION SECONDS 56 | +C COMMON /TIMIBM/ T1,T2 57 | +C DOUBLE PRECISION T1,T2 58 | +C DOUBLE PRECISION SECONDS 59 | C 60 | C 61 | C *** PARAMETERS DESCRIPTION 62 | @@ -74,16 +74,16 @@ C 63 | C 64 | C Here for UNIX (IBM RISC6000 and Power PC workstations) 65 | C ------------------------------------------------------ 66 | - IF(JOB.EQ.0) THEN 67 | - call init_seconds() 68 | - T1 = seconds() 69 | - T2 = T1 70 | - ELSE 71 | - T2 = seconds() 72 | - ENDIF 73 | - WRITE(BUFFER,101) (T2 - T1) 74 | - 101 format(1X,'MYTIME: Elapsed user time:',F12.2) 75 | - CALL MYWRT(IOLOG,BUFFER) 76 | +C IF(JOB.EQ.0) THEN 77 | +C call init_seconds() 78 | +C T1 = seconds() 79 | +C T2 = T1 80 | +C ELSE 81 | +C T2 = seconds() 82 | +C ENDIF 83 | +C WRITE(BUFFER,101) (T2 - T1) 84 | +C 101 format(1X,'MYTIME: Elapsed user time:',F12.2) 85 | +C CALL MYWRT(IOLOG,BUFFER) 86 | C 87 | C 88 | C 89 | -------------------------------------------------------------------------------- /beagle.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class CudaRequirement < Requirement 4 | build true 5 | fatal true 6 | 7 | satisfy { which 'nvcc' } 8 | 9 | env do 10 | # Nvidia CUDA installs (externally) into this dir (hard-coded): 11 | ENV.append 'CFLAGS', "-F/Library/Frameworks" 12 | # # because nvcc has to be used 13 | ENV.append 'PATH', which('nvcc').dirname, ':' 14 | end 15 | 16 | def message 17 | <<-EOS.undent 18 | To use this formula with NVIDIA graphics cards you will need to 19 | download and install the CUDA drivers and tools from nvidia.com. 20 | 21 | https://developer.nvidia.com/cuda-downloads 22 | 23 | Select "Mac OS" as the Operating System and then select the 24 | 'Developer Drivers for MacOS' package. 25 | You will also need to download and install the 'CUDA Toolkit' package. 26 | 27 | The `nvcc` has to be in your PATH then (which is normally the case). 28 | 29 | EOS 30 | end 31 | end 32 | 33 | class Beagle < Formula 34 | homepage 'http://beagle-lib.googlecode.com/' 35 | head 'http://beagle-lib.googlecode.com/svn/trunk/' 36 | 37 | option 'with-opencl', "Build with OpenCL GPU/CPU acceleration" 38 | 39 | depends_on :autoconf => :build 40 | depends_on :automake => :build 41 | depends_on 'doxygen' => :build 42 | depends_on :libtool 43 | depends_on CudaRequirement => :optional 44 | 45 | def patches 46 | DATA 47 | end 48 | 49 | def install 50 | system "./autogen.sh" 51 | 52 | args = [ "--prefix=#{prefix}" ] 53 | args << "--enable-osx-leopard" if MacOS.version <= :leopard 54 | args << "--with-cuda=#{Pathname(which 'nvcc').dirname}" if build.with? 'cuda' 55 | args << "--enable-opencl" if build.with? 'opencl' 56 | 57 | system "./configure", *args 58 | 59 | # The JNI bindings cannot be built in parallel, else we get 60 | # "ld: library not found for -lhmsbeagle" 61 | # (https://github.com/Homebrew/homebrew-science/issues/67) 62 | ENV.deparallelize 63 | 64 | system "make" 65 | system "make install" 66 | # The tests seem to fail if --enable-opencl is provided 67 | system "make check" unless build.with? 'opencl' 68 | end 69 | end 70 | 71 | __END__ 72 | diff --git a/configure.ac b/configure.ac 73 | index eba488f..e7d7e36 100644 74 | --- a/configure.ac 75 | +++ b/configure.ac 76 | @@ -64,7 +64,7 @@ AM_DISABLE_STATIC 77 | AC_PROG_LIBTOOL 78 | AM_PROG_LIBTOOL 79 | 80 | -AM_CONFIG_HEADER(libhmsbeagle/config.h) 81 | +AC_CONFIG_HEADERS(libhmsbeagle/config.h) 82 | 83 | # needed to support old automake versions 84 | AC_SUBST(abs_top_builddir) 85 | -------------------------------------------------------------------------------- /shogun.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Shogun < Formula 4 | homepage 'http://www.shogun-toolbox.org' 5 | url 'http://shogun-toolbox.org/archives/shogun/releases/2.1/sources/shogun-2.1.0.tar.bz2' 6 | sha1 '706401267bfceedff981c7709be1098b18ffb031' 7 | 8 | option 'disable-svm-light', 'Disable SVM-light module, which is GPLv3 and makes all of shogun GPLv3' 9 | 10 | depends_on 'pkg-config' => :build 11 | depends_on 'hdf5' => :recommended 12 | depends_on 'json-c' => :recommended 13 | depends_on 'readline' => :recommended 14 | depends_on 'nlopt' => :recommended 15 | depends_on 'eigen' => :recommended 16 | depends_on 'glpk' => :recommended 17 | depends_on 'lzo' => :recommended 18 | depends_on 'snappy' => :recommended 19 | depends_on 'xz' => :recommended # provides lzma 20 | depends_on 'swig' => [:recommended, :build] # needef for dynamic python bindings 21 | depends_on 'numpy' => :python # You may want `brew tap samueljohn/python && brew install numpy` 22 | depends_on 'matplotlib' => :python # You may want `brew tap samueljohn/python && brew install matplotlib` 23 | depends_on 'r' => :optional 24 | depends_on 'lua' => :optional 25 | depends_on 'octave' => :optional 26 | 27 | # Todo: support additional deps: arpack, mosek, superlu, cplex, lpsolve 28 | # Help us by hacking on this and open a pull request! Thanks. 29 | def install 30 | pydir = "#{which_python}/site-packages" 31 | 32 | args = [ "--prefix=#{prefix}", 33 | "--pydir=#{pydir}", 34 | "--enable-hmm-parallel" ] 35 | args << "--disable-svm-light" if build.include? 'disable-svm-light' 36 | 37 | # Todo: with upcoming python support: --python=python.binary 38 | # Todo: if we have depends_on :python => :recommended, we can disable 39 | # swig, numpy and matplotlib deps if `--without-python`. 40 | 41 | unless MacOS::CLT.installed? 42 | # fix: "Checking for Mac OS vector library ... no" 43 | ["src/configure", "src/shogun/mathematics/lapack.h"].each do |f| 44 | inreplace f, "#include DATA} 16 | end 17 | 18 | def install 19 | inreplace 'Makefile' do |s| 20 | s.change_make_var! 'INSTALLDIR', prefix 21 | end 22 | 23 | bin.mkpath 24 | system "make install" 25 | end 26 | end 27 | __END__ 28 | Patch to remove Triangle dependencies (as those are handled by the Triangle 29 | formula), to enable NetCDF support and to sort out compiler flags. 30 | diff -u b/Makefile b/Makefile 31 | --- b/Makefile 32 | +++ b/Makefile 33 | @@ -10,20 +10,20 @@ 34 | # Uncomment the following 3 defines for netCDF support 35 | # adjust paths to suit local conditions 36 | # 37 | -#NETCDF = -DHAVE_NETCDF 38 | -#NETCDFINCLUDES = -I/usr/local/ace/netcdf/include 39 | -#NETCDFLIBS = -L/usr/local/ace/netcdf/lib -lnetcdf 40 | +NETCDFFLAGS=-DHAVE_NETCDF 41 | +NETCDFLIBS=-lnetcdf 42 | + 43 | +TRIANGLEFLAGS=-DDO_TRIANGLE 44 | +TRIAGLELIBS=-ltriangle 45 | 46 | ############################################ 47 | # LINUX 48 | -LIBS = -L/usr/X11R6/lib64 -lXm -lXp -lXt -lXext -lXpm -lX11 -lICE -lSM -lm 49 | -INCLUDES = -I/usr/X11R6/include 50 | -CC = gcc -g -O 51 | +LIBS=$(LDFLAGS) -lXm -lXp -lXt -lXext -lXpm -lX11 -lICE -lSM -lm $(NETCDFLIBS) $(TRIAGLELIBS) 52 | +CFLAGS+=$(NETCDFFLAGS) $(TRIANGLEFLAGS) 53 | 54 | ################# 55 | ####### End of configuration, no changes should be required below ######### 56 | ################# 57 | -CFLAGS = -DDO_TRIANGLE $(INCLUDES) 58 | 59 | OBJS = main.o\ 60 | vers.o\ 61 | @@ -75,7 +75,6 @@ 62 | params.o\ 63 | malerts.o\ 64 | motifutils.o\ 65 | - triangle.o\ 66 | tritest.o\ 67 | vedglist.o\ 68 | vgeometry.o\ 69 | @@ -140,7 +139,6 @@ 70 | params.c\ 71 | malerts.c\ 72 | motifutils.c\ 73 | - triangle.c\ 74 | tritest.c\ 75 | vedglist.c\ 76 | vgeometry.c\ 77 | @@ -173,21 +171,17 @@ 78 | patterns.h\ 79 | special.h\ 80 | graphics.h\ 81 | - triangle.h\ 82 | vdefines.h\ 83 | vdefs.h 84 | 85 | -all: xmgredit5 86 | +all: xmgredit 87 | 88 | -xmgredit5: $(OBJS) $(PARSOBJS) 89 | - $(CC) $(OBJS) $(PARSOBJS) -o xmgredit5 $(LIBS) 90 | +xmgredit: $(OBJS) $(PARSOBJS) 91 | + $(CC) $(CFLAGS) $(CPPFLAGS) $(OBJS) $(PARSOBJS) -o xmgredit $(LIBS) 92 | 93 | $(OBJS): defines.h globals.h 94 | eventproc.c: defines.h globals.h 95 | 96 | -triangle.o: 97 | - $(CC) -c -DTRILIBRARY triangle.c 98 | - 99 | pars.o: pars.y 100 | 101 | vers.o: $(SRCS) pars.y 102 | @@ -218,8 +212,8 @@ 103 | touch rcs 104 | grep Id: Makefile $(SRCS) $(INCS) $(PARSSRCS) > release.tmp 105 | 106 | -install: xmgredit5 107 | - cp -p xmgredit5 $(INSTALLDIR)/bin/xmgredit5 108 | +install: xmgredit 109 | + cp -p xmgredit $(INSTALLDIR)/bin/xmgredit 110 | 111 | lint: 112 | lint -axv -wk -Nn10000 -Nd10000 $(SRCS) $(PARSSRCS) 113 | @@ -230,3 +224,3 @@ 114 | clean: 115 | - /bin/rm *.o xmgredit5 116 | + /bin/rm *.o xmgredit 117 | 118 | -------------------------------------------------------------------------------- /mummer.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Mummer < Formula 4 | homepage 'http://mummer.sourceforge.net/' 5 | url 'https://downloads.sourceforge.net/project/mummer/mummer/3.23/MUMmer3.23.tar.gz' 6 | sha1 '69261ed80bb77e7595100f0560973fe1f810c5fa' 7 | 8 | def install 9 | 10 | inreplace 'scripts/Makefile', '$(CURDIR)', prefix 11 | 12 | system 'make' 13 | 14 | %w[dnadiff mummerplot nucmer promer mapview].each do |script| 15 | inreplace script, "use lib \"#{prefix}", "use lib \"#{share}/mummer" 16 | end 17 | 18 | inreplace 'promer' do |s| 19 | s.gsub! /BIN_DIR = "[^"]+/ , "BIN_DIR = \"#{libexec}" 20 | s.gsub! /AUX_BIN_DIR = "[^"]+/ , "AUX_BIN_DIR = \"#{libexec}" 21 | s.gsub! /SCRIPT_DIR = "[^"]+/ , "SCRIPT_DIR = \"#{share}/mummer" 22 | end 23 | 24 | inreplace 'nucmer' do |s| 25 | s.gsub! /BIN_DIR = "[^"]+/ , "BIN_DIR = \"#{libexec}" 26 | s.gsub! /AUX_BIN_DIR = "[^"]+/ , "AUX_BIN_DIR = \"#{libexec}" 27 | s.gsub! /SCRIPT_DIR = "[^"]+/ , "SCRIPT_DIR = \"#{share}/mummer" 28 | end 29 | 30 | inreplace 'dnadiff' do |s| 31 | s.gsub! /BIN_DIR = "[^"]+/ , "BIN_DIR = \"#{libexec}" 32 | s.gsub! /SCRIPT_DIR = "[^"]+/ , "SCRIPT_DIR = \"#{share}/mummer" 33 | end 34 | 35 | inreplace 'mummerplot' do |s| 36 | s.gsub! /BIN_DIR = "[^"]+/ , "BIN_DIR = \"#{libexec}" 37 | s.gsub! /SCRIPT_DIR = "[^"]+/ , "SCRIPT_DIR = \"#{share}/mummer" 38 | end 39 | 40 | inreplace 'exact-tandems' do |s| 41 | s.gsub! /bindir = \S+/ , "bindir = #{libexec}" 42 | s.gsub! /scriptdir = \S+/ , "scriptdir = #{libexec}" 43 | end 44 | 45 | inreplace 'run-mummer1' do |s| 46 | s.gsub! /bindir = \S+/ , "bindir = #{libexec}" 47 | end 48 | 49 | inreplace 'run-mummer3' do |s| 50 | s.gsub! /bindir = \S+/ , "bindir = #{libexec}" 51 | end 52 | 53 | %w[run-mummer1 run-mummer3 nucmer promer].each do |app| 54 | bin.install app 55 | end 56 | %w[show-diff repeat-match show-snps combineMUMs mgaps dnadiff 57 | show-tiling delta-filter exact-tandems show-coords mummer mummerplot 58 | mapview nucmer2xfig annotate gaps].each do |app| 59 | libexec.install app 60 | end 61 | libexec.install 'scripts/tandem-repeat.awk' 62 | 63 | # postnuc, postpro, prenuc, prepro 64 | Dir.glob('aux_bin/*').each do |script| 65 | libexec.install script 66 | end 67 | 68 | (share/'mummer').install 'scripts/Foundation.pm' 69 | 70 | end 71 | 72 | def caveats 73 | <<-EOS.undent 74 | show-diff, repeat-match, show-snps, combineMUMs, mgaps, dnadiff, show-tiling, 75 | delta-filter, exact-tandems, show-coords, mummer, mummerplot, mapview, nucmer2xfig, 76 | annotate, and gaps have been installed in #{libexec} 77 | EOS 78 | end 79 | 80 | def test 81 | %w[ nucmer promer run-mummer1 run-mummer3 ].each do |script| 82 | system "#{bin}/#{script} -h 2>&1 | grep -i USAGE | grep #{script}" 83 | end 84 | %w[ dnadiff mapview mummerplot show-diff repeat-match show-snps combineMUMs 85 | mgaps show-tiling delta-filter show-coords mummer mummerplot mapview].each do |script| 86 | system "#{libexec}/#{script} -h 2>&1 | grep -i USAGE | grep #{script}" 87 | end 88 | end 89 | 90 | end 91 | -------------------------------------------------------------------------------- /pymol.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Pymol < Formula 4 | homepage 'http://pymol.org' 5 | url 'http://downloads.sourceforge.net/project/pymol/pymol/1.6/pymol-v1.6.0.0.tar.bz2' 6 | sha1 '0446fd67ef22594eb5060ab07e69993c384b2e41' 7 | head 'https://pymol.svn.sourceforge.net/svnroot/pymol/trunk/pymol' 8 | 9 | depends_on "glew" 10 | depends_on 'Pmw' 11 | depends_on 'python' => 'with-brewed-tk' 12 | depends_on 'homebrew/dupes/tcl-tk' => ['enable-threads','with-x11'] 13 | depends_on :freetype 14 | depends_on :libpng 15 | depends_on :x11 16 | 17 | # To use external GUI tk must be built with --enable-threads 18 | # and python must be setup to use that version of tk with --with-brewed-tk 19 | depends_on 'Tkinter' => :python 20 | 21 | option 'default-stereo', 'Set stereo graphics as default' 22 | 23 | def install 24 | # PyMol uses ./ext as a backup to look for ./ext/include and ./ext/lib 25 | ln_s HOMEBREW_PREFIX, "./ext" 26 | 27 | temp_site_packages = lib/which_python/'site-packages' 28 | mkdir_p temp_site_packages 29 | ENV['PYTHONPATH'] = temp_site_packages 30 | 31 | args = [ 32 | "--verbose", 33 | "install", 34 | "--install-scripts=#{bin}", 35 | "--install-lib=#{temp_site_packages}", 36 | ] 37 | 38 | # build the pymol libraries 39 | system "python", "-s", "setup.py", *args 40 | 41 | # get the executable 42 | bin.install("pymol") 43 | end 44 | 45 | def patches 46 | p = [] 47 | # This patch adds checks that force mono as default 48 | p << 'https://gist.github.com/scicalculator/1b84b2ad3503395f1041/raw/2a85dc56b4bd1ea28d99ce0b94acbf7ac880deff/pymol_disable_stereo.diff' unless build.include? 'default-stereo' 49 | # This patch disables the vmd plugin. VMD is not something we can depend on for now. The plugin is set to always install as of revision 4019. 50 | p << 'https://gist.github.com/scicalculator/4966279/raw/9eb79bf5b6a36bd8f684bae46be2fcf834fea8de/pymol_disable_vmd_plugin.diff' 51 | p 52 | end 53 | 54 | def which_python 55 | "python" + `python -c 'import sys;print(sys.version[:3])'`.strip 56 | end 57 | 58 | def test 59 | # commandline test 60 | system "pymol","-c" 61 | # if build.include? "gui" 62 | # # serious bench test 63 | # system "pymol","-b","-d","quit" 64 | # end 65 | end 66 | 67 | def caveats 68 | <<-EOS.undent 69 | 70 | In order to get the most out of pymol, you will want the external 71 | gui. This requires a thread enabled tk installation and python 72 | linked to it. Install these with the following commands. 73 | brew tap homebrew/dupes 74 | brew install homebrew/dupes/tcl-tk --enable-threads --with-x11 75 | brew install python --with-brewed-tk 76 | 77 | On some macs, the graphics drivers do not properly support stereo 78 | graphics. This will cause visual glitches and shaking that stay 79 | visible until x11 is completely closed. This may even require 80 | restarting your computer. Therefore, we install pymol in a way that 81 | defaults to mono graphics. This is equivalent to running pymol with 82 | the "-M" option. You can still run in stereo mode by running 83 | pymol -S 84 | 85 | You can install pymol such that it defaults to stereo with the 86 | "--default-stereo" option. 87 | 88 | EOS 89 | end 90 | 91 | end 92 | -------------------------------------------------------------------------------- /hyphy.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Hyphy < Formula 4 | homepage 'http://www.hyphy.org/' 5 | url 'https://github.com/veg/hyphy/archive/2.2.tar.gz' 6 | sha1 '9ff285a71a51f4699947a162fe46c3eb3458425e' 7 | head 'https://github.com/veg/hyphy.git' 8 | 9 | option 'with-opencl', "Build a version with OpenCL GPU/CPU acceleration" 10 | option 'without-multi-threaded', "Don't build a multi-threaded version" 11 | option 'without-single-threaded', "Don't build a single-threaded version" 12 | 13 | depends_on 'cmake' => :build 14 | depends_on :mpi => :optional 15 | 16 | fails_with :clang do 17 | build 77 18 | cause "cmake gets passed the wrong flags" 19 | end 20 | 21 | def patches 22 | DATA # single-threaded builds 23 | end 24 | 25 | def install 26 | system "cmake", "-DINSTALL_PREFIX=#{prefix}", ".", *std_cmake_args 27 | system "make SP" unless build.without? "single-threaded" 28 | system "make MP2" unless build.without? "multi-threaded" 29 | system "make MPI" if build.with? :mpi 30 | system "make OCL" if build.with? "opencl" 31 | 32 | system "make install" 33 | (share/'hyphy').install('help') 34 | end 35 | 36 | def caveats; <<-EOS.undent 37 | The help has been installed to #{HOMEBREW_PREFIX}/share/hyphy. 38 | EOS 39 | end 40 | end 41 | 42 | __END__ 43 | diff --git a/CMakeLists.txt b/CMakeLists.txt 44 | index 76228a8..ee4bb80 100644 45 | --- a/CMakeLists.txt 46 | +++ b/CMakeLists.txt 47 | @@ -299,6 +299,23 @@ add_custom_target(MP2 DEPENDS HYPHYMP) 48 | 49 | 50 | #------------------------------------------------------------------------------- 51 | +# hyphy sp target 52 | +#------------------------------------------------------------------------------- 53 | +add_executable( 54 | + HYPHYSP 55 | + EXCLUDE_FROM_ALL 56 | + ${SRC_COMMON} ${SRC_UNIXMAIN} 57 | +) 58 | +target_link_libraries(HYPHYSP ${DEFAULT_LIBRARIES}) 59 | +install( 60 | + TARGETS HYPHYSP 61 | + RUNTIME DESTINATION bin 62 | + OPTIONAL 63 | +) 64 | +add_custom_target(SP DEPENDS HYPHYSP) 65 | + 66 | + 67 | +#------------------------------------------------------------------------------- 68 | # hyphy OpenCL target 69 | #------------------------------------------------------------------------------- 70 | find_package(OpenCL) 71 | @@ -546,7 +563,7 @@ endif((${QT4_FOUND})) 72 | #------------------------------------------------------------------------------- 73 | if(UNIX) 74 | set_property( 75 | - TARGET HYPHYMP hyphy_mp HYPHYGTEST HYPHYDEBUG 76 | + TARGET HYPHYMP hyphy_mp HYPHYGTEST HYPHYDEBUG HYPHYSP 77 | APPEND PROPERTY COMPILE_DEFINITIONS __UNIX__ 78 | ) 79 | endif(UNIX) 80 | @@ -557,7 +574,7 @@ set_property( 81 | ) 82 | 83 | set_property( 84 | - TARGET hyphy_mp HYPHYMP HYPHYGTEST HYPHYDEBUG 85 | + TARGET hyphy_mp HYPHYMP HYPHYGTEST HYPHYDEBUG HYPHYSP 86 | APPEND PROPERTY COMPILE_DEFINITIONS _HYPHY_LIBDIRECTORY_="${CMAKE_INSTALL_PREFIX}/lib/hyphy" 87 | ) 88 | 89 | @@ -567,6 +584,13 @@ set_property( 90 | ) 91 | 92 | set_target_properties( 93 | + HYPHYSP 94 | + PROPERTIES 95 | + COMPILE_FLAGS "${DEFAULT_COMPILE_FLAGS}" 96 | + LINK_FLAGS "${DEFAULT_LINK_FLAGS}" 97 | +) 98 | + 99 | +set_target_properties( 100 | hyphy_mp HYPHYMP 101 | PROPERTIES 102 | COMPILE_FLAGS "${DEFAULT_COMPILE_FLAGS} ${OpenMP_CXX_FLAGS}" 103 | 104 | -------------------------------------------------------------------------------- /octave.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Octave < Formula 4 | homepage 'http://www.gnu.org/software/octave/index.html' 5 | url 'http://ftpmirror.gnu.org/octave/octave-3.6.4.tar.bz2' 6 | mirror 'http://ftp.gnu.org/gnu/octave/octave-3.6.4.tar.bz2' 7 | sha1 '3cc9366b6dbbd336eaf90fe70ad16e63705d82c4' 8 | 9 | option 'without-fltk', 'Compile without fltk (disables native graphics)' 10 | option 'test', 'Run tests before installing' 11 | 12 | depends_on :fortran 13 | 14 | depends_on 'pkg-config' => :build 15 | depends_on 'gnu-sed' => :build 16 | depends_on 'texinfo' => :build # OS X's makeinfo won't work for this 17 | 18 | depends_on :x11 19 | depends_on 'fftw' 20 | # When building 64-bit binaries on Snow Leopard, there are naming issues with 21 | # the dot product functions in the BLAS library provided by Apple's 22 | # Accelerate framework. See the following thread for the gory details: 23 | # 24 | # http://www.macresearch.org/lapackblas-fortran-106 25 | # 26 | # We can work around the issues using dotwrp. 27 | depends_on 'dotwrp' if MacOS.version == :snow_leopard and MacOS.prefer_64_bit? 28 | # octave refuses to work with BSD readline, so it's either this or --disable-readline 29 | depends_on 'readline' 30 | depends_on 'curl' if MacOS.version == :leopard # Leopard's libcurl is too old 31 | 32 | # additional features 33 | depends_on 'suite-sparse' 34 | depends_on 'glpk' 35 | depends_on 'graphicsmagick' => :recommended 36 | depends_on 'hdf5' 37 | depends_on 'pcre' 38 | depends_on 'qhull' 39 | depends_on 'qrupdate' 40 | 41 | if build.include? 'without-fltk' 42 | # required for plotting if we don't have native graphics 43 | depends_on 'gnuplot' 44 | else 45 | depends_on 'fltk' 46 | end 47 | 48 | def blas_flags 49 | flags = [] 50 | flags << "-ldotwrp" if MacOS.version == :snow_leopard and MacOS.prefer_64_bit? 51 | # Cant use `-framework Accelerate` because `mkoctfile`, the tool used to 52 | # compile extension packages, can't parse `-framework` flags. 53 | flags << "-Wl,-framework,Accelerate" 54 | flags.join(" ") 55 | end 56 | 57 | def install 58 | ENV.m64 if MacOS.prefer_64_bit? 59 | ENV.append_to_cflags "-D_REENTRANT" 60 | 61 | args = [ 62 | "--disable-dependency-tracking", 63 | "--prefix=#{prefix}", 64 | "--with-blas=#{blas_flags}", 65 | # SuiteSparse-4.x.x fix, see http://savannah.gnu.org/bugs/?37031 66 | "--with-umfpack=-lumfpack -lsuitesparseconfig", 67 | ] 68 | args << "--without-framework-carbon" if MacOS.version >= :lion 69 | # avoid spurious 'invalid assignment to cs-list' erorrs on 32 bit installs: 70 | args << 'CXXFLAGS=-O0' unless MacOS.prefer_64_bit? 71 | 72 | system "./configure", *args 73 | system "make all" 74 | system "make check 2>&1 | tee make-check.log" if build.include? 'test' 75 | system "make install" 76 | 77 | prefix.install ["test/fntests.log", "make-check.log"] if build.include? 'test' 78 | end 79 | 80 | def caveats 81 | native_caveats = <<-EOS.undent 82 | Octave supports "native" plotting using OpenGL and FLTK. You can activate 83 | it for all future figures using the Octave command 84 | 85 | graphics_toolkit ("fltk") 86 | 87 | or for a specific figure handle h using 88 | 89 | graphics_toolkit (h, "fltk") 90 | 91 | Otherwise, gnuplot is still used by default, if available. 92 | EOS 93 | 94 | gnuplot_caveats = <<-EOS.undent 95 | When plotting with gnuplot, you should set "GNUTERM=x11" before running octave; 96 | if you are using Aquaterm, use "GNUTERM=aqua". 97 | EOS 98 | 99 | s = gnuplot_caveats 100 | s = native_caveats + s unless build.include? 'without-fltk' 101 | end 102 | end 103 | -------------------------------------------------------------------------------- /qgis.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class PyQtImportable < Requirement 4 | fatal true 5 | satisfy { quiet_system 'python', '-c', 'from PyQt4 import QtCore' } 6 | 7 | def message 8 | <<-EOS.undent 9 | Python could not import the PyQt4 module. This will cause the QGIS build to fail. 10 | The most common reason for this failure is that the PYTHONPATH needs to be adjusted. 11 | The pyqt caveats explain this adjustment and may be reviewed using: 12 | 13 | brew info pyqt 14 | EOS 15 | end 16 | end 17 | 18 | class Qgis < Formula 19 | homepage 'http://www.qgis.org' 20 | url 'http://qgis.org/downloads/qgis-1.8.0.tar.bz2' 21 | sha1 '99c0d716acbe0dd70ad0774242d01e9251c5a130' 22 | 23 | head 'https://github.com/qgis/Quantum-GIS.git', :branch => 'master' 24 | 25 | depends_on 'cmake' => :build 26 | depends_on :python 27 | depends_on PyQtImportable 28 | 29 | depends_on 'gsl' 30 | depends_on 'pyqt' 31 | depends_on 'qwt' 32 | depends_on 'expat' 33 | depends_on 'gdal' 34 | depends_on 'proj' 35 | depends_on 'spatialindex' 36 | depends_on 'bison' 37 | depends_on 'grass' => :optional 38 | depends_on 'gettext' if build.with? 'grass' 39 | depends_on 'postgis' => :optional 40 | 41 | def install 42 | # Set bundling level back to 0 (the default in all versions prior to 1.8.0) 43 | # so that no time and energy is wasted copying the Qt frameworks into QGIS. 44 | args = std_cmake_args.concat %W[ 45 | -DQWT_INCLUDE_DIR=#{Formula.factory('qwt').opt_prefix}/lib/qwt.framework/Headers/ 46 | -DQWT_LIBRARY=#{Formula.factory('qwt').opt_prefix}/lib/qwt.framework/qwt 47 | -DBISON_EXECUTABLE=#{Formula.factory('bison').opt_prefix}/bin/bison 48 | -DENABLE_TESTS=NO 49 | -DQGIS_MACAPP_BUNDLE=0 50 | -DQGIS_MACAPP_DEV_PREFIX='#{prefix}/Frameworks' 51 | -DQGIS_MACAPP_INSTALL_DEV=YES 52 | -DPYTHON_INCLUDE_DIR='#{python.incdir}' 53 | -DPYTHON_LIBRARY='#{python.libdir}/lib#{python.xy}.dylib' 54 | ] 55 | 56 | args << "-DGRASS_PREFIX='#{Formula.factory('grass').opt_prefix}'" if build.with? 'grass' 57 | 58 | # So that `libintl.h` can be found 59 | ENV.append 'CXXFLAGS', "-I'#{Formula.factory('gettext').opt_prefix}/include'" if build.with? 'grass' 60 | 61 | # Avoid ld: framework not found QtSql (https://github.com/Homebrew/homebrew-science/issues/23) 62 | ENV.append 'CXXFLAGS', "-F#{Formula.factory('qt').opt_prefix}/lib" 63 | 64 | Dir.mkdir 'build' 65 | python do 66 | Dir.chdir 'build' do 67 | system 'cmake', '..', *args 68 | system 'make install' 69 | end 70 | 71 | py_lib = lib/"#{python.xy}/site-packages" 72 | qgis_modules = prefix + 'QGIS.app/Contents/Resources/python/qgis' 73 | py_lib.mkpath 74 | ln_s qgis_modules, py_lib + 'qgis' 75 | 76 | # Create script to launch QGIS app 77 | (bin + 'qgis').write <<-EOS.undent 78 | #!/bin/sh 79 | # Ensure Python modules can be found when QGIS is running. 80 | env PATH='#{HOMEBREW_PREFIX}/bin':$PATH PYTHONPATH='#{HOMEBREW_PREFIX}/lib/#{python.xy}/site-packages':$PYTHONPATH\\ 81 | open #{prefix}/QGIS.app 82 | EOS 83 | end 84 | end 85 | 86 | def caveats 87 | s = <<-EOS.undent 88 | QGIS has been built as an application bundle. To make it easily available, a 89 | wrapper script has been written that launches the app with environment 90 | variables set so that Python modules will be functional: 91 | 92 | qgis 93 | 94 | You may also symlink QGIS.app into ~/Applications: 95 | brew linkapps 96 | mkdir -p #{ENV['HOME']}/.MacOSX 97 | defaults write #{ENV['HOME']}/.MacOSX/environment.plist PYTHONPATH -string "#{HOMEBREW_PREFIX}/lib/#{python.xy}/site-packages" 98 | 99 | You will need to log out and log in again to make environment.plist effective. 100 | 101 | EOS 102 | s += python.standard_caveats if python 103 | s 104 | end 105 | end 106 | -------------------------------------------------------------------------------- /vtk.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Vtk < Formula 4 | homepage 'http://www.vtk.org' 5 | url 'http://www.vtk.org/files/release/5.10/vtk-5.10.1.tar.gz' # update libdir below, too! 6 | sha1 'deb834f46b3f7fc3e122ddff45e2354d69d2adc3' 7 | 8 | head 'https://github.com/Kitware/VTK.git' 9 | 10 | depends_on 'cmake' => :build 11 | depends_on :x11 => :optional 12 | depends_on 'qt' => :optional 13 | depends_on :python => :recommended 14 | 15 | # If --with-qt and --with-python, then we automatically use PyQt, too! 16 | if build.with? 'qt' 17 | if build.with? 'python3' 18 | depends_on 'sip' => 'with-python3' # because python3 is optional for sip 19 | depends_on 'pyqt' => 'with-python3' # because python3 is optional for pyqt 20 | elsif build.with? 'python' 21 | depends_on 'sip' 22 | depends_on 'pyqt' 23 | end 24 | end 25 | 26 | option 'examples', 'Compile and install various examples' 27 | option 'qt-extern', 'Enable Qt4 extension via non-Homebrew external Qt4' 28 | option 'tcl', 'Enable Tcl wrapping of VTK classes' 29 | 30 | def patches 31 | # Fix bug in Wrapping/Python/setup_install_paths.py: http://vtk.org/Bug/view.php?id=13699 32 | DATA unless build.head? # fixed in head already 33 | end 34 | 35 | def install 36 | libdir = if build.head? then lib; else "#{lib}/vtk-5.10"; end 37 | 38 | args = std_cmake_args + %W[ 39 | -DVTK_REQUIRED_OBJCXX_FLAGS='' 40 | -DVTK_USE_CARBON=OFF 41 | -DVTK_USE_TK=OFF 42 | -DBUILD_TESTING=OFF 43 | -DBUILD_SHARED_LIBS=ON 44 | -DIOKit:FILEPATH=#{MacOS.sdk_path}/System/Library/Frameworks/IOKit.framework 45 | -DCMAKE_INSTALL_RPATH:STRING=#{libdir} 46 | -DCMAKE_INSTALL_NAME_DIR:STRING=#{libdir} 47 | ] 48 | 49 | args << '-DBUILD_EXAMPLES=' + ((build.include? 'examples') ? 'ON' : 'OFF') 50 | 51 | if build.with? 'qt' or build.include? 'qt-extern' 52 | args << '-DVTK_USE_GUISUPPORT=ON' 53 | args << '-DVTK_USE_QT=ON' 54 | args << '-DVTK_USE_QVTK=ON' 55 | end 56 | 57 | args << '-DVTK_WRAP_TCL=ON' if build.include? 'tcl' 58 | 59 | # Cocoa for everything except x11 60 | if build.with? 'x11' 61 | args << '-DVTK_USE_COCOA=OFF' 62 | args << '-DVTK_USE_X=ON' 63 | else 64 | args << '-DVTK_USE_COCOA=ON' 65 | end 66 | 67 | unless MacOS::CLT.installed? 68 | # We are facing an Xcode-only installation, and we have to keep 69 | # vtk from using its internal Tk headers (that differ from OSX's). 70 | args << "-DTK_INCLUDE_PATH:PATH=#{MacOS.sdk_path}/System/Library/Frameworks/Tk.framework/Headers" 71 | args << "-DTK_INTERNAL_PATH:PATH=#{MacOS.sdk_path}/System/Library/Frameworks/Tk.framework/Headers/tk-private" 72 | end 73 | 74 | mkdir 'build' do 75 | python do 76 | args << '-DVTK_WRAP_PYTHON=ON' 77 | # For Xcode-only systems, the headers of system's python are inside of Xcode: 78 | args << "-DPYTHON_INCLUDE_DIR='#{python.incdir}'" 79 | # Cmake picks up the system's python dylib, even if we have a brewed one: 80 | args << "-DPYTHON_LIBRARY='#{python.libdir}/lib#{python.xy}.dylib'" 81 | # Set the prefix for the python bindings to the Cellar 82 | args << "-DVTK_PYTHON_SETUP_ARGS:STRING='--prefix=#{prefix} --single-version-externally-managed --record=installed.txt'" 83 | if build.with? 'pyqt' 84 | args << '-DVTK_WRAP_PYTHON_SIP=ON' 85 | args << "-DSIP_PYQT_DIR='#{HOMEBREW_PREFIX}/share/sip#{python.if3then3}'" 86 | end 87 | # The make and make install have to be inside the python do loop 88 | # because the PYTHONPATH is defined by this block (and not outside) 89 | args << ".." 90 | system 'cmake', *args 91 | system 'make' 92 | system 'make install' 93 | end 94 | if not python then # no python bindings 95 | args << ".." 96 | system 'cmake', *args 97 | system 'make' 98 | system 'make install' 99 | end 100 | end 101 | 102 | (share+'vtk').install 'Examples' if build.include? 'examples' 103 | end 104 | 105 | def caveats 106 | s = '' 107 | s += python.standard_caveats if python 108 | s += <<-EOS.undent 109 | Even without the --with-qt option, you can display native VTK render windows 110 | from python. Alternatively, you can integrate the RenderWindowInteractor 111 | in PyQt, PySide, Tk or Wx at runtime. Read more: 112 | import vtk.qt4; help(vtk.qt4) or import vtk.wx; help(vtk.wx) 113 | 114 | EOS 115 | 116 | if build.include? 'examples' 117 | s += <<-EOS.undent 118 | 119 | The scripting examples are stored in #{HOMEBREW_PREFIX}/share/vtk 120 | 121 | EOS 122 | end 123 | return s.empty? ? nil : s 124 | end 125 | 126 | end 127 | 128 | __END__ 129 | diff --git a/Wrapping/Python/setup_install_paths.py b/Wrapping/Python/setup_install_paths.py 130 | index 00f48c8..014b906 100755 131 | --- a/Wrapping/Python/setup_install_paths.py 132 | +++ b/Wrapping/Python/setup_install_paths.py 133 | @@ -35,7 +35,7 @@ def get_install_path(command, *args): 134 | option, value = string.split(arg,"=") 135 | options[option] = value 136 | except ValueError: 137 | - options[option] = 1 138 | + options[arg] = 1 139 | 140 | # check for the prefix and exec_prefix 141 | try: 142 | -------------------------------------------------------------------------------- /openimageio.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class J2kp4files < Formula 4 | url 'http://pkgs.fedoraproject.org/repo/pkgs/openjpeg/j2kp4files_v1_5.zip/27780ed3254e6eb763ebd718a8ccc340/j2kp4files_v1_5.zip' 5 | sha1 'a90cad94abbe764918175db72b49df6d2f63704b' 6 | end 7 | 8 | class Tiffpic < Formula 9 | url 'ftp://ftp.remotesensing.org/pub/libtiff/pics-3.8.0.tar.gz' 10 | sha1 'f50e14335fd98f73c6a235d3ff4d83cf4767ab37' 11 | end 12 | 13 | class Bmpsuite < Formula 14 | url 'http://entropymine.com/jason/bmpsuite/bmpsuite.zip' 15 | sha1 '2e43ec4d8e6f628f71a554c327433914000db7ba' 16 | version '1.0.0' 17 | end 18 | 19 | class Tgautils < Formula 20 | url 'http://makseq.com/materials/lib/Code/FileFormats/BitMap/TARGA/TGAUTILS.ZIP' 21 | sha1 '0902c51e7b00ae70a460250f60d6adc41c8095df' 22 | version '1.0.0' 23 | end 24 | 25 | class OpenexrImages < Formula 26 | url 'http://download.savannah.nongnu.org/releases/openexr/openexr-images-1.5.0.tar.gz' 27 | sha1 '22bb1a3d37841a88647045353f732ceac652fd3f' 28 | end 29 | 30 | class OiioImages < Formula 31 | url 'https://github.com/OpenImageIO/oiio-images/tarball/9bf43561f5' 32 | sha1 '8f12a86098120fd10ceb294a0d3aa1c95a0d3f80' 33 | version '1.0.0' 34 | end 35 | 36 | 37 | class Openimageio < Formula 38 | homepage 'http://openimageio.org' 39 | url 'https://github.com/OpenImageIO/oiio/archive/Release-1.1.8.tar.gz' 40 | sha1 '14ce1bb9067e70717de3f8d72c56342fa378a1e6' 41 | 42 | head 'https://github.com/OpenImageIO/oiio.git' 43 | 44 | option 'with-tests', 'Dowload 95MB of test images and verify Oiio (~2 min)' 45 | 46 | depends_on 'cmake' => :build 47 | depends_on 'pkg-config' => :build 48 | depends_on 'opencolorio' 49 | depends_on 'ilmbase' 50 | depends_on 'openexr' 51 | depends_on 'boost' 52 | depends_on 'libtiff' 53 | depends_on 'jpeg' 54 | depends_on 'openjpeg' 55 | depends_on 'cfitsio' 56 | depends_on 'hdf5' => 'enable-cxx' 57 | depends_on 'field3d' 58 | depends_on 'webp' 59 | depends_on 'glew' 60 | depends_on 'qt' 61 | 62 | def install 63 | # Oiio is designed to have its testsuite images extracted one directory 64 | # above the source. That's not a safe place for HB. Do the opposite, 65 | # and move the entire source down into a subdirectory if --with-tests. 66 | if build.include? 'with-tests' then 67 | (buildpath+'localpub').install Dir['*'] 68 | chdir 'localpub' 69 | end 70 | 71 | j2k = Formula.factory('openjpeg').linked_keg.realpath 72 | ENV.append 'MY_CMAKE_FLAGS', "-Wno-dev" # stops a warning. 73 | ENV.append 'MY_CMAKE_FLAGS', "-DOPENJPEG_INCLUDE_DIR=#{j2k}/include/openjpeg-1.5" 74 | args = ["USE_TBB=1", "EMBEDPLUGINS=1"] 75 | 76 | 77 | python_prefix = `python-config --prefix`.strip 78 | # Python is actually a library. The libpythonX.Y.dylib points to this lib, too. 79 | if File.exist? "#{python_prefix}/Python" 80 | # Python was compiled with --framework: 81 | ENV.append 'MY_CMAKE_FLAGS', "-DPYTHON_LIBRARY='#{python_prefix}/Python'" 82 | ENV.append 'MY_CMAKE_FLAGS', "-DPYTHON_INCLUDE_DIR='#{python_prefix}/Headers'" 83 | else 84 | python_version = `python-config --libs`.match('-lpython(\d+\.\d+)').captures.at(0) 85 | python_lib = "#{python_prefix}/lib/libpython#{python_version}" 86 | ENV.append 'MY_CMAKE_FLAGS', "-DPYTHON_INCLUDE_DIR='#{python_prefix}/include/python#{python_version}'" 87 | if File.exists? "#{python_lib}.a" 88 | ENV.append 'MY_CMAKE_FLAGS', "-DPYTHON_LIBRARY='#{python_lib}.a'" 89 | else 90 | ENV.append 'MY_CMAKE_FLAGS', "-DPYTHON_LIBRARY='#{python_lib}.dylib'" 91 | end 92 | end 93 | 94 | # Download standardized test images if the user throws --with-tests. 95 | # 90% of the images are in tarballs, so they are cached normally. 96 | # The webp and fits images are loose. Curl them each install. 97 | if build.include? 'with-tests' then 98 | d = buildpath 99 | mkdir d+'webp-images' do 100 | curl "http://www.gstatic.com/webp/gallery/[1-5].webp", "-O" 101 | end 102 | mkdir d+'fits-images' 103 | mkdir d+'fits-images/pg93' do 104 | curl "http://www.cv.nrao.edu/fits/data/tests/pg93/tst000[1-3].fits", "-O" 105 | curl "http://www.cv.nrao.edu/fits/data/tests/pg93/tst000[5-9].fits", "-O" 106 | curl "http://www.cv.nrao.edu/fits/data/tests/pg93/tst0013.fits", "-O" 107 | end 108 | mkdir d+'fits-images/ftt4b' do 109 | curl "http://www.cv.nrao.edu/fits/data/tests/ftt4b/file00[1-3].fits", "-O" 110 | curl "http://www.cv.nrao.edu/fits/data/tests/ftt4b/file0{09,12}.fits", "-O" 111 | end 112 | J2kp4files.new.brew { (d+'j2kp4files_v1_5').install Dir['J2KP4files/*'] } 113 | Tiffpic.new.brew { (d+'libtiffpic').install Dir['*'] } 114 | Bmpsuite.new.brew { (d+'bmpsuite').install Dir['*'] } 115 | Tgautils.new.brew { (d+'TGAUTILS').install Dir['*'] } 116 | OpenexrImages.new.brew { (d+'openexr-images-1.5.0').install Dir['*'] } 117 | OiioImages.new('oiioimages').brew { (d+'oiio-images').install Dir['*'] } 118 | end 119 | 120 | # make is a shell wrapper for cmake crafted by the devs (who have Lion). 121 | system "make", *args 122 | system "make test" if build.include? 'with-tests' 123 | # There is no working make install in 1.1.6, devel or HEAD. 124 | Dir.chdir 'dist/macosx' do 125 | (lib + which_python ).install 'lib/python/site-packages' 126 | prefix.install %w[ bin include ] 127 | lib.install Dir[ 'lib/lib*' ] 128 | doc.install 'share/doc/openimageio/openimageio.pdf' 129 | prefix.install Dir['share/doc/openimageio/*'] 130 | end 131 | end 132 | 133 | def caveats; <<-EOS.undent 134 | If OpenImageIO is brewed using non-homebrew Python, then you need to amend 135 | your PYTHONPATH like so: 136 | export PYTHONPATH=#{HOMEBREW_PREFIX}/lib/#{which_python}/site-packages:$PYTHONPATH 137 | EOS 138 | end 139 | 140 | def which_python 141 | "python" + `python -c 'import sys;print(sys.version[:3])'`.strip 142 | end 143 | end 144 | -------------------------------------------------------------------------------- /lp_solve.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | def numpy_include_dir 4 | "#{`python -c "import numpy.distutils.misc_util as u; print(u.get_numpy_include_dirs())[0]"`.strip}" 5 | end 6 | 7 | class NumpyHasHeaders < Requirement 8 | def satisfied? 9 | not Dir["#{numpy_include_dir}/numpy/*.h"].empty? 10 | end 11 | 12 | def fatal? 13 | true 14 | end 15 | 16 | def message 17 | s = <<-EOS.undent 18 | Apple ships NumPy without the header files :-/ 19 | To fix this, do either of the following options: 20 | EOS 21 | unless MacOS::CLT.installed? 22 | s += " * Install the 'Command Line Tools for Xcode' via the Preferences in Xcode.\n" 23 | end 24 | s += " * `brew tap samueljohn/python` and `brew install numpy`\n" 25 | s += " * `pip install numpy`\n" 26 | s 27 | end 28 | end 29 | 30 | class LpSolvePython < Formula 31 | homepage 'http://lpsolve.sourceforge.net/5.5/Python.htm' 32 | url 'http://downloads.sourceforge.net/lpsolve/lp_solve_5.5.2.0_Python_source.tar.gz' 33 | sha1 '058cced6b6a27cc160c9c5054c6b94b0eae6d989' 34 | version '5.5.2.0' 35 | end 36 | 37 | class LpSolve < Formula 38 | homepage 'http://sourceforge.net/projects/lpsolve/' 39 | url 'http://downloads.sourceforge.net/lpsolve/lp_solve_5.5.2.0_source.tar.gz' 40 | version '5.5.2.0' # automatic version parser spits out "solve" as version 41 | sha1 'e2830053cf079839b9ce21662cbc886ac6d31c80' 42 | 43 | option 'python', 'Python extension to interface with lp_solve' 44 | depends_on 'numpy' => :python if build.include? 'python' 45 | depends_on NumpyHasHeaders.new if build.include? 'python' 46 | 47 | def patches 48 | # Prefer OS X's fast BLAS implementation (patch stolen from fink-project) 49 | DATA 50 | end 51 | 52 | def install 53 | # Thanks to superenv, we don't have to care if the ccc.osx build script 54 | # tells the compiler stupid things. And Xcode-only works like charm. 55 | 56 | # Clang on :snow_leopard does not ignore `-Wno-long-double` and errors out. 57 | ["configure", "configure.ac", "demo/ccc.osx", "lp_solve/ccc.osx", 58 | "lpsolve55/ccc.osx", "lpsolve55/cccLUSOL.osx"].each do |f| 59 | inreplace f, '-Wno-long-double', '' 60 | end if MacOS.version <= :snow_leopard 61 | 62 | cd 'lpsolve55' do 63 | system "sh ccc.osx # lpsolve55 library" 64 | lib.install Dir['./bin/osx64/*.a'] 65 | lib.install Dir['./bin/osx64/*.dylib'] 66 | end 67 | 68 | cd 'lp_solve' do 69 | system "sh ccc.osx # lp_solve executable" 70 | bin.install './bin/osx64/lp_solve' 71 | end 72 | 73 | # Note, the demo does not build with lpsolve55. Upstream issue. 74 | 75 | include.install Dir['*.h'] 76 | 77 | if build.include? 'python' then 78 | # In order to install into the Cellar, the dir must exist and be in the 79 | # PYTHONPATH. 80 | temp_site_packages = lib/which_python/'site-packages' 81 | mkdir_p temp_site_packages 82 | ENV['PYTHONPATH'] = temp_site_packages 83 | args = [ 84 | "--no-user-cfg", 85 | "install", 86 | "--force", 87 | "--verbose", 88 | "--install-scripts=#{share}/python", 89 | "--install-lib=#{temp_site_packages}", 90 | "--record=installed-files.txt" 91 | ] 92 | lp_solve_prefix = prefix 93 | LpSolvePython.new.brew do |b| 94 | cd 'extra/Python' do 95 | # On OS X malloc there is and 96 | inreplace "hash.c", "#include ", "#include " 97 | # We know where the lpsolve55 lib is... 98 | inreplace "setup.py", "LPSOLVE55 = '../../lpsolve55/bin/ux32'", "LPSOLVE55 = '#{lp_solve_prefix}/lib'" 99 | # Correct path to lpsolve's include dir and go the official way to find numpy include_dirs 100 | inreplace "setup.py", 101 | "include_dirs=['../..', NUMPYPATH],", 102 | "include_dirs=['#{lp_solve_prefix}/include', '#{numpy_include_dir}']," 103 | inreplace 'setup.py', "(NUMPY, '1')", "('NUMPY', '1')" 104 | # Even their version number is broken ... 105 | inreplace "setup.py", 'version = "5.5.0.9",', "version = '#{version}'," 106 | 107 | system "python", "setup.py", *args 108 | 109 | # Save the examples 110 | (lp_solve_prefix/'share/lp_solve').install Dir['ex*.py'] 111 | (lp_solve_prefix/'share/lp_solve').install 'lpdemo.py' 112 | (lp_solve_prefix/'share/lp_solve').install 'Python.htm' 113 | 114 | end 115 | end 116 | end 117 | end 118 | 119 | def which_python 120 | "python" + `python -c 'import sys;print(sys.version[:3])'`.strip 121 | end 122 | 123 | def caveats; <<-EOS.undent 124 | For non-homebrew Python, you need to amend your PYTHONPATH like so: 125 | export PYTHONPATH=#{HOMEBREW_PREFIX}/lib/#{which_python}/site-packages:$PYTHONPATH 126 | 127 | Python examples and doc are installed to #{HOMEBREW_PREFIX}/share/lp_solve. 128 | EOS 129 | end if build.include? 'python' 130 | 131 | test do 132 | input = <<-EOS.undent 133 | max: 143 x + 60 y; 134 | 135 | 120 x + 210 y <= 15000; 136 | 110 x + 30 y <= 4000; 137 | x + y <= 75; 138 | EOS 139 | (testpath/'input.lp').write(input) 140 | output = `#{bin}/lp_solve -S3 input.lp` 141 | #puts output 142 | match = output =~ /Value of objective function: 6315\.6250/ 143 | raise if match.nil? 144 | # if build.include? 'python' 145 | # system 'python', "#{HOMEBREW_PREFIX}/share/lp_solve/lpdemo.py" 146 | # end 147 | end 148 | end 149 | 150 | __END__ 151 | diff --git a/lp_lib.h b/lp_lib.h 152 | index 2ef654f..7b06ef8 100644 153 | --- a/lp_lib.h 154 | +++ b/lp_lib.h 155 | @@ -104,7 +104,7 @@ 156 | /* Specify use of the basic linear algebra subroutine library */ 157 | /* ------------------------------------------------------------------------- */ 158 | #define libBLAS 2 /* 0: No, 1: Internal, 2: External */ 159 | -#define libnameBLAS "myBLAS" 160 | +#define libnameBLAS "/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Versions/Current/libBLAS.dylib" 161 | 162 | 163 | /* Active inverse logic (default is optimized original etaPFI) */ 164 | -------------------------------------------------------------------------------- /lammps.rb: -------------------------------------------------------------------------------- 1 | require 'formula' 2 | 3 | class Lammps < Formula 4 | homepage 'http://lammps.sandia.gov' 5 | url 'http://lammps.sandia.gov/tars/lammps-14May13.tar.gz' 6 | sha1 '5e522e9e3d4a4cbbe80c01c36002489777fb65d8' 7 | # lammps releases are named after their release date. We transform it to 8 | # YYYY.MM.DD (year.month.day) so that we get a comparable version numbering (for brew outdated) 9 | version '2013.05.14' 10 | head 'http://git.icms.temple.edu/lammps-ro.git' 11 | 12 | # user-submitted packages not considered "standard" 13 | USER_PACKAGES= %W[ 14 | user-misc 15 | user-awpmd 16 | user-cg-cmm 17 | user-colvars 18 | user-eff 19 | user-molfile 20 | user-reaxc 21 | user-sph 22 | ] 23 | 24 | # could not get gpu or user-cuda to install (hardware problem?) 25 | # kim requires openkim software, which is not currently in homebrew. 26 | # user-atc would not install without mpi and then would not link to blas-lapack 27 | # user-omp requires gcc dependency (tricky). clang does not have OMP support, yet. 28 | DISABLED_PACKAGES = %W[ 29 | gpu 30 | kim 31 | user-omp 32 | ] 33 | DISABLED_USER_PACKAGES = %W[ 34 | user-atc 35 | user-cuda 36 | ] 37 | 38 | # setup user-packages as options 39 | USER_PACKAGES.each do |package| 40 | option "enable-#{package}", "Build lammps with the '#{package}' package" 41 | end 42 | 43 | # additional options 44 | option "with-mpi", "Build lammps with MPI support" 45 | 46 | depends_on 'fftw' 47 | depends_on 'jpeg' 48 | depends_on 'voro++' 49 | depends_on :mpi => [:cxx, :f90, :optional] 50 | depends_on :fortran 51 | 52 | def build_lib(comp, lmp_lib, opts={}) 53 | change_compiler_var = opts[:change_compiler_var] # a non-standard compiler name to replace 54 | prefix_make_var = opts[:prefix_make_var] || "" # prepended to makefile variable names 55 | 56 | cd "lib/"+lmp_lib do 57 | if comp == "FC" 58 | make_file = "Makefile.gfortran" # make file 59 | compiler_var = "F90" # replace compiler 60 | elsif comp == "CXX" 61 | make_file = "Makefile.g++" # make file 62 | compiler_var = "CC" # replace compiler 63 | elsif comp == "MPICXX" 64 | make_file = "Makefile.openmpi" # make file 65 | compiler_var = "CC" # replace compiler 66 | comp = "CXX" if not ENV["MPICXX"] 67 | end 68 | compiler_var = change_compiler_var if change_compiler_var 69 | 70 | # force compiler 71 | inreplace make_file do |s| 72 | s.change_make_var! compiler_var, ENV[comp] 73 | end 74 | 75 | system "make", "-f", make_file 76 | 77 | if File.exists? "Makefile.lammps" 78 | # empty it to reduce chance of conflicts 79 | inreplace "Makefile.lammps" do |s| 80 | s.change_make_var! prefix_make_var+lmp_lib+"_SYSINC", "" 81 | s.change_make_var! prefix_make_var+lmp_lib+"_SYSLIB", "" 82 | s.change_make_var! prefix_make_var+lmp_lib+"_SYSPATH", "" 83 | end 84 | end 85 | end 86 | end 87 | 88 | def install 89 | ENV.j1 # not parallel safe (some packages have race conditions :meam:) 90 | 91 | # make sure to optimize the installation 92 | ENV.append "CFLAGS","-O" 93 | ENV.append "LDFLAGS","-O" 94 | 95 | if build.include? "with-mpi" 96 | # Simplify by relying on the mpi compilers 97 | ENV["FC"] = ENV["MPIFC"] 98 | ENV["CXX"] = ENV["MPICXX"] 99 | end 100 | 101 | # build package libraries 102 | build_lib "FC", "reax" 103 | build_lib "FC", "meam" 104 | build_lib "CXX", "poems" 105 | build_lib "CXX", "colvars", :change_compiler_var => "CXX" if build.include? "enable-user-colvars" 106 | if build.include? "enable-user-awpmd" 107 | build_lib "MPICXX","awpmd", :prefix_make_var => "user-" 108 | ENV.append 'LDFLAGS', "-lblas -llapack" 109 | end 110 | 111 | # Assuming gfortran library 112 | ENV.append 'LDFLAGS', "-L#{Formula.factory('gfortran').opt_prefix}/gfortran/lib -lgfortran" 113 | 114 | # build the lammps program and library 115 | cd "src" do 116 | # setup the make file variabls for fftw, jpeg, and mpi 117 | inreplace "MAKE/Makefile.mac" do |s| 118 | # We will stick with "make mac" type and forget about 119 | # "make mac_mpi" because it has some unnecessary 120 | # settings. We get a nice clean slate with "mac" 121 | if build.include? "with-mpi" 122 | #-DOMPI_SKIP_MPICXX is to speed up c++ compilation 123 | s.change_make_var! "MPI_INC" , "-DOMPI_SKIP_MPICXX" 124 | s.change_make_var! "MPI_PATH" , "" 125 | s.change_make_var! "MPI_LIB" , "" 126 | end 127 | s.change_make_var! "CC" , ENV["CXX"] 128 | s.change_make_var! "LINK" , ENV["CXX"] 129 | 130 | # installing with FFTW and JPEG 131 | s.change_make_var! "FFT_INC" , "-DFFT_FFTW3 -I#{Formula.factory('fftw').opt_prefix}/include" 132 | s.change_make_var! "FFT_PATH" , "-L#{Formula.factory('fftw').opt_prefix}/lib" 133 | s.change_make_var! "FFT_LIB" , "-lfftw3" 134 | 135 | s.change_make_var! "JPG_INC" , "-DLAMMPS_JPEG -I#{Formula.factory('jpeg').opt_prefix}/include" 136 | s.change_make_var! "JPG_PATH" , "-L#{Formula.factory('jpeg').opt_prefix}/lib" 137 | s.change_make_var! "JPG_LIB" , "-ljpeg" 138 | 139 | s.change_make_var! "CCFLAGS" , ENV["CFLAGS"] 140 | s.change_make_var! "LIB" , ENV["LDFLAGS"] 141 | end 142 | 143 | inreplace "VORONOI/Makefile.lammps" do |s| 144 | s.change_make_var! "voronoi_SYSINC", "-I#{HOMEBREW_PREFIX}/include/voro++" 145 | end 146 | 147 | # setup standard packages 148 | system "make", "yes-standard" 149 | DISABLED_PACKAGES.each do |pkg| 150 | system "make", "no-" + pkg 151 | end 152 | 153 | # setup optional packages 154 | USER_PACKAGES.each do |pkg| 155 | system "make", "yes-" + pkg if build.include? "enable-" + pkg 156 | end 157 | 158 | unless build.include? "with-mpi" 159 | # build fake mpi library 160 | cd "STUBS" do 161 | system "make" 162 | end 163 | end 164 | 165 | system "make", "mac" 166 | mv "lmp_mac", "lammps" # rename it to make it easier to find 167 | 168 | # build the lammps library 169 | system "make", "makeshlib" 170 | system "make", "-f", "Makefile.shlib", "mac" 171 | 172 | # install them 173 | bin.install("lammps") 174 | lib.install("liblammps_mac.so") 175 | lib.install("liblammps.so") # this is just a soft-link to liblamps_mac.so 176 | 177 | end 178 | 179 | # get the python module 180 | cd "python" do 181 | temp_site_packages = lib/which_python/'site-packages' 182 | mkdir_p temp_site_packages 183 | ENV['PYTHONPATH'] = temp_site_packages 184 | 185 | system "python", "install.py", lib, temp_site_packages 186 | mv "examples", "python-examples" 187 | prefix.install("python-examples") 188 | end 189 | 190 | # install additional materials 191 | (share/'lammps').install(["doc", "potentials", "tools", "bench"]) 192 | end 193 | 194 | def which_python 195 | "python" + `python -c 'import sys;print(sys.version[:3])'`.strip 196 | end 197 | 198 | def test 199 | # to prevent log files, move them to a temporary directory 200 | mktemp do 201 | system "lammps","-in","#{HOMEBREW_PREFIX}/share/lammps/bench/in.lj" 202 | system "python","-c","from lammps import lammps ; lammps().file('#{HOMEBREW_PREFIX}/share/lammps/bench/in.lj')" 203 | end 204 | end 205 | 206 | def caveats 207 | <<-EOS.undent 208 | You should run a benchmark test or two. There are plenty available. 209 | 210 | cd #{HOMEBREW_PREFIX}/share/lammps/bench 211 | lammps -in in.lj 212 | # with mpi 213 | mpiexec -n 2 lammps -in in.lj 214 | 215 | The following directories could come in handy 216 | 217 | Documentation: 218 | #{HOMEBREW_PREFIX}/share/lammps/doc/Manual.html 219 | 220 | Potential files: 221 | #{HOMEBREW_PREFIX}/share/lammps/potentials 222 | 223 | Python examples: 224 | #{HOMEBREW_PREFIX}/share/lammps/python-examples 225 | 226 | Additional tools (may require manual installation): 227 | #{HOMEBREW_PREFIX}/share/lammps/tools 228 | 229 | To use the Python module with non-homebrew Python, you need to amend your 230 | PYTHONPATH like so: 231 | export PYTHONPATH=#{HOMEBREW_PREFIX}/lib/python2.7/site-packages:$PYTHONPATH 232 | 233 | EOS 234 | end 235 | 236 | # This fixes the python module to point to the absolute path of the lammps library 237 | # without this the module cannot find the library when homebrew is installed in a 238 | # custom directory. 239 | def patches 240 | DATA 241 | end 242 | end 243 | 244 | __END__ 245 | diff --git a/python/lammps.py b/python/lammps.py 246 | index c65e84c..b2b28a2 100644 247 | --- a/python/lammps.py 248 | +++ b/python/lammps.py 249 | @@ -23,8 +23,8 @@ class lammps: 250 | # if name = "g++", load liblammps_g++.so 251 | 252 | try: 253 | - if not name: self.lib = CDLL("liblammps.so",RTLD_GLOBAL) 254 | - else: self.lib = CDLL("liblammps_%s.so" % name,RTLD_GLOBAL) 255 | + if not name: self.lib = CDLL("HOMEBREW_PREFIX/lib/liblammps.so",RTLD_GLOBAL) 256 | + else: self.lib = CDLL("HOMEBREW_PREFIX/lib/liblammps_%s.so" % name,RTLD_GLOBAL) 257 | except: 258 | type,value,tb = sys.exc_info() 259 | traceback.print_exception(type,value,tb) 260 | --------------------------------------------------------------------------------