Permalink
Browse files

added comments for MAcOSX arch fix

  • Loading branch information...
1 parent dd53f02 commit 48f9e5b4c815dd4ba046ecd1b175ceee9e4df1d1 @kthakore kthakore committed Aug 4, 2010
Showing with 18 additions and 1 deletion.
  1. +18 −1 Build.PL
View
@@ -601,5 +601,22 @@ $build->notes( 'sdl_cflags', Alien::SDL->config('cflags') );
$build->notes( 'sdl_libs', Alien::SDL->config('libs') );
$build->set_file_flags(); # creates notes('file_flags')
-# now we're ready to go!
+=pod
+
+##TODO: MacOSx Arch Fix.
+# Move this to appropriate place
+my $sdl_lib_name = 'libSDL.dylib'; #get the right extentions dynamically
+my $sdl_lib = Alien::SDL->config('prefix')."/lib/$sdl_lib_name";
+#Note 'prefix' is not set when Alien::SDL is built with preinstall SDL
+
+my $lipo_out = 'lipo -info '.$sdl_lib;
+my $arch = $1 if $lipo_out = m/architecture:\s*(\w+)\b/;
+
+my $lddflags = $build->config( 'lddflags' );
+my $ccflags = $build->config( 'cflags' );
+my $ldflags = $build->config( 'ldflags' );
+
+## foreach of above strip -arch foo and add -arch $arch
+=cut
+
$build->create_build_script();

0 comments on commit 48f9e5b

Please sign in to comment.