forked from ahmadia/homebrew-science
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dssp.rb
33 lines (27 loc) · 1 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
require 'formula'
class Dssp < Formula
homepage 'http://swift.cmbi.ru.nl/gv/dssp/'
url 'ftp://ftp.cmbi.ru.nl/pub/software/dssp/dssp-2.1.0.tgz'
sha1 'ac943f49e2bdce73b3523434ec811857e50d82a2'
depends_on 'boost'
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' do |s|
s.gsub! /-static/, ''
end
# The makefile ask for g++ as a compiler but that causes a error at link
# time: ld: library not found for -lgcc_ext.10.5
system "make", "install", "DEST_DIR=#{prefix}", "MAN_DIR=#{man1}", "CXX=c++"
end
test do
system 'mkdssp --version'
end
end