X-Git-Url: http://git.indexdata.com/?p=irspy-moved-to-github.git;a=blobdiff_plain;f=Makefile.PL;h=0566a8c4c5ebca1fb3ee01f8ca72e13eb873927e;hp=dd79c1eae09be769248d28304832f8dabb2334bb;hb=ee9a8c4c96f52f8f8fdfe25b24f07d967c544116;hpb=2ee5bb696499e86b8e15501d19fdcc998e0d307e diff --git a/Makefile.PL b/Makefile.PL index dd79c1e..0566a8c 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,16 +1,55 @@ -# $Id: Makefile.PL,v 1.1 2006-04-13 14:53:17 mike Exp $ +# $Id: Makefile.PL,v 1.14 2007-05-09 12:04:36 mike Exp $ use 5.008; +use strict; +use warnings; use ExtUtils::MakeMaker; + +my $yazver = `yaz-config --version`; +if (!$yazver) { + die qq[ +ERROR: Unable to call script: yaz-config +If you are using a YAZ installation from the Debian package "yaz", you +will also need to install "libyaz-dev" in order to build this module. +]; +} + +chomp($yazver); +# 2.1.53 is the first version with ZOOM-C fixed to properly support +# reconnection in asynchronous mode. +check_version($yazver, "2.1.53"); + # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. WriteMakefile( - NAME => 'Net::Z3950::IRSpy', - VERSION_FROM => 'lib/Net/Z3950/IRSpy.pm', # finds $VERSION + NAME => 'ZOOM::IRSpy', + VERSION_FROM => 'lib/ZOOM/IRSpy.pm', # finds $VERSION PREREQ_PM => { - Net::Z3950::ZOOM => 1.04, + "Net::Z3950::ZOOM" => 1.19, + "XML::LibXML::XPathContext" => 0.07, # For Web UI + "XML::LibXML" => 1.58, + "XML::LibXSLT" => 1.57, + "URI::Escape" => 3.28, # For Web UI }, ($] >= 5.005 ? ## Add these new keywords supported since 5.005 - (ABSTRACT_FROM => 'lib/Net/Z3950/IRSpy.pm', # retrieve abstract from module + (ABSTRACT_FROM => 'lib/ZOOM/IRSpy.pm', # retrieve abstract from module AUTHOR => 'Mike Taylor ') : ()), ); + + +sub check_version { + my($got, $want) = @_; + + my($gmajor, $gminor, $gtrivial) = ($got =~ /(\d+)\.(\d+)\.(\d+)/); + my($wmajor, $wminor, $wtrivial) = ($want =~ /(\d+)\.(\d+)\.(\d+)/); + if (($gmajor < $wmajor) || + ($gmajor == $wmajor && $gminor < $wminor) || + ($gmajor == $wmajor && $gminor == $wminor && $gtrivial < $wtrivial)) { + print <<__EOT__; +*** ERROR! +ZOOM-Perl requires at least version $want of YAZ, +but is currently you only have version $got. +__EOT__ + exit 1; + } +}