Skip to content

Commit

Permalink
Update perl-SDL to version 2.548 / rev 12 via SR 1168524
Browse files Browse the repository at this point in the history
https://build.opensuse.org/request/show/1168524
by user dstoecker + dimstar_suse
- Add 308.patch: Fix reference-counting in set_event_filter
  (gh#PerlGameDev/SDL#308).
  • Loading branch information
dstoecker authored and bmwiedemann committed Apr 17, 2024
1 parent cc30586 commit 3edfada
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 4 deletions.
Binary file modified packages/p/perl-SDL/.files
Binary file not shown.
10 changes: 10 additions & 0 deletions packages/p/perl-SDL/.rev
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,14 @@
<comment></comment>
<requestid>1102970</requestid>
</revision>
<revision rev="12" vrev="7">
<srcmd5>cd1f48186c497baf0250a9bb97c2be91</srcmd5>
<version>2.548</version>
<time>1713357978</time>
<user>dimstar_suse</user>
<comment>- Add 308.patch: Fix reference-counting in set_event_filter
(gh#PerlGameDev/SDL#308).
</comment>
<requestid>1168524</requestid>
</revision>
</revisionlist>
30 changes: 30 additions & 0 deletions packages/p/perl-SDL/308.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
From fbf151a7481a5fda88bfe766d826fe55476cf4af Mon Sep 17 00:00:00 2001
From: Colin Watson <[email protected]>
Date: Thu, 28 Mar 2024 13:21:47 +0000
Subject: [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)
---
src/Core/Events.xs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/Core/Events.xs b/src/Core/Events.xs
index faa7cfe6..0b99f8a9 100644
--- a/src/Core/Events.xs
+++ b/src/Core/Events.xs
@@ -102,7 +102,8 @@ void
events_set_event_filter(callback)
SV* callback
CODE:
- eventfiltersv = callback;
+ SvREFCNT_dec(eventfiltersv);
+ eventfiltersv = SvREFCNT_inc_simple(callback);
SDL_SetEventFilter((SDL_EventFilter) eventfilter_cb);

AV *
5 changes: 2 additions & 3 deletions packages/p/perl-SDL/cpanspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ description: |-
sources:
- perl-SDL.rpmlintrc
patches:
https://patch-diff.githubusercontent.com/raw/PerlGameDev/SDL/pull/304.patch: -p1
# foo.patch: -p1
# bar.patch:
https://patch-diff.githubusercontent.com/raw/PerlGameDev/SDL/pull/304.patch: -p1 PATCH-FIX-UPSTREAM 304.patch -- based on PR 304
https://patch-diff.githubusercontent.com/raw/PerlGameDev/SDL/pull/308.patch: -p1 PATCH-FIX-UPSTREAM 308.patch -- based on PR 308
preamble: |-
BuildRequires: Mesa-devel
BuildRequires: libSDL-devel
Expand Down
6 changes: 6 additions & 0 deletions packages/p/perl-SDL/perl-SDL.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Apr 15 18:43:39 UTC 2024 - [email protected]

- Add 308.patch: Fix reference-counting in set_event_filter
(gh#PerlGameDev/SDL#308).

-------------------------------------------------------------------
Tue Aug 8 14:59:43 UTC 2023 - Dominique Leuenberger <[email protected]>

Expand Down
5 changes: 4 additions & 1 deletion packages/p/perl-SDL/perl-SDL.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# spec file for package perl-SDL
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
Expand All @@ -26,7 +26,10 @@ URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/F/FR/FROGGS/%{cpan_name}-%{version}.tar.gz
Source1: perl-SDL.rpmlintrc
Source2: cpanspec.yml
# PATCH-FIX-UPSTREAM 304.patch -- based on PR 304
Patch0: https://patch-diff.githubusercontent.com/raw/PerlGameDev/SDL/pull/304.patch
# PATCH-FIX-UPSTREAM 308.patch -- based on PR 308
Patch1: https://patch-diff.githubusercontent.com/raw/PerlGameDev/SDL/pull/308.patch
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Alien::SDL) >= 1.446
Expand Down

0 comments on commit 3edfada

Please sign in to comment.