aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/blast.rb
blob: bc2227da15e15d3ea37ed081219b3dc2422d9bfc (plain)
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
require 'formula'

class Blast < Formula
  homepage 'http://blast.ncbi.nlm.nih.gov/'
  url 'ftp://ftp.ncbi.nih.gov/blast/executables/blast+/2.2.25/ncbi-blast-2.2.25+-src.tar.gz'
  version '2.2.25'
  md5 '01256b808e3af49a5087945b6a8c8293'

  fails_with :clang do
    build 421
  end

  option 'with-dll', "Create dynamic binaries instead of static"

  # fixes to 2.2.25 acknowledged upstream by Aaron U. per email
  # inform configure about -Os
  def patches
    DATA
  end

  def install
    args = ["--prefix=#{prefix}"]
    args << "--with-dll" if build.include? 'with-dll'

    cd 'c++' do
      system "./configure", *args
      system "make"
      system "make install"
    end
  end

  def caveats; <<-EOS.undent
    Using the option '--with-dll' will create dynamic binaries instead of
    static. NCBI Blast static binaries are approximately 28-times larger
    than dynamic binaries.

    Static binaries should be used for speed if the executable requires
    fast startup time, such as if another program is frequently restarting
    the blast executables.
    EOS
  end
end

__END__
---
 c++/src/build-system/configure |   24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/c++/src/build-system/configure b/c++/src/build-system/configure
index 2f467a2..a2d14c7 100755
--- a/c++/src/build-system/configure
+++ b/c++/src/build-system/configure
@@ -8538,29 +8538,29 @@ fi
 if test "$compiler" != "MSVC" ; then
    if test "$with_debug" = "no" ; then
       with_optimization=${with_optimization:="yes"}
-      CFLAGS=`  echo " $CFLAGS"   | sed 's/[ 	]-g[0-9]*//g'`
-      CXXFLAGS=`echo " $CXXFLAGS" | sed 's/[ 	]-g[0-9]*//g'`
-      LDFLAGS=` echo " $LDFLAGS"  | sed 's/[ 	]-g[0-9]*//g'`
+      CFLAGS=`  echo " $CFLAGS"   | sed 's/[ 	]-g[0-9s]*//g'`
+      CXXFLAGS=`echo " $CXXFLAGS" | sed 's/[ 	]-g[0-9s]*//g'`
+      LDFLAGS=` echo " $LDFLAGS"  | sed 's/[ 	]-g[0-9s]*//g'`
       CPPFLAGS="-DNDEBUG $CPPFLAGS"
    else
       with_optimization=${with_optimization:="no"}
-      if echo " $CFLAGS"   |grep -v >/dev/null '[ 	]-g[0-9]*' ; then
+      if echo " $CFLAGS"   |grep -v >/dev/null '[ 	]-g[0-9s]*' ; then
          CFLAGS="$CFLAGS -g"     ; fi
-      if echo " $CXXFLAGS" |grep -v >/dev/null '[ 	]-g[0-9]*' ; then
+      if echo " $CXXFLAGS" |grep -v >/dev/null '[ 	]-g[0-9s]*' ; then
          CXXFLAGS="$CXXFLAGS -g" ; fi
       if test "${with_tcheck=no}" = "no" ; then
          CPPFLAGS="-D_DEBUG $CPPFLAGS"
       else
          CPPFLAGS="-DNDEBUG $CPPFLAGS"
       fi
-      if echo " $LDFLAGS"  |grep -v >/dev/null '[ 	]-g[0-9]*' ;
+      if echo " $LDFLAGS"  |grep -v >/dev/null '[ 	]-g[0-9s]*' ;
          then LDFLAGS="$LDFLAGS -g" ; fi
       STRIP="@:"
    fi

-   NOPT_CFLAGS=`  echo " $CFLAGS"    | sed 's/[ 	]-x*O[0-9]*//g'`
-   NOPT_CXXFLAGS=`echo " $CXXFLAGS"  | sed 's/[ 	]-x*O[0-9]*//g'`
-   NOPT_LDFLAGS=` echo " $LDFLAGS"   | sed 's/[ 	]-x*O[0-9]*//g'`
+   NOPT_CFLAGS=`  echo " $CFLAGS"    | sed 's/[ 	]-x*O[0-9s]*//g'`
+   NOPT_CXXFLAGS=`echo " $CXXFLAGS"  | sed 's/[ 	]-x*O[0-9s]*//g'`
+   NOPT_LDFLAGS=` echo " $LDFLAGS"   | sed 's/[ 	]-x*O[0-9s]*//g'`
    if test "${with_tcheck-no}" != "no"; then
       # Suppress warnings when building with ICC.
       NOPT_CFLAGS="$NOPT_CFLAGS -O0"
@@ -8575,11 +8575,11 @@ if test "$compiler" != "MSVC" ; then
       FAST_CXXFLAGS="$CXXFLAGS"
       FAST_LDFLAGS="$LDFLAGS"
    else
-      if echo " $CFLAGS"   |grep -v >/dev/null '[ 	]-x*O[0-9]*' ; then
+      if echo " $CFLAGS"   |grep -v >/dev/null '[ 	]-x*O[0-9s]*' ; then
          CFLAGS="$CFLAGS -O" ; fi
-      if echo " $CXXFLAGS" |grep -v >/dev/null '[ 	]-x*O[0-9]*' ; then
+      if echo " $CXXFLAGS" |grep -v >/dev/null '[ 	]-x*O[0-9s]*' ; then
          CXXFLAGS="$CXXFLAGS -O" ; fi
-      if echo " $LDFLAGS"  |grep -v >/dev/null '[ 	]-x*O[0-9]*' ; then
+      if echo " $LDFLAGS"  |grep -v >/dev/null '[ 	]-x*O[0-9s]*' ; then
          LDFLAGS="$LDFLAGS -O" ; fi
       FAST_CFLAGS="$NOPT_CFLAGS $FAST_CFLAGS"
       FAST_CXXFLAGS="$NOPT_CXXFLAGS $FAST_CXXFLAGS"
--
1.7.9.2