diff options
| author | Trevor Wennblom | 2012-02-27 03:00:02 -0600 |
|---|---|---|
| committer | Adam Vandenberg | 2012-03-20 20:17:31 -0700 |
| commit | 63ccfa55496548d99d095c44552a763db599cf14 (patch) | |
| tree | f6bc9d86d28ea33c38b3ad23017d36ee7225d5a7 /Library/Formula | |
| parent | e503ae9f000c67118ef52e628d36efe06a287236 (diff) | |
| download | homebrew-63ccfa55496548d99d095c44552a763db599cf14.tar.bz2 | |
blast: add option for dynamic linking, support -Os
fixes to 2.2.25 acknowledged upstream by Aaron U. per email
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/blast.rb | 99 |
1 files changed, 98 insertions, 1 deletions
diff --git a/Library/Formula/blast.rb b/Library/Formula/blast.rb index ef5f40e6c..4efa5c6e6 100644 --- a/Library/Formula/blast.rb +++ b/Library/Formula/blast.rb @@ -6,11 +6,108 @@ class Blast < Formula version '2.2.25' md5 '01256b808e3af49a5087945b6a8c8293' + def options + [['--with-dll', "Create dynamic binaries instead of static"]] + end + + # fixes to 2.2.25 acknowledged upstream by Aaron U. per email + # inform configure about -Os + def patches + DATA + end + def install + # FIXME This should be replaced with fails_with_clang once available + if ENV.compiler == :clang + opoo "Formula will not build with Clang, using LLVM." + ENV.llvm + end + + args = ["--prefix=#{prefix}"] + args << "--with-dll" if ARGV.include? '--with-dll' + cd 'c++' do - system "./configure", "--prefix=#{prefix}" + 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 + |
