if ($? >> 8)
{
croak "SDL doesn't appear to be installed.\n" .
- "Please check that sdl-config is in your path and try again.\n";
+ "Please check that sdl-config is in your path and try again.\n";
}
chomp( $sdl_compile_flags );
to => 'src/SDL_perl.xs',
},
libraries => [qw( SDL SDL_image SDL_mixer SDL_sound SDL_net SDL_ttf
- SDL_gfx SDL_svg png jpeg smpeg )],
+ SDL_gfx SDL_svg png jpeg smpeg )],
},
OpenGL => {
file => {
my $defines = $arch->build_defines( \%libraries, $build_systems );
my $includes = $arch->build_includes( \%libraries, $build_systems );
my $links = $arch->build_links( \%libraries, $build_systems );
-my $c_sources = $arch->build_c_sources( \%libraries, $build_systems );
-my $c_source = $arch->build_c_source( \%libraries, $build_systems );
-my $install_base = $arch->build_install_base( \%libraries, $build_systems );
# mangle the compilable files into a format Module::Build can understand
my %xs = map { $subsystems{$_}{file}{from} => $subsystems{$_}{file}{to} }
- keys %subsystems;
+keys %subsystems;
my $build = SDL::Build->new(
dist_name => 'SDL_Perl',
{
'Pod::ToDemo' => '0.20',
},
- c_source => $c_source,
- c_sources => $c_sources,
+ c_source => 'src',
xs_files => \%xs,
dist_author => 'David J. Goehrig <DGOEHRIG@cpan.org>',
- install_base => $install_base
);
-# and here's where the real (and ugly) magic works... see SDL::Build
+if($arch eq 'Darwin')
+{
+ $build->{c_source} = $arch->build_c_source( \%libraries, $build_systems );
+ $build->{c_sources} = $arch->build_c_sources( \%libraries, $build_systems );
+ $build->{install_base} = $arch->build_install_base( \%libraries, $build_systems );
+
+}
$build->set_flags(
\%subsystems,
$build_systems,
$sdl_config = {
'OpenGL' => {
'GL' => [
- '/System/Library/Frameworks/OpenGL.framework/Headers',
- '/System/Library/Frameworks/OpenGL.framework/Libraries'
+ '/usr/include/GL',
+ '/usr/lib'
],
- 'SDL' => 0,
+ 'SDL' => [
+ '/usr/include/SDL',
+ '/usr/lib'
+ ],
'GLU' => [
- '/System/Library/Frameworks/OpenGL.framework/Headers',
- '/System/Library/Frameworks/OpenGL.framework/Libraries'
+ '/usr/include/GL',
+ '/usr/lib'
]
},
'SDL' => {
- 'png' => 0,
- 'SDL' => 0,
- 'SDL_ttf' => 0,
+ 'png' => [
+ '/usr/include',
+ '/usr/lib'
+ ],
+ 'SDL' => [
+ '/usr/include/SDL',
+ '/usr/lib'
+ ],
+ 'SDL_ttf' => [
+ '/usr/include/SDL',
+ '/usr/lib'
+ ],
'SDL_svg' => 0,
- 'SDL_net' => 0,
- 'SDL_image' => 0,
- 'jpeg' => 0,
- 'SDL_gfx' => 0,
- 'smpeg' => 0,
- 'SDL_sound' => 0,
- 'SDL_mixer' => 0
+ 'SDL_net' => [
+ '/usr/include/SDL',
+ '/usr/lib'
+ ],
+ 'SDL_image' => [
+ '/usr/include/SDL',
+ '/usr/lib'
+ ],
+ 'jpeg' => [
+ '/usr/include',
+ '/usr/lib'
+ ],
+ 'SDL_gfx' => [
+ '/usr/include/SDL',
+ '/usr/lib'
+ ],
+ 'smpeg' => [
+ '/usr/include/smpeg',
+ '/usr/lib'
+ ],
+ 'SDL_sound' => [
+ '/usr/include/SDL',
+ '/usr/lib'
+ ],
+ 'SDL_mixer' => [
+ '/usr/include/SDL',
+ '/usr/lib'
+ ]
},
'SFont' => {
- 'SDL_image' => 0,
- 'SDL' => 0
+ 'SDL_image' => [
+ '/usr/include/SDL',
+ '/usr/lib'
+ ],
+ 'SDL' => [
+ '/usr/include/SDL',
+ '/usr/lib'
+ ]
}
};
my ( $self, $vendor ) = @_;
return 'ms_gl' unless defined $vendor;
-
return 'mesa_gl' if $vendor eq 'MESA';
return 'ms_gl' if $vendor eq 'MS';
-
-<<<<<<< HEAD
- die "Unrecognized GL vendor '$vendor'\n";
-=======
croak "Unrecognized GL vendor '$vendor'\n";
->>>>>>> sdlperl-2.1.3
+
}
sub ms_gl_subsystems