@@ -4,7 +4,12 @@ use warnings;
use lib "inc";
use File::Spec::Functions qw(catdir catfile);
use Config;
-use My::Utility qw(check_config_script check_prebuilt_binaries check_prereqs_libs check_prereqs_tools $source_packs);
+use My::Utility qw(check_config_script check_prebuilt_binaries check_prereqs_libs check_prereqs_tools $source_packs
+ check_perl_buildlibs);
+
+use Getopt::Long;
+my ( $ans, $travis ) = 0;
+GetOptions( "travis" => \$travis );
print "Welcome to Alien::SDL module installation\n";
print "-----------------------------------------\n";
@@ -103,6 +108,7 @@ my $build = $package->new(
my $choice;
my %have_libs = ();
+my %perl_libs = ();
if (defined $sdl_config) {
# handle --with-sdl-config (without params)
@@ -169,6 +175,8 @@ else {
}
}
+ $perl_libs{pthread} = check_perl_buildlibs('pthread') if $have_libs{pthread} && $^O eq 'openbsd';
+
# prebuilt binaries (windows only)
push @candidates, @{$rv} if $rv = check_prebuilt_binaries($build->os_type);
@@ -207,8 +215,17 @@ else {
$prompt_string .= "[" . $i++ . "] " . $c->{title} . "\n";
}
- $prompt_string .= "\nWhat way do you wanna go?";
- my $ans = $build->prompt($prompt_string, $recommended_candidate);
+
+ # select option '1' for travis
+ if ( defined $travis and $travis == 1 ) {
+ $ans = 1;
+ }
+
+# or prompt user for build option
+ else {
+ $prompt_string .= "\nWhat way do you wanna go?";
+ $ans = $build->prompt( $prompt_string, $recommended_candidate );
+ }
if($ans > 0 && $ans < scalar(@candidates)) {
$choice = $candidates[$ans - 1];
@@ -224,6 +241,7 @@ if($choice) {
$build->notes('env_include', $ENV{INCLUDE}) if $ENV{INCLUDE};
$build->notes('env_lib', $ENV{LIB}) if $ENV{LIB};
$build->notes('have_libs', \%have_libs);
+ $build->notes('perl_libs', \%perl_libs);
$build->create_build_script();
#### clean build_done stamp; force rebuild when running 'Build'
@@ -5,6 +5,22 @@ Versioning rule: public releases are even numbers, dev releases are odd. (same l
TODO
- check for available libs when using --with-sdl-config option
+1.446 Sat Feb 21 2015
+ - fix build on OS X Mavericks (missing symbol CGDirectPaletteRef) [FROGGS]
+ - build fix on Windows Strawberry Perl 5.20.+ [kmx]
+
+1.444 Wed May 14 2014
+ - check that perl was linked against pthread and do a pthread-less build if not (OpenBSD) [FROGGS]
+ - add patch that replaces $^ in Makefile.in, which can be a problem for BSD's make [FROGGS]
+ - let SDL_Pango.h include ft2build.h, because even when the header file ifdef's out some
+ code that needs it, the source file does not and thus explodes happily. [FROGGS]
+ - add PIC flags to CFLAGS when the compiler can handle it, this is meant to fix
+ an issue on freebsd [FROGGS]
+
+1.442 Tue Apr 22 2014
+ - bump SDL_gfx to 2.0.25 [FROGGS]
+ - fix for building on >=libX11-1.5.99.901 [FROGGS]
+
1.440 Sun Aug 12 2012
- patch for File::Temp->tempfile -> File::Temp::tempfile (#244) [FROGGS]
@@ -12,6 +12,10 @@ META.json
META.yml
patches/jpeg-8a_cygwin.patch
patches/libsdl-1.2.13-sdl-config.patch
+patches/libsdl-1.2.15-const-xdata32.1.patch
+patches/libsdl-1.2.15-const-xdata32.2.patch
+patches/libsdl-1.2.15-const-xdata32.3.patch
+patches/libsdl-1.2.15-const-xdata32.4.patch
patches/libvorbis-1.3.3-configure.patch
patches/SDL-1.2-openbsd-rldflags.patch
patches/SDL-1.2.14-configure
@@ -20,7 +24,10 @@ patches/SDL-1.2.14-openbsd-rldflags.patch
patches/SDL-1.2.14-SDL_platform_h.patch
patches/SDL-1.2.14-SDL_x11gl_c.patch
patches/SDL-1.2.14-video_mmx.patch
+patches/SDL-1.2.15-Makefile.in-OBJECTS.patch
+patches/SDL-1.2.15-mavericks-cgdirectpallete.patch
patches/SDL-1.2.15-openbsd-rldflags.patch
+patches/SDL-1.2.15-PIC-in-CFLAGS.patch
patches/SDL_config_win32.h
patches/SDL_gfx-2.0.20-configure.patch
patches/SDL_image-1.2.10-libpng-flags.patch
@@ -36,9 +43,11 @@ patches/SDL_Pango-0.1.2-API-adds.2.patch
patches/SDL_Pango-0.1.2-config-tools.1.patch
patches/SDL_Pango-0.1.2-config-tools.2.patch
patches/SDL_Pango-0.1.2-config-tools.3.patch
+patches/SDL_Pango-0.1.2-include-ft2build.h.patch
patches/test1.patch
patches/zlib-1.2.5-bsd-ldconfig.patch
README
+README.md
t/001_load.t
t/002_config.t
t/003_check_header.t
@@ -4,7 +4,7 @@
"Kartik Thakore <KTHAKORE@cpan.org>"
],
"dynamic_config" : 1,
- "generated_by" : "Module::Build version 0.4001, CPAN::Meta::Converter version 2.112621",
+ "generated_by" : "Module::Build version 0.4204",
"license" : [
"perl_5"
],
@@ -16,45 +16,45 @@
"prereqs" : {
"build" : {
"requires" : {
- "Archive::Extract" : 0,
- "Archive::Tar" : 0,
- "Archive::Zip" : 0,
- "Digest::SHA" : 0,
- "ExtUtils::CBuilder" : 0,
+ "Archive::Extract" : "0",
+ "Archive::Tar" : "0",
+ "Archive::Zip" : "0",
+ "Digest::SHA" : "0",
+ "ExtUtils::CBuilder" : "0",
"File::Fetch" : "0.24",
- "File::Find" : 0,
+ "File::Find" : "0",
"File::Path" : "2.08",
- "File::ShareDir" : 0,
- "File::Spec" : 0,
- "File::Temp" : 0,
- "File::Which" : 0,
+ "File::ShareDir" : "0",
+ "File::Spec" : "0",
+ "File::Temp" : "0",
+ "File::Which" : "0",
"Module::Build" : "0.36",
"Text::Patch" : "1.4"
}
},
"configure" : {
"requires" : {
- "Archive::Extract" : 0,
- "Capture::Tiny" : 0,
- "Digest::SHA" : 0,
+ "Archive::Extract" : "0",
+ "Capture::Tiny" : "0",
+ "Digest::SHA" : "0",
"File::Fetch" : "0.24",
- "File::Find" : 0,
+ "File::Find" : "0",
"File::Path" : "2.08",
- "File::ShareDir" : 0,
- "File::Spec" : 0,
- "File::Which" : 0,
+ "File::ShareDir" : "0",
+ "File::Spec" : "0",
+ "File::Which" : "0",
"Module::Build" : "0.36",
"Text::Patch" : "1.4"
}
},
"runtime" : {
"requires" : {
- "Capture::Tiny" : 0,
- "ExtUtils::CBuilder" : 0,
+ "Capture::Tiny" : "0",
+ "ExtUtils::CBuilder" : "0",
"File::ShareDir" : "1.00",
- "File::Spec" : 0,
- "File::Temp" : 0,
- "File::Which" : 0,
+ "File::Spec" : "0",
+ "File::Temp" : "0",
+ "File::Which" : "0",
"perl" : "5.008000"
}
}
@@ -62,7 +62,7 @@
"provides" : {
"Alien::SDL" : {
"file" : "lib/Alien/SDL.pm",
- "version" : "1.440"
+ "version" : "1.446"
}
},
"release_status" : "stable",
@@ -77,5 +77,5 @@
"url" : "http://github.com/PerlGameDev/Alien-SDL"
}
},
- "version" : "1.440"
+ "version" : "1.446"
}
@@ -3,53 +3,53 @@ abstract: 'Get, Build and Use SDL libraries'
author:
- 'Kartik Thakore <KTHAKORE@cpan.org>'
build_requires:
- Archive::Extract: 0
- Archive::Tar: 0
- Archive::Zip: 0
- Digest::SHA: 0
- ExtUtils::CBuilder: 0
- File::Fetch: 0.24
- File::Find: 0
- File::Path: 2.08
- File::ShareDir: 0
- File::Spec: 0
- File::Temp: 0
- File::Which: 0
- Module::Build: 0.36
- Text::Patch: 1.4
+ Archive::Extract: '0'
+ Archive::Tar: '0'
+ Archive::Zip: '0'
+ Digest::SHA: '0'
+ ExtUtils::CBuilder: '0'
+ File::Fetch: '0.24'
+ File::Find: '0'
+ File::Path: '2.08'
+ File::ShareDir: '0'
+ File::Spec: '0'
+ File::Temp: '0'
+ File::Which: '0'
+ Module::Build: '0.36'
+ Text::Patch: '1.4'
configure_requires:
- Archive::Extract: 0
- Capture::Tiny: 0
- Digest::SHA: 0
- File::Fetch: 0.24
- File::Find: 0
- File::Path: 2.08
- File::ShareDir: 0
- File::Spec: 0
- File::Which: 0
- Module::Build: 0.36
- Text::Patch: 1.4
+ Archive::Extract: '0'
+ Capture::Tiny: '0'
+ Digest::SHA: '0'
+ File::Fetch: '0.24'
+ File::Find: '0'
+ File::Path: '2.08'
+ File::ShareDir: '0'
+ File::Spec: '0'
+ File::Which: '0'
+ Module::Build: '0.36'
+ Text::Patch: '1.4'
dynamic_config: 1
-generated_by: 'Module::Build version 0.4001, CPAN::Meta::Converter version 2.112621'
+generated_by: 'Module::Build version 0.4204, CPAN::Meta::Converter version 2.142060'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
- version: 1.4
+ version: '1.4'
name: Alien-SDL
provides:
Alien::SDL:
file: lib/Alien/SDL.pm
- version: 1.440
+ version: '1.446'
requires:
- Capture::Tiny: 0
- ExtUtils::CBuilder: 0
- File::ShareDir: 1.00
- File::Spec: 0
- File::Temp: 0
- File::Which: 0
- perl: 5.008000
+ Capture::Tiny: '0'
+ ExtUtils::CBuilder: '0'
+ File::ShareDir: '1.00'
+ File::Spec: '0'
+ File::Temp: '0'
+ File::Which: '0'
+ perl: '5.008000'
resources:
bugtracker: http://github.com/PerlGameDev/SDL/issues?labels=Alien-SDL
license: http://dev.perl.org/licenses/
repository: http://github.com/PerlGameDev/Alien-SDL
-version: 1.440
+version: '1.446'
@@ -2,7 +2,7 @@ NAME
Alien::SDL - building, finding and using SDL binaries
VERSION
- Version 1.440
+ Version 1.446
SYNOPSIS
Alien::SDL tries (in given order) during its installation:
@@ -0,0 +1,151 @@
+# Alien::SDL [![Build Status](https://travis-ci.org/PerlGameDev/Alien-SDL.svg?branch=master)](https://travis-ci.org/PerlGameDev/Alien-SDL)
+
+NAME
+ Alien::SDL - building, finding and using SDL binaries
+
+VERSION
+ Version 1.444
+
+SYNOPSIS
+ Alien::SDL tries (in given order) during its installation:
+
+ * When given `--with-sdl-config' option use specified sdl-config script
+ to locate SDL libs.
+ perl Build.PL --with-sdl-config=/opt/sdl/bin/sdl-config
+
+ or using default script name 'sdl-config' by running:
+
+ perl Build.PL --with-sdl-config
+
+ IMPORTANT NOTE: Using --with-sdl-config avoids considering any other
+ build methods; no prompt with other available build options.
+
+ * Locate an already installed SDL via 'sdl-config' script.
+ * Check for SDL libs in directory specified by SDL_INST_DIR variable. In
+ this case the module performs SDL library detection via
+ '$SDL_INST_DIR/bin/sdl-config' script.
+ SDL_INST_DIR=/opt/sdl perl ./Build.PL
+
+ * Download prebuilt SDL binaries (if available for your platform).
+ * Build SDL binaries from source codes (if possible on your system).
+
+ Later you can use Alien::SDL in your module that needs to link agains
+ SDL and/or related libraries like this:
+
+ # Sample Makefile.pl
+ use ExtUtils::MakeMaker;
+ use Alien::SDL;
+
+ WriteMakefile(
+ NAME => 'Any::SDL::Module',
+ VERSION_FROM => 'lib/Any/SDL/Module.pm',
+ LIBS => Alien::SDL->config('libs', [-lAdd_Lib]),
+ INC => Alien::SDL->config('cflags'),
+ # + additional params
+ );
+
+DESCRIPTION
+ Please see Alien for the manifesto of the Alien namespace.
+
+ In short `Alien::SDL' can be used to detect and get configuration
+ settings from an installed SDL and related libraries. Based on your
+ platform it offers the possibility to download and install prebuilt
+ binaries or to build SDL & co. from source codes.
+
+ The important facts:
+
+ * The module does not modify in any way the already existing SDL
+ installation on your system.
+ * If you reinstall SDL libs on your system you do not need to reinstall
+ Alien::SDL (providing that you use the same directory for the new
+ installation).
+ * The prebuild binaries and/or binaries built from sources are always
+ installed into perl module's 'share' directory.
+ * If you use prebuild binaries and/or binaries built from sources it
+ happens that some of the dynamic libraries (*.so, *.dll) will not
+ automaticly loadable as they will be stored somewhere under perl
+ module's 'share' directory. To handle this scenario Alien::SDL offers
+ some special functionality (see below).
+
+METHODS
+ config()
+ This function is the main public interface to this module. Basic
+ functionality works in a very similar maner to 'sdl-config' script:
+
+ Alien::SDL->config('prefix'); # gives the same string as 'sdl-config --prefix'
+ Alien::SDL->config('version'); # gives the same string as 'sdl-config --version'
+ Alien::SDL->config('libs'); # gives the same string as 'sdl-config --libs'
+ Alien::SDL->config('cflags'); # gives the same string as 'sdl-config --cflags'
+
+ On top of that this function supports special parameters:
+
+ Alien::SDL->config('ld_shared_libs');
+
+ Returns a list of full paths to shared libraries (*.so, *.dll) that will
+ be required for running the resulting binaries you have linked with SDL
+ libs.
+
+ Alien::SDL->config('ld_paths');
+
+ Returns a list of full paths to directories with shared libraries (*.so,
+ *.dll) that will be required for running the resulting binaries you have
+ linked with SDL libs.
+
+ Alien::SDL->config('ld_shlib_map');
+
+ Returns a reference to hash of value pairs '<libnick>' =>
+ '<full_path_to_shlib'>, where '<libnick>' is shortname for SDL related
+ library like: SDL, SDL_gfx, SDL_net, SDL_sound ... + some non-SDL
+ shortnames e.g. smpeg, jpeg, png.
+
+ NOTE: config('ld_<something>') return an empty list/hash if you have
+ decided to use SDL libraries already installed on your system. This
+ concerns 'sdl-config' detection and detection via
+ '$SDL_INST_DIR/bin/sdl-config'.
+
+ check_header()
+ This function checks the availability of given header(s) when using
+ compiler options provided by "Alien::SDL->config('cflags')".
+
+ Alien::SDL->check_header('SDL.h');
+ Alien::SDL->check_header('SDL.h', 'SDL_net.h');
+
+ Returns 1 if all given headers are available, 0 otherwise.
+
+ get_header_version()
+ Tries to find a header file specified as a param in SDL prefix direcotry
+ and based on "#define" macros inside this header file tries to get a
+ version triplet.
+
+ Alien::SDL->get_header_version('SDL_mixer.h');
+ Alien::SDL->get_header_version('SDL_version.h');
+ Alien::SDL->get_header_version('SDL_gfxPrimitives.h');
+ Alien::SDL->get_header_version('SDL_image.h');
+ Alien::SDL->get_header_version('SDL_mixer.h');
+ Alien::SDL->get_header_version('SDL_net.h');
+ Alien::SDL->get_header_version('SDL_ttf.h');
+ Alien::SDL->get_header_version('smpeg.h');
+
+ Returns string like '1.2.3' or undef if not able to find and parse
+ version info.
+
+BUGS
+ Please post issues and bugs at
+ http://rt.cpan.org/NoAuth/Bugs.html?Dist=Alien-SDL
+
+AUTHOR
+ Kartik Thakore
+ CPAN ID: KTHAKORE
+ Thakore.Kartik@gmail.com
+ http://yapgh.blogspot.com
+
+ACKNOWLEDGEMENTS
+ kmx - complete redesign between versions 0.7.x and 0.8.x
+
+COPYRIGHT
+ This program is free software; you can redistribute it and/or modify it
+ under the same terms as Perl itself.
+
+ The full text of the license can be found in the LICENSE file included
+ with this module.
+
@@ -37,7 +37,12 @@ sub get_additional_libs {
}
}
push @list, (keys %rv);
- push @list, '-lpthread' if ($^O eq 'openbsd');
+ if ($^O eq 'openbsd') {
+ my $osver = `uname -r 2>/dev/null`;
+ if ($self->notes('perl_libs')->{pthread} || ($osver && $osver < 5.0)) {
+ push @list, '-lpthread'
+ }
+ }
return join(' ', @list);
}
@@ -161,8 +166,11 @@ sub _get_configure_cmd {
$extra .= ' --disable-audio';
}
- if($pack eq 'SDL' && $^O eq 'openbsd') {
- $extra_ldflags .= ' -lpthread';
+ if ($pack eq 'SDL' && $^O eq 'openbsd') {
+ my $osver = `uname -r 2>/dev/null`;
+ if (!$self->notes('perl_libs')->{pthread} || !$osver || $osver >= 5.0) {
+ $extra .= ' --disable-pthreads';
+ }
}
if($pack =~ /^SDL_/) {
@@ -266,6 +266,13 @@ sub set_config_data {
}
}
+ if ($^O eq 'openbsd') {
+ my $osver = `uname -r 2>/dev/null`;
+ if (!$self->notes('perl_libs')->{pthread} || !$osver || $osver >= 5.0) {
+ $cfg->{libs} =~ s/\s*-l?pthread//g;
+ }
+ }
+
# write config
$self->config_data('additional_cflags', '-I' . $self->get_path('@PrEfIx@/include') . ' ' .
'-I' . $self->get_path('@PrEfIx@/include/smpeg') . ' ' .
@@ -330,8 +337,17 @@ sub set_ld_config {
pangoft2 pango gobject gmodule glib fontconfig expat )) {
if( !$shlib_map{$_} && $have_libs->{$_}->[0] ) {
next unless defined $have_libs->{$_}->[1];
- push @{ $cfg->{ld_shared_libs} }, $have_libs->{$_}->[1];
- $shlib_map{$_} = $have_libs->{$_}->[1];
+ if ($_ eq 'pthread' && $^O eq 'openbsd') {
+ my $osver = `uname -r 2>/dev/null`;
+ if ($self->notes('perl_libs')->{pthread} || ($osver && $osver < 5.0)) {
+ push @{ $cfg->{ld_shared_libs} }, $have_libs->{$_}->[1];
+ $shlib_map{$_} = $have_libs->{$_}->[1];
+ }
+ }
+ else {
+ push @{ $cfg->{ld_shared_libs} }, $have_libs->{$_}->[1];
+ $shlib_map{$_} = $have_libs->{$_}->[1];
+ }
}
}
@@ -4,7 +4,7 @@ use warnings;
use base qw(Exporter);
our @EXPORT_OK = qw(check_config_script check_prebuilt_binaries check_prereqs_libs check_prereqs_tools find_SDL_dir find_file check_header
- sed_inplace get_dlext $inc_lib_candidates $source_packs);
+ sed_inplace get_dlext $inc_lib_candidates $source_packs check_perl_buildlibs);
use Config;
use ExtUtils::CBuilder;
use File::Spec::Functions qw(splitdir catdir splitpath catpath rel2abs);
@@ -43,7 +43,7 @@ my $prebuilt_binaries = [
'http://froggs.de/libsdl/Win32_SDL-1.2.14-extended-bin_20100704.zip',
],
sha1sum => '98409ddeb649024a9cc1ab8ccb2ca7e8fe804fd8',
- arch_re => qr/^MSWin32-x86-multi-thread$/,
+ arch_re => qr/^MSWin32-x86-multi-thread(-64int)?$/,
os_re => qr/^MSWin32$/,
cc_re => qr/gcc/,
},
@@ -55,7 +55,7 @@ my $prebuilt_binaries = [
'http://froggs.de/libsdl/Win32_SDL-1.2.14-extended-bin_20111205.zip',
],
sha1sum => '553b7e21bb650d047ec9f2a5f650c67d76430e61',
- arch_re => qr/^MSWin32-x86-multi-thread$/,
+ arch_re => qr/^MSWin32-x86-multi-thread(-64int)?$/,
os_re => qr/^MSWin32$/,
cc_re => qr/gcc/,
},
@@ -188,6 +188,13 @@ our $source_packs = [
patches => [
'test1.patch',
'SDL-1.2-openbsd-rldflags.patch',
+ 'libsdl-1.2.15-const-xdata32.1.patch',
+ 'libsdl-1.2.15-const-xdata32.2.patch',
+ 'libsdl-1.2.15-const-xdata32.3.patch',
+ 'libsdl-1.2.15-const-xdata32.4.patch',
+ 'SDL-1.2.15-PIC-in-CFLAGS.patch',
+ 'SDL-1.2.15-Makefile.in-OBJECTS.patch',
+ 'SDL-1.2.15-mavericks-cgdirectpallete.patch',
],
prereqs => {
libs => [
@@ -277,13 +284,13 @@ our $source_packs = [
},
{
pack => 'SDL_gfx',
- version => '2.0.23',
- dirname => 'SDL_gfx-2.0.23',
+ version => '2.0.25',
+ dirname => 'SDL_gfx-2.0.25',
url => [
- 'http://www.ferzkopp.net/Software/SDL_gfx-2.0/SDL_gfx-2.0.23.tar.gz',
- 'http://froggs.de/libsdl/SDL_gfx-2.0.23.tar.gz',
+ 'http://froggs.de/libsdl/SDL_gfx-2.0.25.tar.gz',
+ 'http://www.ferzkopp.net/Software/SDL_gfx-2.0/SDL_gfx-2.0.25.tar.gz',
],
- sha1sum => 'aae60e7fed539f3f8a0a0bd6da3bbcf625642596',
+ sha1sum => '20a89d0b71b7b790b830c70f17ed2c44100bc0f4',
patches => [ ],
prereqs => {
libs => [ ]
@@ -304,6 +311,7 @@ our $source_packs = [
'SDL_Pango-0.1.2-config-tools.1.patch',
'SDL_Pango-0.1.2-config-tools.2.patch',
'SDL_Pango-0.1.2-config-tools.3.patch',
+ 'SDL_Pango-0.1.2-include-ft2build.h.patch',
],
prereqs => {
libs => [
@@ -411,6 +419,27 @@ sub check_prereqs_libs {
return $ret;
}
+sub check_perl_buildlibs {
+ my @libs = @_;
+ my $ret = 1;
+ my $dlext = get_dlext();
+ my $devnull = File::Spec->devnull();
+ for my $lib (@libs) {
+ print "checking if perl is linked against $lib... ";
+ if($Config{libs} =~ /\Q-l$lib\E\b/
+ || $Config{perllibs} =~ /\Q-l$lib\E\b/
+ || `ldd $^X 2>$devnull` =~ /[\/\\]lib\Q$lib\E[\-\d\.]*\.($dlext[\d\.]*|so|dll)$/) {
+ print "yes\n";
+ $ret &= 1;
+ }
+ else {
+ print "no\n";
+ $ret = 0;
+ }
+ }
+ return $ret;
+}
+
sub check_prereqs {
my $bp = shift;
my $ret = 1;
@@ -545,7 +574,7 @@ sub get_dlext {
return 'la';
}
else {
- return $Config{dlext};
+ return $Config{so};
}
}
@@ -16,11 +16,11 @@ Alien::SDL - building, finding and using SDL binaries
=head1 VERSION
-Version 1.440
+Version 1.446
=cut
-our $VERSION = '1.440';
+our $VERSION = '1.446';
$VERSION = eval $VERSION;
=head1 SYNOPSIS
@@ -0,0 +1,15 @@
+--- SDL-1.2/Makefile.in 2012-05-28 13:21:48.000000000 +0200
++++ SDL-1.2/Makefile.in.new 2014-05-04 20:07:10.000000000 +0200
+@@ -72,10 +72,10 @@
+ include $(depend)
+
+ $(objects)/$(TARGET): $(OBJECTS)
+- $(LIBTOOL) --mode=link $(CC) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
++ $(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
+
+ $(objects)/$(SDLMAIN_TARGET): $(SDLMAIN_OBJECTS)
+- $(LIBTOOL) --mode=link $(CC) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS) $(SDLMAIN_LDFLAGS)
++ $(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS) $(SDLMAIN_LDFLAGS)
+
+
+ install: all install-bin install-hdrs install-lib install-data install-man
@@ -0,0 +1,13 @@
+--- SDL-1.2/configure 2014-04-23 12:59:05.000000000 +0200
++++ SDL-1.2/configure 2014-04-23 12:59:14.000000000 +0200
+@@ -7538,7 +7538,9 @@
+ if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
+ case $lt_prog_compiler_pic in
+ "" | " "*) ;;
+- *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
++ *) lt_prog_compiler_pic=" $lt_prog_compiler_pic"
++ CFLAGS="$CFLAGS$lt_prog_compiler_pic"
++ ;;
+ esac
+ else
+ lt_prog_compiler_pic=
@@ -0,0 +1,10 @@
+--- SDL-1.2.15/src/video/quartz/SDL_QuartzVideo.h 2012-01-19 07:30:06.000000000 +0100
++++ SDL-1.2.15/src/video/quartz/SDL_QuartzVideo.h 2014-09-25 13:56:44.941891402 +0200
+@@ -91,7 +91,6 @@
+ CGDirectDisplayID display; /* 0 == main display (only support single display) */
+ const void *mode; /* current mode of the display */
+ const void *save_mode; /* original mode of the display */
+- CGDirectPaletteRef palette; /* palette of an 8-bit display */
+ NSOpenGLContext *gl_context; /* OpenGL rendering context */
+ NSGraphicsContext *nsgfx_context; /* Cocoa graphics context */
+ Uint32 width, height, bpp; /* frequently used data about the display */
@@ -0,0 +1,10 @@
+--- SDL_Pango-0.1.2/src/SDL_Pango.h 2014-04-23 13:10:40.000000000 +0200
++++ SDL_Pango-0.1.2/src/SDL_Pango.h 2014-04-24 10:22:58.000000000 +0200
+@@ -34,6 +34,7 @@
+ #include "SDL.h"
+
+ #include "begin_code.h"
++#include <ft2build.h>
+
+ #ifdef __cplusplus
+ extern "C" {
@@ -0,0 +1,20 @@
+--- SDL-1.2/configure.in 2012-05-28 13:21:49.000000000 +0200
++++ SDL-1.2/configure.in 2014-04-22 20:22:46.000000000 +0200
+@@ -1127,6 +1127,17 @@
+ if test x$definitely_enable_video_x11_xrandr = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_X11_XRANDR)
+ fi
++ AC_MSG_CHECKING(for const parameter to _XData32)
++ have_const_param_xdata32=no
++ AC_TRY_COMPILE([
++ #include <X11/Xlibint.h>
++ extern int _XData32(Display *dpy,register _Xconst long *data,unsigned len);
++ ],[
++ ],[
++ have_const_param_xdata32=yes
++ AC_DEFINE(SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32)
++ ])
++ AC_MSG_RESULT($have_const_param_xdata32)
+ fi
+ fi
+ }
@@ -0,0 +1,10 @@
+--- SDL-1.2/include/SDL_config.h.in 2012-05-28 13:21:49.000000000 +0200
++++ SDL-1.2/include/SDL_config.h.in 2014-04-22 20:24:02.000000000 +0200
+@@ -282,6 +282,7 @@
+ #undef SDL_VIDEO_DRIVER_WINDIB
+ #undef SDL_VIDEO_DRIVER_WSCONS
+ #undef SDL_VIDEO_DRIVER_X11
++#undef SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32
+ #undef SDL_VIDEO_DRIVER_X11_DGAMOUSE
+ #undef SDL_VIDEO_DRIVER_X11_DYNAMIC
+ #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT
@@ -0,0 +1,14 @@
+--- SDL-1.2/src/video/x11/SDL_x11sym.h 2012-05-28 13:21:49.000000000 +0200
++++ SDL-1.2/src/video/x11/SDL_x11sym.h 2014-04-22 20:18:37.000000000 +0200
+@@ -165,7 +165,11 @@
+ */
+ #ifdef LONG64
+ SDL_X11_MODULE(IO_32BIT)
++#if SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32
++SDL_X11_SYM(int,_XData32,(Display *dpy,register _Xconst long *data,unsigned len),(dpy,data,len),return)
++#else
+ SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len),(dpy,data,len),return)
++#endif
+ SDL_X11_SYM(void,_XRead32,(Display *dpy,register long *data,long len),(dpy,data,len),)
+ #endif
+
@@ -0,0 +1,62 @@
+--- SDL-1.2/configure 2014-04-22 20:52:13.000000000 +0200
++++ SDL-1.2/configure 2014-04-22 20:52:27.000000000 +0200
+@@ -24440,6 +24440,59 @@
+ _ACEOF
+
+ fi
++ { echo "$as_me:$LINENO: checking for const parameter to _XData32" >&5
++ echo $ECHO_N "checking for const parameter to _XData32... $ECHO_C" >&6; }
++ have_const_param_xdata32=no
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++ cat confdefs.h >>conftest.$ac_ext
++ cat >>conftest.$ac_ext <<_ACEOF
++#include <X11/Xlibint.h>
++extern int _XData32(Display *dpy,register _Xconst long *data,unsigned len);
++
++int
++main ()
++{
++
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest$ac_exeext &&
++ $as_test_x conftest$ac_exeext; then
++ have_const_param_xdata32=yes
++ cat >>confdefs.h <<\_ACEOF
++#define SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32 1
++_ACEOF
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ have_const_param_xdata32=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
++ conftest$ac_exeext conftest.$ac_ext
++ { echo "$as_me:$LINENO: result: $have_const_param_xdata32" >&5
++ echo "${ECHO_T}$have_const_param_xdata32" >&6; }
+ fi
+ fi
+ }