~ubuntu-branches/ubuntu/oneiric/padre/oneiric

« back to all changes in this revision

Viewing changes to privinc/Module/Install/PRIVATE/Padre.pm

  • Committer: Bazaar Package Importer
  • Author(s): Damyan Ivanov
  • Date: 2009-04-28 16:21:53 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090428162153-9p3ygfznr9xt08sn
Tags: 0.34-1
* New upstream release

* bump liborlite-perl (build-)dependency to 1.20
* bump liborlite-migrate-perl (build-)dependency to 0.03
* refresh patches

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
}
32
32
 
33
33
sub check_wx_version {
34
 
        # Can we find Wx.pm
35
 
        my $wxfile = _module_file('Wx');
36
 
        my $wxpath = _file_path($wxfile);
37
 
        unless ( $wxpath ) {
38
 
                # Wx.pm is not installed.
 
34
        # Check if Alien is installed
 
35
        my $alien_file = _module_file('Alien::wxWidgets');
 
36
        my $alien_path = _file_path($alien_file);
 
37
        unless ( $alien_path ) {
 
38
                # Alien::wxWidgets.pm is not installed.
39
39
                # Allow EU:MM to do it's thing as normal
 
40
                # but give some extra hints to the user
 
41
                warn "** Could not locate Alien::wxWidgets\n";
 
42
                warn "** When installing it please make sure wxWidgetes is compiled with Unicode enabled\n";
 
43
                warn "** Please use the latest version from CPAN\n";
40
44
                return;
41
45
        }
42
 
        my $wx_pm = _path_version($wxpath);
43
 
        print "Found Wx.pm     $wx_pm\n";
44
46
 
45
47
        # Do we have the alien package
46
48
        eval {
50
52
        if ( $@ ) {
51
53
                # If we don't have the alien package,
52
54
                # we should just pass through to EU:MM
 
55
                warn "** Could not locate Alien::wxWidgets\n";
 
56
                warn "** When installing it please make sure wxWidgetes is compiled with Unicode enabled\n";
 
57
                warn "** Please use the latest version from CPAN\n";
53
58
                return;
54
59
        }
55
60
 
66
71
                nono("Padre needs at least version 2.8.8 of wxWidgets. You have wxWidgets $widgets_human");
67
72
        }
68
73
 
 
74
 
 
75
        
 
76
        # Can we find Wx.pm
 
77
        my $wx_file = _module_file('Wx');
 
78
        my $wx_path = _file_path($wx_file);
 
79
        unless ( $wx_path ) {
 
80
                # Wx.pm is not installed.
 
81
                # Allow EU:MM to do it's thing as normal
 
82
                # but give extra hints to the user
 
83
                warn "** Could not locate Wx.pm\n";
 
84
                warn "** Please install the latest version from CPAN\n";
 
85
                return;
 
86
        }
 
87
        my $wx_pm = _path_version($wx_path);
 
88
        print "Found Wx.pm     $wx_pm\n";
 
89
 
 
90
 
69
91
        # this part still needs the DISPLAY 
70
92
        # so check only if there is one
71
93
        if ( $ENV{DISPLAY} or $^O =~ /win32/i ) {
76
98
                if ($@) {
77
99
                        # If we don't have the Wx installed,
78
100
                        # we should just pass through to EU:MM
 
101
                        warn "** Could not locate Wx.pm\n";
 
102
                        warn "** Please install the latest version from CPAN\n";
79
103
                        return;
80
104
                }
81
105
                unless ( Wx::wxUNICODE() ) {