Build.PL 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. use utf8;
  2. use 5.010;
  3. use strict;
  4. use warnings;
  5. use Module::Build;
  6. my $gtk = grep { /^--?gtk3?\z/ } @ARGV;
  7. my $builder = Module::Build->new(
  8. module_name => 'WWW::PipeViewer',
  9. license => 'perl',
  10. dist_author => q{Trizen <echo dHJpemVuQHByb3Rvbm1haWwuY29tCg== | base64 -d>},
  11. dist_version_from => 'lib/WWW/PipeViewer.pm',
  12. release_status => 'stable',
  13. build_requires => {
  14. 'Test::More' => 0,
  15. },
  16. extra_manify_args => {utf8 => 1},
  17. configure_requires => {
  18. 'Module::Build' => 0,
  19. },
  20. get_options => {
  21. 'gtk3' => {
  22. type => '!',
  23. store => \$gtk,
  24. },
  25. },
  26. requires => {
  27. 'perl' => 5.016,
  28. 'Data::Dump' => 0,
  29. 'File::Spec' => 0,
  30. 'File::Spec::Functions' => 0,
  31. 'File::Path' => 0,
  32. 'Getopt::Long' => 0,
  33. 'HTTP::Request' => 0,
  34. 'JSON' => 0,
  35. 'Encode' => 0,
  36. 'Memoize' => 0,
  37. 'MIME::Base64' => 0,
  38. 'List::Util' => 1.33,
  39. 'LWP::UserAgent' => 0,
  40. 'LWP::Protocol::https' => 0,
  41. 'Term::ANSIColor' => 0,
  42. 'Term::ReadLine' => 0,
  43. 'Text::ParseWords' => 0,
  44. 'Text::Wrap' => 0,
  45. 'URI::Escape' => 0,
  46. 'Time::Piece' => 0,
  47. $gtk
  48. ? (
  49. 'Gtk3' => 0,
  50. 'File::ShareDir' => 0,
  51. 'Storable' => 0,
  52. 'Digest::MD5' => 0,
  53. )
  54. : (),
  55. },
  56. recommends => {
  57. 'LWP::UserAgent::Cached' => 0, # local cache support
  58. 'Term::ReadLine::Gnu' => 0, # for better STDIN support (+history)
  59. 'JSON::XS' => 0, # faster JSON to HASH conversion
  60. 'Unicode::GCString' => 0, # fixed-width formatting
  61. 'Parallel::ForkManager' => '2.02', # for the `*_parallel` options
  62. 'Text::Unidecode' => 0, # for the `fat32safe` option
  63. },
  64. add_to_cleanup => ['WWW-PipeViewer-*'],
  65. create_makefile_pl => 'traditional',
  66. );
  67. $builder->script_files(['bin/pipe-viewer', ($gtk ? ('bin/gtk-pipe-viewer') : ()),]);
  68. $builder->share_dir('share') if $gtk;
  69. $builder->create_build_script();