Skip Menu |

This queue is for tickets about the SDL_perl CPAN distribution.

Report information
The Basics
Id: 49003
Status: resolved
Priority: 0/
Queue: SDL_perl

People
Owner: KTHAKORE [...] cpan.org
Requestors: kmx [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: v2.2.1.8
Fixed in: (no value)



Subject: [PATCH] Win32 compatibility
Hi, please find enclosed SDL_Perl-v2.2.1.8_win32_patch2.diff.gz containing a patch that makes SDL_Perl installable on Win32/strawberry perl. I have developed and tested this patch on strawberry perl 5.10.0.6. To Make SDL_Perl running on Win32 you need the following: 1) install SDL library according this RT - http://rt.cpan.org/Ticket/Display.html?id=49001 (there is an attached ZIP to this RT that you can simply unzip into your c:\strawberry) 2) apply attached SDL_Perl-v2.2.1.8_win32_patch2.diff.gz 3) patch your ExtUtils::CBuilder according this RT: http://rt.cpan.org/Ticket/Display.html?id=49000 Please consider the proposed patch. I think it is quite obvious from the patch what I have changed but I can give you more details if you want. I am open to any discussion - here or at IRC (#win32) or at sdl-devel@perl.org. -- kmx

Message body not shown because it is not plain text.

