Michael Thon | 18 Aug 07:00

Build.PL options?

Hi all - I am trying to write a port of bioperl 1.5.2 to enable its  
installation with the macports system (www.macports.org).  I'm not too  
familiar with the Build.PL build system - is there any way to disable  
the dependency resolution that the build script does (i.e. without  
patching the script)?
Thanks
Mike
Dave Messina | 18 Aug 09:37
Favicon

Re: Build.PL options?

Hi Mike,

Great to hear you're planning add BioPerl to MacPorts. Thanks!

I'm afraid I don't know how to disable the dependency resolution, but while
you're waiting for others to chime in , here are a couple of things you
might try if you haven't already:

- The Build.PL for BioPerl is configured to automatically write out a
Makefile.PL for you. If you're more familiar with MakeFile.PL, then you
could work with that.

Module::Build tries to maintain a certain level of cross-compatibility with
ExtUtils::MakeMaker; how do you disable dependency resolution with the
Makefile.PL system?

- The Build.PL API is pretty flexible, and it's easy to change just about
any behavior by passing parameters to Build.PL on the command line. See

http://search.cpan.org/~kwilliams/Module-Build-0.2808/lib/Module/Build/API.pod

and

http://search.cpan.org/~kwilliams/Module-Build-0.2808/lib/Module/Build/Cookbook.pm

I'm curious -- it seems to me that a major purpose of Build.PL and
Makefile.PL is specifying dependencies (and installing them where
necessary). Does MacPorts override that and do its own dependency-checking
for Perl modules?

(Continue reading)

Michael Thon | 18 Aug 21:48

Re: Build.PL options?


On Aug 18, 2008, at 9:37 AM, Dave Messina wrote:

>
> I'm curious -- it seems to me that a major purpose of Build.PL and  
> Makefile.PL is specifying dependencies (and installing them where  
> necessary). Does MacPorts override that and do its own dependency- 
> checking for Perl modules?
>
Hi Dave - Thanks for the links- I will check them out.  MacPorts can  
resolve dependencies that are specified for each package, much like  
rpm and other linux packaging systems, so its probably better to  
disable the dependency resolution in the bioperl build script and let  
macports handle them.  It looks like I can patch the build.PL script  
pretty easily, unless I can find a better way.

Mike
Sendu Bala | 19 Aug 10:34
Favicon

Re: Build.PL options?

Michael Thon wrote:
> Hi all - I am trying to write a port of bioperl 1.5.2 to enable its 
> installation with the macports system (www.macports.org).  I'm not too 
> familiar with the Build.PL build system - is there any way to disable 
> the dependency resolution that the build script does (i.e. without 
> patching the script)?

How else will you be doing the dependency resolution? If your system 
just installs all dependencies itself beforehand, then dependency 
resolution won't be invoked in Build.PL :)

Otherwise, don't run Build.PL at all (why do you need to?), or have your 
system answer default to all questions:

echo | perl Build.PL
Michael Thon | 19 Aug 17:16

Re: Build.PL options?

> How else will you be doing the dependency resolution? If your system  
> just installs all dependencies itself beforehand, then dependency  
> resolution won't be invoked in Build.PL :)
> Otherwise, don't run Build.PL at all (why do you need to?),
Good point.  Now, why didn't I think of that? :)
Does Build.PL do anything other than copy Perl modules (and install  
dependencies)?
> or have your system answer default to all questions:
> echo | perl Build.PL
>
Sendu Bala | 19 Aug 17:56
Favicon

Re: Build.PL options?

Michael Thon wrote:
>> How else will you be doing the dependency resolution? If your system 
>> just installs all dependencies itself beforehand, then dependency 
>> resolution won't be invoked in Build.PL :)
>> Otherwise, don't run Build.PL at all (why do you need to?),
>
> Good point.  Now, why didn't I think of that? :)
> Does Build.PL do anything other than copy Perl modules (and install 
> dependencies)?

It generates the 'Build' script, which provides a whole host of functions:

./Build help

The only one other than 'install' that might be relevant to you is

./Build test

to run the test suite, if testing is part of you own system. There are 
other standard ways to run the tests though, that don't need you to 
create the Build script.

Somewhere along the lines, probably during the install function, it also 
creates man files and other forms of documentation iirc, and installs 
those too.

If you handle dependencies, installation and testing (or don't do 
testing) yourself, and don't care about man files (perldoc is good 
enough?) you can ignore Build.PL.
(Continue reading)


Gmane