view release on metacpan or search on metacpan
requires => { perl => '5.006',
'Module::Pluggable' => '2.6',
},
build_requires => { 'Module::Build' => '0.28',
'ExtUtils::CBuilder' => '0.24',
'File::Spec' => '1.50',
'LWP::Protocol::https' => '0',
},
configure_requires => { 'Module::Build' => '0.28',
},
get_options => { 'wxWidgets-debug' => { type => '!' },
'wxWidgets-unicode' => { type => '!' },
'wxWidgets-mslu' => { type => '!' },
'wxWidgets-static' => { type => '!' },
'wxWidgets-monolithic' => { type => '!' },
'wxWidgets-universal' => { type => '!' },
'wxWidgets-build' => { type => '!' },
'wxWidgets-portable' => { type => '!',
default => $^O eq 'MSWin32' },
'wxWidgets-build-opengl' => { type => '!' },
'wxWidgets-source' => { type => '=s' },
0.63 Fri Oct 26 2012
- Patches for wxGTK build fixing dir dialog issues
0.62 Tue Oct 2 2012
- Fix patching on MSWin when buildpaths have spaces.
- Allow addition of user patch - --wxWidgets-userpatch
- Expand README.txt
- Another Mac OS X SDK change
0.61 Fri Sep 21 2012
- change default debug level for wxWidgets >= 2.9 to 1 ( was 0)
- fix several incorrect wxWidgets version checks
0.60 Fri Aug 24 2012
- allow building 2.9.4
- correct SDKs for Mountain Lion
- fixes for XCode 4.4
0.59 Tue May 01 2012
- Version sub modules to keep meta info users happy
=head1 NAME
README.txt - build and installation instructions
=head1 DESCRIPTION
Alien::wxWidgets allows wxPerl to easily find information about
your wxWidgets installation. It can store this information for multiple
wxWidgets versions or configurations (debug, Unicode, etc.). It can also
build and install a private copy of wxWidgets as part of the build process.
=head1 Installing wxWidgets
If you do not know how to do it, please answer 'yes' to the question 'Do you
want to build wxWidgets?'; Alien::wxWidgets will build and install a
copy of wxWidgets for you.
=head1 Installing Alien::wxWidgets
Please note that the steps below can be repeated multiple times in order
install multiple configurations (differing for the wxWidgets version,
compiler, compiler version, debug/unicode settings).
=head2 Unices and Mac OS X
Important: If you are going to use the system wxWidgets or your own build of
wxWidgets then either your required wx-config must be the first wx-config in
the PATH or the WX_CONFIG environment variable must be set to the full path
to wx-config. The environment WX_CONFIG variable can also be used to specify
a different wx-config.
perl Build.PL
inc/My/Build/Any_wx_config.pm view on Meta::CPAN
our $WX_CONFIG_LIBSEP;
our @LIBRARIES = qw(base net xml adv animate aui core fl gizmos gl html
media propgrid qa ribbon richtext stc webview xrc);
our @MONO_LIBRARIES_2_9 = qw(core gl);
our @MONO_LIBRARIES_2_8 = qw(core stc gl);
our @CONTRIB_LIBRARIES = qw(gizmos_xrc ogl plot svg);
our @CRITICAL = qw(base core);
our @IMPORTANT = qw(net xml adv aui gl html media richtext stc xrc );
my $initialized;
my( $wx_debug, $wx_unicode, $wx_monolithic );
sub _find {
my( $name ) = @_;
return $name if File::Spec->file_name_is_absolute( $name );
foreach my $dir ( File::Spec->path ) {
my $abs = File::Spec->catfile( $dir, $name );
return $abs if -x $abs;
}
inc/My/Build/Any_wx_config.pm view on Meta::CPAN
my $wx_config = ( $build && $build->notes( 'wx_config' ) )
|| $ENV{WX_CONFIG} || 'wx-config';
my $ver = `$wx_config --version` or die "Can't execute '$wx_config': $!";
$build->notes( 'wx_config' => _find( $wx_config ) )
if $build && !$build->notes( 'wx_config' );
$ver = __PACKAGE__->_version_2_dec( $ver );
my $base = `$wx_config --basename`;
$wx_debug = $base =~ m/d$/ ? 1 : 0;
$wx_unicode = $base =~ m/ud?$/ ? 1 : 0;
$WX_CONFIG_LIBSEP = `$wx_config --libs base > /dev/null 2>&1 || echo 'X'` eq "X\n" ? '=' : ' ';
$wx_monolithic = `$wx_config --libs${WX_CONFIG_LIBSEP}adv` eq
`$wx_config --libs${WX_CONFIG_LIBSEP}core`;
sub awx_is_debug {
$_[0]->notes( 'build_wx' )
? $_[0]->SUPER::awx_is_debug
: $wx_debug;
}
sub awx_is_unicode {
$_[0]->notes( 'build_wx' )
? $_[0]->SUPER::awx_is_unicode
: $wx_unicode;
}
sub awx_is_monolithic {
$_[0]->notes( 'build_wx' )
? $_[0]->SUPER::awx_is_monolithic
: $wx_monolithic;
inc/My/Build/Any_wx_config.pm view on Meta::CPAN
$config{config}{toolkit} = lc $1;
$config{config}{build} = $self->awx_is_monolithic ? 'mono' : 'multi';
if( $config{config}{toolkit} eq 'gtk' ) {
$self->wx_config( 'basename' ) =~ m/(gtk2?)/i or
die 'PANIC: ', $self->wx_config( 'basename' );
$config{config}{toolkit} = lc $1;
}
$config{compiler} = $ENV{CXX} || $self->wx_config( 'cxx' );
if( $self->awx_debug ) {
$config{c_flags} .= ' -g ';
}
my $cccflags = $self->wx_config( 'cxxflags' );
my $libs = $self->wx_config( 'libs' );
foreach ( split /\s+/, $cccflags ) {
m(^[-/]I) && do { $config{include_path} .= "$_ "; next; };
m(^[-/]D) && do { $config{defines} .= "$_ "; next; };
$config{c_flags} .= "$_ ";
inc/My/Build/Any_wx_config.pm view on Meta::CPAN
sub awx_dlext { $Config{dlext} }
sub _key {
my $self = shift;
my $compiler = $ENV{CXX} || $Config{ccname} || $Config{cc};
my $key = $self->awx_get_name
( toolkit => $self->awx_build_toolkit,
version => $self->_version_2_dec
( $self->notes( 'build_data' )->{data}{version} ),
debug => $self->awx_is_debug,
unicode => $self->awx_is_unicode,
mslu => $self->awx_is_mslu,
# it is unlikely it will ever be required under *nix
$self->notes( 'build_wx' ) ? () :
( compiler => $self->awx_compiler_kind( $compiler ),
compiler_version => $self->awx_compiler_version( $compiler )
),
);
return $key;
inc/My/Build/Any_wx_config.pm view on Meta::CPAN
sub build_wxwidgets {
my $self = shift;
my $extra_flags = $self->wxwidgets_configure_extra_flags;
my $prefix_dir = $self->_key;
my $prefix = awx_install_arch_dir( $self, $prefix_dir );
my $opengl = $self->notes( 'build_wx_opengl' );
my $args = sprintf '--with-%s %s--disable-compat24',
$self->awx_build_toolkit,
$opengl ? '--with-opengl ' : '';
my $unicode = $self->awx_is_unicode ? 'enable' : 'disable';
my $debug = '';
if( $self->awx_version_type == 2 ) {
$debug = ( $self->awx_debug ) ? '--enable-debug' : '--disable-debug';
} else {
$debug = ( $self->awx_debug ) ? '--enable-debug=max' : '';
}
my $monolithic = $self->awx_is_monolithic ? 'enable' : 'disable';
my $universal = $self->awx_is_universal ? 'enable' : 'disable';
my $dir = $self->notes( 'build_data' )->{data}{directory};
my $cmd = "echo exit | " . # for OS X 10.3...
"sh ../configure --prefix=$prefix $args --$unicode-unicode"
. " $debug --$monolithic-monolithic"
. " --$universal-universal_binary $extra_flags";
my $old_dir = Cwd::cwd;
chdir $dir;
# do not reconfigure unless necessary
mkdir 'bld' unless -d 'bld';
chdir 'bld';
# print $cmd, "\n";
$self->_system( $cmd ) unless -f 'Makefile';
inc/My/Build/Base.pm view on Meta::CPAN
$config{config}{compiler_kind} = $self->notes( 'compiler_kind' ) ||
$self->awx_compiler_kind( $config{compiler} );
$config{config}{compiler_version} = $self->notes( 'compiler_version' ) ||
$self->awx_compiler_version( $config{compiler} );
$self->notes( 'compiler_kind' => $config{config}{compiler_kind} );
$self->notes( 'compiler_version' => $config{config}{compiler_version} );
my $base = $self->awx_get_name
( toolkit => $config{config}{toolkit},
version => $config{version},
debug => $self->awx_is_debug,
unicode => $self->awx_is_unicode,
mslu => $self->awx_is_mslu,
compiler => $config{config}{compiler_kind},
compiler_version => $config{config}{compiler_version},
);
$self->{awx_key} = $base;
$config{wx_base_directory} = $self->awx_wx_config_data->{wxdir}
if $self->awx_wx_config_data->{wxdir};
inc/My/Build/Base.pm view on Meta::CPAN
}
sub install_system_wxwidgets { }
sub awx_configure {
my $self = shift;
return %{$self->{awx_config}} if $self->{awx_config};
my %config;
$config{config}{debug} = $self->awx_is_debug;
$config{config}{unicode} = $self->awx_is_unicode;
$config{config}{mslu} = $self->awx_is_mslu;
$config{config}{build} = $self->awx_is_monolithic ? 'mono' : 'multi';
$config{link_flags} = '';
$config{c_flags} = '';
return %config;
}
sub wx_config {
inc/My/Build/Base.pm view on Meta::CPAN
foreach ( @_ ) {
warn "Undefined key '", $_, "' in wx_config"
unless defined $data->{$_};
}
return @{$data}{@_};
}
sub awx_monolithic { $_[0]->args( 'wxWidgets-monolithic' ) ? 1 : 0 }
sub awx_is_monolithic { $_[0]->awx_monolithic }
sub awx_debug { $_[0]->args( 'wxWidgets-debug' ) ? 1 : 0 }
sub awx_is_debug { $_[0]->awx_debug }
sub awx_unicode { $_[0]->notes( 'build_wx_unicode' )
|| $_[0]->args( 'wxWidgets-unicode' ) ? 1 : 0 }
sub awx_is_unicode { $_[0]->awx_unicode }
sub awx_mslu { 0 }
sub awx_is_mslu { $_[0]->awx_mslu }
sub awx_static { $_[0]->args( 'wxWidgets-static' ) ? 1 : 0 }
sub awx_is_static { $_[0]->awx_static }
sub awx_universal { $_[0]->args( 'wxWidgets-universal' ) ? 1 : 0 }
sub awx_is_universal { $_[0]->awx_universal }
sub awx_get_package { local $_ = $_[0]; s/^My::Build:://; return $_ }
inc/My/Build/Base.pm view on Meta::CPAN
? 2 : 3;
return $versiontype;
}
sub awx_get_name {
my( $self, %args ) = @_;
my $e = sub { defined $_[0] ? ( $_[0] ) : () };
my $pv = sub { join '.', map { 0 + ( $_ || 0 ) }
( $_[0] =~ /(\d+)\.(\d{1,3})(\d{0,3})/ ) } ;
my $base = join '-', $args{toolkit}, $pv->( $args{version} ),
$e->( $args{debug} ? 'dbg' : undef ),
$e->( $args{unicode} ? 'uni' : undef ),
$e->( $args{mslu} ? 'mslu' : undef ),
$e->( $args{compiler} ),
$e->( $args{compiler_version} ),
;
$base =~ s/\./_/g; $base =~ s/-/_/g;
return $base;
}
inc/My/Build/Win32.pm view on Meta::CPAN
qq{ | "$patch_exe" -N -p0 -u -b -z .bak};
return $cmd;
}
sub awx_grep_dlls {
my( $self, $libdir, $digits, $mono ) = @_;
my $ret = {};
my $ver = $self->_version_2_dec( $self->awx_w32_bakefile_version );
my $suff = ( $self->awx_unicode ? 'u' : '' ) .
( $self->awx_debug && $ver <= 2.009 ? 'd' : '' );
my @dlls = grep { m/${digits}\d*${suff}_/ }
bsd_glob( File::Spec->catfile( $libdir, '*.dll' ) );
my @libs = grep { m/(?:lib)?wx(?:wince|msw|base)[\w\.]+$/ }
grep { m/${digits}\d*${suff}(_|\.)/ }
bsd_glob( File::Spec->catfile( $libdir, "*$Config{lib_ext}" ) );
# we want builtins on Win32 so that they are available for wxWidgets extensions
my @builtins = grep { m/wx(zlib|regex|expat|png|jpeg|tiff)/ }
bsd_glob( File::Spec->catfile( $libdir, "*$Config{lib_ext}" ) );
inc/My/Build/Win32.pm view on Meta::CPAN
use Carp;
use Config;
# mixin: no use base
sub build_wxwidgets {
my $self = shift;
my $old_dir = Cwd::cwd();
my $uni = $self->awx_unicode ? 'UNICODE=1' : 'UNICODE=0';
my $mslu = $self->awx_mslu ? 'MSLU=1' : 'MSLU=0';
my $dbg = $self->awx_debug ? 'BUILD=debug' : 'BUILD=release';
my $opt = join ' ', $uni, $mslu, $dbg, 'SHARED=1';
if( my $xbuildflags = $self->awx_w32_extra_buildflags ) {
$opt .= ' ' . $xbuildflags;
}
# help windres in x compiler
local $ENV{GNUTARGET} = ( $Config{ptrsize} == 8 ) ? 'pe-x86-64' : 'pe-i386';
chdir File::Spec->catdir( $ENV{WXDIR}, 'build', 'msw' );
inc/My/Build/Win32.pm view on Meta::CPAN
my $buildflags = '';
my $extraflags = $self->awx_w32_configure_extra_flags;
$buildflags .= $extraflags if $extraflags;
return $buildflags if !$self->notes('build_wx');
# extra flags for vers != 2.8 - that is >= 2.9
if( $self->awx_version_type == 3 ) {
if($self->awx_debug) {
$buildflags .= ' DEBUG_INFO=default DEBUG_FLAG=2';
} else {
$buildflags .= ' DEBUG_INFO=default DEBUG_FLAG=1';
}
}
# flags for vers == 2.x
if( $self->awx_version_type == 2 ) {
inc/My/Build/Win32_MSVC.pm view on Meta::CPAN
use My::Build::Utility qw(awx_install_arch_file awx_install_arch_dir);
use Alien::wxWidgets::Utility qw(awx_cc_version);
use Config;
sub awx_configure {
my $self = shift;
my %config = $self->SUPER::awx_configure;
$config{c_flags} .= ' -GF -TP ';
if( $self->awx_debug ) {
$config{link_flags} .= ' -debug ';
}
my $cccflags = $self->wx_config( 'cxxflags' );
my $libs = $self->wx_config( 'libs' );
my $incdir = $self->awx_wx_config_data->{wxinc};
my $cincdir = $self->awx_wx_config_data->{wxcontrinc};
my $iincdir = awx_install_arch_dir( $self, 'rEpLaCe/include' );
foreach ( split /\s+/, $cccflags ) {
m(^-DSTRICT) && next;
inc/My/Build/Win32_MSVC_Bakefile.pm view on Meta::CPAN
my %data = ( %{$self->SUPER::awx_wx_config_data},
'cxx' => 'cl',
'ld' => 'link',
);
my $make = File::Basename::basename( lc $Config{make}, '.exe' );
die "PANIC: you are not using nmake!" unless $make eq 'nmake';
my $orig_libdir;
my $final = $self->awx_debug ? 'BUILD=debug DEBUG_RUNTIME_LIBS=0'
: 'BUILD=release DEBUG_RUNTIME_LIBS=0';
if( my $xbuildflags = $self->awx_w32_extra_buildflags ) {
$final .= ' ' . $xbuildflags;
}
my $unicode = $self->awx_unicode ? 'UNICODE=1' : 'UNICODE=0';
$unicode .= ' MSLU=1' if $self->awx_mslu;
my $dir = Cwd::cwd;
inc/My/Build/Win32_MinGW.pm view on Meta::CPAN
return 'make';
}
sub awx_configure {
my $self = shift;
my %config = $self->SUPER::awx_configure;
my $mxarchflags = ( $Config{ptrsize} == 8 ) ? '-m64' : '-m32';
if( $self->awx_debug ) {
$config{c_flags} .= qq( -g $mxarchflags );
$config{link_flags} .= qq( $mxarchflags );
} else {
$config{c_flags} .= qq( $mxarchflags );
$config{link_flags} .= qq( -s $mxarchflags );
}
my $cccflags = $self->wx_config( 'cxxflags' );
my $libs = $self->wx_config( 'libs' );
my $incdir = $self->awx_wx_config_data->{wxinc};
inc/My/Build/Win32_MinGW_Bakefile.pm view on Meta::CPAN
my $self = shift;
return $self->{awx_data} if $self->{awx_data};
my %data = ( %{$self->SUPER::awx_wx_config_data},
'cxx' => 'g++',
'ld' => 'g++',
);
my $cflags = 'CXXFLAGS=" -Os -DNO_GCC_PRAGMA "';
my $final = $self->awx_debug ? 'BUILD=debug'
: 'BUILD=release';
if( my $xbuildflags = $self->awx_w32_extra_buildflags ) {
$final .= ' ' . $xbuildflags;
}
my $unicode = $self->awx_unicode ? 'UNICODE=1' : 'UNICODE=0';
$unicode .= ' MSLU=1' if $self->awx_mslu;
my $dir = Cwd::cwd;
inc/bin/patch view on Meta::CPAN
# List of supported options and acceptable arguments.
my @desc = qw/
suffix|b=s force|f reject-file|r=s
prefix|B=s batch|t reverse|R
context|c fuzz|F=i silent|quiet|s
check|C ignore-whitespace|l skip|S
directory|d=s normal|n unified|u
ifdef|D=s forward|N version|v
ed|e output|o=s version-control|V=s
remove-empty-files|E strip|p=i debug|x=i
/;
# Each patch may have its own set of options. These are separated by
# a '+' on the command line.
my @opts;
for (@ARGV, '+') { # Now '+' terminated instead of separated...
if ($_ eq '+') {
push @options, [splice @opts, 0];
} else {
push @opts, $_;
inc/bin/patch view on Meta::CPAN
Make numbered backups of files that already
have them, simple backups of the others. This
is the default.
=item `never' or `simple'
Always make simple backups.
=back
=item -xnumber or --debug number
sets internal debugging flags,
and is of no interest to I<patch> patchers [see L<"note 8">].
=back
=head1 ENVIRONMENT
B<SIMPLE>I<_>B<BACKUP>I<_>B<SUFFIX>
Extension to use for backup file names instead of
".orig" or "~".
inc/bin/patch view on Meta::CPAN
If the original file cannot be found or is read-only, but a suitable SCCS or RCS
file is handy, GNU patch will attempt to get or check out the file.
=head2 note 7
GNU patch requires a space between the B<-D> and the argument. This has been
made optional.
=head2 note 8
There are currently no debugging flags to go along with B<-x>.
=head1 AUTHOR
Fuzzy | tgy@chocobo.org | Will hack Perl for a moogle stuffy! =^.^=
=head1 COPYRIGHT
Copyright (c) 1999 Moogle Stuffy Software. All rights reserved.
You may play with this software in accordance with the Perl Artistic License.
inc/inc_File-Fetch/File/Fetch.pm view on Meta::CPAN
This variable controls whether errors encountered internally by
C<File::Fetch> should be C<carp>'d or not.
Set to false to silence warnings. Inspect the output of the C<error()>
method manually to see what went wrong.
Defaults to C<true>.
=head2 $File::Fetch::DEBUG
This enables debugging output when calling commandline utilities to
fetch files.
This also enables C<Carp::longmess> errors, instead of the regular
C<carp> errors.
Good for tracking down why things don't work with your particular
setup.
Default is 0.
=head2 $File::Fetch::BLACKLIST
inc/inc_IPC-Cmd/IPC/Cmd.pm view on Meta::CPAN
### flag to indicate we have a buffer captured
my $have_buffer = __PACKAGE__->can_capture_buffer ? 1 : 0;
### flag indicating if the subcall went ok
my $ok;
### IPC::Run is first choice if $USE_IPC_RUN is set.
if( $USE_IPC_RUN and __PACKAGE__->can_use_ipc_run( 1 ) ) {
### ipc::run handlers needs the command as a string or an array ref
__PACKAGE__->_debug( "# Using IPC::Run. Have buffer: $have_buffer" )
if $DEBUG;
$ok = __PACKAGE__->_ipc_run( $cmd, $_out_handler, $_err_handler );
### since IPC::Open3 works on all platforms, and just fails on
### win32 for capturing buffers, do that ideally
} elsif ( $USE_IPC_OPEN3 and __PACKAGE__->can_use_ipc_open3( 1 ) ) {
__PACKAGE__->_debug( "# Using IPC::Open3. Have buffer: $have_buffer" )
if $DEBUG;
### in case there are pipes in there;
### IPC::Open3 will call exec and exec will do the right thing
$ok = __PACKAGE__->_open3_run(
( ref $cmd ? "@$cmd" : $cmd ),
$_out_handler, $_err_handler, $verbose
);
### if we are allowed to run verbose, just dispatch the system command
} else {
__PACKAGE__->_debug( "# Using system(). Have buffer: $have_buffer" )
if $DEBUG;
$ok = __PACKAGE__->_system_run( (ref $cmd ? "@$cmd" : $cmd), $verbose );
}
### fill the buffer;
$$buffer = join '', @buffer if @buffer;
### return a list of flags and buffers (if available) in list
### context, or just a simple 'ok' in scalar
return wantarray
inc/inc_IPC-Cmd/IPC/Cmd.pm view on Meta::CPAN
STDOUT => [qw|>&|, \*STDOUT, Symbol::gensym() ],
STDERR => [qw|>&|, \*STDERR, Symbol::gensym() ],
STDIN => [qw|<&|, \*STDIN, Symbol::gensym() ],
);
### dups FDs and stores them in a cache
sub __dup_fds {
my $self = shift;
my @fds = @_;
__PACKAGE__->_debug( "# Closing the following fds: @fds" ) if $DEBUG;
for my $name ( @fds ) {
my($redir, $fh, $glob) = @{$Map{$name}} or (
Carp::carp(loc("No such FD: '%1'", $name)), next );
### MUST use the 2-arg version of open for dup'ing for
### 5.6.x compatibilty. 5.8.x can use 3-arg open
### see perldoc5.6.2 -f open for details
open $glob, $redir . fileno($fh) or (
Carp::carp(loc("Could not dup '$name': %1", $!)),
inc/inc_IPC-Cmd/IPC/Cmd.pm view on Meta::CPAN
}
return 1;
}
### reopens FDs from the cache
sub __reopen_fds {
my $self = shift;
my @fds = @_;
__PACKAGE__->_debug( "# Reopening the following fds: @fds" ) if $DEBUG;
for my $name ( @fds ) {
my($redir, $fh, $glob) = @{$Map{$name}} or (
Carp::carp(loc("No such FD: '%1'", $name)), next );
### MUST use the 2-arg version of open for dup'ing for
### 5.6.x compatibilty. 5.8.x can use 3-arg open
### see perldoc5.6.2 -f open for details
open( $fh, $redir . fileno($glob) ) or (
Carp::carp(loc("Could not restore '$name': %1", $!)),
inc/inc_IPC-Cmd/IPC/Cmd.pm view on Meta::CPAN
);
### close this FD, we're not using it anymore
close $glob;
}
return 1;
}
}
sub _debug {
my $self = shift;
my $msg = shift or return;
my $level = shift || 0;
local $Carp::CarpLevel += $level;
Carp::carp($msg);
return 1;
}
inc/inc_Params-Check/Params/Check.pm view on Meta::CPAN
If set to true, L<Params::Check> will require all values passed to be
C<defined>. If you wish to enable this on a 'per key' basis, use the
template option C<defined> instead.
Default is 0;
=head2 $Params::Check::SANITY_CHECK_TEMPLATE
If set to true, L<Params::Check> will sanity check templates, validating
for errors and unknown keys. Although very useful for debugging, this
can be somewhat slow in hot-code and large loops.
To disable this check, set this variable to C<false>.
Default is 1;
=head2 $Params::Check::WARNINGS_FATAL
If set to true, L<Params::Check> will C<croak> when an error during
template validation occurs, rather than return C<false>.
lib/Alien/wxWidgets.pm view on Meta::CPAN
$display{compiler_version} = '(any version)' unless $display{compiler_version};
return _pretty_print_configuration( \%display );
}
sub _pretty_print_configuration {
my $config = shift;
my @options = map { !defined $config->{$_} ? () :
$config->{$_} ? ( $_ ) :
( "no $_" ) }
qw(debug unicode mslu);
return "wxWidgets $config->{version} for $config->{toolkit}; " .
"compiler compatibility: $config->{compiler_kind} " .
$config->{compiler_version} . '; ' .
( @options ? 'options: ' . join( ', ', @options ) : '' ) .
"\n";
}
sub show_configurations {
my $class = shift;
lib/Alien/wxWidgets.pm view on Meta::CPAN
__END__
=head1 METHODS
=head2 load/import
use Alien::wxWidgets version => 2.004 | [ 2.004, 2.005 ],
compiler_kind => 'gcc' | 'cl', # Windows only
compiler_version => '3.3', # only GCC for now
toolkit => 'gtk2',
debug => 0 | 1,
unicode => 0 | 1,
mslu => 0 | 1,
key => $key,
;
Alien::wxWidgets->load( <same as the above> );
Using C<Alien::wxWidgets> without parameters will load a default
configuration (for most people this will be the only installed
confiuration). Additional parameters allow to be more selective.
lib/Alien/wxWidgets.pm view on Meta::CPAN
e.g. 2.008012 for wxWidgets 2.8.12 and 2.009 for wxWidgets 2.9.0.
=head2 config
my $config = Alien::wxWidgets->config;
Returns some miscellaneous configuration informations for wxWidgets
in the form
{ toolkit => 'msw' | 'gtk' | 'motif' | 'x11' | 'cocoa' | 'mac',
debug => 1 | 0,
unicode => 1 | 0,
mslu => 1 | 0,
}
=head2 include_path
my $include_path = Alien::wxWidgets->include_path;
Returns the include paths to be used in a format suitable for the
compiler (usually something like "-I/usr/local/include -I/opt/wx/include").
lib/Alien/wxWidgets.pm view on Meta::CPAN
my $prefix = Alien::wxWidgets->prefix;
Returns the install prefix for wxWidgets.
=head2 dump_configurations
Alien::wxWidgets->dump_configurations( %filters );
Prints a list of available configurations (mainly useful for
interactive use/debugging).
=head2 show_configurations
Alien::wxWidgets->show_configurations( %filters );
Prints a human-readable list of available configurations (mainly
useful for interactive use/debugging).
=head2 get_configurations
my $configs = Alien::wxWidgets->get_configurations( %filters );
Returns a list of configurations matching the given filters.
=head1 AUTHOR
Mattia Barbon <mbarbon@cpan.org>
lib/Alien/wxWidgets/Utility.pm view on Meta::CPAN
my( $cc ) = @_;
_warn_nonworking_compiler( $cc );
return 'gcc' if awx_cc_is_gcc( $cc );
return 'cl' if awx_cc_is_msvc( $cc );
return 'nc'; # as in 'No Clue'
}
# sort a list of configurations by version, debug/release, unicode/ansi, mslu
sub awx_sort_config {
# comparison functions treating undef as 0 or ''
# numerico comparison
my $make_cmpn = sub {
my $k = shift;
sub { exists $a->{$k} && exists $b->{$k} ? $a->{$k} <=> $b->{$k} :
exists $a->{$k} ? 1 :
exists $b->{$k} ? -1 :
0 }
};
lib/Alien/wxWidgets/Utility.pm view on Meta::CPAN
foreach ( @crit ) {
my $cmp = &$_;
return $cmp if $cmp;
}
return 0;
}
};
my $cmp = $crit_sort->( $make_cmpn->( 'version' ),
$rev->( $make_cmpn->( 'debug' ) ),
$make_cmpn->( 'unicode' ),
$make_cmpn->( 'mslu' ) );
return reverse sort $cmp @_;
}
sub awx_grep_config {
my( $cfgs ) = shift;
my( %a ) = @_;
# compare to a numeric range or value
lib/Alien/wxWidgets/Utility.pm view on Meta::CPAN
my $btk = $_->{toolkit} eq 'mac' ? 'osx_carbon' :
$_->{toolkit};
return $atk eq $btk;
};
# note tha if the criteria was not supplied, the comparison is a noop
my $wver = $make_cmpr->( 'version' );
my $ckind = $make_cmps->( 'compiler_kind' );
my $cver = $make_cmpn->( 'compiler_version' );
my $tkit = $compare_tk;
my $deb = $make_cmpn->( 'debug' );
my $uni = $make_cmpn->( 'unicode' );
my $mslu = $make_cmpn->( 'mslu' );
my $key = $make_cmps->( 'key' );
grep { &$wver } grep { &$ckind } grep { &$cver }
grep { &$tkit } grep { &$deb } grep { &$uni }
grep { &$mslu } grep { &$key }
@{$cfgs}
}
patches/wxMSW-2.8.10-w64.patch view on Meta::CPAN
- HGLOBAL hDevMode = (HGLOBAL)(DWORD) data->GetDevMode();
+ HGLOBAL hDevMode = (HGLOBAL) data->GetDevMode();
DEVMODE *lpDevMode = hDevMode ? (DEVMODE *)::GlobalLock(hDevMode) : NULL;
Index: src/msw/window.cpp
===================================================================
--- src/msw/window.cpp (revisione 63679)
+++ src/msw/window.cpp (copia locale)
@@ -2596,8 +2596,8 @@
// trace all messages - useful for the debugging
#ifdef __WXDEBUG__
wxLogTrace(wxTraceMessages,
- wxT("Processing %s(hWnd=%08lx, wParam=%8lx, lParam=%8lx)"),
- wxGetMessageName(message), (long)hWnd, (long)wParam, lParam);
+ wxT("Processing %s(hWnd=%p, wParam=%8lx, lParam=%8lx)"),
+ wxGetMessageName(message), hWnd, (long)wParam, lParam);
#endif // __WXDEBUG__
wxWindowMSW *wnd = wxFindWinFromHandle((WXHWND) hWnd);
@@ -3449,7 +3455,7 @@
patches/wxMSW-2.8.11-w64.patch view on Meta::CPAN
- HGLOBAL hDevMode = (HGLOBAL)(DWORD) data->GetDevMode();
+ HGLOBAL hDevMode = (HGLOBAL) data->GetDevMode();
DEVMODE *lpDevMode = hDevMode ? (DEVMODE *)::GlobalLock(hDevMode) : NULL;
Index: src/msw/window.cpp
===================================================================
--- src/msw/window.cpp (revisione 63679)
+++ src/msw/window.cpp (copia locale)
@@ -2596,8 +2596,8 @@
// trace all messages - useful for the debugging
#ifdef __WXDEBUG__
wxLogTrace(wxTraceMessages,
- wxT("Processing %s(hWnd=%08lx, wParam=%8lx, lParam=%8lx)"),
- wxGetMessageName(message), (long)hWnd, (long)wParam, lParam);
+ wxT("Processing %s(hWnd=%p, wParam=%8lx, lParam=%8lx)"),
+ wxGetMessageName(message), hWnd, (long)wParam, lParam);
#endif // __WXDEBUG__
wxWindowMSW *wnd = wxFindWinFromHandle((WXHWND) hWnd);
@@ -3449,7 +3455,7 @@
patches/wxMSW-2.8.12-w64.patch view on Meta::CPAN
- HGLOBAL hDevMode = (HGLOBAL)(DWORD) data->GetDevMode();
+ HGLOBAL hDevMode = (HGLOBAL) data->GetDevMode();
DEVMODE *lpDevMode = hDevMode ? (DEVMODE *)::GlobalLock(hDevMode) : NULL;
Index: src/msw/window.cpp
===================================================================
--- src/msw/window.cpp (revisione 63679)
+++ src/msw/window.cpp (copia locale)
@@ -2596,8 +2596,8 @@
// trace all messages - useful for the debugging
#ifdef __WXDEBUG__
wxLogTrace(wxTraceMessages,
- wxT("Processing %s(hWnd=%08lx, wParam=%8lx, lParam=%8lx)"),
- wxGetMessageName(message), (long)hWnd, (long)wParam, lParam);
+ wxT("Processing %s(hWnd=%p, wParam=%8lx, lParam=%8lx)"),
+ wxGetMessageName(message), hWnd, (long)wParam, lParam);
#endif // __WXDEBUG__
wxWindowMSW *wnd = wxFindWinFromHandle((WXHWND) hWnd);
@@ -3449,7 +3455,7 @@