forked from ahmadia/homebrew-science
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathncbi-c++-toolkit.rb
71 lines (56 loc) · 3.2 KB
/
ncbi-c++-toolkit.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
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
class NcbiCxxToolkit < Formula
homepage "http://www.ncbi.nlm.nih.gov/toolkit/"
# tag "bioinformatics"
url "ftp://ftp.ncbi.nih.gov/toolbox/ncbi_tools++/CURRENT/ncbi_cxx--12_0_0.tar.gz"
sha256 "432d5c72cc02dad263f1b2f1ab875e04e60b1ded0c5537ed54e8095b50554d20"
bottle do
sha256 "4510dcbeabf2aed8abd3b72e9f17bad7384670e6fa2a3e60c1c08b8d1f7c88c9" => :yosemite
sha256 "b0fc4b35768876ab1ad2d5c08e911d5eb1cc179193d123fcbd52e7f48f1089c1" => :mavericks
sha256 "a2735fe595865420230f43284cdbbabfdda2cda5920af408c07aee4ff292bdf4" => :mountain_lion
end
head "http://anonsvn.ncbi.nlm.nih.gov/repos/v1/trunk/c++", :using => :svn
fails_with :gcc => "5" do
cause "5.1.0 is not fully supported."
end
# Files that conflict with blast, rmblast and sratoolkit.
CONFLICTS_BLAST = %w[bin/align_format_unit_test bin/bdbloader_unit_test bin/blast_format_unit_test bin/blast_formatter bin/blast_services_unit_test bin/blast_unit_test bin/blastdb_aliastool bin/blastdb_format_unit_test bin/blastdbcheck bin/blastdbcmd bin/blastdbcp bin/blastinput_unit_test bin/blastn bin/blastp bin/blastx bin/convert2blastmask bin/datatool bin/deltablast bin/dustmasker bin/gene_info_reader bin/gene_info_unit_test bin/legacy_blast.pl bin/makeblastdb bin/makembindex bin/makeprofiledb bin/project_tree_builder bin/psiblast bin/rpsblast bin/rpstblastn bin/seedtop bin/segmasker bin/seqdb_demo bin/seqdb_perf bin/seqdb_unit_test bin/tblastn bin/tblastx bin/update_blastdb.pl bin/windowmasker bin/windowmasker_2.2.22_adapter.py bin/writedb_unit_test]
CONFLICTS_RMBLAST = %w[bin/rmblastn]
CONFLICTS_SRATOOLKIT = %w[bin/abi-dump bin/abi-load bin/align-info bin/bam-load bin/cg-load bin/fastq-dump bin/fastq-load bin/helicos-load bin/illumina-dump bin/illumina-load bin/kar bin/kdbmeta bin/latf-load bin/prefetch bin/rcexplain bin/sff-dump bin/sff-load bin/sra-pileup bin/sra-sort bin/sra-stat bin/srapath bin/srf-load bin/test-sra bin/vdb-config bin/vdb-copy bin/vdb-decrypt bin/vdb-dump bin/vdb-encrypt bin/vdb-lock bin/vdb-passwd bin/vdb-unlock bin/vdb-validate]
CONFLICTS = CONFLICTS_BLAST + CONFLICTS_RMBLAST + CONFLICTS_SRATOOLKIT
# Fix error: static declaration of 'strndup' follows non-static declaration
patch :DATA
def install
# Fix error with clang. error: 'bits/c++config.h' file not found
ENV.libstdcxx
# Fix error: invalid conversion from 'BDB_CompareFunction'
ENV.append_to_cflags "-fpermissive"
system "./configure", "--prefix=#{prefix}"
system "make"
system "make", "install"
# Remove conflicting files.
cd prefix do
rm_f CONFLICTS
end
end
test do
system "#{bin}/agpconvert", "-help"
end
end
__END__
diff --git a/src/sra/sdk/interfaces/os/mac/os-native.h.orig b/src/sra/sdk/interfaces/os/mac/os-native.h
index b46ef96..8627766 100644
--- a/src/sra/sdk/interfaces/os/mac/os-native.h.orig
+++ b/src/sra/sdk/interfaces/os/mac/os-native.h
@@ -45,6 +45,7 @@ extern "C" {
*/
char *strdup ( const char *str );
+#if 0
static __inline__
char *strndup ( const char *str, size_t n )
{
@@ -63,6 +64,7 @@ char *strndup ( const char *str, size_t n )
return dupstr;
}
+#endif
/*--------------------------------------------------------------------------
* strchrnul - implemented inline here