From: Kartik Thakore Date: Sat, 1 Aug 2009 22:44:26 +0000 (-0400) Subject: Fixed XS building X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e00a4871f08a9980f73513369edb4e66f0956d8d;p=sdlgit%2FSDL_perl.git Fixed XS building --- diff --git a/Build.PL b/Build.PL index a0ab924..9bae626 100644 --- a/Build.PL +++ b/Build.PL @@ -35,7 +35,7 @@ my %subsystems = SDL => { file => { from => 'src/SDL.xs', - to => 'src/SDL_perl.xs', + to => 'SDL/SDL_perl.xs', }, libraries => [qw( SDL SDL_image SDL_mixer SDL_net SDL_ttf SDL_gfx png jpeg smpeg )], @@ -43,14 +43,14 @@ my %subsystems = OpenGL => { file => { from => 'src/OpenGL.xs', - to => 'src/SDL/OpenGL.xs', + to => 'SDL/OpenGL/OpenGL.xs', }, libraries => [qw( SDL GL GLU )], }, SFont => { file => { from => 'src/SFont.xs', - to => 'src/SDL/SFont.xs', + to => 'SDL/SFont/SFont.xs', }, libraries => [qw( SDL SDL_image )], }, @@ -121,7 +121,6 @@ my $links = $arch->build_links( \%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; - my $build = SDL::Build->new( dist_name => 'SDL_Perl', license => 'lgpl', @@ -135,6 +134,7 @@ my $build = SDL::Build->new( { 'Pod::ToDemo' => '0.20', }, + c_source => 'src', xs_files => \%xs, dist_author => 'David J. Goehrig ', ); diff --git a/lib/SDL/Tool/Font.pm b/lib/SDL/Tool/Font.pm index 3850f6e..02b5c39 100644 --- a/lib/SDL/Tool/Font.pm +++ b/lib/SDL/Tool/Font.pm @@ -46,7 +46,7 @@ sub DESTROY { sub print { my ($self,$surface,$x,$y,@text) = @_; die "Tool::Font::print requires a SDL::Surface\n" - unless ($SDL::DEBUG && $surface->isa('SDL::Surface')); + unless ($surface->isa('SDL::Surface')); if ($$self{-font}->isa('SDL::Font')) { $$self{-font}->use(); SDL::SFont::PutString( $$surface, $x, $y, join('',@text)); diff --git a/make/lib/SDL/Build.pm b/make/lib/SDL/Build.pm index f0c71e0..4d8a8e4 100644 --- a/make/lib/SDL/Build.pm +++ b/make/lib/SDL/Build.pm @@ -19,10 +19,10 @@ sub process_xs my ($self, $file) = @_; my $properties = $self->{properties}; + my $file_args = $self->notes( 'file_flags' )->{$file}; my @old_values = @$properties{ keys %$file_args }; @$properties{ keys %$file_args } = values %$file_args; - $self->SUPER::process_xs( $file ); @$properties{ keys %$file_args } = @old_values; } diff --git a/src/OpenGL.xs b/src/OpenGL.xs index ae36df2..a04d63c 100644 --- a/src/OpenGL.xs +++ b/src/OpenGL.xs @@ -23,7 +23,7 @@ #define GL_ALL_CLIENT_ATTRIB_BITS 0xFFFFFFF #endif /* GL_ALL_CLIENT_BITS */ -#include "../defines.h" +#include "defines.h" SV* sdl_perl_nurbs_error_hook; void diff --git a/src/SFont.xs b/src/SFont.xs index 092cf00..126ca58 100644 --- a/src/SFont.xs +++ b/src/SFont.xs @@ -23,8 +23,8 @@ #define HAVE_TLS_CONTEXT #endif -#include "../defines.h" -#include "../SFont.h" +#include "defines.h" +#include "SFont.h" #ifdef HAVE_SDL_IMAGE #include