Fixed XS building
Kartik Thakore [Sat, 1 Aug 2009 22:44:26 +0000 (18:44 -0400)]
Build.PL
lib/SDL/Tool/Font.pm
make/lib/SDL/Build.pm
src/OpenGL.xs
src/SFont.xs

index a0ab924..9bae626 100644 (file)
--- 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 <DGOEHRIG@cpan.org>',
 );
index 3850f6e..02b5c39 100644 (file)
@@ -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));
index f0c71e0..4d8a8e4 100644 (file)
@@ -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;
 }
index ae36df2..a04d63c 100644 (file)
@@ -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
index 092cf00..126ca58 100644 (file)
@@ -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 <SDL_image.h>