Permalink
Browse files

Applied patch ready for merge

  • Loading branch information...
1 parent fcfc9e0 commit 7b6a53a1f5064ca5b8ab0243f7bcf6209e6bf5a4 @kthakore kthakore committed Aug 4, 2009
Showing with 2,844 additions and 1,053 deletions.
  1. +54 −15 Build.PL
  2. +21 −8 CHANGELOG
  3. +6 −6 META.yml
  4. +66 −13 README
  5. +5 −0 TODO
  6. +28 −7 lib/SDL.pm
  7. +49 −25 lib/SDL/App.pm
  8. +26 −3 lib/SDL/Cdrom.pm
  9. +39 −38 lib/SDL/Color.pm
  10. +45 −26 lib/SDL/Constants.pm
  11. +27 −1 lib/SDL/Cursor.pm
  12. +27 −28 lib/SDL/Event.pm
  13. +27 −3 lib/SDL/Font.pm
  14. +26 −3 lib/SDL/MPEG.pm
  15. +29 −25 lib/SDL/Mixer.pm
  16. +29 −3 lib/SDL/Music.pm
  17. +27 −9 lib/SDL/OpenGL.pm
  18. +34 −15 lib/SDL/OpenGL/Constants.pm
  19. +31 −3 lib/SDL/Palette.pm
  20. +28 −3 lib/SDL/Rect.pm
  21. +27 −3 lib/SDL/SFont.pm
  22. +27 −3 lib/SDL/Sound.pm
  23. +26 −3 lib/SDL/Surface.pm
  24. +40 −17 lib/SDL/TTFont.pm
  25. +28 −3 lib/SDL/Timer.pm
  26. +28 −3 lib/SDL/Tool/Font.pm
  27. +27 −3 lib/SDL/Tool/Graphic.pm
  28. +32 −1 lib/SDL/Tutorial.pm
  29. +32 −1 lib/SDL/Tutorial/Animation.pm
  30. +34 −3 lib/SDL/Tutorial/Drawing.pm
  31. +31 −0 lib/SDL/Tutorial/Images.pm
  32. +27 −3 lib/SDL/Video.pm
  33. +27 −1 lib/SDL_perl.pm
  34. +70 −4 make/lib/SDL/Build.pm
  35. +30 −0 make/lib/SDL/Build/Cygwin.pm
  36. +70 −19 make/lib/SDL/Build/Darwin.pm
  37. +30 −0 make/lib/SDL/Build/Freebsd.pm
  38. +30 −0 make/lib/SDL/Build/Linux.pm
  39. +30 −0 make/lib/SDL/Build/MSWin32.pm
  40. +31 −1 make/lib/SDL/Build/Netbsd.pm
  41. +42 −115 src/OpenGL.xs
  42. +853 −569 src/SDL.xs
  43. +29 −9 src/SFont.h
  44. +27 −6 src/SFont.xs
  45. +25 −1 src/defines.h
  46. +26 −2 t/apppm.t
  47. +24 −0 t/cdrompm.t
  48. +28 −13 t/colorpm.t
  49. +26 −0 t/cursorpm.t
  50. +27 −3 t/eventpm.t
  51. +28 −2 t/fontpm.t
  52. +27 −3 t/mixerpm.t
  53. +26 −0 t/mpegpm.t
  54. +26 −0 t/musicpm.t
  55. +30 −15 t/opengl.t
  56. +26 −0 t/palettepm.t
  57. +26 −0 t/rectpm.t
  58. +26 −0 t/sdlpm.t
  59. +26 −0 t/soundpm.t
  60. +54 −2 t/surfacepm.t
  61. +26 −0 t/timerpm.t
  62. +27 −1 t/toolfontpm.t
  63. +28 −2 t/toolgraphicpm.t
  64. +28 −2 t/ttfontpm.t
  65. +28 −2 t/videopm.t
  66. +4 −4 typemap
