[Bioperl-l] [PATCH] makefile and dependencies

Chia-liang Kao clkao@clkao.org
Thu, 18 Apr 2002 03:29:39 +0800


--FsscpQKzF/jJk6ya
Content-Type: multipart/mixed; boundary="tsOsTdHNUZQcU9Ye"
Content-Disposition: inline


--tsOsTdHNUZQcU9Ye
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

attached is a patch to Makefile.PL using ExtUtils::AutoInstall to
prompt and install for missing dependencies from CPAN. a bootstrapping
code is included so if the user does not have AutoInstall it will be
automagically installed from CPAN. IMHO this would be easier for user
to select optional dependencies by feature, and is more integrated
with the base package than the Bundle:: approach.

Cheers,
CLK

--tsOsTdHNUZQcU9Ye
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="Makefile.diff"

Index: Makefile.PL
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Makefile.PL,v
retrieving revision 1.35
diff -u -r1.35 Makefile.PL
--- Makefile.PL	2002/03/23 19:18:09	1.35
+++ Makefile.PL	2002/04/17 19:29:14
@@ -3,14 +3,33 @@
 ## $Id: Makefile.PL,v 1.35 2002/03/23 19:18:09 lstein Exp $
 ##----------------------------------------------------
 
-#
-# Basically this is a standard Makefile with a hash of
-# needed packages which are tested at the start
-#
 # If you want help with this Makefile get in touch with
 # the developers by sending a message to bioperl-l@bioperl.org.
-
 
+# ExtUtils::AutoInstall Bootstrap Code, version 2.
+BEGIN {my($p,$v)=('ExtUtils::AutoInstall',0.21);eval"use $p $v;1"or
+print"*** $p $v is needed. Install automatically? [Y/n] "and<STDIN>
+!~/^n/i and print"*** Fetching $p.\n"and require CPAN,CPAN::install
+$p;eval"use $p $v;1" or die "*** Please install $p $v manually.\n"}
+
+use ExtUtils::AutoInstall (
+    -version                    => '0.28',
+    -core 			=> [
+# GenBank+GenPept sequence retrieval, remote http Blast jobs
+        'LWP::UserAgent'	=> '0.0',
+	'Storable'		=> '0.0',
+    ],
+    'XML support'		=> [
+        -default		=> 1,
+        'XML::Parser'		=> '0.0',
+        'XML::Writer'		=> '0.0',
+        'XML::Parser::PerlSAX'	=> '0.0',
+        'XML::Twig'		=> '0.0',
+    ],
+    'Ace support(access of ACeDB database)'	=> [
+	'Ace'			=> '0.0',
+    ]
+);
 
 # All Bioperl dependencies on external modules are defined here
 %packages = (
@@ -190,7 +209,6 @@
 # Let the code begin...
 
 require 5.005;
-use ExtUtils::MakeMaker;
 
 $do_autoload_finesse = 0;
 $NAME     = 'Bio';
@@ -218,11 +236,11 @@
 
 $error = 0;
 print "\n";
-foreach $name ( keys %packages ) {
-    if( &check_package($name,$packages{$name}) == 1 ) {
-	$error = 1;
-    }
-}
+#foreach $name ( keys %packages ) {
+#    if( &check_package($name,$packages{$name}) == 1 ) {
+#	$error = 1;
+#    }
+#}
 
 if( $error == 1 ) {
     print <<QQ_ERROR_QQ;

--tsOsTdHNUZQcU9Ye--

--FsscpQKzF/jJk6ya
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see http://www.gnupg.org

iD8DBQE8vc0jk1XldlEkA5YRAroKAJkBRdc28xHWJyLEb/vZXr3u1baPOgCfQ4k/
cvnC9qVT3JQZYfN9QcMPAbE=
=Oyk5
-----END PGP SIGNATURE-----

--FsscpQKzF/jJk6ya--