# This -*- perl -*- script writes the Makefile for this package.
require 5.004_04;
use strict;
my %requires;
# Subroutine to check for installed modules.
sub check_version
{
my ($pkg, $wanted, $msg) = @_;
local($|) = 1;
print "Checking for $pkg...";
eval { my $p; ($p = $pkg . ".pm") =~ s#::#/#g; require $p; };
no strict 'refs';
my $vstr = ${"${pkg}::VERSION"} ? "found v" . ${"${pkg}::VERSION"}
: "not found";
my $vnum = ${"${pkg}::VERSION"} || 0;
my $ok = $vnum >= $wanted;
print $ok ? "ok\n" : " " . $vstr . "\n";
$requires{$pkg} = $wanted if !$ok;
return $ok;
}
# Check for needed modules.
if ($^O eq 'MSWin32') {
check_version('Win32::Process' => '0.04') or
warn "\n"
. "*** For Proc:Background you require version 0.04, or later, of\n"
. " Win32::Process from CPAN/authors/id/GSAR/libwin32-x.x.tar.gz\n\n";
}
#--- Configuration section ---
my @programs_to_install = qw(timed-process);
#--- End Configuration - You should not have to change anything below this line
# Allow us to suppress all program installation with the -n (library only)
# option. This is for those that don't want to mess with the configuration
# section of this file.
use Getopt::Std;
use vars qw($opt_n);
unless (getopts('n')) {
die "Usage: $0 [-n]\n";
}
@programs_to_install = () if $opt_n;
use ExtUtils::MakeMaker;
WriteMakefile1(
NAME => 'Proc::Background',
AUTHOR => 'Blair Zajac <blair@orcaware.com>',
VERSION_FROM => 'lib/Proc/Background.pm',
PL_FILES => { map {("bin/$_.PL" => "bin/$_")} @programs_to_install },
EXE_FILES => [map {"bin/$_"} @programs_to_install ],
'clean' => {FILES => '$(EXE_FILES)' },
'dist' => {
'COMPRESS' => 'gzip',
'SUFFIX' => 'gz'
},
PREREQ_PM => \%requires,
LICENSE => 'perl',
MIN_PERL_VERSION => '5.00404',
META_MERGE => {
resources => {
repository => '
http://www.orcaware.com/svn/repos/perl_proc_background/trunk',
},
},
#BUILD_REQUIRES => {
#},
);
sub WriteMakefile1 { #Written by Alexandr Ciornii, version 0.21. Added by eumm-upgrade.
my %params=@_;
my $eumm_version=$ExtUtils::MakeMaker::VERSION;
$eumm_version=eval $eumm_version;
die "EXTRA_META is deprecated" if exists $params{EXTRA_META};
die "License not specified" if not exists $params{LICENSE};
if ($params{BUILD_REQUIRES} and $eumm_version < 6.5503) {
#EUMM 6.5502 has problems with BUILD_REQUIRES
$params{PREREQ_PM}={ %{$params{PREREQ_PM} || {}} , %{$params{BUILD_REQUIRES}} };
delete $params{BUILD_REQUIRES};
}
delete $params{CONFIGURE_REQUIRES} if $eumm_version < 6.52;
delete $params{MIN_PERL_VERSION} if $eumm_version < 6.48;
delete $params{META_MERGE} if $eumm_version < 6.46;
delete $params{META_ADD} if $eumm_version < 6.46;
delete $params{LICENSE} if $eumm_version < 6.31;
delete $params{AUTHOR} if $] < 5.005;
delete $params{ABSTRACT_FROM} if $] < 5.005;
delete $params{BINARY_LOCATION} if $] < 5.005;
WriteMakefile(%params);
}