Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / Makefile.PL
1 #!/usr/bin/perl -w
2 ############################################################################
3 ## Name:        Makefile.PL
4 ## Purpose:     Makefile.PL
5 ## Author:      Mattia Barbon
6 ## Modified by:
7 ## Created:     01/10/2000
8 ## RCS-ID:      $Id: Makefile.PL 2746 2010-01-08 21:36:41Z mbarbon $
9 ## Copyright:   (c) 2000-2009 Mattia Barbon
10 ## Licence:     This program is free software; you can redistribute it and/or
11 ##              modify it under the same terms as Perl itself
12 #############################################################################
13
14 package core;
15
16 use 5.006001;
17 use strict;
18
19 use FindBin;
20 use lib "${FindBin::RealBin}/build";
21 use Wx::build::MakeMaker::Core;
22
23 ( my $mmv = ExtUtils::MakeMaker->VERSION ) =~ s/_//g;
24
25 if( $mmv == 6.21 ) {
26     die <<EOT
27 ExtUtils::MakeMaker 6.21 is known not to work with wxPerl;
28 please downgrade to 6.17 or install the latest version from CPAN.
29 EOT
30 }
31
32 # $ExtUtils::MakeMaker::Verbose = 2;
33 # $wxConfig::Verbose = 10;
34
35 my $build_requires =
36   { 'File::Spec::Functions'  => 0.82,
37     'Test::More'             => 0.45,
38     'Test::Harness'          => 2.26,
39     'Data::Dumper'           => 0,
40     'ExtUtils::MakeMaker'    => 6.17,
41     'Alien::wxWidgets'       => 0.25,
42     'if'                     => 0.03,
43     'ExtUtils::XSpp'         => 0.05,
44     };
45
46 eval {
47     require ExtUtils::MY_Metafile;
48     ExtUtils::MY_Metafile->import;
49
50     my_metafile
51       ( { license        => 'perl',
52           dynamic_config => 1,
53           requires       => {},
54           build_requires => $build_requires,
55           no_index       => { directory => [ qw(samples script) ],
56                               package   => [ qw(MY Parse::Yapp::Driver) ],
57                               },
58           configure_requires => { 'Alien::wxWidgets' => 0.25,
59                                   },
60           resources       => { 'license'       => 'http://dev.perl.org/licenses/',
61                                'homepage'      => 'http://wxperl.eu/',
62                                'bugtracker'    => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=Wx',
63                                'repository'    => 'https://wxperl.svn.sourceforge.net/svnroot/wxperl/wxPerl',
64                                'MailingList'   => 'http://lists.perl.org/list/wxperl-users.html',
65                                },
66           } );
67 };
68
69 wxWriteMakefile( NAME          => 'Wx',
70                  ABSTRACT_FROM => 'Wx.pm',
71                  AUTHOR        => 'Mattia Barbon <mbarbon@cpan.org>',
72                  VERSION_FROM  => 'Wx.pm',
73                  PREREQ_PM     => { %$build_requires },
74                  PMLIBDIRS     => [ 'lib', 'build' ],
75                  EXE_FILES     => [ qw(script/wxperl_overload) ],
76                  WX_CORE_LIB_MAYBE => $^O eq 'darwin' ? 'media html' : '',
77                  WX_CORE_LIB   => 'adv core base',
78                  WX_OVERLOAD   => { header  => 'cpp/ovl_const.h',
79                                     source  => 'cpp/ovl_const.cpp',
80                                     },
81                  WX_TOP        => 'Wx.pm',
82                  LICENSE       => 'perl',
83                  );
84
85 END {
86     print <<EOT;
87
88 ======================================================================
89 For installation instructions and further help please see
90 docs/INSTALL.pod
91
92 For command line switches help use:
93 perl Makefile.PL --help
94 ======================================================================
95
96 EOT
97
98     if( grep /\b(?:INC|LIB)=/, @ARGV ) {
99         print <<EOT;
100 ======================================================================
101 It seems that LIB and/or INC was passed to Makefile.PL invocation;
102 this might cause the build to fail.  Please retry without passing
103 INC/LIB to Makefile.PL
104 ======================================================================
105 EOT
106     }
107 }
108
109 # local variables:
110 # mode: cperl
111 # end: