Tweaked a few setting on the Mac OS X build system to locate Mac Ports libraries...
cthulhuology [Fri, 7 Aug 2009 19:50:16 +0000 (15:50 -0400)]
Build.PL
lib/SDL/Config.pm
make/lib/SDL/Build.pm
make/lib/SDL/Build/Darwin.pm

index 6bed354..cc80c12 100644 (file)
--- a/Build.PL
+++ b/Build.PL
@@ -9,6 +9,7 @@ use warnings;
 use Carp;
 use lib  'make/lib';
 
+use Data::Dumper;
 use SDL::Build;
 use YAML;
 use YAML::Node;
index 8ca726b..241e3ba 100644 (file)
@@ -4,64 +4,61 @@ my $sdl_config;
 $sdl_config = {
                 'OpenGL' => {
                               'GL' => [
-                                        '/usr/include/GL',
-                                        '/usr/lib'
+                                        '/System/Library/Frameworks/OpenGL.framework/Headers',
+                                        '/System/Library/Frameworks/OpenGL.framework/Libraries'
                                       ],
                               'SDL' => [
-                                         '/usr/include/SDL',
-                                         '/usr/lib'
+                                         '/opt/local/include/SDL',
+                                         '/opt/local/lib'
                                        ],
                               'GLU' => [
-                                         '/usr/include/GL',
-                                         '/usr/lib'
+                                         '/System/Library/Frameworks/OpenGL.framework/Headers',
+                                         '/System/Library/Frameworks/OpenGL.framework/Libraries'
                                        ]
                             },
                 'SDL' => {
                            'png' => [
-                                      '/usr/include',
-                                      '/usr/lib'
+                                      '/opt/local/include',
+                                      '/opt/local/lib'
                                     ],
                            'SDL' => [
-                                      '/usr/include/SDL',
-                                      '/usr/lib'
+                                      '/opt/local/include/SDL',
+                                      '/opt/local/lib'
                                     ],
                            'SDL_ttf' => [
-                                          '/usr/include/SDL',
-                                          '/usr/lib'
+                                          '/opt/local/include/SDL',
+                                          '/opt/local/lib'
                                         ],
                            'SDL_net' => [
-                                          '/usr/include/SDL',
-                                          '/usr/lib'
+                                          '/opt/local/include/SDL',
+                                          '/opt/local/lib'
                                         ],
                            'SDL_image' => [
-                                            '/usr/include/SDL',
-                                            '/usr/lib'
+                                            '/opt/local/include/SDL',
+                                            '/opt/local/lib'
                                           ],
                            'SDL_gfx' => [
-                                          '/usr/include/SDL',
-                                          '/usr/lib'
+                                          '/opt/local/include/SDL',
+                                          '/opt/local/lib'
                                         ],
                            'jpeg' => [
-                                       '/usr/include',
-                                       '/usr/lib'
+                                       '/opt/local/include',
+                                       '/opt/local/lib'
                                      ],
-                           'smpeg' => [
-                                        '/usr/include/smpeg',
-                                        '/usr/lib'
-                                      ],
+                           'smpeg' => 0,
                            'SDL_mixer' => [
-                                            '/usr/include/SDL',
-                                            '/usr/lib'
+                                            '/opt/local/include/SDL',
+                                            '/opt/local/lib'
                                           ]
                          },
                 'SFont' => {
                              'SDL_image' => [
-                                              '/usr/include/SDL',
-                                              '/usr/lib'
+                                              '/opt/local/include/SDL',
+                                              '/opt/local/lib'
                                             ],
                              'SDL' => [
-                                        '/usr/include/SDL',
-                                        '/usr/lib'
+                                        '/opt/local/include/SDL',
+                                        '/opt/local/lib'
                                       ]
                            }
               };
index a4eb392..37354a7 100644 (file)
@@ -158,27 +158,24 @@ sub set_flags
 {
        my ($self, $subsystems, $build, $defines, $includes, $links,
            $sdl_compile, $sdl_link) = @_;
-
        my %file_flags;
-
        while (my ($subsystem, $buildable) = each %$build)
        {
                my $sub_file     = $subsystems->{$subsystem}{file}{to};
                my $sub_includes = join(' ', @{ $includes->{$subsystem} } );
-
                $file_flags{ $sub_file } = 
                {
                        extra_compiler_flags =>
                        [
                                @{ $includes->{$subsystem} },
-                               split(' ',$sdl_compile),
+                               (split(' ',$sdl_compile)),
                                @{ $defines->{$subsystem} },
                                ( defined $Config{usethreads} ? ('-DUSE_THREADS', '-fPIC') : ('-fPIC' )),
                        ],
                        extra_linker_flags => 
                        [
                                @{ $links->{$subsystem}{paths} },
-                               split(' ',$sdl_link),
+                               (split(' ',$sdl_link)),
                                @{ $links->{$subsystem}{libs} },
                        ],
                },
index 18d5b1e..1f090da 100644 (file)
@@ -45,6 +45,8 @@ sub fetch_includes
        '/usr/local/include/gl'    => '/usr/local/lib',
        '/usr/include/GL'          => '/usr/lib', 
        '/usr/include/gl'          => '/usr/lib', 
+       '/opt/local/include/SDL'   => '/opt/local/lib',         # Mac Ports
+       '/opt/local/include'   => '/opt/local/lib',             # Mac Ports
 
        '/System/Library/Frameworks/SDL_mixer.framework/Headers'     => '../../lib',
        '/System/Library/Frameworks/SDL_image.framework/Headers'     => '../../lib',