Package: libsdl-perl / 2.548-6

Metadata

Package Version Patches format
libsdl-perl 2.548-6 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
fix runaway test | (download)

t/sdlx_controller_interface.t | 2 2 + 0 - 0 !
1 file changed, 2 insertions(+)

 fix runaway test
 Test case requires the creation of an event. This creation require the specification of an event type. Otherwise the event may not fire on some arch like ia64 or armhf. If the event does not fire, the test does not end.
Bug-Debian: #721405
fix centered text | (download)

lib/SDLx/Text.pm | 12 8 + 4 - 0 !
1 file changed, 8 insertions(+), 4 deletions(-)

 fix centered text
 Centered text was off-center
do_not_ship_ttf_font | (download)

Build.PL | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 avoid shipping fonts provided elsewhere

install_man_pages_correctly | (download)

inc/My/Builder.pm | 8 8 + 0 - 0 !
1 file changed, 8 insertions(+)

 fix build so that man pages do not being with pods::

fix_whatis_entries | (download)

lib/pods/SDL/Cookbook.pod | 2 1 + 1 - 0 !
lib/pods/SDL/Tutorial/Animation.pod | 2 1 + 1 - 0 !
lib/pods/SDLx/Sound.pod | 2 1 + 1 - 0 !
3 files changed, 3 insertions(+), 3 deletions(-)

 fix name section

fix_spelling | (download)

lib/pods/SDL/Platform.pod | 6 3 + 3 - 0 !
lib/pods/SDLx/App.pod | 2 1 + 1 - 0 !
lib/pods/SDLx/Controller.pod | 2 1 + 1 - 0 !
3 files changed, 5 insertions(+), 5 deletions(-)

 makes lintian happy

fix_api_spelling | (download)

lib/SDLx/App.pm | 2 1 + 1 - 0 !
lib/pods/SDLx/App.pod | 2 1 + 1 - 0 !
2 files changed, 2 insertions(+), 2 deletions(-)

 fix spelling error in api and documentation
 Spelling errors in API are bad because they confuse users. This patch makes the API accept correct spelling and also accept bad spelling to preserve backward compatibility

hardcode default font | (download)

Build.PL | 3 0 + 3 - 0 !
META.json | 3 0 + 3 - 0 !
META.yml | 3 0 + 3 - 0 !
lib/SDLx/Text.pm | 7 2 + 5 - 0 !
4 files changed, 2 insertions(+), 14 deletions(-)

 hardcode default font
 upstream SDL delivers a default font for SDLx::Text. This font is
 provided by package fonts-sil-gentium-basic in Debian. This patch
 hardcodes the default font path and remove the dependency on
 File::ShareDir which is no longer required.
Bug-Debian: #682338
fix inline ccflags | (download)

lib/SDL.pm | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

fix inline ccflags
 When Inline::C,  CFLAGS is overridden with the flags provided by
 'sdl-config --cflags'. This command does not provide the flags used
 to compile Perl. In Debian case, omitting the flags used to compile
 Perl will lead to exceution failure when using Inline::C on i386.
 .
 This patch uses Inline::C CFLAGSEX to extend the original Perl compilation
 flags with sdl flags. 
 .
 Thamks to Niko Tyni for the analysis and fix.
Bug:https://github.com/PerlGameDev/SDL_Manual/issues/15
Bug-Debian:https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=730549
reproducible build | (download)

inc/My/Builder.pm | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

  fix reproducible build
 Replaced relevant occurrence of 'keys %foo' with 'sort keys %foo' in libs used by Build.PL (in inc)
perl_5.37.1.patch | (download)

src/SDLx/Controller/Interface.xs | 12 6 + 6 - 0 !
1 file changed, 6 insertions(+), 6 deletions(-)

 [patch] adapt to perl 5.37.1

Perl 5.37.1 removed a deprecated sv_nv() macro and SDL fails to build
with Perl 5.38.0:

lib/SDLx/Controller/Interface.xs:60:26: error: implicit declaration of function 'sv_nv'
   60 |         out->dv_x      = sv_nv(temp);
      |                          ^~~~~

Users are advised to use SvNVx() macro instead. SvNVx() seems to have been
available all the time (it predates a commit from 1993-10-07).

