Skip to content

Commit

Permalink
#244 patch for File::Temp->tempfile, release 1.440
Browse files Browse the repository at this point in the history
  • Loading branch information
FROGGS committed Apr 17, 2013
1 parent f48e39f commit 398a893
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 34 deletions.
3 changes: 3 additions & 0 deletions Changes
Expand Up @@ -5,6 +5,9 @@ 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.440 Sun Aug 12 2012
- patch for File::Temp->tempfile -> File::Temp::tempfile (#244) [FROGGS]

1.438 Sun Aug 12 2012
- added minimum Perl version [jtpalmer]
- added release tests to check pod syntax and coverage [jtpalmer]
Expand Down
53 changes: 23 additions & 30 deletions README
Expand Up @@ -2,14 +2,13 @@ NAME
Alien::SDL - building, finding and using SDL binaries

VERSION
Version 1.438
Version 1.440

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.

* 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:
Expand All @@ -19,17 +18,14 @@ SYNOPSIS
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.

* 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).
* 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:
Expand All @@ -49,28 +45,25 @@ SYNOPSIS
DESCRIPTION
Please see Alien for the manifesto of the Alien namespace.

In short "Alien::SDL" can be used to detect and get configuration
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).
* 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()
Expand Down Expand Up @@ -136,7 +129,7 @@ METHODS

BUGS
Please post issues and bugs at
<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Alien-SDL>
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Alien-SDL

AUTHOR
Kartik Thakore
Expand Down
2 changes: 1 addition & 1 deletion inc/My/Utility.pm
Expand Up @@ -494,7 +494,7 @@ sub check_header {
my ($cflags, @header) = @_;
print STDERR "Testing header(s): " . join(', ', @header) . "\n";
my $cb = ExtUtils::CBuilder->new(quiet => 1);
my ($fs, $src) = File::Temp->tempfile('XXXXaa', SUFFIX => '.c', UNLINK => 1);
my ($fs, $src) = File::Temp::tempfile('aaXXXX', SUFFIX => '.c', UNLINK => 1);
my $inc = '';
$inc .= "#include <$_>\n" for @header;
syswrite($fs, <<MARKER); # write test source code
Expand Down
6 changes: 3 additions & 3 deletions lib/Alien/SDL.pm
Expand Up @@ -16,11 +16,11 @@ Alien::SDL - building, finding and using SDL binaries
=head1 VERSION
Version 1.438
Version 1.440
=cut

our $VERSION = '1.438';
our $VERSION = '1.440';
$VERSION = eval $VERSION;

=head1 SYNOPSIS
Expand Down Expand Up @@ -240,7 +240,7 @@ sub check_header {
}

my $cb = ExtUtils::CBuilder->new( quiet => 1, config => $config );
my ($fs, $src) = File::Temp->tempfile('XXXXaa', SUFFIX => '.c', UNLINK => 1);
my ($fs, $src) = File::Temp::tempfile('aaXXXX', SUFFIX => '.c', UNLINK => 1);
my $inc = '';
my $i = 0;
foreach (@header) {
Expand Down

0 comments on commit 398a893

Please sign in to comment.