forked from ahmadia/homebrew-science
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dssp.rb
40 lines (33 loc) · 1.43 KB
/
dssp.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
class Dssp < Formula
desc "Secondary structure assignments for the Protein Data Bank"
homepage "http://swift.cmbi.ru.nl/gv/dssp/"
url "https://mirrors.kernel.org/debian/pool/main/d/dssp/dssp_2.2.1.orig.tar.gz"
mirror "https://mirrors.ocf.berkeley.edu/debian/pool/main/d/dssp/dssp_2.2.1.orig.tar.gz"
sha256 "5fb5e7c085de16c05981e3a72869c8b082911a0b46e6dcc6dbd669c9f267e8e1"
revision 4
bottle :disable, "needs to be rebuilt with latest boost"
depends_on "boost"
resource "pdb" do
url "ftp://ftp.cmbi.ru.nl/pub/molbio/data/pdb_redo/zz/3zzz/3zzz_0cyc.pdb.gz"
sha256 "6ee5ab16972d8f3ae6c2f92fce789a40fecb1a6a8c0de42257b35fc7e9d82149"
end
def install
# Create a make.config file that contains the configuration for boost
boost = Formula["boost"].opt_prefix
File.open("make.config", "w") do |makeconf|
makeconf.puts "BOOST_LIB_SUFFIX = -mt"
makeconf.puts "BOOST_LIB_DIR = #{boost}/lib"
makeconf.puts "BOOST_INC_DIR = #{boost}/include"
end
# There is no need for the build to be static and static build causes
# an error: ld: library not found for -lcrt0.o
inreplace "makefile", "-static", ""
system "make", "install", "DEST_DIR=#{prefix}", "MAN_DIR=#{man1}"
end
test do
resource("pdb").stage do
system "mkdssp", "-i", "3zzz_0cyc.pdb", "-o", testpath/"test.dssp"
end
assert_match "POLYPYRIMIDINE TRACT BINDING PROTEIN RRM2", (testpath/"test.dssp").read
end
end