On Tue Aug 25 17:16:53 2009, KMX wrote: Show quoted text
> Hi, > > please find enclosed SDL_Perl-v2.2.1.8_win32_patch2.diff.gz containing a > patch that makes SDL_Perl installable on Win32/strawberry perl. I have > developed and tested this patch on strawberry perl 5.10.0.6. > > To Make SDL_Perl running on Win32 you need the following: > > 1) install SDL library according this RT - > http://rt.cpan.org/Ticket/Display.html?id=49001 (there is an attached > ZIP to this RT that you can simply unzip into your c:\strawberry)
I cannot find this. But I have made a similar tarball with all the other libs to http://cloud.github.com/downloads/kthakore/SDL_perl/sdlperl-deps.tar.bz2 . Can you try this? Show quoted text
> 2) apply attached SDL_Perl-v2.2.1.8_win32_patch2.diff.gz > > 3) patch your ExtUtils::CBuilder according this RT: > http://rt.cpan.org/Ticket/Display.html?id=49000 > > Please consider the proposed patch. I think it is quite obvious from the > patch what I have changed but I can give you more details if you want. I > am open to any discussion - here or at IRC (#win32) or at > sdl-devel@perl.org. > > -- > kmx
-- work in progress
RT-Send-CC: sdl-devel [...] perl.org
Hey folks, Patched here for now: http://github.com/kthakore/SDL_perl/tree/win32path This doesn't include the Ext Cbuilder patch. But atlease other OS can check if anything has broken or not. to get click on download and choose your poison (tarball or zip)
Subject: Re: [rt.cpan.org #49003] [PATCH] Win32 compatibility
Date: Wed, 26 Aug 2009 16:14:15 +0200
To: bug-SDL_perl [...] rt.cpan.org
From: kmx <kmx [...] volny.cz>
Hi Kartik, Show quoted text
>> 1) install SDL library according this RT - >> http://rt.cpan.org/Ticket/Display.html?id=49001 (there is an attached >> ZIP to this RT that you can simply unzip into your c:\strawberry) >>
> I cannot find this. But I have made a similar tarball with all the other > libs to >
It was my fault - I forgot the attachment. I have fixed it: http://rt.cpan.org/Ticket/Attachment/653600/335026/libsdl-1.2.13-bin_20090825.ZIP Show quoted text
It is very similar to my SDL pack with just 3 differences: 1) My ZIP contains just core SDL (not SDL_mixer & co) 2) I have created faked "bin/sdl-config.bat" that makes installation easy 3) I have applied a VERY IMPORTATNT patch for SDL_rwops.h (it solves perl vs. SDL macro collision) -#define SDL_RWseek(ctx, offset, whence) (ctx)->seek(ctx, offset, whence) -#define SDL_RWtell(ctx) (ctx)->seek(ctx, 0, RW_SEEK_CUR) -#define SDL_RWread(ctx, ptr, size, n) (ctx)->read(ctx, ptr, size, n) -#define SDL_RWwrite(ctx, ptr, size, n) (ctx)->write(ctx, ptr, size, n) -#define SDL_RWclose(ctx) (ctx)->close(ctx) +#define SDL_RWseek(ctx, offset, whence) ((ctx)->seek)(ctx, offset, whence) +#define SDL_RWtell(ctx) ((ctx)->seek)(ctx, 0, RW_SEEK_CUR) +#define SDL_RWread(ctx, ptr, size, n) ((ctx)->read)(ctx, ptr, size, n) +#define SDL_RWwrite(ctx, ptr, size, n) ((ctx)->write)(ctx, ptr, size, n) +#define SDL_RWclose(ctx) ((ctx)->close)(ctx) Without patch 3) I was not able to compile the XS files properly (with strawberry 5.10.0.6). One question for you - why did you comment out the following line? //extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft); I does not make any troubles to me. -- kmx
RT-Send-CC: sdl-devel [...] perl.org
On Wed Aug 26 10:15:06 2009, kmx@volny.cz wrote: Show quoted text
> Hi Kartik, >
> >> 1) install SDL library according this RT - > >> http://rt.cpan.org/Ticket/Display.html?id=49001 (there is an
> attached
> >> ZIP to this RT that you can simply unzip into your c:\strawberry) > >>
> > I cannot find this. But I have made a similar tarball with all the
> other
> > libs too > >
> It was my fault - I forgot the attachment. I have fixed it: > http://rt.cpan.org/Ticket/Attachment/653600/335026/libsdl-1.2.13- > bin_20090825.ZIP >
Thanks I will grab it soon! Show quoted text
> 1) My ZIP contains just core SDL (not SDL_mixer & co)
This shouldn't be a problem right? As we need those libs too. I will try to combine our packs an take a look if they work now. Show quoted text
> 2) I have created faked "bin/sdl-config.bat" that makes installation > easy
I was just talking with Alias about do this thank you! Show quoted text
> 3) I have applied a VERY IMPORTANT patch for SDL_rwops.h (it solves > perl vs. SDL macro collision)
Great! Thank you! Show quoted text
> One question for you - why did you comment out the following line? > //extern DECLSPEC size_t SDL ...
This was for Cygwin build. Thank you for catching that. I don't need to do that anymore. Show quoted text
> -- > kmx
It would be a good idea to join our packs (keeping your patch for SDL. What is a way I can ship 2.2.2 with the CBuilder one line fix? Is it appropriate to do My::ExtUtils::CBuilder ? -- work in progress
Subject: Re: [rt.cpan.org #49003] [PATCH] Win32 compatibility
Date: Wed, 26 Aug 2009 17:27:54 +0200
To: bug-SDL_perl [...] rt.cpan.org
From: kmx <kmx [...] volny.cz>
Hi, Show quoted text
Please apply also the following changes: ********************** --- kthakore-SDL_perl-git/make/lib/SDL/Build.pm 2009-08-26 03:57:22.000000000 +0200 +++ kthakore-SDL_perl-patch/make/lib/SDL/Build.pm 2009-08-26 17:20:49.390625000 +0200 @@ -45,6 +45,7 @@ { my ($self, $file) = @_; + $file =~ s/\\/\//g; #replace \ for / (Win32 needs this) my $properties = $self->{properties}; my $file_args = $self->notes( 'file_flags' )->{$file}; my @old_values = @$properties{ keys %$file_args }; @@ -253,7 +254,7 @@ # get link flags with a given a sdl_dir sub alt_link_flags { - my($self) = @_; + my $self = shift; my $sdl_dir = shift; return '-L"'.$sdl_dir.'\lib"'; @@ -262,10 +263,10 @@ # get compile flags with a given a sdl_dir sub alt_compile_flags { - my($self) = @_; + my $self = shift; my $sdl_dir = shift; - return '-L"'.$sdl_dir.'\include\SDL"'; + return '-I"'.$sdl_dir.'\include\SDL"'; } # Override to create a MacOS Bundle ********************** http://github.com/kthakore/SDL_perl/tree/win32path + the patch above works for me. -- kmx
Subject: Re: [rt.cpan.org #49003] [PATCH] Win32 compatibility
Date: Wed, 26 Aug 2009 17:52:07 +0200
To: bug-SDL_perl [...] rt.cpan.org
From: kmx <kmx [...] volny.cz>
Show quoted text
> It would be a good idea to join our packs (keeping your patch for SDL) >
OK, I do not have an ambition to start another SDL-for-mingw32 pack. I would like just to propose some little changes in naming *.a files (we can discuss later) Show quoted text
> What is a way I can ship 2.2.2 with the CBuilder one line fix? Is it > appropriate to do My::ExtUtils::CBuilder ? >
I would try (just idea - have not tested) to put a patched ExtUtils::CBuilder into make/lib dir. As we put make/lib at the beginning of @INC (I guess) it should load our patched ExtUtils::CBuilder instead of perl's standard one - we do not have to change the module code and after new/patched ExtUtils::CBuilder will be released we can just delete make/lib/ExtUtils/*. But as I have mentioned just an idea - patching ExtUtils::CBuilder will be more proper way . -- kmx
On Wed Aug 26 11:28:42 2009, kmx@volny.cz wrote: Show quoted text
> Hi, >
> > Patched here for now: > > http://github.com/kthakore/SDL_perl/tree/win32path > > > >
> > Please apply also the following changes: > > ********************** > > --- kthakore-SDL_perl-git/make/lib/SDL/Build.pm 2009-08-26 > 03:57:22.000000000 +0200 > +++ kthakore-SDL_perl-patch/make/lib/SDL/Build.pm 2009-08-26 > 17:20:49.390625000 +0200 > @@ -45,6 +45,7 @@ > { > my ($self, $file) = @_; > > + $file =~ s/\\/\//g; #replace \ for / (Win32 needs this) > my $properties = $self->{properties}; > my $file_args = $self->notes( 'file_flags' > )->{$file}; > my @old_values = @$properties{ keys
%$file_args }; Show quoted text
> @@ -253,7 +254,7 @@ > # get link flags with a given a sdl_dir > sub alt_link_flags > { > - my($self) = @_; > + my $self = shift; > my $sdl_dir = shift; > > return '-L"'.$sdl_dir.'\lib"'; > @@ -262,10 +263,10 @@ > # get compile flags with a given a sdl_dir > sub alt_compile_flags > { > - my($self) = @_; > + my $self = shift; > my $sdl_dir = shift; > > - return '-L"'.$sdl_dir.'\include\SDL"'; > + return '-I"'.$sdl_dir.'\include\SDL"'; > } > > # Override to create a MacOS Bundle > > ********************** > > http://github.com/kthakore/SDL_perl/tree/win32path + the patch above > works for me. > > -- > kmx
What machine are you on? I am on winXP 64bit I am getting the following errors with this process. lib/SDL_perl.xs -> lib\SDL_perl.c gcc -c -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -DPERL_MSVCRT_READFIX -IC:\strawberry\c\i nclude -IC:\strawberry\c\bin\..\include\SDL -D_GNU_SOURCE=1 -Dmain=SDL_main -DHAVE_SDL -DHAVE_SDL_TTF -DHAVE_SDL_NET -DHAVE_SDL_IMAGE -DHAVE_SDL_MI XER -DUSE_THREADS -fPIC -s -O2 "-DXS_VERSION=\"v2.2.2\"" "-DVERSION=\"v2.2.2\"" -I"C:\strawberry\perl\lib\CORE" -I"C:\strawberry\c\include" -o "lib \SDL_perl.o" "lib\SDL_perl.c" lib\SDL_perl.c:1: warning: -fPIC ignored for target (all code is position independent) lib/SDL_perl.xs:433:36: macro "PerlLIO_read" passed 4 arguments, but takes just 3 lib/SDL_perl.xs: In function `XS_SDL_RWread': lib/SDL_perl.xs:433: warning: assignment makes integer from pointer without a cast lib/SDL_perl.xs:444:37: macro "PerlLIO_write" passed 4 arguments, but takes just 3 lib/SDL_perl.xs: In function `XS_SDL_RWwrite': lib/SDL_perl.xs:444: warning: assignment makes integer from pointer without a cast lib/SDL_perl.xs: In function `XS_SDL_RWclose': lib/SDL_perl.xs:452: error: syntax error before '(' token error building dll file from 'lib\SDL_perl.c' at C:/strawberry/perl/lib/ExtUtils/CBuilder/Platform/Windows.pm line 107. LOCAL/SDL_Perl-v2.2.2.tar.gz C:\strawberry\perl\bin\perl.exe ./Build -- NOT OK Running Build test Can't test without successful make Running Build install Make had returned bad status, install seems impossible -- work in progress
Subject: Re: [rt.cpan.org #49003] [PATCH] Win32 compatibility
Date: Wed, 26 Aug 2009 18:49:25 +0200
To: bug-SDL_perl [...] rt.cpan.org
From: kmx <kmx [...] volny.cz>
Show quoted text
> What machine are you on? I am on winXP 64bit I am getting the following > errors with this process. > > lib/SDL_perl.xs -> lib\SDL_perl.c > gcc -c -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT > -DPERL_IMPLICIT_SYS -fno-strict-aliasing -DPERL_MSVCRT_READFIX > -IC:\strawberry\c\i > nclude -IC:\strawberry\c\bin\..\include\SDL -D_GNU_SOURCE=1 > -Dmain=SDL_main -DHAVE_SDL -DHAVE_SDL_TTF -DHAVE_SDL_NET > -DHAVE_SDL_IMAGE -DHAVE_SDL_MI > XER -DUSE_THREADS -fPIC -s -O2 "-DXS_VERSION=\"v2.2.2\"" > "-DVERSION=\"v2.2.2\"" -I"C:\strawberry\perl\lib\CORE" > -I"C:\strawberry\c\include" -o "lib > \SDL_perl.o" "lib\SDL_perl.c" > lib\SDL_perl.c:1: warning: -fPIC ignored for target (all code is > position independent) > lib/SDL_perl.xs:433:36: macro "PerlLIO_read" passed 4 arguments, but > takes just 3 > lib/SDL_perl.xs: In function `XS_SDL_RWread': > lib/SDL_perl.xs:433: warning: assignment makes integer from pointer > without a cast > lib/SDL_perl.xs:444:37: macro "PerlLIO_write" passed 4 arguments, but > takes just 3 > lib/SDL_perl.xs: In function `XS_SDL_RWwrite': > lib/SDL_perl.xs:444: warning: assignment makes integer from pointer > without a cast > lib/SDL_perl.xs: In function `XS_SDL_RWclose': > lib/SDL_perl.xs:452: error: syntax error before '(' token > error building dll file from 'lib\SDL_perl.c' at > C:/strawberry/perl/lib/ExtUtils/CBuilder/Platform/Windows.pm line 107. > LOCAL/SDL_Perl-v2.2.2.tar.gz > C:\strawberry\perl\bin\perl.exe ./Build -- NOT OK > Running Build test > Can't test without successful make > Running Build install > Make had returned bad status, install seems impossible > >
That is exactly the reason why you need my patched SDL/SDL_rwops.h - I have mentioned this in my previous e-mail -- kmx
Subject: Re: [rt.cpan.org #49003] [PATCH] Win32 compatibility
Date: Wed, 26 Aug 2009 18:50:37 +0200
To: bug-SDL_perl [...] rt.cpan.org
From: kmx <kmx [...] volny.cz>
/* SDL - Simple DirectMedia Layer Copyright (C) 1997-2006 Sam Lantinga 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 St, Fifth Floor, Boston, MA 02110-1301 USA Sam Lantinga slouken@libsdl.org */ /* This file provides a general interface for SDL to read and write data sources. It can easily be extended to files, memory, etc. */ #ifndef _SDL_rwops_h #define _SDL_rwops_h #include "SDL_stdinc.h" #include "SDL_error.h" #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus extern "C" { #endif /* This is the read/write operation structure -- very basic */ typedef struct SDL_RWops { /* Seek to 'offset' relative to whence, one of stdio's whence values: SEEK_SET, SEEK_CUR, SEEK_END Returns the final offset in the data source. */ int (SDLCALL *seek)(struct SDL_RWops *context, int offset, int whence); /* Read up to 'num' objects each of size 'objsize' from the data source to the area pointed at by 'ptr'. Returns the number of objects read, or -1 if the read failed. */ int (SDLCALL *read)(struct SDL_RWops *context, void *ptr, int size, int maxnum); /* Write exactly 'num' objects each of size 'objsize' from the area pointed at by 'ptr' to data source. Returns 'num', or -1 if the write failed. */ int (SDLCALL *write)(struct SDL_RWops *context, const void *ptr, int size, int num); /* Close and free an allocated SDL_FSops structure */ int (SDLCALL *close)(struct SDL_RWops *context); Uint32 type; union { #if defined(__WIN32__) && !defined(__SYMBIAN32__) struct { int append; void *h; struct { void *data; int size; int left; } buffer; } win32io; #endif #ifdef HAVE_STDIO_H struct { int autoclose; FILE *fp; } stdio; #endif struct { Uint8 *base; Uint8 *here; Uint8 *stop; } mem; struct { void *data1; } unknown; } hidden; } SDL_RWops; /* Functions to create SDL_RWops structures from various data sources */ extern DECLSPEC SDL_RWops * SDLCALL SDL_RWFromFile(const char *file, const char *mode); #ifdef HAVE_STDIO_H extern DECLSPEC SDL_RWops * SDLCALL SDL_RWFromFP(FILE *fp, int autoclose); #endif extern DECLSPEC SDL_RWops * SDLCALL SDL_RWFromMem(void *mem, int size); extern DECLSPEC SDL_RWops * SDLCALL SDL_RWFromConstMem(const void *mem, int size); extern DECLSPEC SDL_RWops * SDLCALL SDL_AllocRW(void); extern DECLSPEC void SDLCALL SDL_FreeRW(SDL_RWops *area); #define RW_SEEK_SET 0 /* Seek from the beginning of data */ #define RW_SEEK_CUR 1 /* Seek relative to current read point */ #define RW_SEEK_END 2 /* Seek relative to the end of data */ /* Macros to easily read and write from an SDL_RWops structure */ #define SDL_RWseek(ctx, offset, whence) ((ctx)->seek)(ctx, offset, whence) #define SDL_RWtell(ctx) ((ctx)->seek)(ctx, 0, RW_SEEK_CUR) #define SDL_RWread(ctx, ptr, size, n) ((ctx)->read)(ctx, ptr, size, n) #define SDL_RWwrite(ctx, ptr, size, n) ((ctx)->write)(ctx, ptr, size, n) #define SDL_RWclose(ctx) ((ctx)->close)(ctx) /* Read an item of the specified endianness and return in native format */ extern DECLSPEC Uint16 SDLCALL SDL_ReadLE16(SDL_RWops *src); extern DECLSPEC Uint16 SDLCALL SDL_ReadBE16(SDL_RWops *src); extern DECLSPEC Uint32 SDLCALL SDL_ReadLE32(SDL_RWops *src); extern DECLSPEC Uint32 SDLCALL SDL_ReadBE32(SDL_RWops *src); extern DECLSPEC Uint64 SDLCALL SDL_ReadLE64(SDL_RWops *src); extern DECLSPEC Uint64 SDLCALL SDL_ReadBE64(SDL_RWops *src); /* Write an item of native format to the specified endianness */ extern DECLSPEC int SDLCALL SDL_WriteLE16(SDL_RWops *dst, Uint16 value); extern DECLSPEC int SDLCALL SDL_WriteBE16(SDL_RWops *dst, Uint16 value); extern DECLSPEC int SDLCALL SDL_WriteLE32(SDL_RWops *dst, Uint32 value); extern DECLSPEC int SDLCALL SDL_WriteBE32(SDL_RWops *dst, Uint32 value); extern DECLSPEC int SDLCALL SDL_WriteLE64(SDL_RWops *dst, Uint64 value); extern DECLSPEC int SDLCALL SDL_WriteBE64(SDL_RWops *dst, Uint64 value); /* Ends C function definitions when using C++ */ #ifdef __cplusplus } #endif #include "close_code.h" #endif /* _SDL_rwops_h */
oops ... Also for the header fix you did can we not just copy the defines to SDL.xs. So instead of SDL_closeRW we do ((rw)->close(rw)) ? If not no worries as Alien::SDL will deliver the right deps soon! I added more libraries for you guys this should give you all the deps except sdlGFX (that's a pain) http://cloud.github.com/downloads/kthakore/SDL_perl/libsdl-1.2.13-bin_20090825.ZIP Yay! kmx++. This brings out v2.2.2! Thank you
Subject: [PATCH] Strawberry Win32 compatibility is experimentally working now!!
RT-Send-CC: sdl-devel [...] perl.org
With some hacks in place here is the patched version. on windows you need to do: go to http://github.com/kthakore/SDL_perl/tree/master click download, choose .tar.gz save kthakore- .... .tar.gz somewhere get to http://cloud.github.com/downloads/kthakore/SDL_perl/libsdl-1.2.13-bin_20090825.ZIP extract it on C:/strawberry/ on the cmd do pip kthakore- .... .tar.gz ... will be a long random variable!
Subject: Re: [rt.cpan.org #49003] [PATCH] Win32 compatibility
Date: Fri, 28 Aug 2009 07:32:49 +0200
To: bug-SDL_perl [...] rt.cpan.org
From: kmx <kmx [...] volny.cz>
Show quoted text
> oops ... > Also for the header fix you did can we not just copy the defines to SDL.xs. >
Well, it will work, but it is a little bit ugly. Show quoted text
> So instead of > SDL_closeRW > we do > ((rw)->close(rw)) ?
no, I have just made existing #define SDL_closeRW more robust: instead of: (ctx)->close(ctx) we do: ((ctx)->close)(ctx) The problem was that ...\perl\lib\CORE\XSUB.h defines another "close" macro that causes troubles with original SDL_closeRW. Show quoted text
> I added more libraries for you guys this should give you all the deps > except sdlGFX (that's a pain) > http://cloud.github.com/downloads/kthakore/SDL_perl/libsdl-1.2.13-bin_20090825.ZIP >
IMPORTANT we have to rename: c\lib\SDL_image.a > libSDL_image.a c\lib\SDL_mixer.a > libSDL_mixer.a c\lib\SDL_net.a > libSDL_net.a c\lib\SDL_ttf.a > libSDL_ttf.a we need to add (from your original pack): bin\libfreetype-6.dll we can remove: lib\libSDL.la Should I prepare updated pack? SDL_gfx + SDL_smpeg: is the only problem that we have to compile it from sources? I can do it. -- kmx
RT-Send-CC: adam [...] ali.as
One comment to Alien::SDL. To be honest I am not too happy about that. 1) it has hardcoded path to c:\strawberry - this is VEEERY BAD 2) I am not sure if Allien::* approach is suitable for binary libs distribution (putting Alias into CC as it is sort of a high-level decision). In that case we should have Allien::* packages for all libs we wanna include e.g. openssl, Berkley DB, libpng, libgif ... 3) We can offer the user to install Allien::SDL if we have not found any SDL, but I do not like too much the idea to have it as mandatory prerequisite. 4) The another problems may arise from the fact that you pack has some DLL (of different filesize) that already exists in standard strawberry installation (e.g. zlib1.dll), zlib is probably OK but overwriting other DLLs can cause big troubles. 5) As for the strawberry there is a chance that SDL binary libs will be included in strawberry release (again Alias will be decision-maker). -- kmx
On Fri Aug 28 02:01:13 2009, KMX wrote: Show quoted text
> One comment to Alien::SDL. > > To be honest I am not too happy about that. > > 1) it has hardcoded path to c:\strawberry - this is VEEERY BAD
Whats an alternative to this use Config; ? Show quoted text
> 2) I am not sure if Allien::* approach is suitable for binary libs > distribution (putting Alias into CC as it is sort of a high-level > decision). In that case we should have Allien::* packages for all libs > we wanna include e.g. openssl, Berkley DB, libpng, libgif ...
Alien::SDL will compile for other distro and my compile source for windows too later on. Show quoted text
> 3) We can offer the user to install Allien::SDL if we have not found any > SDL, but I do not like too much the idea to have it as mandatory > prerequisite.
I wanted to move make/lib/build/Utilty.pm sdlconfig to Alien::SDL. Show quoted text
> 4) The another problems may arise from the fact that you pack has some > DLL (of different filesize) that already exists in standard strawberry > installation (e.g. zlib1.dll), zlib is probably OK but overwriting other > DLLs can cause big troubles.
zlib1.dll can be removed. Show quoted text
> 5) As for the strawberry there is a chance that SDL binary libs will be > included in strawberry release (again Alias will be decision-maker).
Oh great! Show quoted text
> -- > kmx
Also can you post bugs on Alien::SDL. -- work in progress
On Fri Aug 28 01:33:15 2009, kmx@volny.cz wrote: Show quoted text
>
> > oops ... > > Also for the header fix you did can we not just copy the defines to
> SDL.xs.
> >
> Well, it will work, but it is a little bit ugly. >
> > So instead of > > SDL_closeRW > > we do > > ((rw)->close(rw)) ?
> no, I have just made existing #define SDL_closeRW more robust: > instead of: > (ctx)->close(ctx) > we do: > ((ctx)->close)(ctx) > > The problem was that ...\perl\lib\CORE\XSUB.h defines another "close" > macro that causes troubles with original SDL_closeRW. >
> > I added more libraries for you guys this should give you all the
> deps > bin_20090825.ZIP
> >
> IMPORTANT > > we have to rename: > c\lib\SDL_image.a > libSDL_image.a > c\lib\SDL_mixer.a > libSDL_mixer.a > c\lib\SDL_net.a > libSDL_net.a > c\lib\SDL_ttf.a > libSDL_ttf.a > > we need to add (from your original pack): > bin\libfreetype-6.dll > > we can remove: > lib\libSDL.la > > Should I prepare updated pack?
Yes Please. Show quoted text
> SDL_gfx + SDL_smpeg: is the only problem that we have to compile it > from > sources? I can do it.
Can you tell me how you did this? or if we can emulate this in Alien Show quoted text
> -- > kmx
-- work in progress
Subject: Re: [rt.cpan.org #49003] [PATCH] Win32 compatibility
Date: Fri, 28 Aug 2009 14:14:21 +0200
To: bug-SDL_perl [...] rt.cpan.org
From: kmx <kmx [...] volny.cz>
Show quoted text
> Can you tell me how you did this? or if we can emulate this in Alien >
OK - give me a week or two and will prepare working build script for the whole SDL pack (for mingw + strawberry). The only problem is that SDL libraries heavily depends on other libraries like libfreetype, libpng, ... - we are about to include them into strawberry, but if you want a generic Allien::SDL pack you should somehow handle what to do if those libs (libfreetype, libpng ...) are not available. -- kmx
Subject: Re: [rt.cpan.org #49003] [PATCH] Win32 compatibility
Date: Sat, 29 Aug 2009 03:05:34 +1000
To: bug-SDL_perl [...] rt.cpan.org
From: Adam Kennedy <adam [...] ali.as>
The normal purpose of Alien::SDL is to do two things 1. Ensure a library is installed across a wide range of platforms (not just Win32) 2. Detect the versions and settings and so on of those libraries for use by things that want to compile against it. In the short term, it's quite reasonable to go in that direction. What an Alien:: module would do in the face of already finding it installed would be to shortcut and just discover the properties of the existing one. Adam K On Fri, Aug 28, 2009 at 4:01 PM, kmx via RT<bug-SDL_perl@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=49003 > > > One comment to Alien::SDL. > > To be honest I am not too happy about that. > > 1) it has hardcoded path to c:\strawberry - this is VEEERY BAD > > 2) I am not sure if Allien::* approach is suitable for binary libs > distribution (putting Alias into CC as it is sort of a high-level > decision). In that case we should have Allien::* packages for all libs > we wanna include e.g. openssl, Berkley DB, libpng, libgif ... > > 3) We can offer the user to install Allien::SDL if we have not found any > SDL, but I do not like too much the idea to have it as mandatory > prerequisite. > > 4) The another problems may arise from the fact that you pack has some > DLL (of different filesize) that already exists in standard strawberry > installation (e.g. zlib1.dll), zlib is probably OK but overwriting other > DLLs can cause big troubles. > > 5) As for the strawberry there is a chance that SDL binary libs will be > included in strawberry release (again Alias will be decision-maker). > > -- > kmx >
On Fri Aug 28 13:05:54 2009, adam@ali.as wrote: Show quoted text
> The normal purpose of Alien::SDL is to do two things > > 1. Ensure a library is installed across a wide range of platforms (not > just Win32) > > 2. Detect the versions and settings and so on of those libraries for > use by things that want to compile against it. > > In the short term, it's quite reasonable to go in that direction.
Do you mean what Alien::SDL does now? Show quoted text
> What an Alien:: module would do in the face of already finding it > installed would be to shortcut and just discover the properties of the > existing one.
That is my goal for Alien::SDL Show quoted text
> Adam K
Moreover I am going to make Alien::SDL a suggestion until it can compile from scratch the .dll and libs. Also can people please move this discussion to Alien::SDL's bug tracker? https://rt.cpan.org/Dist/Display.html?Queue=Alien-SDL
Moved to Alien::SDL. When that is stabilized we will continue the new XS discussion here.