This patch does that.

https://github.com/PerlGameDev/SDL/issues/303

Bug-Debian: https://bugs.debian.org/1040388

PR306.patch | (download)

src/Core/Video.xs | 6 4 + 2 - 0 !
src/helper.h | 7 4 + 3 - 0 !
typemap | 23 23 + 0 - 0 !
3 files changed, 31 insertions(+), 5 deletions(-)

 [patch] distinguish between owned and borrowed references to a
 SDL_Surface

In many SDL APIs that return a SDL_Surface *, the surface is considered
to be owned by the caller, and must be freed by the caller.

However, SDL_SetVideoMode and presumably SDL_GetVideoSurface return
a pointer to SDL's internal video surface, which will be freed by SDL
if necessary, and must not be freed by library users.
Incorrectly freeing this surface can lead to a use-after-free crash,
manifesting as a test failure in t/core_video.t.

See also https://github.com/libsdl-org/sdl12-compat/issues/305

Resolves: https://github.com/PerlGameDev/SDL/issues/305
Signed-off-by: Simon McVittie <smcv@debian.org>

Bug-Debian: https://bugs.debian.org/1041211
Bug: https://github.com/PerlGameDev/SDL/issues/305
implicit declaration.patch | (download)

src/SDLx/Surface.xs | 16 8 + 8 - 0 !
1 file changed, 8 insertions(+), 8 deletions(-)

 [patch] fix implicit declaration of _calc_offset

event filter refcount.patch | (download)

src/Core/Events.xs | 3 2 + 1 - 0 !
1 file changed, 2 insertions(+), 1 deletion(-)

 [patch] fix reference-counting in set_event_filter

This previously resulted in the following test failure with Perl 5.38.2
on Debian unstable (https://bugs.debian.org/1064761):

    t/core_events.t ................. 1/? Can't use an undefined value as a subroutine reference during global destruction.
    t/core_events.t ................. Dubious, test returned 22 (wstat 5632, 0x1600)
    All 691 subtests passed
            (less 1 skipped subtest: 690 okay)

Bug-Debian: https://bugs.debian.org/1064761
0001 Fix building in ISO C23.patch | (download)

src/SDL.xs | 4 2 + 2 - 0 !
1 file changed, 2 insertions(+), 2 deletions(-)

 [patch] fix building in iso c23
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Building with GCC 15, which defaults to ISO C23, failed like this:

    In file included from lib/SDL_perl.xs:32:
    lib/SDL_perl.c:654:13: error: conflicting types for boot_SDL; have void(PerlInterpreter *, CV *) {aka void(struct interpreter *, struct cv *)}
      654 | XS_EXTERNAL(boot_SDL); /* prototype to pass -Wmissing-prototypes */
	  |             ^~~~~~~~
    /usr/lib64/perl5/CORE/XSUB.h:149:34: note: in definition of macro XS_EXTERNAL
      149 | #  define XS_EXTERNAL(name) void name(pTHX_ CV* cv __attribute__unused__)
	  |                                  ^~~~
    lib/SDL_perl.xs:147:6: note: previous declaration of boot_SDL with type void(void)
      147 | void boot_SDL();
	  |      ^~~~~~~~
    lib/SDL_perl.c:655:13: error: conflicting types for boot_SDL; have void(PerlInterpreter *, CV *) {aka void(struct interpreter *, struct cv *)}
      655 | XS_EXTERNAL(boot_SDL)
	  |             ^~~~~~~~
    /usr/lib64/perl5/CORE/XSUB.h:149:34: note: in definition of macro XS_EXTERNAL
      149 | #  define XS_EXTERNAL(name) void name(pTHX_ CV* cv __attribute__unused__)
	  |                                  ^~~~
    lib/SDL_perl.xs:147:6: note: previous declaration of boot_SDL with type void(void)
      147 | void boot_SDL();
	  |      ^~~~~~~~

The cause is a mismatch between how boot_SDL() was declared and used
in src/SDL.xs and how Perl generates a boot function for XS packages.
This patch fixes it by passing current Perl interpreter and, probably
ignored, cv argument.

Bug: https://github.com/PerlGameDev/SDL/issues/294
Bug-Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=2341036
Bug-Debian: https://bugs.debian.org/1097266