X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=Makefile.PL;h=e5063e7e909b02ad00e79b2e4ec1baef1e22b085;hb=ac51e186036f8e7c09a9f71d971f54eaa2f0c821;hp=89e82bd8f01398b051c72a11c0239892f877c3bc;hpb=9597938811ed0c5bcc0b9ec52b166cbce18b8794;p=app-musicexpo.git diff --git a/Makefile.PL b/Makefile.PL index 89e82bd..e5063e7 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,6 +1,30 @@ use 5.014000; use ExtUtils::MakeMaker; +my @optionals = ( + qw/Audio::FLAC::Header 0 + Audio::Opusfile 0 + MP3::Info 0 + MP4::Info 0 + Ogg::Vorbis::Header::PurePerl 0/, +); + +sub is_installed { + my ($module) = @_; + eval "require $module" +} + +my @extra_prereqs; + +unless (grep \&is_installed, @optionals) { + my $answer = ''; + while (!$answer) { + my $yn = lc prompt 'None of the optional dependencies are installed. Install all of them? (default: y) [y/n]', 'y'; + $answer = $yn if $yn eq 'y' || $yn eq 'n'; + } + @extra_prereqs = @optionals if $answer eq 'y'; +} + WriteMakefile( NAME => 'App::MusicExpo', VERSION_FROM => 'lib/App/MusicExpo.pm', @@ -11,18 +35,16 @@ WriteMakefile( LICENSE => 'perl', SIGN => 1, PREREQ_PM => { - qw/Audio::FLAC::Header 0 - HTML::Template::Compiled 0 + qw/HTML::Template::Compiled 0 Memoize 0 - MP3::Tag 1.12 - MP4::Info 0 - DB_File 0 - Ogg::Vorbis::Header::PurePerl 0/, + DB_File 0/, + @extra_prereqs }, META_MERGE => { - dynamic_config => 0, + dynamic_config => 1, resources => { repository => 'http://git.ieval.ro/?p=app-musicexpo.git' }, + recommends => { @optionals }, } );