/usr/lib/perl5/Wx/build/MakeMaker/Any_OS.pm is in libwx-perl 1:0.9922-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 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 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 | package Wx::build::MakeMaker::Any_OS;
use strict;
use base 'Wx::build::MakeMaker';
use File::Spec::Functions qw(curdir);
use Wx::build::Options;
use Wx::build::Utils qw(xs_dependencies lib_file);
my $exp = lib_file( 'Wx/Wx_Exp.pm' );
my @generated_xs = qw(XS/ItemContainer.xs XS/ItemContainerImmutable.xs
XS/VarScrollHelperBase.xs XS/VarVScrollHelper.xs
XS/VarHScrollHelper.xs XS/VarHVScrollHelper.xs);
sub get_flags {
my $this = shift;
my %config;
if( %Wx::build::MakeMaker::additional_arguments ) {
$config{WX}{lc $_} = $Wx::build::MakeMaker::additional_arguments{$_}
foreach keys %Wx::build::MakeMaker::additional_arguments;
$ExtUtils::MakeMaker::Recognized_Att_Keys{WX} = 1;
%Wx::build::MakeMaker::additional_arguments = ();
}
if( $config{WX}{wx_overload} ) {
$_ = File::Spec->catfile( split /\//, $_ )
foreach values %{$config{WX}{wx_overload}};
}
$config{INC} .= '-I' . curdir . ' ';
$config{INC} .= '-I' . $this->get_api_directory . ' ';
unless( $this->_core ) {
$config{DEFINE} .= " -DWXPL_EXT ";
}
if( $this->_static ) {
$config{DEFINE} .= " -DWXPL_STATIC ";
}
return %config;
}
sub metafile_target_ext {
return '' if Wx::build::MakeMaker::is_wxPerl_tree;
return shift->MM::metafile_target( @_ );
}
sub metafile_target_core {
return shift->MM::metafile_target( @_ );
}
sub configure_core {
my $this = shift;
my %config = $this->get_flags;
$config{clean} =
{ FILES => "$config{WX}{wx_overload}{source}" .
" $config{WX}{wx_overload}{header} Opt" .
" files.lst cpp/setup.h cpp/v_cback_def.h" .
" " . join( " ", @generated_xs ) .
" overload.lst xspp wxt_*" };
return %config;
}
sub configure_ext {
my $this = shift;
my %config = $this->get_flags;
my( $ovlc, $ovlh ) = $config{WX}{wx_overload} ?
@{$config{WX}{wx_overload}}{qw(source header)} : ();
if( $ovlc && $ovlh ) {
$config{clean} =
{ FILES => "$config{WX}{wx_overload}{source}" .
" $config{WX}{wx_overload}{header} wxt_overload" };
}
$config{clean}{FILES} .= " xspp";
return %config;
}
sub files_with_constants {
my( $this ) = @_;
return @{$this->{wx_files_with_constants}}
if $this->{wx_files_with_constants};
return @{$this->{wx_files_with_constants} =
[ Wx::build::Utils::files_with_constants ]};
}
sub files_with_overload {
my( $this ) = @_;
return @{$this->{wx_files_with_overload}}
if $this->{wx_files_with_overload};
return @{$this->{wx_files_with_overload} =
[ Wx::build::Utils::files_with_overload ]};
}
sub _depend_common {
my $this = shift;
my $top_file = $this->{WX}{wx_top}
|| $this->{ARGS}{VERSION_FROM}
|| $this->{ARGS}{ABSTRACT_FROM}
|| 'Wx.pm';
my( $ovlc, $ovlh ) = $this->{WX}{wx_overload} ?
@{$this->{WX}{wx_overload}}{qw(source header)} : ();
return ( xs_dependencies( $this, [ curdir, $this->get_api_directory
],
Wx::build::Utils::src_dir( $top_file ) ),
# overload
( $ovlc && $ovlh ?
( $ovlc => 'wxt_overload',
$ovlh => $ovlc,
) :
( ) ),
);
}
sub depend_core {
my $this = shift;
my %files = $this->files_to_install();
my %depend = ( _depend_common( $this ),
$exp => join( ' ', $this->files_with_constants, ),
'wxt_fix_alien' => 'pm_to_blib',
'pm_to_blib' => 'wxt_copy_files',
'blibdirs' => 'wxt_copy_files',
'blibdirs.ts' => 'wxt_copy_files',
'wxt_copy_files' => join( ' ', keys %files ),
);
my %this_depend = @_;
foreach ( keys %depend ) {
$this_depend{$_} .= ' ' . $depend{$_};
}
$this->SUPER::depend_core( %this_depend );
}
sub depend_ext {
my $this = shift;
my %depend = _depend_common( $this );
my %this_depend = @_;
foreach ( keys %depend ) {
$this_depend{$_} .= ' ' . $depend{$_};
}
$this->SUPER::depend_ext( %this_depend );
}
sub subdirs_core {
my $this = shift;
my $text = $this->SUPER::subdirs_core( @_ );
return <<EOT . $text;
subdirs :: wxt_overload
EOT
}
sub subdirs_ext {
my $this = shift;
my $text = $this->SUPER::subdirs_core( @_ );
return ( $this->{WX}{wx_overload} ? <<EOT : '' ) . $text;
subdirs :: wxt_overload
EOT
}
sub postamble_overload {
my( $this ) = @_;
# command line length workaround
if( !Wx::build::MakeMaker::is_wxPerl_tree
|| Wx::build::MakeMaker::is_core ) {
Wx::build::Utils::write_string( 'overload.lst',
join "\n", $this->files_with_overload );
}
my $ovl_script = Wx::build::MakeMaker::is_wxPerl_tree() ?
'script/wxperl_overload' : "-S wxperl_overload";
my( $ovlc, $ovlh ) = $this->{WX}{wx_overload} ?
@{$this->{WX}{wx_overload}}{qw(source header)} : ();
return ( $this->{WX}{wx_overload} ? <<EOT : '' );
wxt_overload :
\t\$(PERL) $ovl_script $ovlc $ovlh overload.lst
\t\$(TOUCH) wxt_overload
EOT
}
sub postamble_core {
my $this = shift;
my %files = $this->files_to_install();
# not all the dependencies added in Utils.pm for Wx_Exp.pm are
# strictly necessary, but it's better to keep them in case the
# dependencies here are changed
require Data::Dumper;
Wx::build::Utils::write_string( 'files.lst',
Data::Dumper->Dump( [ \%files ] ) );
# $exp and fix_alien depend on wxt_copy_files to ensure that blib/lib/Wx
# has been created
my $text = <<EOT . $this->postamble_overload;
$exp : wxt_copy_files wxt_binary_\$(LINKTYPE)
\t\$(PERL) script/make_exp_list.pl $exp @{[$this->files_with_constants]} xspp/*.h ext/*/xspp/*.h
\$(LINKTYPE) :: wxt_fix_alien $exp
wxt_binary_static : \$(INST_STATIC)
\$(NOECHO) \$(TOUCH) wxt_binary_static
wxt_binary_dynamic : \$(INST_DYNAMIC)
\$(NOECHO) \$(TOUCH) wxt_binary_dynamic
wxt_copy_files :
\t\$(PERL) script/copy_files.pl files.lst
\t\$(TOUCH) wxt_copy_files
wxt_fix_alien : wxt_copy_files lib/Wx/Mini.pm
\t\$(PERL) script/fix_alien_path.pl lib/Wx/Mini.pm blib/lib/Wx/Mini.pm
\t\$(TOUCH) wxt_fix_alien
parser :
yapp -v -s -m Wx::XSP::Grammar -o build/Wx/XSP/Grammar.pm build/Wx/XSP/XSP.yp
typemap : typemap.tmpl script/make_typemap.pl
\$(PERL) script/make_typemap.pl typemap.tmpl typemap
cpp/v_cback_def.h : script/make_v_cback.pl
\$(PERL) script/make_v_cback.pl > cpp/v_cback_def.h
EOT
foreach my $f ( @generated_xs ) {
my $file = File::Spec->canonpath( $f );
$text .= sprintf <<EOT, $file, $file, $file, $file;
%s : %sp typemap.xsp
\$(PERL) -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp %sp > %s
EOT
}
$text .= sprintf <<EOT, join( ' ', @generated_xs );
generated : cpp/v_cback_def.h typemap %s wxt_overload
EOT
$text;
}
sub postamble_ext {
my( $this ) = @_;
return $this->postamble_overload;
}
# here because File::Find::find chdirs, and our is_core is,
# er, quite limited
sub libscan_ext {
my( $this, $inst ) = @_;
$inst =~ s/(\W+)build\W+Wx/$1Wx/i && return $inst;
return $this->SUPER::libscan_core( $inst );
}
sub constants_core {
my $this = shift;
foreach my $k ( grep { m/~$/ } keys %{$this->{PM}} ) {
delete $this->{PM}{$k};
}
return $this->SUPER::constants_core( @_ );
}
# returns an hash of files to be copied
sub files_to_install {
my @api = qw(cpp/chkconfig.h
cpp/compat.h
cpp/constants.h
cpp/event.h
cpp/e_cback.h
cpp/helpers.h
cpp/overload.h
cpp/setup.h
cpp/streams.h
cpp/v_cback.h
cpp/v_cback_def.h
cpp/wxapi.h
typemap
);
# in arch, so $INC{'Opt.pm'} will tell where arch is
return ( 'Opt', Wx::build::Utils::arch_file( 'Wx/build/Opt.pm' ),
( map { ( $_ => Wx::build::Utils::lib_file( "Wx/$_" ) ) } @api ),
);
}
sub manifypods_core {
my( $self ) = @_;
s{([\\/])build::}{$1} foreach values %{$self->{MAN3PODS}};
return $self->SUPER::manifypods_core;
}
1;
# local variables:
# mode: cperl
# end:
|