1 ## --Makefile.PL for Bioperl core module distribution--##
2 ## ----------------------------------------------------##
4 ##----------------------------------------------------
7 # Basically this is a standard Makefile with a hash of
8 # needed packages which are tested at the start
10 # If you want help with this Makefile get in touch with
11 # the developers by sending a message to bioperl-l@bioperl.org.
15 # All Bioperl dependencies on external modules are defined here
17 'HTTP::Request::Common' => '0.0/Part of the LWP package/GenBank+GenPept sequence retrieval, remote http Blast jobs/Bio::DB::*,Bio::Tools::Run::RemoteBlast',
18 'LWP::UserAgent' => '0.0/Part of the LWP package/GenBank+GenPept sequence retrieval, remote http Blast jobs/Bio::DB::*,Bio::Tools::Run::RemoteBlast',
19 'Ace' => '0.0/Aceperl/access of ACeDB database/Bio::DB::Ace',
20 'IO::Scalar' => '0.0/IO handle to read or write to a scalar/remote http Blast jobs/Bio::Tools::Blast::Run::Webblast',
21 'IO::String' => '0.0/IO handle to read or write to a string/GenBank+GenPept sequence retrieval, Variation code/Bio::DB::*,Bio::Variation::*,Bio::Tools::Blast::Run::Webblast, Bio::Index::Blast',
22 'XML::Parser' => '0.0/Parsing of XML documents/Bio::Variation code, GAME parser/Bio::SeqIO::game,Bio::Variation::*',
23 'XML::Writer' => '0.0/Parsing + writing of XML documents/Bio::Variation code, GAME parser/Bio::SeqIO::game,Bio::Variation::*',
24 'XML::Parser::PerlSAX' => '0.0/Parsing of XML documents/Bio::Variation code, GAME parser/Bio::SeqIO::game,Bio::Variation::*',
25 'XML::Twig' => '0.0/Available on CPAN/parsing of XML documents/Module Bio::Variation::IO::xml.pm',
26 'File::Temp' => '0.0/Temporary File creation/Bio::Root::IO uses if present/Bio::DB::WebDBSeqI, Bio::Seq::LargePrimarySeq',
27 'SOAP::Lite' => '0.0/SOAP protocol/XEMBL Services (also Bibliographic queries in Biblio::) /Bio::DB::XEMBLService',
28 'HTML::Parser' => '0.0/HTML parsing/HTML parsing of GDB page/Bio::DB::GDB',
29 'DBD::mysql' => '0.0/Mysql driver/loading and querying of Mysql-based GFF feature databases/Bio::DB::GFF',
30 'GD' => '1.3/Graphical Drawing Toolkit/Rendering Sequences and Features/Bio::Graphics',
31 'Text::Shellwords' => '0.0/Execute shell commands/test scripts/Bio::Graphics',
32 'Storable' => '0.0/Persistent object storage and retrieval/Storing sequence objects in local file cache/Bio::DB::FileCache',
33 'Graph::Directed' => '0.0/Generic Graph data stucture and algorithms/Ontology Engine implementation for the GO parser/Bio::Ontology::SimpleOntologyEngine',
34 # Bio::Microarray is not in core bioperl yet
35 # 'enum' => '0.0/C style enumerated types and bitmask flags in Perl/Bio::Microarray::Affymetrix::*',
37 # rare function let's not scare people
38 # 'srsperl.pm' => '0.0/Sequence Retrieval System (SRS) perl API/alternative way of retrieving sequences/Bio::LiveSeq::IO::SRS.pm'
43 my ($ver,$desc,$expl,$module) = split( /\// , $str);
44 if( !eval "require($name)") {
45 print "External Module $name, $desc,\n is not installed on this computer.\n The $module in Bioperl needs it for $expl\n\n";
53 # Generate sub testing package system
57 # make mini test targets for playing around with
60 opendir(DIR,"t") || warn "No test directory. Weird!";
61 @files = readdir(DIR);
64 foreach my $file (@files) {
65 $file =~ /(\w+)\.t/ || next;
67 $line = "test_$file :: pure_all\n\tPERL_DL_NONLAZY=1 \$(FULLPERL) -I\$(INST_ARCHLIB) -I\$(INST_LIB) -I\$(PERL_ARCHLIB) -I\$(PERL_LIB) -e \'use Test::Harness qw(&runtests \$\$verbose); \$\$verbose=\$(TEST_VERBOSE); runtests \@ARGV;\' t/$file.t\n";
70 $tset .= "$file \\\n";
73 $tline = join('',@tline);
74 $tline = "show_tests :\n\t\@echo \'type make test_<subtest> to run\'\n\t\@echo '$tset'\n$tline\n";
76 print STDERR "Generated sub tests. go make show_tests to see available subtests\n";
83 # Prompt user for BioDBGFF stuff
86 if( eval { require DBI } && grep {/mysql/} DBI->available_drivers) {
87 my $proceed = prompt("Do you want to run the BioDBGFF tests (requires a mysql database) y/n",'n');
88 if( $proceed =~ /^[yY]/) {
89 my $cfg = {dbd_driver => 'mysql'};
90 GFFQueryDb($cfg,{'prompt'=>1,'verbose'=>1});
91 if (open T,">t/do_biodbgff.tests") {
92 foreach (keys %$cfg) {
93 print T $_,"\t",$cfg->{$_},"\n";
98 if( -e "t/do_biodbgff.tests" ) {
99 unlink "t/do_biodbgff.tests";
105 ############################################################################
109 # Purpose: Query user for settings for running the Bio::DB::GFF test suite
111 # Inputs: $cfg - Config hash ref
113 # Returns: Nothing; creates
114 # $cfg->{$driver}->{test_(db|host|dsn|user|pass)}
116 ############################################################################
120 my $options = shift || {};
121 my $db = $cfg->{'description'} || $cfg->{'dbd_driver'};
122 my $driver = $cfg->{'dbd_driver'};
125 my $prompt = $options->{'prompt'};
127 my $test_db = exists($options->{"$d-test-db"}) ?
128 $options->{"$d-test-db"} : ($cfg->{'test_db'} || 'test');
130 ("Which database should I use for testing the $db drivers?",
131 $test_db) if $prompt;
133 my $test_host = exists($options->{"$d-test-host"}) ?
134 $options->{"$d-test-host"} : ($cfg->{'test_host'} || 'localhost');
136 ("On which host is database $test_db running (hostname, ip address or host:port)", $test_host) if $prompt;
138 my($test_user, $test_pass);
140 $test_user = exists($options->{"$d-test-user"}) ?
141 $options->{"$d-test-user"} : ($cfg->{'test_user'} || "undef");
143 ("User name for connecting to database $test_db?", $test_user)
145 $test_user = undef if $test_user eq 'undef';
147 $test_pass = exists($options->{"$d-test-pass"}) ?
148 $options->{"$d-test-pass"} : ($cfg->{'test_pass'} || "undef");
150 ("Password for connecting to database $test_db?", $test_pass)
152 $test_pass = undef if $test_pass eq 'undef';
154 $cfg->{'test_db'} = $test_db;
155 $cfg->{'test_host'} = $test_host;
156 $cfg->{'test_user'} = $test_user;
157 $cfg->{'test_pass'} = $test_pass;
158 if ($test_host eq 'undef' || $test_host eq 'localhost') {
161 my $test_dsn = "DBI:$driver:database=$test_db";
162 $cfg->{test_dsn} = $test_dsn;
164 $cfg->{'test_dsn'} .= ";host=$test_host";
168 if ($options->{'verbose'}) {
169 local $^W=0; # some uninitialized variable warning coming through
170 print("Driver $driver is using the following settings for tests:\n",
171 " Database $test_db\n",
172 " Host $test_host\n",
174 " User $test_user\n",
175 " Password $test_pass\n");
181 # Talk to Ewan (<birney@ebi.ac.uk>) or bioperl-l@bioperl.org for more info.
184 # Let the code begin...
187 use ExtUtils::MakeMaker ;
189 $do_autoload_finesse = 0;
191 $DISTNAME = "bioperl";
194 if( $do_autoload_finesse == 1 ) {
195 fatal("Autoload finessing does not work at the moment!");
200 @BACKUP_FILES = qw(./Seq.pm.bak);
203 # This does an inplace edit on Seq.pm
206 if( $do_autoload_finesse ) {
208 print "Bioperl module installation\nPreparing modules for AUTOLOADing...";
209 `perl -p -i.bak -e 's/#__END__/__END__/' Seq.pm`;
215 foreach $name ( keys %packages ) {
216 if( &check_package($name,$packages{$name}) == 1 ) {
226 There are some external packages and perl modules, listed above, which
227 bioperl uses. This only effects the functionality which is listed above:
228 the rest of bioperl will work fine, which includes nearly all of the
231 The installation of these external packages is very simple. You
232 can read more about bioperl external dependencies at
234 http://bioperl.org/Core/external.shtml
236 Enjoy the rest of bioperl, which you can use after going 'make install'
243 DISTNAME => $DISTNAME,
245 'dist' => { COMPRESS => 'gzip -9f',
247 DIST_DEFAULT => 'all tardist',
250 'AUTHOR' => 'Bioperl Team (bioperl-l@bioperl.org)',
251 'ABSTRACT' => 'Bioinformatics Toolkit',
253 'realclean' => { FILES => join(' ',@BACKUP_FILES) },
254 DIR => [ ], # directories with other Makefile.PL's in them