view release on metacpan or search on metacpan
inc/My/Build/Any_wx_config.pm view on Meta::CPAN
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;
}
sub wxwidgets_configure_extra_flags {
inc/My/Build/Base.pm view on Meta::CPAN
sub ACTION_install {
my $self = shift;
$self->SUPER::ACTION_install;
$self->install_system_wxwidgets;
}
sub _check_data_file {
my( $self, $file, $manifest ) = @_;
require File::Spec::Unix;
my $data = do {
package main;
our( $TYPE, $URL );
local $TYPE = 'dummy';
local $URL = 'dummy';
do $file;
};
die "Unable to load data file '$file': $@" unless $data;
foreach my $p ( qw(msw mac unix) ) {
next unless exists $data->{$p};
foreach my $c ( qw(unicode ansi) ) {
next unless exists $data->{$p}{$c};
foreach my $f ( @{$data->{$p}{$c}} ) {
my $file = File::Spec->catfile( 'patches', $f );
my $manifest_file = File::Spec::Unix->catfile( 'patches', $f );
die 'Missing patch file: ', $file, "\n" unless -f $file;
die 'Patch file ', $file, ' not in MANIFEST'
unless exists $manifest->{$manifest_file};
}
}
}
}
sub _check_data_files {
inc/My/Build/Base.pm view on Meta::CPAN
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 $_ }
sub awx_wx_patches {
my $self = shift;
my $data = $self->notes( 'build_data' );
my $toolkit = $^O eq 'MSWin32' ? 'msw' :
$^O eq 'darwin' ? 'mac' :
'unix';
my $unicode = $self->awx_unicode ? 'unicode' : 'ansi';
return unless exists $data->{$toolkit} and $data->{$toolkit}{$unicode};
return map { File::Spec->rel2abs( File::Spec->catfile( 'patches', $_ ) ) }
@{$data->{$toolkit}{$unicode}};
}
sub awx_version_type {
my $self = shift;
inc/My/Build/Win32.pm view on Meta::CPAN
$files{$dll} = awx_arch_file( "rEpLaCe/lib/$base" );
}
foreach my $lib ( map { $_->{lib} } values %$dlls ) {
next unless defined $lib;
my $base = File::Basename::basename( $lib );
$files{$lib} = awx_arch_file( "rEpLaCe/lib/$base" );
}
if( $self->notes( 'build_wx' ) || $self->notes( 'mk_portable' ) ) {
require File::Find;
my $no_platform = join '|', qw(unix gtk x11 motif mac cocoa
os2 palmos univ mgl msdos gtk1
dfb);
my $wx_base = $self->awx_wx_config_data->{wxdir_build};
foreach my $find_base ( File::Spec->catdir( $wx_base, qw(include wx) ),
File::Spec->catdir( $wx_base, qw(contrib
include wx) ) ) {
next unless -d $find_base;
my $wanted = sub {
$File::Find::prune ||=
-d $_ && $_ =~ m{include[/\\]wx[/\\](?:$no_platform)$};
inc/inc_Archive-Extract/Archive/Extract.pm view on Meta::CPAN
This is the directory that the files where extracted to.
=item $ae->files
This is an array ref with the paths of all the files in the archive,
relative to the C<to> argument you specified.
To get the full path to an extracted file, you would use:
File::Spec->catfile( $to, $ae->files->[0] );
Note that all files from a tar archive will be in unix format, as per
the tar specification.
=back
=cut
sub extract {
my $self = shift;
my %hash = @_;
inc/inc_File-Fetch/File/Fetch.pm view on Meta::CPAN
package File::Fetch;
use strict;
use FileHandle;
use File::Copy;
use File::Spec;
use File::Spec::Unix;
use File::Basename qw[dirname];
use Cwd qw[cwd];
use Carp qw[carp];
use IPC::Cmd qw[can_run run];
use File::Path qw[mkpath];
use Params::Check qw[check];
use Module::Load::Conditional qw[can_load];
use Locale::Maketext::Simple Style => 'gettext';
inc/inc_File-Fetch/File/Fetch.pm view on Meta::CPAN
### file:// paths have no host ###
if( $href->{scheme} eq 'file' ) {
$href->{path} = $uri;
$href->{host} = '';
} else {
@{$href}{qw|host path|} = $uri =~ m|([^/]*)(/.*)$|s;
}
### split the path into file + dir ###
{ my @parts = File::Spec::Unix->splitpath( delete $href->{path} );
$href->{path} = $parts[1];
$href->{file} = $parts[2];
}
return $href;
}
=head2 $ff->fetch( [to => /my/output/dir/] )
inc/inc_File-Fetch/File/Fetch.pm view on Meta::CPAN
'LWP::UserAgent' => '0.0',
'HTTP::Request' => '0.0',
'HTTP::Status' => '0.0',
URI => '0.0',
};
if( can_load(modules => $use_list) ) {
### setup the uri object
my $uri = URI->new( File::Spec::Unix->catfile(
$self->path, $self->file
) );
### special rules apply for file:// uris ###
$uri->scheme( $self->scheme );
$uri->host( $self->scheme eq 'file' ? '' : $self->host );
$uri->userinfo("anonymous:$FROM_EMAIL") if $self->scheme ne 'file';
### set up the useragent object
my $ua = LWP::UserAgent->new();
inc/inc_File-Fetch/File/Fetch.pm view on Meta::CPAN
### login ###
unless( $ftp->login( anonymous => $FROM_EMAIL ) ) {
return $self->_error(loc("Could not login to '%1'",$self->host));
}
### set binary mode, just in case ###
$ftp->binary;
### create the remote path
### remember remote paths are unix paths! [#11483]
my $remote = File::Spec::Unix->catfile( $self->path, $self->file );
### fetch the file ###
my $target;
unless( $target = $ftp->get( $remote, $to ) ) {
return $self->_error(loc("Could not fetch '%1' from '%2'",
$remote, $self->host));
}
### log out ###
$ftp->quit;
inc/inc_File-Fetch/File/Fetch.pm view on Meta::CPAN
my $cmd = [
$ncftp,
'-V', # do not be verbose
'-p', $FROM_EMAIL, # email as password
$self->host, # hostname
dirname($to), # local dir for the file
# remote path to the file
### DO NOT quote things for IPC::Run, it breaks stuff.
$IPC::Cmd::USE_IPC_RUN
? File::Spec::Unix->catdir( $self->path, $self->file )
: QUOTE. File::Spec::Unix->catdir(
$self->path, $self->file ) .QUOTE
];
### shell out ###
my $captured;
unless(run( command => $cmd,
buffer => \$captured,
verbose => $DEBUG )
) {
inc/inc_File-Fetch/File/Fetch.pm view on Meta::CPAN
sub _file_fetch {
my $self = shift;
my %hash = @_;
my ($to);
my $tmpl = {
to => { required => 1, store => \$to }
};
check( $tmpl, \%hash ) or return;
### prefix a / on unix systems with a file uri, since it would
### look somewhat like this:
### file://home/kane/file
### wheras windows file uris might look like:
### file://C:/home/kane/file
my $path = ON_UNIX ? '/'. $self->path : $self->path;
my $remote = File::Spec->catfile( $path, $self->file );
### File::Copy is littered with 'die' statements :( ###
my $rv = eval { File::Copy::copy( $remote, $to ) };
inc/inc_IPC-Cmd/IPC/Cmd.pm view on Meta::CPAN
return 1 if $USE_IPC_OPEN3 && $self->can_use_ipc_open3 && !IS_WIN32;
return;
}
=head1 FUNCTIONS
=head2 $path = can_run( PROGRAM );
C<can_run> takes but a single argument: the name of a binary you wish
to locate. C<can_run> works much like the unix binary C<which> or the bash
command C<type>, which scans through your path, looking for the requested
binary .
Unlike C<which> and C<type>, this function is platform independent and
will also work on, for example, Win32.
It will return the full path to the binary you asked for if it was
found, or C<undef> if it was not.
=cut
inc/inc_IPC-Cmd/IPC/Cmd.pm view on Meta::CPAN
### to read from.
use Symbol;
my $kidout = Symbol::gensym();
my $kiderror = Symbol::gensym();
### Dup the filehandle so we can pass 'our' STDIN to the
### child process. This stops us from having to pump input
### from ourselves to the childprocess. However, we will need
### to revive the FH afterwards, as IPC::Open3 closes it.
### We'll do the same for STDOUT and STDERR. It works without
### duping them on non-unix derivatives, but not on win32.
my @fds_to_dup = ( IS_WIN32 && !$verbose
? qw[STDIN STDOUT STDERR]
: qw[STDIN]
);
__PACKAGE__->__dup_fds( @fds_to_dup );
my $pid = IPC::Open3::open3(
'<&STDIN',
(IS_WIN32 ? '>&STDOUT' : $kidout),
inc/inc_IPC-Cmd/IPC/Cmd.pm view on Meta::CPAN
@command = map { if( /([<>|&])/ ) {
$special_chars .= $1; $_;
} else {
[ split / +/ ]
}
} split( /\s*([<>|&])\s*/, $cmd );
}
### if there's a pipe in the command, *STDIN needs to
### be inserted *BEFORE* the pipe, to work on win32
### this also works on *nix, so we should do it when possible
### this should *also* work on multiple pipes in the command
### if there's no pipe in the command, append STDIN to the back
### of the command instead.
### XXX seems IPC::Run works it out for itself if you just
### dont pass STDIN at all.
# if( $special_chars and $special_chars =~ /\|/ ) {
# ### only add STDIN the first time..
# my $i;
# @command = map { ($_ eq '|' && not $i++)
# ? ( \*STDIN, $_ )
inc/inc_Module-Load-Conditional/Module/Load/Conditional.pm view on Meta::CPAN
verbose => { default => $VERBOSE },
};
my $args;
unless( $args = check( $tmpl, \%hash, $VERBOSE ) ) {
warn loc( q[A problem occurred checking arguments] ) if $VERBOSE;
return;
}
my $file = File::Spec->catfile( split /::/, $args->{module} ) . '.pm';
my $file_inc = File::Spec::Unix->catfile(
split /::/, $args->{module}
) . '.pm';
### where we store the return value ###
my $href = {
file => undef,
version => undef,
uptodate => undef,
};
inc/inc_Module-Load-Conditional/Module/Load/Conditional.pm view on Meta::CPAN
}
$href->{file} = $filename;
### user wants us to find the version from files
if( $FIND_VERSION ) {
my $in_pod = 0;
while (local $_ = <$fh> ) {
### stolen from EU::MM_Unix->parse_version to address
### #24062: "Problem with CPANPLUS 0.076 misidentifying
### versions after installing Text::NSP 1.03" where a
### VERSION mentioned in the POD was found before
### the real $VERSION declaration.
$in_pod = /^=(?!cut)/ ? 1 : /^=cut/ ? 0 : $in_pod;
next if $in_pod;
### try to find a version declaration in this string.
my $ver = __PACKAGE__->_parse_version( $_ );
inc/inc_Module-Load-Conditional/Module/Load/Conditional.pm view on Meta::CPAN
sub _parse_version {
my $self = shift;
my $str = shift or return;
my $verbose = shift or 0;
### skip commented out lines, they won't eval to anything.
return if $str =~ /^\s*#/;
### the following regexp & eval statement comes from the
### ExtUtils::MakeMaker source (EU::MM_Unix->parse_version)
### Following #18892, which tells us the original
### regex breaks under -T, we must modifiy it so
### it captures the entire expression, and eval /that/
### rather than $_, which is insecure.
if( $str =~ /(?<!\\)([\$*])(([\w\:\']*)\bVERSION)\b.*\=/ ) {
print "Evaluating: $str\n" if $verbose;
### this creates a string to be eval'd, like:
inc/inc_Module-Load/Module/Load.pm view on Meta::CPAN
file. We will try to find C<file> first in C<@INC> and if that fails,
we will try to find C<file.pm> in @INC.
If both fail, we die with the respective error messages.
=back
=head1 Caveats
Because of a bug in perl (#19213), at least in version 5.6.1, we have
to hardcode the path seperator for a require on Win32 to be C</>, like
on Unix rather than the Win32 C<\>. Otherwise perl will not read it's
own %INC accurately double load files if they are required again, or
in the worst case, core dump.
C<Module::Load> can not do implicit imports, only explicit imports.
(in other words, you always have to specify expliclity what you wish
to import from a module, even if the functions are in that modules'
C<@EXPORT>)
=head1 AUTHOR
lib/Alien/wxWidgets.pm view on Meta::CPAN
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
=item bundled files from CPAN
inc/File/Fetch/Item.pm
inc/File/Fetch.pm
inc/File/Spec/Unix.pm
inc/IPC/Cmd.pm
inc/Locale/Maketext/Simple.pm
inc/Module/Load/Conditional.pm
inc/Module/Load.pm
inc/Params/Check.pm
inc/Archive/Extract.pm
Are copyright their respective authors an can be used according
to the license specified in their CPAN distributions.
patches/data-2.8.10 view on Meta::CPAN
},
mac => { unicode => [ qw(
wxMac-2.8.3-brokengcc.patch
wxMac-2.8.10-fontdlg.patch
), @common ],
ansi => [ qw(
wxMac-2.8.3-brokengcc.patch
wxMac-2.8.10-fontdlg.patch
), @common ],
},
unix => { unicode => [ qw(
wxWidgets-2.8.10-gsocket.patch
), @common ],
ansi => [ qw(
wxWidgets-2.8.10-gsocket.patch
), @common ],
},
data => { url => ( sprintf '%s/%s-%s.%s', $URL, $BASE, $VERSION, $TYPE ),
directory => ( sprintf '%s-%s', $BASE, $VERSION ),
archive => ( sprintf '%s-%s.%s', $BASE, $VERSION, $TYPE ),
version => $VERSION,
patches/data-2.8.11 view on Meta::CPAN
wxMSW-2.8.11-filefn.patch
), @common ],
},
mac => { unicode => [ qw(
wxMac-2.8.3-brokengcc.patch
), @common ],
ansi => [ qw(
wxMac-2.8.3-brokengcc.patch
), @common ],
},
unix => { unicode => [ qw(
), @common ],
ansi => [ qw(
), @common ],
},
data => { url => ( sprintf '%s/%s-%s.%s', $URL, $BASE, $VERSION, $TYPE ),
directory => ( sprintf '%s-%s', $BASE, $VERSION ),
archive => ( sprintf '%s-%s.%s', $BASE, $VERSION, $TYPE ),
version => $VERSION,
},
patches/data-2.8.12 view on Meta::CPAN
), @common ],
},
mac => { unicode => [ qw(
wxMac-2.8.3-brokengcc.patch
), @common ],
ansi => [ qw(
wxMac-2.8.3-brokengcc.patch
), @common ],
},
unix => { unicode => [ qw(
wxGTK-2.8.12-dirdialog.patch
), @common ],
ansi => [ qw(
wxGTK-2.8.12-dirdialog.patch
), @common ],
},
data => { url => ( sprintf '%s/%s-%s.%s', $URL, $BASE, $VERSION, $TYPE ),
directory => ( sprintf '%s-%s', $BASE, $VERSION ),
archive => ( sprintf '%s-%s.%s', $BASE, $VERSION, $TYPE ),
version => $VERSION,
patches/data-2.9.0 view on Meta::CPAN
wxMSW-2.9.0-config.patch
wxMSW-2.9.0-makefiles.patch
wxMSW-2.9.0-version.patch
wxMSW-2.8.10-w64-mslu.patch
wxMSW-2.9.0-w64-filefn.patch
), @common ],
},
mac => { unicode => [ qw(wxMac-2.9.0-textctrl.patch
), @common ],
},
unix => { unicode => [ @common ],
},
data => { url => ( sprintf '%s/%s-%s.%s', $URL, $BASE, $VERSION, $TYPE ),
directory => ( sprintf '%s-%s', $BASE, $VERSION ),
archive => ( sprintf '%s-%s.%s', $BASE, $VERSION, $TYPE ),
version => $VERSION,
},
};
patches/data-2.9.1 view on Meta::CPAN
my @common = qw(wxWidgets-2.9.0-magic.patch);
{ msw => { unicode => [ qw(
wxMSW-2.9.1-setup.patch
wxMSW-2.9.1-makefiles.patch
wxMSW-2.9.1-w64-mslu.patch
), @common ],
},
mac => { unicode => [ @common ],
},
unix => { unicode => [ @common ],
},
data => { url => ( sprintf '%s/%s-%s.%s', $URL, $BASE, $VERSION, $TYPE ),
directory => ( sprintf '%s-%s', $BASE, $VERSION ),
archive => ( sprintf '%s-%s.%s', $BASE, $VERSION, $TYPE ),
version => $VERSION,
},
};
patches/data-2.9.2 view on Meta::CPAN
my $winsetuppatch = ( $FORCE_GTX ) ? 'wxMSW-2.9.2-setup_gctx.patch' : 'wxMSW-2.9.2-setup.patch';
{ msw => { unicode => [
'wxMSW-2.9.2-makefiles.patch',
$winsetuppatch,
@common
],
},
mac => { unicode => [ @common ],
},
unix => { unicode => [ @common ],
},
data => { url => ( sprintf '%s/%s-%s.%s', $URL, $BASE, $VERSION, $TYPE ),
directory => ( sprintf '%s-%s', $BASE, $VERSION ),
archive => ( sprintf '%s-%s.%s', $BASE, $VERSION, $TYPE ),
version => $VERSION,
},
};
patches/data-2.9.3 view on Meta::CPAN
my $winsetuppatch = ( $FORCE_GTX ) ? 'wxMSW-2.9.3-setup_gctx.patch' : 'wxMSW-2.9.3-setup.patch';
{ msw => { unicode => [
'wxMSW-2.9.3-makefiles.patch',
$winsetuppatch,
@common
],
},
mac => { unicode => [ 'cocoaoverlay-2-9-3.patch', @common ],
},
unix => { unicode => [ @common ],
},
data => { url => ( sprintf '%s/%s-%s.%s', $URL, $BASE, $VERSION, $TYPE ),
directory => ( sprintf '%s-%s', $BASE, $VERSION ),
archive => ( sprintf '%s-%s.%s', $BASE, $VERSION, $TYPE ),
version => $VERSION,
},
};
patches/data-2.9.4 view on Meta::CPAN
my $winsetuppatch = ( $FORCE_GTX ) ? 'wxMSW-2.9.4-setup_gctx.patch' : 'wxMSW-2.9.4-setup.patch';
{ msw => { unicode => [
'wxMSW-2.9.4-makefiles.patch',
$winsetuppatch,
@common
],
},
mac => { unicode => [ 'cocoaoverlay-2-9-3.patch', @common ],
},
unix => { unicode => [ 'wxGTK-2.9.4-dirdialog.patch', @common ],
},
data => { url => ( sprintf '%s/%s-%s.%s', $URL, $BASE, $VERSION, $TYPE ),
directory => ( sprintf '%s-%s', $BASE, $VERSION ),
archive => ( sprintf '%s-%s.%s', $BASE, $VERSION, $TYPE ),
version => $VERSION,
},
};
patches/data-3.0.0 view on Meta::CPAN
{
msw => { unicode => [
'wxMSW-3.0.0-makefiles.patch',
$winsetuppatch,
@common
],
},
mac => { unicode => [ @common ],
},
unix => { unicode => [ @common ],
},
data => { url => ( sprintf '%s/%s-%s.%s', $URL, $BASE, $VERSION, $TYPE ),
directory => ( sprintf '%s-%s', $BASE, $VERSION ),
archive => ( sprintf '%s-%s.%s', $BASE, $VERSION, $TYPE ),
version => $VERSION,
},
};
patches/data-3.0.1 view on Meta::CPAN
msw => { unicode => [
'wxMSW-3.0.0-makefiles.patch',
'wxMSW-3.0.1-defs.patch',
$winsetuppatch,
@common
],
},
mac => { unicode => [ @common ],
},
unix => { unicode => [ @common ],
},
data => { url => ( sprintf '%s/%s-%s.%s', $URL, $BASE, $VERSION, $TYPE ),
directory => ( sprintf '%s-%s', $BASE, $VERSION ),
archive => ( sprintf '%s-%s.%s', $BASE, $VERSION, $TYPE ),
version => $VERSION,
},
};
patches/data-3.0.2 view on Meta::CPAN
msw => { unicode => [
'wxMSW-3.0.0-makefiles.patch',
'wxMSW-3.0.1-defs.patch',
$winsetuppatch,
@common
],
},
mac => { unicode => [ @common ],
},
unix => { unicode => [ @common ],
},
data => { url => ( sprintf '%s/%s-%s.%s', $URL, $BASE, $VERSION, $TYPE ),
directory => ( sprintf '%s-%s', $BASE, $VERSION ),
archive => ( sprintf '%s-%s.%s', $BASE, $VERSION, $TYPE ),
version => $VERSION,
},
};
patches/wxWidgets-2.8.10-gsocket.patch view on Meta::CPAN
@@ -15,8 +15,10 @@
#include <stdlib.h>
#include <stdio.h>
+#define GSocket GlibGSocket
#include <gdk/gdk.h>
#include <glib.h>
+#undef GSocket
#include "wx/gsocket.h"
#include "wx/unix/gsockunx.h"