Debian Codegraph @

Makefile.PL

raw symbols ◀ ▶ SCIP
1 Debian patch touch this file
1 require 5.006;
2 use ExtUtils::MakeMaker;
3
4
5 my $NAME = 'TFBS';
6 my $DISTNAME = "TFBS";
7 my $VERSION = "0.5.0";
8
9 get_sql_data();
10
11 WriteMakefile(
12 NAME => $NAME,
13 DISTNAME => $DISTNAME,
14 VERSION => $VERSION,
15 'dist' => { COMPRESS => 'gzip -9f',
16 SUFFIX => '.gz',
17 DIST_DEFAULT => 'all tardist',
18 },
19
20 );
21
22 sub get_sql_data {
23 my $ans = "abc";
•24 $ans = $ENV{HAVE_MYSQL} if($ENV{HAVE_MYSQL});
25 do {
26 print "Do you have write access to a MySQL database server? [n] ";
27 $ans=<STDIN>; chomp $ans;
28 } until $ans =~ /^y|n/i or $ans eq "";
29
30 if (uc(substr($ans,0,1)) eq 'Y') {
31 print "\nOK, tell me more about it.\n\n";
32 print "\tHost name : [localhost] ";
33 my $hostname = <STDIN>; chomp $hostname;
34 $hostname = 'localhost' unless $hostname;
35
36 print "\tUsername : [none] ";
37 my $username = <STDIN>; chomp $username;
38 $username = '' unless $username;
39
40 print "\tPassword : [none] ";
41 my $password = <STDIN>; chomp $password;
42 $password = '' unless password;
43
44 open FILE, ">t/MYSQLCONNECT"
45 or die "Can't write to t/ directory, stopped";
46 print FILE join("::", $hostname, $username, $password, " ");
47 close FILE;
48 }
49 else {
50 unlink "t/MYSQLCONNECT" if -e "t/MYSQLCONNECT";
51 }
52 }
53
54 BEGIN {
55 my $fail = 0;
56 unless (eval "use Bio::Root::RootI;1") {
57 $fail = 1;
58 print qq!
59
60 -------------------------------------------------
61 WARNING
62 -------------------------------------------------
63
64 Bioperl does not seem to be installed.
65
66 Bioperl 1.0 or newer is unconditionally required by TFBS.
67
68 Please install Bioperl BEFORE proceeding with
69 TFBS installation. Go to http://bioperl.org for
70 information on how to obtain and install it.
71
72 -------------------------------------------------
73
74 !;
75 }
76
77 unless (eval "use PDL; 1") {
78 $fail = 1;
79 print qq!
80
81 -------------------------------------------------
82 WARNING
83 -------------------------------------------------
84
85 PDL (Perl Data Language) does not seem to be
86 installed.
87
88 PDL is unconditionally required by TFBS.
89
90 Please install PDL BEFORE proceeding with
91 TFBS installation. Go to http://pdl.perl.org for
92 information on how to obtain and install it.
93
94 NOTE FOR LINUX USERS: PDL binary packages
95 (.rpm, .deb) are included in all major Linux
96 distributions and repositories. Unless you are an
97 advanced Linux user, it is recommended that you
98 install PDL from one of these packages,
99 or from CPAN command line.
100
101 -------------------------------------------------
102
103 !;
104 }
105 unless (eval "use File::Temp; 1") {
106 $fail = 1;
107 print qq!
108
109 -------------------------------------------------
110 WARNING
111 -------------------------------------------------
112
113 File::Temp package does not seem to be installed.
114
115 File::Temp is unconditionally required by TFBS.
116
117 Please install File::Temp BEFORE proceeding with
118 TFBS installation. The package is available from
119 CPAN (http://cpan.perl.org/).
120
121 -------------------------------------------------
122
123 !;
124 }
125 if ($fail) {
126 print STDERR "TFBS installation aborted.\n";
127 print STDERR "Please install one or more missing modules before proceeding\n\n";
128 exit(0);
129 }
130 unless (eval "use GD; 1") {
131 # do not fail
132 print qq!
133
134 -------------------------------------------------
135 WARNING
136 -------------------------------------------------
137 GD.pm does not seem to be installed.
138
139 GD is reqired to produce "sequence logos" from
140 information content matrices. If you need this
141 functionality, please visit
142 http://stein.cshl.org/WWW/software/GD/
143 for information on obtaining and installing GD.
144 -------------------------------------------------
145
146 !;
147 }
148
149 };