X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FInstallationCheck.pm;h=37f276c803518a1d325377ae505404175bbdb32e;hb=20366719c9a10a765a7b1e852abd6ce0ddb11034;hp=70d6217db5ee0cc220ab268d23ba8a115f5e0ef0;hpb=e7fdb1da83751073b7bcc5488772c7e844789062;p=kivitendo-erp.git diff --git a/SL/InstallationCheck.pm b/SL/InstallationCheck.pm index 70d6217db..37f276c80 100644 --- a/SL/InstallationCheck.pm +++ b/SL/InstallationCheck.pm @@ -11,12 +11,14 @@ BEGIN { @required_modules = ( { name => "parent", url => "http://search.cpan.org/~corion/", debian => 'libparent-perl' }, { name => "Archive::Zip", version => '1.16', url => "http://search.cpan.org/~adamk/", debian => 'libarchive-zip-perl' }, + { name => "Clone", url => "http://search.cpan.org/~rdf/", debian => 'libclone-perl' }, { name => "Config::Std", url => "http://search.cpan.org/~dconway/", debian => 'libconfig-std-perl' }, { name => "DateTime", url => "http://search.cpan.org/~drolsky/", debian => 'libdatetime-perl' }, { name => "DBI", version => '1.50', url => "http://search.cpan.org/~timb/", debian => 'libdbi-perl' }, - { name => "DBD::Pg", version => '1.49', url => "http://search.cpan.org/~dbdpg/", debian => 'libdbd-pg' }, + { name => "DBD::Pg", version => '1.49', url => "http://search.cpan.org/~dbdpg/", debian => 'libdbd-pg-perl' }, { name => "Email::Address", url => "http://search.cpan.org/~rjbs/", debian => 'libemail-address-perl' }, - { name => "FCGI", url => "http://search.cpan.org/~mstrout/", debian => 'libfcgi-perl' }, + { name => "Email::MIME", url => "http://search.cpan.org/~rjbs/", debian => 'libemail-mime-perl' }, + { name => "FCGI", version => '0.72', url => "http://search.cpan.org/~mstrout/", debian => 'libfcgi-perl' }, { name => "JSON", url => "http://search.cpan.org/~makamaka", debian => 'libjson-perl' }, { name => "List::MoreUtils", version => '0.21', url => "http://search.cpan.org/~vparseval/", debian => 'liblist-moreutils-perl' }, { name => "Params::Validate", url => "http://search.cpan.org/~drolsky/", debian => 'libparams-validate-perl' }, @@ -34,12 +36,21 @@ BEGIN { { name => "YAML", version => '0.62', url => "http://search.cpan.org/~ingy/", debian => 'libyaml-perl' }, ); -@optional_modules = (); +@optional_modules = ( + { name => "Digest::SHA", url => "http://search.cpan.org/~mshelor/", debian => 'libdigest-sha-perl' }, + { name => "IO::Socket::SSL", url => "http://search.cpan.org/~sullr/", debian => 'libio-socket-ssl-perl' }, + { name => "Net::LDAP", url => "http://search.cpan.org/~gbarr/", debian => 'libnet-ldap-perl' }, + # Net::SMTP is core since 5.7.3 + { name => "Net::SMTP::SSL", version => '1.01', url => "http://search.cpan.org/~cwest/", debian => 'libnet-smtp-ssl-perl' }, + { name => "Net::SSLGlue", version => '1.01', url => "http://search.cpan.org/~sullr/", debian => 'libnet-sslglue-perl' }, +); @developer_modules = ( { name => "Devel::REPL", url => "http://search.cpan.org/~doy/", debian => 'libdevel-repl-perl' }, { name => "Moose::Role", url => "http://search.cpan.org/~doy/", debian => 'libmoose-role-perl' }, { name => "Perl::Tags", url => "http://search.cpan.org/~osfameron/", debian => 'libperl-tags-perl' }, + { name => "Test::Deep", url => "http://search.cpan.org/~rjbs/", debian => 'libtest-deep-perl' }, + { name => "GD", version => '2.00', url => "http://search.cpan.org/~lds/", debian => 'libgd-perl' }, ); $_->{fullname} = join ' ', grep $_, @$_{qw(name version)} @@ -51,7 +62,13 @@ sub module_available { my $module = $_[0]; my $version = $_[1] || '' ; - return eval "use $module $version; 1"; + my $got = eval "use $module $version (); 1"; + + if ($got) { + return ($got, $module->VERSION); + } else { + return + } } sub check_kpsewhich { @@ -71,6 +88,10 @@ sub template_dirs { sub classes_from_latex { my ($path, $class) = @_; + eval { use String::ShellQuote; 1 } or warn "can't load String::ShellQuote" && return; + $path = shell_quote $path; + $class = shell_quote $class; + open my $pipe, q#egrep -rs '^[\ \t]*# . "$class' $path". q# | sed 's/ //g' | awk -F '{' '{print $2}' | awk -F '}' '{print $1}' |#; my @cls = <$pipe>; close $pipe; @@ -85,7 +106,7 @@ my %conditional_dependencies; sub check_for_conditional_dependencies { return if $conditional_dependencies{net_ldap}++; - push @required_modules, { 'name' => 'Net::LDAP', 'url' => 'http://search.cpan.org/~gbarr/' } + push @required_modules, grep { $_->{name} eq 'Net::LDAP' } @optional_modules if $::lx_office_conf{authentication} && ($::lx_office_conf{authentication}->{module} eq 'LDAP'); }