View
@@ -1,8 +1,33 @@
-#! perl -w
+#!/usr/bin/env perl
#
-# Copyright (C) 2003 chromatic
-# Copyright (C) 2004 David J. Goehrig
-# Copyright (C) 2009 Kartik Thakore
+# Build.PL
+#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+#
+# ------------------------------------------------------------------------------
+#
+# Please feel free to send questions, suggestions or improvements to:
+#
+# David J. Goehrig
+# dgoehrig@cpan.org
+#
+
use strict;
use warnings;
@@ -11,7 +36,6 @@ use lib 'make/lib';
use SDL::Build;
use YAML;
-use YAML::Node;
my $sdl_compile_flags = `sdl-config --cflags`;
my $sdl_link_flags = `sdl-config --libs`;
@@ -37,22 +61,22 @@ my %subsystems =
SDL => {
file => {
from => 'src/SDL.xs',
- to => './SDL_perl.xs',
+ to => 'src/SDL_perl.xs',
},
- libraries => [qw( SDL SDL_image SDL_mixer SDL_net SDL_ttf SDL_gfx
- png jpeg smpeg )],
+ libraries => [qw( SDL SDL_image SDL_mixer SDL_sound SDL_net SDL_ttf
+ SDL_gfx SDL_svg png jpeg smpeg )],
},
OpenGL => {
file => {
from => 'src/OpenGL.xs',
- to => 'SDL/OpenGL.xs',
+ to => 'src/SDL/OpenGL.xs',
},
libraries => [qw( SDL GL GLU )],
},
SFont => {
file => {
from => 'src/SFont.xs',
- to => 'SDL/SFont.xs',
+ to => 'src/SDL/SFont.xs',
},
libraries => [qw( SDL SDL_image )],
},
@@ -71,6 +95,10 @@ my %libraries = (
define => 'HAVE_SDL_MIXER',
header => 'SDL_mixer.h'
},
+ SDL_sound => {
+ define => 'HAVE_SDL_SOUND',
+ header => 'SDL_sound.h'
+ },
SDL_net => {
define => 'HAVE_SDL_NET',
header => 'SDL_net.h'
@@ -83,6 +111,10 @@ my %libraries = (
define => 'HAVE_SDL_GFX',
header => 'SDL_gfxPrimitives.h'
},
+ SDL_svg => {
+ define => 'HAVE_SDL_SVG',
+ header => 'SDL_svg.h'
+ },
png => {
define => 'HAVE_PNG',
header => 'png.h',
@@ -109,22 +141,27 @@ my %libraries = (
# see build/lib/SDL/Build/*pm
my $arch = SDL::Build->get_arch( $^O );
+print "[Build.PL] arch $arch\n";
+
# see which subsystems can be built -- do we have headers for them?
my $build_systems = $arch->find_subsystems( \%subsystems, \%libraries );
# now write SDL::Config
$arch->write_sdl_config( $build_systems );
# and fetch all of the information needed to compile
-my $defines = $arch->build_defines( \%libraries, $build_systems );
-my $includes = $arch->build_includes( \%libraries, $build_systems );
-my $links = $arch->build_links( \%libraries, $build_systems );
+my $defines = $arch->build_defines( \%libraries, $build_systems );
+my $includes = $arch->build_includes( \%libraries, $build_systems );
+my $links = $arch->build_links( \%libraries, $build_systems );
+my $c_sources = $arch->build_c_sources( \%libraries, $build_systems );
+my $c_source = $arch->build_c_source( \%libraries, $build_systems );
+my $install_base = $arch->build_install_base( \%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(
- module_name => 'SDL',
dist_name => 'SDL_Perl',
license => 'lgpl',
dist_version_from => 'lib/SDL.pm',
@@ -137,9 +174,11 @@ my $build = SDL::Build->new(
{
'Pod::ToDemo' => '0.20',
},
- c_source => 'src',
+ c_source => $c_source,
+ c_sources => $c_sources,
xs_files => \%xs,
dist_author => 'David J. Goehrig <DGOEHRIG@cpan.org>',
+ install_base => $install_base
);
# and here's where the real (and ugly) magic works... see SDL::Build
View
@@ -1,14 +1,27 @@
Revision history for Perl extension SDL_perl.
-* Aug 2 2009 Kartik Thakore
- - Added patches
- - Verified and Tested patches
- - Clean bugs
-* Mar 3 2006 Tels 77 Tests
- - Color.pm: add rgb(), and make new($r,$g,$b) work for speed
- - add ColorRGB() to src/SDL.xs
+* Jul 8 2006 David J. Goehrig <dgoehrig@cpan.org>
+ - finished embedding data in example scripts
+ - fixed Mac OS X file associations
-* Oct 4 2004 David J. Goehrig <dgoehrig@cpan.org>
+* Mar 15 2006 David J. Goehrig <dgoehrig@cpan.org>
+ - fixed OpenGL examples to work under MacOS X using the SDL Perl.app bundle
+
+* Oct 12 2005 David J. Goehrig <dgoehrig@cpan.org>
+ - Fixed bug where SDL::App frees underlying Surface via DESTROY
+ - Added SDL_svg support
+ - cleaned up SDL_gfx support in SDL.xs
+ - cleaned up smpeg support in SDL.xs
+ - Added more SDL_sound support
+ - Added basic SDL_RWops support (TODO - perl callback for user defined)
+
+* Oct 6 2005 David J. Goehrig <dgoehrig@cpan.org>
+ - Changed constructors to die upon invalid initialization
+
+* Oct 5 2005 David J. Goehrig <dgoehrig@cpan.org>
+ - Updated the copyright notices as per the LGPL guidelines
+
+* Oct 4 2005 David J. Goehrig <dgoehrig@cpan.org>
- Patched Cygwin.pm
- Fixed SDL::Rect documentation
- Fixed Freebsd build module package designation
View
@@ -1,6 +1,6 @@
---
name: SDL_Perl
-version: 2.1.3
+version: 2.2.0
author:
- David J. Goehrig <DGOEHRIG@cpan.org>
abstract: Simple DirectMedia Layer for Perl
@@ -11,7 +11,7 @@ build_requires:
provides:
SDL:
file: lib/SDL.pm
- version: 2.1.3
+ version: 2.2.0
SDL::App:
file: lib/SDL/App.pm
SDL::Cdrom:
@@ -46,8 +46,6 @@ provides:
file: lib/SDL/Sound.pm
SDL::Surface:
file: lib/SDL/Surface.pm
- SDL::TTFont:
- file: lib/SDL/TTFont.pm
SDL::Timer:
file: lib/SDL/Timer.pm
SDL::Tool::Font:
@@ -58,12 +56,14 @@ provides:
file: lib/SDL/Tutorial.pm
SDL::Tutorial::Animation:
file: lib/SDL/Tutorial/Animation.pm
- SDL::Tutorial::Drawing:
- file: lib/SDL/Tutorial/Drawing.pm
SDL::Tutorial::Images:
file: lib/SDL/Tutorial/Images.pm
+ SDL::Tutorial:Drawing:
+ file: lib/SDL/Tutorial/Drawing.pm
SDL::Video:
file: lib/SDL/Video.pm
+ SDL:TTFont:
+ file: lib/SDL/TTFont.pm
SDL_perl:
file: lib/SDL_perl.pm
Walker:
View
@@ -1,19 +1,72 @@
-README for SDL_Perl-2.2
+README for SDL_Perl-2.2.0
-First step is to make SDL perl pass all tests in
-t/.
+What's New in 2.2.0:
-I will add these as a issue.
+SDL_Perl-2.2.0 adds support for a few new modules, fixes a few more
+bugs, and improves the error handling of the object layer. Additional
+support for SDL_sound, SDL_svg, and SDL_vnc has been added. In the
+OO layer, all constructors now die when they fail to construct an object
+with a valid underlying datastructure pointer.
-Simple Run:
-perl Build.PL
-perl Build
-perl Build test
-perl Build install
+Prerequisites:
-There are more test scripts in test/
+SDL Perl recommends installing the following libraries available
+from http://www.libsdl.org/ prior to installing:
-Disclaimer: This might be moved to CPAN when I get access
+ SDL-1.2.8
+ smpeg-0.4.5
+ SDL_image-1.2.4
+ SDL_mixer-1.2.6
+ SDL_sound-1.0.1
+ SDL_net-1.2.5
+ SDL_gfx-2.0.13
+ SDL_ttf-2.0.7
+ SDL_svg-1.1.9
+ SDL_vnc-1.0.0
+
+Additionally the following Perl modules should be installed:
+
+ Module-Build-0.22
+ Test-Simple-0.62
+
+Installation:
+
+ perl Build.PL
+ ./Build
+ ./Build test
+ ./Build install
+
+The build process will use the new Module::Build facility
+to autodetect and build SDL Perl for your platform. If
+the build fails please forward bugs to sdl-devel@perl.org.
+
+Documentation:
+
+Each module now includes its own documentation, and
+is accessible through perldoc. Additional tutorials,
+code, and tips can be found at the website:
+
+ http://sdl.perl.org
+
+Online documentation and tutorials are available through
+perldoc module.
+
+Contributing:
+
+Anyone wishing to contribute modules, sprite engines, documentation,
+and anything else that others might find useful, please join
+the mailing list:
+
+ sdl-devel@perl.org
+
+This is a mailing list for those interested in SDLperl development,
+both as an applications developer, and as a core contributor.
+
+I am always more than happy to take patches, bug reports, and
+helpful suggestions. It is feedback, both good and poor, that
+keeps projects like this going.
+
+Enjoy,
+
+David J. Goehrig <dgoehrig@cpan.org>
-kthakore <thakore.kartik@gmail.com>
-1 August 2009
View
@@ -1,5 +1,10 @@
TODO for SDL_perl
o Add SDL_EventFilter support
+ o fix OpenGL build without glu.h
+ o fix openFile: support on Mac (SDL patch)
+ o add Windows application bundle support
+ o add Linux application bundle support
+ o add embedded media module
View
@@ -1,5 +1,31 @@
+#!/usr/bin/env perl
#
-# Copyright (C) 2004 David J. Goehrig
+# SDL.pm
+#
+# Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
+#
+# ------------------------------------------------------------------------------
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+#
+# ------------------------------------------------------------------------------
+#
+# Please feel free to send questions, suggestions or improvements to:
+#
+# David J. Goehrig
+# dgoehrig@cpan.org
# Copyright (C) 2009 Kartik Thakore
package SDL;
@@ -19,14 +45,10 @@ use SDL::Constants;
BEGIN {
@ISA = qw(Exporter DynaLoader);
@EXPORT = qw( in verify &NULL );
- # reexport all SDL constants
- for (@SDL::Constants::EXPORT) {
- push @EXPORT,$_;
- }
};
-$VERSION = '2.1.3';
+$VERSION = '2.2.1';
print "$VERSION" if (defined($ARGV[0]) && ($ARGV[0] eq '--SDLperl'));
@@ -76,7 +98,6 @@ the C<SDL::Init> subroutine. This routine takes a mode flag constructed through
the bitwise OR product of the following functions:
=over 4
-
=item *
INIT_AUDIO()
Oops, something went wrong.

0 comments on commit 7b6a53a

Please sign in to comment.