From: cthulhuology Date: Fri, 7 Aug 2009 19:50:16 +0000 (-0400) Subject: Tweaked a few setting on the Mac OS X build system to locate Mac Ports libraries... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0cdd4aa75f50a27006bf41697f215a940524f63e;p=sdlgit%2FSDL_perl.git Tweaked a few setting on the Mac OS X build system to locate Mac Ports libraries in /opt/local/include --- diff --git a/Build.PL b/Build.PL index 6bed354..cc80c12 100644 --- 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; diff --git a/lib/SDL/Config.pm b/lib/SDL/Config.pm index 8ca726b..241e3ba 100644 --- a/lib/SDL/Config.pm +++ b/lib/SDL/Config.pm @@ -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' ] } }; diff --git a/make/lib/SDL/Build.pm b/make/lib/SDL/Build.pm index a4eb392..37354a7 100644 --- a/make/lib/SDL/Build.pm +++ b/make/lib/SDL/Build.pm @@ -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} }, ], }, diff --git a/make/lib/SDL/Build/Darwin.pm b/make/lib/SDL/Build/Darwin.pm index 18d5b1e..1f090da 100644 --- a/make/lib/SDL/Build/Darwin.pm +++ b/make/lib/SDL/Build/Darwin.pm @@ -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',