Makefile.PL 3.93 KB
Newer Older
1 2 3 4 5 6 7
#!/usr/bin/perl -w
############################################################################
## Name:        Makefile.PL
## Purpose:     Makefile.PL
## Author:      Mattia Barbon
## Modified by:
## Created:     01/10/2000
8
## RCS-ID:      $Id: Makefile.PL 3538 2015-03-11 02:36:34Z mdootson $
9
## Copyright:   (c) 2000-2012 Mattia Barbon
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
## Licence:     This program is free software; you can redistribute it and/or
##              modify it under the same terms as Perl itself
#############################################################################

package core;

use 5.006001;
use strict;

use FindBin;
use lib "${FindBin::RealBin}/build";
use Wx::build::MakeMaker::Core;

( my $mmv = ExtUtils::MakeMaker->VERSION ) =~ s/_//g;

25 26
my $moduleauthor = ( $mmv >= 6.5702 ) ? [ 'Mattia Barbon <mbarbon@cpan.org>' ] : 'Mattia Barbon <mbarbon@cpan.org>';

27 28 29
# $ExtUtils::MakeMaker::Verbose = 2;
# $wxConfig::Verbose = 10;

30 31 32 33 34 35
# Make setting optional MakeMaker parameters more readable
# lifted from DBD::SQLite distribution
sub OPTIONAL {
	return () unless $ExtUtils::MakeMaker::VERSION ge shift;
	return @_;
}
36

37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
wxWriteMakefile(                 
    NAME             => 'Wx',
	ABSTRACT_FROM    => 'Wx.pm',
	VERSION_FROM     => 'Wx.pm',
	AUTHOR           => $moduleauthor,
	PREREQ_PM        => {
        'Alien::wxWidgets'       => 0.25,
        'ExtUtils::XSpp'         => 0.1602,
        'ExtUtils::MakeMaker'    => 6.46,
        'ExtUtils::ParseXS'      => 3.15,
        'File::Spec::Functions'  => 0.82,
        'Test::More'             => 0.45,
        'Test::Harness'          => 2.26,
        'if'                     => 0.03,
	},
    LICENSE => 'perl',	
	OPTIONAL( '6.48',
		MIN_PERL_VERSION => '5.006001',
	),
	META_ADD => {
        dynamic_config => 1,
        configure_requires => {
            'Alien::wxWidgets'    => 0.25,
        },
        build_requires => {
            'Alien::wxWidgets'    => 0.25,
            'ExtUtils::MakeMaker' => 6.48,
            'ExtUtils::XSpp'      => 0.1602,
            'Test::More'          => 0.42,
            'ExtUtils::ParseXS'   => 3.15,
            'File::Spec::Functions'  => 0.82,
            'Test::More'          => 0.45,
            'Test::Harness'       => 2.26,
            'if'                  => 0.03,
        },
        requires => {
            'Alien::wxWidgets'    => 0.25,
        },
        resources => {
            'license'       => 'http://dev.perl.org/licenses/',
77
            'homepage'      => 'http://www.wxperl.it/',
78
            'bugtracker'    => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=Wx',
79
            'repository'    => 'http://svn.code.sf.net/p/wxperl/code/wxPerl',
80 81 82
            'MailingList'   => 'http://lists.perl.org/list/wxperl-users.html',
        },
        no_index => { directory => [ qw(samples script) ],
83
                      package   => [ qw(MY Parse::Yapp::Driver Wx::DropTarget Wx::Droptarget) ],
84 85 86 87 88 89 90 91 92 93 94
        },
    },
    PMLIBDIRS         => [ 'lib', 'build' ],
    EXE_FILES         => [ qw(script/wxperl_overload) ],
    WX_CORE_LIB_MAYBE => $^O eq 'darwin' ? 'media html' : '',
    WX_CORE_LIB       => 'adv core base',
    WX_OVERLOAD       => { header  => 'cpp/ovl_const.h',
                           source  => 'cpp/ovl_const.cpp',
                         },
    WX_TOP            => 'Wx.pm',
);
95 96 97 98 99 100 101 102 103 104 105 106 107

END {
    print <<EOT;

======================================================================
For installation instructions and further help please see
docs/INSTALL.pod

For command line switches help use:
perl Makefile.PL --help
======================================================================

EOT
108 109 110 111 112 113 114 115 116 117

    if( grep /\b(?:INC|LIB)=/, @ARGV ) {
        print <<EOT;
======================================================================
It seems that LIB and/or INC was passed to Makefile.PL invocation;
this might cause the build to fail.  Please retry without passing
INC/LIB to Makefile.PL
======================================================================
EOT
    }
118 119 120 121 122
}

# local variables:
# mode: cperl
# end: