use ExtUtils::MakeMaker; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. WriteMakefile( NAME => 'Bio::Das', VERSION_FROM => 'Das.pm', # finds $VERSION PREREQ_PM => { Compress::Zlib => 1.0, HTML::Parser => 3.0, LWP => 5.0, MIME::Base64 => 2.12, Bio::Root::Root=>0, }, AUTHOR => 'Lincoln Stein (lstein@cshl.edu)', ABSTRACT => 'Client-side library for Distributed Genome Annotation System', ); sub MY::ppd { package MY; my $repository = 'http://www.gmod.org/ggb/ppm'; my $arch = 'MSWin32-x86-multi-thread'; my $inherited = shift->SUPER::ppd(@_); my $implementation; my $newimp; my $oldMM =0; #VERY irritating--different versions of ExtUtils::MakeMaker have #different ways of generating the ppd file. if ($inherited =~ /qq\{(\\n)\}.*qq\{(\\t\\n)\}.*qq\{(\\t\\t\\n)\}/sg){ $oldMM=1; my $xml = $1.$2.$3; #warn "$xml\n"; $inherited =~ s/qq\{.*>>/qq{$xml}" >/s; } elsif ($inherited =~ /NOECHO/) { my @la = split /\n/, $inherited; my $grab = 0; for (@la) { $grab++ if (m!!); if ($grab and $_ =~ /\'(.*)\'/) { $implementation .= "$1\n"; } $grab = 0 if (m!!); } } if ($oldMM and $inherited =~ /(\s*\.*\<\/IMPLEMENTATION\>)/m) { $implementation = $newimp = $1; $newimp =~ s/ARCHITECTURE NAME=\\"\S+\\"/ARCHITECTURE NAME=\\"$arch\\"/; $newimp =~ s/\$\(OSNAME\)/MSWin32/; my $impl58 = $newimp; $impl58 =~ s/\Q$arch\E/$arch\-5\.8/; $newimp .= "\\n\\t\\t$impl58"; $inherited =~ s/\Q$implementation\E/$newimp/; } elsif (!$oldMM and $implementation) { $newimp = $implementation; $newimp =~ s/ARCHITECTURE NAME="\S+"/ARCHITECTURE NAME="$arch"/; $newimp =~ s/\$\(OSNAME\)/MSWin32/; my $impl58 = $newimp; $impl58 =~ s/\Q$arch\E/$arch\-5\.8/; $newimp .= $impl58; my @la = split /\n/, $newimp; for my $line (@la) { $line = qq{\t\$(NOECHO) \$(ECHO) '$line' >> \$(DISTNAME).ppd}; } my @inherit_array = split /\n/, $inherited; my @newinherit; $inherited = ''; for (@inherit_array) { if (//) { push @newinherit, @la; last; } else { push @newinherit, $_; } } push @newinherit, qq{\t\$(NOECHO) \$(ECHO) '' >> \$(DISTNAME).ppd\n}; $inherited = join "\n", @newinherit; } $inherited .= <