From 61acc8671a1b4b7670b0ad67d24bed8a69b4cf6e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 21 Jan 2022 04:56:07 +0000 Subject: [PATCH 01/29] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- perl-SDL.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/perl-SDL.spec b/perl-SDL.spec index 168ced6..25cbf87 100644 --- a/perl-SDL.spec +++ b/perl-SDL.spec @@ -1,6 +1,6 @@ Name: perl-SDL Version: 2.548 -Release: 12%{?dist} +Release: 13%{?dist} Summary: Simple DirectMedia Layer for Perl License: LGPLv2+ URL: http://sdl.perl.org/ @@ -122,6 +122,9 @@ find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \; %{_mandir}/man3/Module::* %changelog +* Fri Jan 21 2022 Fedora Release Engineering - 2.548-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Thu Jul 22 2021 Fedora Release Engineering - 2.548-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From b2b598adb6e4adeb1ba20b84104590fbbed9b094 Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Wed, 1 Jun 2022 12:00:07 +0200 Subject: [PATCH 02/29] Perl 5.36 rebuild --- perl-SDL.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/perl-SDL.spec b/perl-SDL.spec index 25cbf87..d6ee77a 100644 --- a/perl-SDL.spec +++ b/perl-SDL.spec @@ -1,6 +1,6 @@ Name: perl-SDL Version: 2.548 -Release: 13%{?dist} +Release: 14%{?dist} Summary: Simple DirectMedia Layer for Perl License: LGPLv2+ URL: http://sdl.perl.org/ @@ -122,6 +122,9 @@ find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \; %{_mandir}/man3/Module::* %changelog +* Wed Jun 01 2022 Jitka Plesnikova - 2.548-14 +- Perl 5.36 rebuild + * Fri Jan 21 2022 Fedora Release Engineering - 2.548-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From 387ca8d2f07b619f288a50b3f915e00a68c64ce0 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 22 Jul 2022 10:42:03 +0000 Subject: [PATCH 03/29] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- perl-SDL.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/perl-SDL.spec b/perl-SDL.spec index d6ee77a..82d84d2 100644 --- a/perl-SDL.spec +++ b/perl-SDL.spec @@ -1,6 +1,6 @@ Name: perl-SDL Version: 2.548 -Release: 14%{?dist} +Release: 15%{?dist} Summary: Simple DirectMedia Layer for Perl License: LGPLv2+ URL: http://sdl.perl.org/ @@ -122,6 +122,9 @@ find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \; %{_mandir}/man3/Module::* %changelog +* Fri Jul 22 2022 Fedora Release Engineering - 2.548-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Wed Jun 01 2022 Jitka Plesnikova - 2.548-14 - Perl 5.36 rebuild From a68414f94e85cb380797de57b6938019aaf12b00 Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Fri, 13 Jan 2023 18:17:28 +0100 Subject: [PATCH 04/29] Remove perl(MODULE_COMPAT), it will be replaced by generators --- perl-SDL.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/perl-SDL.spec b/perl-SDL.spec index 82d84d2..d849ab0 100644 --- a/perl-SDL.spec +++ b/perl-SDL.spec @@ -57,7 +57,6 @@ BuildRequires: perl(Test::More) BuildRequires: perl(Test::Most) >= 0.21 BuildRequires: perl(threads) BuildRequires: perl(threads::shared) -Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) Requires: perl(File::ShareDir) >= 1.0 %define _use_internal_dependency_generator 0 @@ -73,7 +72,6 @@ the spirit of both the SDL and Perl. %package -n perl-Module-Build-SDL Summary: Module::Build subclass for building SDL applications Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release} -Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) Requires: perl(ExtUtils::CBuilder::Base) %description -n perl-Module-Build-SDL From 347cf3fb5ac90e14b96381722bc335744077e967 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 20 Jan 2023 05:46:15 +0000 Subject: [PATCH 05/29] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- perl-SDL.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/perl-SDL.spec b/perl-SDL.spec index d849ab0..13b0827 100644 --- a/perl-SDL.spec +++ b/perl-SDL.spec @@ -1,6 +1,6 @@ Name: perl-SDL Version: 2.548 -Release: 15%{?dist} +Release: 16%{?dist} Summary: Simple DirectMedia Layer for Perl License: LGPLv2+ URL: http://sdl.perl.org/ @@ -120,6 +120,9 @@ find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \; %{_mandir}/man3/Module::* %changelog +* Fri Jan 20 2023 Fedora Release Engineering - 2.548-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Fri Jul 22 2022 Fedora Release Engineering - 2.548-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From b6b5e69cb28b69ba8f0c2c0554a3ec3d60c45421 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Fri, 10 Mar 2023 11:03:23 +0100 Subject: [PATCH 06/29] Fix an implicit function declaration --- ...implicit-declaration-of-_calc_offset.patch | 50 +++++++++++++++++++ perl-SDL.spec | 10 +++- 2 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 SDL-2.548-Fix-implicit-declaration-of-_calc_offset.patch diff --git a/SDL-2.548-Fix-implicit-declaration-of-_calc_offset.patch b/SDL-2.548-Fix-implicit-declaration-of-_calc_offset.patch new file mode 100644 index 0000000..ec40cb9 --- /dev/null +++ b/SDL-2.548-Fix-implicit-declaration-of-_calc_offset.patch @@ -0,0 +1,50 @@ +From 90d7056288282df9febf04acce6712f4071e4103 Mon Sep 17 00:00:00 2001 +From: Ryan Schmidt +Date: Wed, 26 Jan 2022 02:55:04 -0600 +Subject: [PATCH] Fix implicit declaration of _calc_offset +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Petr Písař +--- + src/SDLx/Surface.xs | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/src/SDLx/Surface.xs b/src/SDLx/Surface.xs +index f3fdb017..44b0af15 100644 +--- a/src/SDLx/Surface.xs ++++ b/src/SDLx/Surface.xs +@@ -16,6 +16,14 @@ + #include + #endif + ++int _calc_offset ( SDL_Surface* surface, int x, int y ) ++{ ++ int offset; ++ offset = (surface->pitch * y) / surface->format->BytesPerPixel; ++ offset += x; ++ return offset; ++} ++ + SV * get_pixel32 (SDL_Surface *surface, int x, int y) + { + /* Convert the pixels to 32 bit */ +@@ -52,14 +60,6 @@ SV * construct_p_matrix ( SDL_Surface *surface ) + return newRV_noinc((SV *)matrix); + } + +-int _calc_offset ( SDL_Surface* surface, int x, int y ) +-{ +- int offset; +- offset = (surface->pitch * y) / surface->format->BytesPerPixel; +- offset += x; +- return offset; +-} +- + unsigned int _get_pixel(SDL_Surface * surface, int offset) + { + unsigned int value; +-- +2.39.2 + diff --git a/perl-SDL.spec b/perl-SDL.spec index 13b0827..a321939 100644 --- a/perl-SDL.spec +++ b/perl-SDL.spec @@ -1,10 +1,13 @@ Name: perl-SDL Version: 2.548 -Release: 16%{?dist} +Release: 17%{?dist} Summary: Simple DirectMedia Layer for Perl License: LGPLv2+ URL: http://sdl.perl.org/ Source0: https://cpan.metacpan.org/authors/id/F/FR/FROGGS/SDL-%{version}.tar.gz +# Fix an implicit function declaration, proposed to the upstream, +# bug #2177189, . +Patch0: SDL-2.548-Fix-implicit-declaration-of-_calc_offset.patch BuildRequires: coreutils BuildRequires: findutils BuildRequires: libGLU-devel @@ -81,7 +84,7 @@ application/game into PAR archive. %prep -%setup -q -n SDL-%{version} +%autosetup -p1 -n SDL-%{version} # Move the pod files directly to directory lib to have correctly generated # man pages without prefix pods:: cd lib/pods @@ -120,6 +123,9 @@ find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \; %{_mandir}/man3/Module::* %changelog +* Fri Mar 10 2023 Petr Pisar - 2.548-17 +- Fix an implicit function declaration (bug #2177189) + * Fri Jan 20 2023 Fedora Release Engineering - 2.548-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From da5c21bac5440711722032e7bb10c73ce22b83b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Fri, 10 Mar 2023 11:39:56 +0100 Subject: [PATCH 07/29] Correct a license to "LGPL-2.1-or-later AND (GPL-1.0-or-later OR Artistic-1.0-Perl) AND OFL-1.1-RFN" Note that a Gentium Book Basic font is bundled here. --- perl-SDL.spec | 43 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/perl-SDL.spec b/perl-SDL.spec index a321939..b0b3b75 100644 --- a/perl-SDL.spec +++ b/perl-SDL.spec @@ -2,7 +2,42 @@ Name: perl-SDL Version: 2.548 Release: 17%{?dist} Summary: Simple DirectMedia Layer for Perl -License: LGPLv2+ +# COPYING: GPL-2.0 text +# lib/pods/SDL.pod: GPL-1.0-or-later OR Artistic-1.0-Perl +# lib/pods/SDL/Platform.pod: GPL-1.0-or-later OR Artistic-1.0-Perl +# lib/pods/SDL/Tutorial.pod: GPL-1.0-or-later OR Artistic-1.0-Perl +# lib/pods/SDL/Tutorial/Animation.pod: GPL-1.0-or-later OR Artistic-1.0-Perl +# lib/pods/SDL/Tutorial/LunarLander.pod: GPL-1.0-or-later OR Artistic-1.0-Perl +# lib/pods/SDLx/Layer.pod: GPL-1.0-or-later OR Artistic-1.0-Perl +# lib/pods/SDLx/LayerManager.pod: GPL-1.0-or-later OR Artistic-1.0-Perl +# lib/pods/SDLx/Music.pod: GPL-1.0-or-later OR Artistic-1.0-Perl +# lib/pods/SDLx/Rect.pod: GPL-1.0-or-later OR Artistic-1.0-Perl +# lib/pods/SDLx/SFont.pod: GPL-1.0-or-later OR Artistic-1.0-Perl +# lib/pods/SDLx/Sound.pod: GPL-1.0-or-later OR Artistic-1.0-Perl +# lib/pods/SDLx/Text.pod: GPL-1.0-or-later OR Artistic-1.0-Perl +# lib/SDL.pm: LGPL-2.1-or-later +# lib/SDL_perl.pm: LGPL-2.1-or-later +# lib/SDL/SMPEG/Info.pm: LGPL-2.1-or-later +# lib/SDL/TTFont.pm: LGPL-2.1-or-later +# lib/SDL/Tutorial.pm: LGPL-2.1-or-later +# lib/SDL/Tutorial/Animation.pm: LGPL-2.1-or-later +# OFL.txt: OFL-1.1-RFN text +# share/GenBasR.ttf: OFL-1.1-RFN +# src/defines.h: LGPL-2.1-or-later +# src/ppport.h: GPL-1.0-or-later OR Artistic-1.0-Perl +# src/SDL.xs: LGPL-2.1-or-later +# src/SDLx/SFont.h: LGPL-2.1-or-later +# src/SDLx/SFont.xs: LGPL-2.1-or-later +## Used at build-time, but not in any binary package +# Build.PL: refers to LGPL +# inc/My/Builder.pm: LGPL-2.1-or-later +# test/data/5x7.fnt: LGPL-2.1-only (see test/data/README) +# test/data/tribe_i.wav: GPL-3.0-only OR LGPL-2.0-only OR CC-BY-SA-3.0 +# (see test/data/README; there is a typo in the file +# name) +## Not in any binary package and not used +# META.json: refers to LGPL-2.1 +License: LGPL-2.1-or-later AND (GPL-1.0-or-later OR Artistic-1.0-Perl) AND OFL-1.1-RFN URL: http://sdl.perl.org/ Source0: https://cpan.metacpan.org/authors/id/F/FR/FROGGS/SDL-%{version}.tar.gz # Fix an implicit function declaration, proposed to the upstream, @@ -61,6 +96,7 @@ BuildRequires: perl(Test::Most) >= 0.21 BuildRequires: perl(threads) BuildRequires: perl(threads::shared) Requires: perl(File::ShareDir) >= 1.0 +Provides: bundled(sil-gentium-basic-book-fonts) = 1.100 %define _use_internal_dependency_generator 0 %{?perl_default_filter} @@ -74,6 +110,7 @@ the spirit of both the SDL and Perl. %package -n perl-Module-Build-SDL Summary: Module::Build subclass for building SDL applications +License: LGPL-2.1-or-later Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release} Requires: perl(ExtUtils::CBuilder::Base) @@ -112,7 +149,7 @@ find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \; %{_fixperms} $RPM_BUILD_ROOT/* %files -%license COPYING +%license COPYING OFL.txt %doc CHANGELOG TODO %{perl_vendorarch}/auto/* %{perl_vendorarch}/SDL* @@ -125,6 +162,8 @@ find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \; %changelog * Fri Mar 10 2023 Petr Pisar - 2.548-17 - Fix an implicit function declaration (bug #2177189) +- Correct a license to "LGPL-2.1-or-later AND (GPL-1.0-or-later OR + Artistic-1.0-Perl) AND OFL-1.1-RFN" * Fri Jan 20 2023 Fedora Release Engineering - 2.548-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From 38e00bd38e44370f9c488549b5220bb6fd54865d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Fri, 10 Mar 2023 15:56:47 +0100 Subject: [PATCH 08/29] Modernize a spec file --- perl-SDL.spec | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/perl-SDL.spec b/perl-SDL.spec index b0b3b75..46c0d1f 100644 --- a/perl-SDL.spec +++ b/perl-SDL.spec @@ -98,7 +98,6 @@ BuildRequires: perl(threads::shared) Requires: perl(File::ShareDir) >= 1.0 Provides: bundled(sil-gentium-basic-book-fonts) = 1.100 -%define _use_internal_dependency_generator 0 %{?perl_default_filter} %description @@ -143,21 +142,33 @@ perl Build.PL installdirs=vendor optimize="$RPM_OPT_FLAGS" ./Build test %install -./Build install destdir=$RPM_BUILD_ROOT create_packlist=0 -find $RPM_BUILD_ROOT -type f -name '*.bs' -a -size 0 -exec rm -f {} \; -find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \; -%{_fixperms} $RPM_BUILD_ROOT/* +./Build install destdir=%{buildroot} create_packlist=0 +find %{buildroot} -type f -name '*.bs' -a -size 0 -delete +%{_fixperms} %{buildroot}/* %files %license COPYING OFL.txt %doc CHANGELOG TODO -%{perl_vendorarch}/auto/* -%{perl_vendorarch}/SDL* -%{_mandir}/man3/SDL* +%{perl_vendorarch}/auto/SDL +%{perl_vendorarch}/auto/SDL_perl +%{perl_vendorarch}/auto/SDLx +%dir %{perl_vendorarch}/auto/share +%dir %{perl_vendorarch}/auto/share/dist +%{perl_vendorarch}/auto/share/dist/SDL +%{perl_vendorarch}/SDL +%{perl_vendorarch}/SDL.pm +%{perl_vendorarch}/SDL.pod +%{perl_vendorarch}/SDL_perl.pm +%{perl_vendorarch}/SDLx +%{_mandir}/man3/SDL.* +%{_mandir}/man3/SDL::* +%{_mandir}/man3/SDLx::* %files -n perl-Module-Build-SDL -%{perl_vendorarch}/Module* -%{_mandir}/man3/Module::* +%dir %{perl_vendorarch}/Module +%dir %{perl_vendorarch}/Module/Build +%{perl_vendorarch}/Module/Build/SDL.pm +%{_mandir}/man3/Module::Build::SDL.* %changelog * Fri Mar 10 2023 Petr Pisar - 2.548-17 From 129b0ed2404c6b36370473e5f00deda12243f255 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Fri, 10 Mar 2023 17:23:37 +0100 Subject: [PATCH 09/29] Use a system-provided Gentium Book Basic font --- ...ndle-Gentium-Book-Basic-regular-font.patch | 135 ++++++++++++++++++ perl-SDL.spec | 26 ++-- 2 files changed, 150 insertions(+), 11 deletions(-) create mode 100644 SDL-2.548-Unbundle-Gentium-Book-Basic-regular-font.patch diff --git a/SDL-2.548-Unbundle-Gentium-Book-Basic-regular-font.patch b/SDL-2.548-Unbundle-Gentium-Book-Basic-regular-font.patch new file mode 100644 index 0000000..53a815e --- /dev/null +++ b/SDL-2.548-Unbundle-Gentium-Book-Basic-regular-font.patch @@ -0,0 +1,135 @@ +From c90ae13b7bf611e2c28d04fd831d4fb8d65ad653 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Fri, 10 Mar 2023 16:53:56 +0100 +Subject: [PATCH] Unbundle Gentium Book Basic regular font +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This replaces the bundled GenBasR.ttf font file with a path to +a system-provided font. Deleting the font file is left to a spec file. + +Signed-off-by: Petr Písař +--- + Build.PL | 4 ---- + MANIFEST | 1 - + lib/SDLx/Text.pm | 3 +-- + t/sdlx_text.t | 3 +-- + t/ttf.t | 5 +---- + t/ttf_font.t | 5 +---- + 6 files changed, 4 insertions(+), 17 deletions(-) + +diff --git a/Build.PL b/Build.PL +index 7c706fc..777c708 100644 +--- a/Build.PL ++++ b/Build.PL +@@ -571,7 +571,6 @@ my $build = $package->new( + 'ExtUtils::CBuilder' => '0.260301', + 'Alien::SDL' => '1.446', + 'File::Find' => '0', +- 'File::ShareDir' => '1.0', + 'Tie::Simple' => '0', + "Module::Build" => '0.40', + 'Capture::Tiny' => '0', +@@ -582,18 +581,15 @@ my $build = $package->new( + 'Test::Most' => '0.21', + 'Alien::SDL' => '1.446', + 'File::Find' => '0', +- 'File::ShareDir' => '1.0', + 'Tie::Simple' => '0', + 'Scalar::Util' => '0', + }, + requires => { + 'Scalar::Util' => '0', + 'Tie::Simple' => '0', +- 'File::ShareDir' => '1.0', + 'CPAN' => '1.92', + 'perl' => '5.008000', + }, +- share_dir => 'share', + + build_recommends => { + 'Pod::ToDemo' => '0.20', +diff --git a/MANIFEST b/MANIFEST +index 6f86b79..dfa4982 100644 +--- a/MANIFEST ++++ b/MANIFEST +@@ -193,7 +193,6 @@ scripts/MultiThreadPOC.pl + scripts/sdl_const.pl + scripts/sdl_module_maker.pl + scripts/SDLpp.pl +-share/GenBasR.ttf + src/Core/Audio.xs + src/Core/CDROM.xs + src/Core/Events.xs +diff --git a/lib/SDLx/Text.pm b/lib/SDLx/Text.pm +index e29ccd9..8727cbb 100644 +--- a/lib/SDLx/Text.pm ++++ b/lib/SDLx/Text.pm +@@ -20,8 +20,7 @@ sub new { + } + my $file = $options{'font'}; + if (!$file) { +- require File::ShareDir; +- $file = File::ShareDir::dist_file('SDL', 'GenBasR.ttf'); ++ $file = '/usr/share/fonts/sil-gentium-basic-book-fonts/GenBkBasR.ttf'; + } + + my $color = defined $options{'color'} ? $options{'color'} : [255, 255, 255]; +diff --git a/t/sdlx_text.t b/t/sdlx_text.t +index 0727b79..1343860 100644 +--- a/t/sdlx_text.t ++++ b/t/sdlx_text.t +@@ -21,9 +21,8 @@ use_ok( 'SDLx::Text' ); + my $videodriver = $ENV{SDL_VIDEODRIVER}; + $ENV{SDL_VIDEODRIVER} = 'dummy' unless $ENV{SDL_RELEASE_TESTING}; + +-use File::Spec; + my $score = SDLx::Text->new( +- font => File::Spec->catfile($FindBin::Bin, '..', 'share', 'GenBasR.ttf') ++ '/usr/share/fonts/sil-gentium-basic-book-fonts/GenBkBasR.ttf' + ); + + isa_ok( $score, 'SDLx::Text'); +diff --git a/t/ttf.t b/t/ttf.t +index 18bdca1..d6c7496 100644 +--- a/t/ttf.t ++++ b/t/ttf.t +@@ -27,10 +27,7 @@ use SDL::RWOps; + use SDL::Version; + use Encode; + +-use File::Spec; +-my $font_filename = File::Spec->catfile( +- $FindBin::Bin, '..', 'share', 'GenBasR.ttf' +-); ++my $font_filename = '/usr/share/fonts/sil-gentium-basic-book-fonts/GenBkBasR.ttf'; + + my $videodriver = $ENV{SDL_VIDEODRIVER}; + $ENV{SDL_VIDEODRIVER} = 'dummy' unless $ENV{SDL_RELEASE_TESTING}; +diff --git a/t/ttf_font.t b/t/ttf_font.t +index e5a05ca..dfabc9c 100644 +--- a/t/ttf_font.t ++++ b/t/ttf_font.t +@@ -6,7 +6,6 @@ use SDL::Config; + + BEGIN { + use FindBin; +- use File::Spec; + use Test::More; + use lib 't/lib'; + use SDL::TestTool; +@@ -19,9 +18,7 @@ BEGIN { + use SDL::TTF; + use SDL::TTF::Font; + use SDL::Version; +-my $font_filename = File::Spec->catfile( +- $FindBin::Bin, '..', 'share', 'GenBasR.ttf' +-); ++my $font_filename = '/usr/share/fonts/sil-gentium-basic-book-fonts/GenBkBasR.ttf'; + + my $lv = SDL::TTF::linked_version(); + my $cv = SDL::TTF::compile_time_version(); +-- +2.39.2 + diff --git a/perl-SDL.spec b/perl-SDL.spec index 46c0d1f..bb7896b 100644 --- a/perl-SDL.spec +++ b/perl-SDL.spec @@ -21,8 +21,6 @@ Summary: Simple DirectMedia Layer for Perl # lib/SDL/TTFont.pm: LGPL-2.1-or-later # lib/SDL/Tutorial.pm: LGPL-2.1-or-later # lib/SDL/Tutorial/Animation.pm: LGPL-2.1-or-later -# OFL.txt: OFL-1.1-RFN text -# share/GenBasR.ttf: OFL-1.1-RFN # src/defines.h: LGPL-2.1-or-later # src/ppport.h: GPL-1.0-or-later OR Artistic-1.0-Perl # src/SDL.xs: LGPL-2.1-or-later @@ -37,12 +35,18 @@ Summary: Simple DirectMedia Layer for Perl # name) ## Not in any binary package and not used # META.json: refers to LGPL-2.1 -License: LGPL-2.1-or-later AND (GPL-1.0-or-later OR Artistic-1.0-Perl) AND OFL-1.1-RFN +# OFL.txt: OFL-1.1-RFN text +## Unbundled: +# share/GenBasR.ttf: OFL-1.1-RFN +License: LGPL-2.1-or-later AND (GPL-1.0-or-later OR Artistic-1.0-Perl) URL: http://sdl.perl.org/ Source0: https://cpan.metacpan.org/authors/id/F/FR/FROGGS/SDL-%{version}.tar.gz # Fix an implicit function declaration, proposed to the upstream, # bug #2177189, . Patch0: SDL-2.548-Fix-implicit-declaration-of-_calc_offset.patch +# Unbundle Gentium Book Basic font, not suitable for the upstream, the file is +# delete in %%prep section. +Patch1: SDL-2.548-Unbundle-Gentium-Book-Basic-regular-font.patch BuildRequires: coreutils BuildRequires: findutils BuildRequires: libGLU-devel @@ -76,7 +80,6 @@ BuildRequires: perl(DynaLoader) BuildRequires: perl(Exporter) # ExtUtils::CBuilder::Base not used at tests BuildRequires: perl(File::Find) -BuildRequires: perl(File::ShareDir) >= 1.0 BuildRequires: perl(List::Util) BuildRequires: perl(overload) BuildRequires: perl(Scalar::Util) @@ -84,6 +87,7 @@ BuildRequires: perl(Tie::Array) BuildRequires: perl(Tie::Simple) BuildRequires: perl(Time::HiRes) BuildRequires: perl(vars) +BuildRequires: sil-gentium-basic-book-fonts # Tests: BuildRequires: perl(bytes) BuildRequires: perl(Capture::Tiny) @@ -95,8 +99,7 @@ BuildRequires: perl(Test::More) BuildRequires: perl(Test::Most) >= 0.21 BuildRequires: perl(threads) BuildRequires: perl(threads::shared) -Requires: perl(File::ShareDir) >= 1.0 -Provides: bundled(sil-gentium-basic-book-fonts) = 1.100 +Requires: sil-gentium-basic-book-fonts %{?perl_default_filter} @@ -121,6 +124,9 @@ application/game into PAR archive. %prep %autosetup -p1 -n SDL-%{version} +# Delete a bundled font file, code removed with +# Unbundle-Gentium-Book-Basic-regular-font.patch. +rm -r share # Move the pod files directly to directory lib to have correctly generated # man pages without prefix pods:: cd lib/pods @@ -147,14 +153,11 @@ find %{buildroot} -type f -name '*.bs' -a -size 0 -delete %{_fixperms} %{buildroot}/* %files -%license COPYING OFL.txt +%license COPYING %doc CHANGELOG TODO %{perl_vendorarch}/auto/SDL %{perl_vendorarch}/auto/SDL_perl %{perl_vendorarch}/auto/SDLx -%dir %{perl_vendorarch}/auto/share -%dir %{perl_vendorarch}/auto/share/dist -%{perl_vendorarch}/auto/share/dist/SDL %{perl_vendorarch}/SDL %{perl_vendorarch}/SDL.pm %{perl_vendorarch}/SDL.pod @@ -174,7 +177,8 @@ find %{buildroot} -type f -name '*.bs' -a -size 0 -delete * Fri Mar 10 2023 Petr Pisar - 2.548-17 - Fix an implicit function declaration (bug #2177189) - Correct a license to "LGPL-2.1-or-later AND (GPL-1.0-or-later OR - Artistic-1.0-Perl) AND OFL-1.1-RFN" + Artistic-1.0-Perl)" +- Use a system-provided Gentium Book Basic font * Fri Jan 20 2023 Fedora Release Engineering - 2.548-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From ff3d616b01a693f75ae9c4080e3c6aeb787b3c2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Fri, 10 Mar 2023 17:31:43 +0100 Subject: [PATCH 10/29] Run tests in parallel --- perl-SDL.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/perl-SDL.spec b/perl-SDL.spec index bb7896b..9c1bf8e 100644 --- a/perl-SDL.spec +++ b/perl-SDL.spec @@ -145,6 +145,7 @@ perl Build.PL installdirs=vendor optimize="$RPM_OPT_FLAGS" ./Build %check +export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}') ./Build test %install From df515b1581bfab6f09ce99b5f1aa788938ed3e86 Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Tue, 11 Jul 2023 16:18:34 +0200 Subject: [PATCH 11/29] Perl 5.38 rebuild --- perl-SDL.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/perl-SDL.spec b/perl-SDL.spec index 9c1bf8e..79503b6 100644 --- a/perl-SDL.spec +++ b/perl-SDL.spec @@ -1,6 +1,6 @@ Name: perl-SDL Version: 2.548 -Release: 17%{?dist} +Release: 18%{?dist} Summary: Simple DirectMedia Layer for Perl # COPYING: GPL-2.0 text # lib/pods/SDL.pod: GPL-1.0-or-later OR Artistic-1.0-Perl @@ -175,6 +175,9 @@ find %{buildroot} -type f -name '*.bs' -a -size 0 -delete %{_mandir}/man3/Module::Build::SDL.* %changelog +* Tue Jul 11 2023 Jitka Plesnikova - 2.548-18 +- Perl 5.38 rebuild + * Fri Mar 10 2023 Petr Pisar - 2.548-17 - Fix an implicit function declaration (bug #2177189) - Correct a license to "LGPL-2.1-or-later AND (GPL-1.0-or-later OR From eb81d86d61ba9571aac59722284938535545b5e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Wed, 12 Jul 2023 18:05:01 +0200 Subject: [PATCH 12/29] Adapt to perl 5.37.1 --- SDL-2.548-Adapt-to-perl-5.37.1.patch | 71 ++++++++++++++++++++++++++++ perl-SDL.spec | 8 +++- 2 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 SDL-2.548-Adapt-to-perl-5.37.1.patch diff --git a/SDL-2.548-Adapt-to-perl-5.37.1.patch b/SDL-2.548-Adapt-to-perl-5.37.1.patch new file mode 100644 index 0000000..5d46976 --- /dev/null +++ b/SDL-2.548-Adapt-to-perl-5.37.1.patch @@ -0,0 +1,71 @@ +From d734d03862d7dcc776bd2fa3ba662cdd5879b32e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Wed, 12 Jul 2023 17:55:27 +0200 +Subject: [PATCH] Adapt to perl 5.37.1 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +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 +Signed-off-by: Petr Písař +--- + src/SDLx/Controller/Interface.xs | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/src/SDLx/Controller/Interface.xs b/src/SDLx/Controller/Interface.xs +index 3dc202b7..d326c885 100644 +--- a/src/SDLx/Controller/Interface.xs ++++ b/src/SDLx/Controller/Interface.xs +@@ -57,15 +57,15 @@ void evaluate(SDLx_Interface *obj, SDLx_Derivative *out, SDLx_State *initial, fl + + SV *temp; + temp = av_pop(accel); +- out->dv_x = sv_nv(temp); ++ out->dv_x = SvNVx(temp); + SvREFCNT_dec(temp); + + temp = av_pop(accel); +- out->dv_y = sv_nv(temp); ++ out->dv_y = SvNVx(temp); + SvREFCNT_dec(temp); + + temp = av_pop(accel); +- out->dang_v = sv_nv(temp); ++ out->dang_v = SvNVx(temp); + SvREFCNT_dec(temp); + + SvREFCNT_dec((SV *)accel); +@@ -90,15 +90,15 @@ void evaluate_dt(SDLx_Interface *obj, SDLx_Derivative *out, SDLx_State *initial, + + SV *temp; + temp = av_pop(accel); +- out->dv_x = sv_nv(temp); ++ out->dv_x = SvNVx(temp); + SvREFCNT_dec(temp); + + temp = av_pop(accel); +- out->dv_y = sv_nv(temp); ++ out->dv_y = SvNVx(temp); + SvREFCNT_dec(temp); + + temp = av_pop(accel); +- out->dang_v = sv_nv(temp); ++ out->dang_v = SvNVx(temp); + SvREFCNT_dec(temp); + + SvREFCNT_dec((SV *)accel); +-- +2.41.0 + diff --git a/perl-SDL.spec b/perl-SDL.spec index 79503b6..45b5f2c 100644 --- a/perl-SDL.spec +++ b/perl-SDL.spec @@ -1,6 +1,6 @@ Name: perl-SDL Version: 2.548 -Release: 18%{?dist} +Release: 19%{?dist} Summary: Simple DirectMedia Layer for Perl # COPYING: GPL-2.0 text # lib/pods/SDL.pod: GPL-1.0-or-later OR Artistic-1.0-Perl @@ -47,6 +47,9 @@ Patch0: SDL-2.548-Fix-implicit-declaration-of-_calc_offset.patch # Unbundle Gentium Book Basic font, not suitable for the upstream, the file is # delete in %%prep section. Patch1: SDL-2.548-Unbundle-Gentium-Book-Basic-regular-font.patch +# Adapt to perl 5.37.1, proposed to upstream, +# +Patch2: SDL-2.548-Adapt-to-perl-5.37.1.patch BuildRequires: coreutils BuildRequires: findutils BuildRequires: libGLU-devel @@ -175,6 +178,9 @@ find %{buildroot} -type f -name '*.bs' -a -size 0 -delete %{_mandir}/man3/Module::Build::SDL.* %changelog +* Wed Jul 12 2023 Petr Pisar - 2.548-19 +- Adapt to perl 5.37.1 (upstream bug #303) + * Tue Jul 11 2023 Jitka Plesnikova - 2.548-18 - Perl 5.38 rebuild From af093d616c5d5818e35518c44bf9d1c72b64e260 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 21 Jul 2023 01:25:19 +0000 Subject: [PATCH 13/29] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- perl-SDL.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/perl-SDL.spec b/perl-SDL.spec index 45b5f2c..22d24b8 100644 --- a/perl-SDL.spec +++ b/perl-SDL.spec @@ -1,6 +1,6 @@ Name: perl-SDL Version: 2.548 -Release: 19%{?dist} +Release: 20%{?dist} Summary: Simple DirectMedia Layer for Perl # COPYING: GPL-2.0 text # lib/pods/SDL.pod: GPL-1.0-or-later OR Artistic-1.0-Perl @@ -178,6 +178,9 @@ find %{buildroot} -type f -name '*.bs' -a -size 0 -delete %{_mandir}/man3/Module::Build::SDL.* %changelog +* Fri Jul 21 2023 Fedora Release Engineering - 2.548-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Wed Jul 12 2023 Petr Pisar - 2.548-19 - Adapt to perl 5.37.1 (upstream bug #303) From 4b9d6b7827a7abd651ff5a7873d6f23592cefd1e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 21 Jan 2024 18:23:33 +0000 Subject: [PATCH 14/29] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- perl-SDL.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/perl-SDL.spec b/perl-SDL.spec index 22d24b8..21ca3ab 100644 --- a/perl-SDL.spec +++ b/perl-SDL.spec @@ -1,6 +1,6 @@ Name: perl-SDL Version: 2.548 -Release: 20%{?dist} +Release: 21%{?dist} Summary: Simple DirectMedia Layer for Perl # COPYING: GPL-2.0 text # lib/pods/SDL.pod: GPL-1.0-or-later OR Artistic-1.0-Perl @@ -178,6 +178,9 @@ find %{buildroot} -type f -name '*.bs' -a -size 0 -delete %{_mandir}/man3/Module::Build::SDL.* %changelog +* Sun Jan 21 2024 Fedora Release Engineering - 2.548-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Jul 21 2023 Fedora Release Engineering - 2.548-20 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 8da273c686dba37e7d7b3d061886faeb42728a13 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jan 2024 20:00:57 +0000 Subject: [PATCH 15/29] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- perl-SDL.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/perl-SDL.spec b/perl-SDL.spec index 21ca3ab..c23ca9c 100644 --- a/perl-SDL.spec +++ b/perl-SDL.spec @@ -1,6 +1,6 @@ Name: perl-SDL Version: 2.548 -Release: 21%{?dist} +Release: 22%{?dist} Summary: Simple DirectMedia Layer for Perl # COPYING: GPL-2.0 text # lib/pods/SDL.pod: GPL-1.0-or-later OR Artistic-1.0-Perl @@ -178,6 +178,9 @@ find %{buildroot} -type f -name '*.bs' -a -size 0 -delete %{_mandir}/man3/Module::Build::SDL.* %changelog +* Thu Jan 25 2024 Fedora Release Engineering - 2.548-22 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sun Jan 21 2024 Fedora Release Engineering - 2.548-21 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 08f94ae26b555bcfb4ae50498e11f6b189b39063 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Tue, 2 Apr 2024 13:33:11 +0200 Subject: [PATCH 16/29] Fix reference counting an event filter callback --- ...ference-counting-in-set_event_filter.patch | 38 +++++++++++++++++++ perl-SDL.spec | 8 +++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 SDL-2.548-Fix-reference-counting-in-set_event_filter.patch diff --git a/SDL-2.548-Fix-reference-counting-in-set_event_filter.patch b/SDL-2.548-Fix-reference-counting-in-set_event_filter.patch new file mode 100644 index 0000000..d851249 --- /dev/null +++ b/SDL-2.548-Fix-reference-counting-in-set_event_filter.patch @@ -0,0 +1,38 @@ +From db0fc617585073065afb1aff3c4e6f5c42748548 Mon Sep 17 00:00:00 2001 +From: Colin Watson +Date: Thu, 28 Mar 2024 13:21:47 +0000 +Subject: [PATCH] Fix reference-counting in set_event_filter +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +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) + +Signed-off-by: Petr Písař +--- + 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..2da2adef 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(callback); + SDL_SetEventFilter((SDL_EventFilter) eventfilter_cb); + + AV * +-- +2.44.0 + diff --git a/perl-SDL.spec b/perl-SDL.spec index c23ca9c..c9db8a5 100644 --- a/perl-SDL.spec +++ b/perl-SDL.spec @@ -1,6 +1,6 @@ Name: perl-SDL Version: 2.548 -Release: 22%{?dist} +Release: 23%{?dist} Summary: Simple DirectMedia Layer for Perl # COPYING: GPL-2.0 text # lib/pods/SDL.pod: GPL-1.0-or-later OR Artistic-1.0-Perl @@ -50,6 +50,9 @@ Patch1: SDL-2.548-Unbundle-Gentium-Book-Basic-regular-font.patch # Adapt to perl 5.37.1, proposed to upstream, # Patch2: SDL-2.548-Adapt-to-perl-5.37.1.patch +# Fix reference counting an event filter callback, bug #2272636, +# proposed to the upstream, +Patch3: SDL-2.548-Fix-reference-counting-in-set_event_filter.patch BuildRequires: coreutils BuildRequires: findutils BuildRequires: libGLU-devel @@ -178,6 +181,9 @@ find %{buildroot} -type f -name '*.bs' -a -size 0 -delete %{_mandir}/man3/Module::Build::SDL.* %changelog +* Tue Apr 02 2024 Petr Pisar - 2.548-23 +- Fix reference counting an event filter callback (bug #2272636) + * Thu Jan 25 2024 Fedora Release Engineering - 2.548-22 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From d6c5071d9d2a09713ea9483fd5906a6321df11cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Tue, 2 Apr 2024 13:50:20 +0200 Subject: [PATCH 17/29] Declare a source license --- perl-SDL.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/perl-SDL.spec b/perl-SDL.spec index c9db8a5..a7e8f61 100644 --- a/perl-SDL.spec +++ b/perl-SDL.spec @@ -39,6 +39,7 @@ Summary: Simple DirectMedia Layer for Perl ## Unbundled: # share/GenBasR.ttf: OFL-1.1-RFN License: LGPL-2.1-or-later AND (GPL-1.0-or-later OR Artistic-1.0-Perl) +SourceLicense: %{license} AND LGPL-2.1-only AND (GPL-3.0-only OR LGPL-2.0-only OR CC-BY-SA-3.0) AND OFL-1.1-RFN URL: http://sdl.perl.org/ Source0: https://cpan.metacpan.org/authors/id/F/FR/FROGGS/SDL-%{version}.tar.gz # Fix an implicit function declaration, proposed to the upstream, From 00933f0d2708d1a4ff07df2ca7d1b68130d92c04 Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Mon, 10 Jun 2024 20:58:33 +0200 Subject: [PATCH 18/29] Perl 5.40 rebuild --- perl-SDL.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/perl-SDL.spec b/perl-SDL.spec index a7e8f61..cc1bc4b 100644 --- a/perl-SDL.spec +++ b/perl-SDL.spec @@ -1,6 +1,6 @@ Name: perl-SDL Version: 2.548 -Release: 23%{?dist} +Release: 24%{?dist} Summary: Simple DirectMedia Layer for Perl # COPYING: GPL-2.0 text # lib/pods/SDL.pod: GPL-1.0-or-later OR Artistic-1.0-Perl @@ -182,6 +182,9 @@ find %{buildroot} -type f -name '*.bs' -a -size 0 -delete %{_mandir}/man3/Module::Build::SDL.* %changelog +* Mon Jun 10 2024 Jitka Plesnikova - 2.548-24 +- Perl 5.40 rebuild + * Tue Apr 02 2024 Petr Pisar - 2.548-23 - Fix reference counting an event filter callback (bug #2272636) From 741dad5edf39852455b1d72cac8ec8f7f34b6c4c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jul 2024 04:06:47 +0000 Subject: [PATCH 19/29] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- perl-SDL.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/perl-SDL.spec b/perl-SDL.spec index cc1bc4b..94d348e 100644 --- a/perl-SDL.spec +++ b/perl-SDL.spec @@ -1,6 +1,6 @@ Name: perl-SDL Version: 2.548 -Release: 24%{?dist} +Release: 25%{?dist} Summary: Simple DirectMedia Layer for Perl # COPYING: GPL-2.0 text # lib/pods/SDL.pod: GPL-1.0-or-later OR Artistic-1.0-Perl @@ -182,6 +182,9 @@ find %{buildroot} -type f -name '*.bs' -a -size 0 -delete %{_mandir}/man3/Module::Build::SDL.* %changelog +* Fri Jul 19 2024 Fedora Release Engineering - 2.548-25 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Mon Jun 10 2024 Jitka Plesnikova - 2.548-24 - Perl 5.40 rebuild From 8344f3d5f1b9e6b76c1861a674e67abec229606f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 18 Jan 2025 06:02:21 +0000 Subject: [PATCH 20/29] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- perl-SDL.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/perl-SDL.spec b/perl-SDL.spec index 94d348e..b2fd35c 100644 --- a/perl-SDL.spec +++ b/perl-SDL.spec @@ -1,6 +1,6 @@ Name: perl-SDL Version: 2.548 -Release: 25%{?dist} +Release: 26%{?dist} Summary: Simple DirectMedia Layer for Perl # COPYING: GPL-2.0 text # lib/pods/SDL.pod: GPL-1.0-or-later OR Artistic-1.0-Perl @@ -182,6 +182,9 @@ find %{buildroot} -type f -name '*.bs' -a -size 0 -delete %{_mandir}/man3/Module::Build::SDL.* %changelog +* Sat Jan 18 2025 Fedora Release Engineering - 2.548-26 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Fri Jul 19 2024 Fedora Release Engineering - 2.548-25 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From de4da1760c2b0f7e062a2db5abc325b0424e8178 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Tue, 11 Feb 2025 12:54:16 +0100 Subject: [PATCH 21/29] Adapt to GCC 15 --- SDL-2.548-Fix-building-in-ISO-C23.patch | 67 +++++++++++++++++++++++++ perl-SDL.spec | 9 +++- 2 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 SDL-2.548-Fix-building-in-ISO-C23.patch diff --git a/SDL-2.548-Fix-building-in-ISO-C23.patch b/SDL-2.548-Fix-building-in-ISO-C23.patch new file mode 100644 index 0000000..81b88ef --- /dev/null +++ b/SDL-2.548-Fix-building-in-ISO-C23.patch @@ -0,0 +1,67 @@ +From 2a1eb99101a89e46c13b75b08a4c685e0f7425fe Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Tue, 11 Feb 2025 12:14:27 +0100 +Subject: [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. + +Resolves: https://github.com/PerlGameDev/SDL/issues/294 +Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2341036 +Signed-off-by: Petr Písař +--- + src/SDL.xs | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/SDL.xs b/src/SDL.xs +index a13882c8..5856e3af 100644 +--- a/src/SDL.xs ++++ b/src/SDL.xs +@@ -144,7 +144,7 @@ sdl_perl_atexit (void) + SDL_Quit(); + } + +-void boot_SDL(); ++XS(boot_SDL); + void boot_SDL__OpenGL(); + + XS(boot_SDL_perl) +@@ -155,7 +155,7 @@ XS(boot_SDL_perl) + #endif + PL_perl_destruct_level = 2; + GET_TLS_CONTEXT +- boot_SDL(); ++ boot_SDL(aTHX_ cv); + + #if defined WINDOWS || defined WIN32 + SDL_RegisterApp ("SDLPerl App", 0, GetModuleHandle (NULL)); +-- +2.48.1 + diff --git a/perl-SDL.spec b/perl-SDL.spec index b2fd35c..b234481 100644 --- a/perl-SDL.spec +++ b/perl-SDL.spec @@ -1,6 +1,6 @@ Name: perl-SDL Version: 2.548 -Release: 26%{?dist} +Release: 27%{?dist} Summary: Simple DirectMedia Layer for Perl # COPYING: GPL-2.0 text # lib/pods/SDL.pod: GPL-1.0-or-later OR Artistic-1.0-Perl @@ -54,6 +54,10 @@ Patch2: SDL-2.548-Adapt-to-perl-5.37.1.patch # Fix reference counting an event filter callback, bug #2272636, # proposed to the upstream, Patch3: SDL-2.548-Fix-reference-counting-in-set_event_filter.patch +# Adapt to GCC 15, bug #2341036, +# , proposed upstream +# +Patch4: SDL-2.548-Fix-building-in-ISO-C23.patch BuildRequires: coreutils BuildRequires: findutils BuildRequires: libGLU-devel @@ -182,6 +186,9 @@ find %{buildroot} -type f -name '*.bs' -a -size 0 -delete %{_mandir}/man3/Module::Build::SDL.* %changelog +* Tue Feb 11 2025 Petr Pisar - 2.548-27 +- Adapt to GCC 15 (bug #2341036) + * Sat Jan 18 2025 Fedora Release Engineering - 2.548-26 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 5235ba595b0a5c8dc7537093fbb0ab9b35eb50c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Tue, 18 Feb 2025 09:24:39 +0100 Subject: [PATCH 22/29] Annotate patches accepted upstream --- perl-SDL.spec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/perl-SDL.spec b/perl-SDL.spec index b234481..f50ea0b 100644 --- a/perl-SDL.spec +++ b/perl-SDL.spec @@ -42,20 +42,20 @@ License: LGPL-2.1-or-later AND (GPL-1.0-or-later OR Artistic-1.0-Perl) SourceLicense: %{license} AND LGPL-2.1-only AND (GPL-3.0-only OR LGPL-2.0-only OR CC-BY-SA-3.0) AND OFL-1.1-RFN URL: http://sdl.perl.org/ Source0: https://cpan.metacpan.org/authors/id/F/FR/FROGGS/SDL-%{version}.tar.gz -# Fix an implicit function declaration, proposed to the upstream, +# Fix an implicit function declaration, in upstream after 2.548, # bug #2177189, . Patch0: SDL-2.548-Fix-implicit-declaration-of-_calc_offset.patch # Unbundle Gentium Book Basic font, not suitable for the upstream, the file is -# delete in %%prep section. +# deleted in %%prep section. Patch1: SDL-2.548-Unbundle-Gentium-Book-Basic-regular-font.patch -# Adapt to perl 5.37.1, proposed to upstream, +# Adapt to perl 5.37.1, in upstream after 2.548, # Patch2: SDL-2.548-Adapt-to-perl-5.37.1.patch # Fix reference counting an event filter callback, bug #2272636, -# proposed to the upstream, +# in upstream after 2.548, Patch3: SDL-2.548-Fix-reference-counting-in-set_event_filter.patch # Adapt to GCC 15, bug #2341036, -# , proposed upstream +# , in upstream after 2.548, # Patch4: SDL-2.548-Fix-building-in-ISO-C23.patch BuildRequires: coreutils From 8e149c39fafcb38b4d0cec380140899c34827c66 Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Mon, 7 Jul 2025 16:05:22 +0200 Subject: [PATCH 23/29] Perl 5.42 rebuild --- perl-SDL.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/perl-SDL.spec b/perl-SDL.spec index f50ea0b..6d04ff4 100644 --- a/perl-SDL.spec +++ b/perl-SDL.spec @@ -1,6 +1,6 @@ Name: perl-SDL Version: 2.548 -Release: 27%{?dist} +Release: 28%{?dist} Summary: Simple DirectMedia Layer for Perl # COPYING: GPL-2.0 text # lib/pods/SDL.pod: GPL-1.0-or-later OR Artistic-1.0-Perl @@ -186,6 +186,9 @@ find %{buildroot} -type f -name '*.bs' -a -size 0 -delete %{_mandir}/man3/Module::Build::SDL.* %changelog +* Mon Jul 07 2025 Jitka Plesnikova - 2.548-28 +- Perl 5.42 rebuild + * Tue Feb 11 2025 Petr Pisar - 2.548-27 - Adapt to GCC 15 (bug #2341036) From 8f1763932727c5c0cf9a2db0599b19c67050eaa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Fri, 11 Jul 2025 09:56:43 +0200 Subject: [PATCH 24/29] Adapt t/core_surface.t test to SDL3 --- ...est-data-icon.bmp-is-really-4-bits-p.patch | 29 +++++++++++++++++++ perl-SDL.spec | 8 ++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 SDL-2.548-core_surface.t-test-data-icon.bmp-is-really-4-bits-p.patch diff --git a/SDL-2.548-core_surface.t-test-data-icon.bmp-is-really-4-bits-p.patch b/SDL-2.548-core_surface.t-test-data-icon.bmp-is-really-4-bits-p.patch new file mode 100644 index 0000000..5c39f38 --- /dev/null +++ b/SDL-2.548-core_surface.t-test-data-icon.bmp-is-really-4-bits-p.patch @@ -0,0 +1,29 @@ +From 39c0ab8fc0b2277ece593b9b50f79f6e1ccd1fc5 Mon Sep 17 00:00:00 2001 +From: Daniel Kamil Kozar +Date: Thu, 12 Jun 2025 21:43:54 +0200 +Subject: [PATCH] core_surface.t: test/data/icon.bmp is really 4 bits per pixel +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Petr Písař +--- + t/core_surface.t | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/t/core_surface.t b/t/core_surface.t +index 897536b6..baa962aa 100644 +--- a/t/core_surface.t ++++ b/t/core_surface.t +@@ -51,7 +51,7 @@ is( $image->h, 32, 'image has height' ); + + my $pixel_format = $image->format; + isa_ok( $pixel_format, 'SDL::PixelFormat' ); +-is( $pixel_format->BitsPerPixel, 8, ' BitsPerPixel' ); ++is( $pixel_format->BitsPerPixel, 4, ' BitsPerPixel' ); + is( $pixel_format->BytesPerPixel, 1, ' BytesPerPixel' ); + is( $pixel_format->Rloss, 8, ' Rloss' ); + is( $pixel_format->Gloss, 8, ' Gloss' ); +-- +2.50.1 + diff --git a/perl-SDL.spec b/perl-SDL.spec index 6d04ff4..547b3c5 100644 --- a/perl-SDL.spec +++ b/perl-SDL.spec @@ -1,6 +1,6 @@ Name: perl-SDL Version: 2.548 -Release: 28%{?dist} +Release: 29%{?dist} Summary: Simple DirectMedia Layer for Perl # COPYING: GPL-2.0 text # lib/pods/SDL.pod: GPL-1.0-or-later OR Artistic-1.0-Perl @@ -58,6 +58,9 @@ Patch3: SDL-2.548-Fix-reference-counting-in-set_event_filter.patch # , in upstream after 2.548, # Patch4: SDL-2.548-Fix-building-in-ISO-C23.patch +# Adapt t/core_surface.t test to SDL3, incompatible with SDL2, bug #2341036, +# proposed to upstream, +Patch5: SDL-2.548-core_surface.t-test-data-icon.bmp-is-really-4-bits-p.patch BuildRequires: coreutils BuildRequires: findutils BuildRequires: libGLU-devel @@ -186,6 +189,9 @@ find %{buildroot} -type f -name '*.bs' -a -size 0 -delete %{_mandir}/man3/Module::Build::SDL.* %changelog +* Fri Jul 11 2025 Petr Pisar - 2.548-29 +- Adapt t/core_surface.t test to SDL3 (bug #2341036) + * Mon Jul 07 2025 Jitka Plesnikova - 2.548-28 - Perl 5.42 rebuild From 24bd6eebf6509134a39f31723d62254688fc6d1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Fri, 11 Jul 2025 10:31:23 +0200 Subject: [PATCH 25/29] Enanle gating --- gating.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 gating.yaml diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..f126b62 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,15 @@ +--- !Policy +product_versions: + - fedora-rawhide +decision_context: bodhi_update_push_stable +subject_type: koji_build +rules: + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpmdeplint.functional} +--- !Policy +product_versions: + - fedora-* +decision_context: bodhi_update_push_stable +subject_type: koji_build +rules: + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.installability.functional} + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpminspect.static-analysis} From 492e8dc990aece15189a72b94c01390017e62074 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 03:40:23 +0000 Subject: [PATCH 26/29] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- perl-SDL.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/perl-SDL.spec b/perl-SDL.spec index 547b3c5..d868720 100644 --- a/perl-SDL.spec +++ b/perl-SDL.spec @@ -1,6 +1,6 @@ Name: perl-SDL Version: 2.548 -Release: 29%{?dist} +Release: 30%{?dist} Summary: Simple DirectMedia Layer for Perl # COPYING: GPL-2.0 text # lib/pods/SDL.pod: GPL-1.0-or-later OR Artistic-1.0-Perl @@ -189,6 +189,9 @@ find %{buildroot} -type f -name '*.bs' -a -size 0 -delete %{_mandir}/man3/Module::Build::SDL.* %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 2.548-30 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Fri Jul 11 2025 Petr Pisar - 2.548-29 - Adapt t/core_surface.t test to SDL3 (bug #2341036) From 2b8431735ba62bfa3525c925db9b9917b2b38e4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Tue, 7 Oct 2025 14:32:46 +0200 Subject: [PATCH 27/29] Adapt tests to SDL-3.2.24 --- SDL-2.548-Adapt-to-SDL-3.2.24.patch | 56 +++++++++++++++++++++++++++++ perl-SDL.spec | 8 ++++- 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 SDL-2.548-Adapt-to-SDL-3.2.24.patch diff --git a/SDL-2.548-Adapt-to-SDL-3.2.24.patch b/SDL-2.548-Adapt-to-SDL-3.2.24.patch new file mode 100644 index 0000000..2d5a3df --- /dev/null +++ b/SDL-2.548-Adapt-to-SDL-3.2.24.patch @@ -0,0 +1,56 @@ +From 8cd2c619916c09b327c3230b975d1eace2924d58 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Tue, 7 Oct 2025 14:16:23 +0200 +Subject: [PATCH] Adapt to SDL 3.2.24 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +After upgrading SDL from 3.2.22 to 3.2.24 t/core.t started to fail +like this: + + # Failed test '[get_error] got error ' + # at t/core.t line 69. + # got: '' + # expected: anything else + # Looks like you failed 1 test of 28. + t/core.t ........................ Dubious, test returned 1 (wstat 256, 0x100) + Failed 1/28 subtests + (3 TODO tests unexpectedly succeeded) + +The failure is triggered by SDL 5594d03da086ab255b1d7ace1496f3a0c109a83d commit +("Leave letterbox borders set to the frame clear color"). + +SDL_SetVideoMode(640, 480, 232, SDL_ANYFORMAT) kept succeeding, but +SDL_GetError() stopped returning "rect has a negative size" error. + +Because the new behavior is more consistent and because the Perl test +checks for SDL::get_error() instead of SDL::Video::set_video_mode() +return value, I conlude that the Perl test wants to test +SDL::get_error() and uses SDL::Video::set_video_mode() only as a way +to produce an error. + +Thus this patch uses a different SDL::Video::set_video_mode() +arguments to obtain an error ("Invalid width or height"). + +Signed-off-by: Petr Písař +--- + t/core.t | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/t/core.t b/t/core.t +index 1ccac868..8b35b9bc 100644 +--- a/t/core.t ++++ b/t/core.t +@@ -62,7 +62,7 @@ is( SDL_INIT_EVENTTHREAD(), 16777216, + 'SDL_INIT_EVENTTHREAD() should also be available' + ); + +-my $display = SDL::Video::set_video_mode( 640, 480, 232, SDL_ANYFORMAT ); ++my $display = SDL::Video::set_video_mode( -1, 480, 232, SDL_ANYFORMAT ); + + isnt( SDL::get_error(), '', '[get_error] got error ' . SDL::get_error() ); + TODO: +-- +2.51.0 + diff --git a/perl-SDL.spec b/perl-SDL.spec index d868720..e3ddb17 100644 --- a/perl-SDL.spec +++ b/perl-SDL.spec @@ -1,6 +1,6 @@ Name: perl-SDL Version: 2.548 -Release: 30%{?dist} +Release: 31%{?dist} Summary: Simple DirectMedia Layer for Perl # COPYING: GPL-2.0 text # lib/pods/SDL.pod: GPL-1.0-or-later OR Artistic-1.0-Perl @@ -61,6 +61,9 @@ Patch4: SDL-2.548-Fix-building-in-ISO-C23.patch # Adapt t/core_surface.t test to SDL3, incompatible with SDL2, bug #2341036, # proposed to upstream, Patch5: SDL-2.548-core_surface.t-test-data-icon.bmp-is-really-4-bits-p.patch +# Adapt t/core.t test to SDL-3.2.24, bug #2401791, proposed upstream, +# +Patch6: SDL-2.548-Adapt-to-SDL-3.2.24.patch BuildRequires: coreutils BuildRequires: findutils BuildRequires: libGLU-devel @@ -189,6 +192,9 @@ find %{buildroot} -type f -name '*.bs' -a -size 0 -delete %{_mandir}/man3/Module::Build::SDL.* %changelog +* Tue Oct 07 2025 Petr Pisar - 2.548-31 +- Adapt tests to SDL-3.2.24 (bug #2401791) + * Fri Jul 25 2025 Fedora Release Engineering - 2.548-30 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 35cce804746fba575488e6756eff091156fe1b33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Tue, 7 Oct 2025 15:45:37 +0200 Subject: [PATCH 28/29] Package the tests --- SDL-2.548-Read-only-t-core_rwops.t.patch | 62 ++++++++++++++++++++++++ perl-SDL.rpmlintrc | 1 + perl-SDL.spec | 45 +++++++++++++++-- 3 files changed, 105 insertions(+), 3 deletions(-) create mode 100644 SDL-2.548-Read-only-t-core_rwops.t.patch create mode 100644 perl-SDL.rpmlintrc diff --git a/SDL-2.548-Read-only-t-core_rwops.t.patch b/SDL-2.548-Read-only-t-core_rwops.t.patch new file mode 100644 index 0000000..251aead --- /dev/null +++ b/SDL-2.548-Read-only-t-core_rwops.t.patch @@ -0,0 +1,62 @@ +From 4cc57bf07c5ee60baac971e2b06c342851eeaff2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Tue, 7 Oct 2025 15:33:33 +0200 +Subject: [PATCH] Read-only t/core_rwops.t +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +t/core_rwops.t used to create a file in the current working directory +and then test that SDL::RWOps can open it, seek in it and read it. +I.e. the test did not perform any write operation, yet setting up the +test required writing. + +This unnecessary write prevented from running the tests from +a read-only location. + +This patch precreates the test file so that no write operation is +needed when running the test. + +Signed-off-by: Petr Písař +--- + t/core_rwops.t | 7 +------ + test/data/rwops | 1 + + 2 files changed, 2 insertions(+), 6 deletions(-) + create mode 100644 test/data/rwops + +diff --git a/t/core_rwops.t b/t/core_rwops.t +index 5f40a82f..0c9d5628 100644 +--- a/t/core_rwops.t ++++ b/t/core_rwops.t +@@ -11,11 +11,7 @@ my @done = qw/ + /; + can_ok( 'SDL::RWOps', @done ); + +-open FH, '>', '.rwops'; +-print FH 'rwops'; +-close FH; +- +-my $file = SDL::RWOps->new_file( '.rwops', 'rw' ); ++my $file = SDL::RWOps->new_file( 'test/data/rwops', 'r' ); + isa_ok( $file, 'SDL::RWOps', '[from_file] returns RWOps' ); + + #0 SEEK_SET +@@ -35,7 +31,6 @@ SKIP: + is( $blocks, 5, '[read] got ' . $char ); + } + $file->close(); +-unlink '.rwops'; + my @left = qw/ + from_fp + from_mem +diff --git a/test/data/rwops b/test/data/rwops +new file mode 100644 +index 00000000..d6380184 +--- /dev/null ++++ b/test/data/rwops +@@ -0,0 +1 @@ ++rwops +\ No newline at end of file +-- +2.51.0 + diff --git a/perl-SDL.rpmlintrc b/perl-SDL.rpmlintrc new file mode 100644 index 0000000..a5d5f5e --- /dev/null +++ b/perl-SDL.rpmlintrc @@ -0,0 +1 @@ +addFilter('-tests\.noarch: W: no-documentation') diff --git a/perl-SDL.spec b/perl-SDL.spec index e3ddb17..4255a45 100644 --- a/perl-SDL.spec +++ b/perl-SDL.spec @@ -26,13 +26,13 @@ Summary: Simple DirectMedia Layer for Perl # src/SDL.xs: LGPL-2.1-or-later # src/SDLx/SFont.h: LGPL-2.1-or-later # src/SDLx/SFont.xs: LGPL-2.1-or-later -## Used at build-time, but not in any binary package -# Build.PL: refers to LGPL -# inc/My/Builder.pm: LGPL-2.1-or-later # test/data/5x7.fnt: LGPL-2.1-only (see test/data/README) # test/data/tribe_i.wav: GPL-3.0-only OR LGPL-2.0-only OR CC-BY-SA-3.0 # (see test/data/README; there is a typo in the file # name) +## Used at build-time, but not in any binary package +# Build.PL: refers to LGPL +# inc/My/Builder.pm: LGPL-2.1-or-later ## Not in any binary package and not used # META.json: refers to LGPL-2.1 # OFL.txt: OFL-1.1-RFN text @@ -64,6 +64,9 @@ Patch5: SDL-2.548-core_surface.t-test-data-icon.bmp-is-really-4-bits-p.p # Adapt t/core.t test to SDL-3.2.24, bug #2401791, proposed upstream, # Patch6: SDL-2.548-Adapt-to-SDL-3.2.24.patch +# Make the tests read-only, proposed upstream, +# +Patch7: SDL-2.548-Read-only-t-core_rwops.t.patch BuildRequires: coreutils BuildRequires: findutils BuildRequires: libGLU-devel @@ -119,6 +122,11 @@ BuildRequires: perl(threads::shared) Requires: sil-gentium-basic-book-fonts %{?perl_default_filter} +# Remove under-specified dependencies +%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^perl\\(Test::Most\\)$ +# Hide private modules +%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^perl\\(SDL::TestTool\\) +%global __provides_exclude %{?__provides_exclude:%{__provides_exclude}|}^perl\\(SDL::TestTool\\) %description SDL_perl is a package of Perl modules that provide both functional and @@ -139,6 +147,20 @@ some tasks specific to SDL applications - e.g. packaging SDL application/game into PAR archive. +%package tests +Summary: Tests for %{name} +License: LGPL-2.1-or-later AND (GPL-3.0-only OR LGPL-2.0-only OR CC-BY-SA-3.0) +BuildArch: noarch +Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: perl-Test-Harness +Requires: perl(Test::Most) >= 0.21 +Requires: sil-gentium-basic-book-fonts + +%description tests +Tests from %{name}. Execute them +with "%{_libexecdir}/%{name}/test". + + %prep %autosetup -p1 -n SDL-%{version} # Delete a bundled font file, code removed with @@ -156,6 +178,11 @@ sed -i -e 's|lib/pods|lib|' MANIFEST # Disable the sdlx_controller_interface.t test, it hangs on arm rm t/sdlx_controller_interface.t sed -i -e '/t\/sdlx_controller_interface\.t/d' MANIFEST +# Help generators to recognize Perl scripts +for F in t/*.t; do + perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!\s*perl}{$Config{startperl}}' "$F" + chmod +x "$F" +done %build perl Build.PL installdirs=vendor optimize="$RPM_OPT_FLAGS" @@ -169,6 +196,14 @@ export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print ./Build install destdir=%{buildroot} create_packlist=0 find %{buildroot} -type f -name '*.bs' -a -size 0 -delete %{_fixperms} %{buildroot}/* +# Install tests +mkdir -p %{buildroot}%{_libexecdir}/%{name}/upstream +cp -a t test %{buildroot}%{_libexecdir}/%{name}/upstream +cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF' +#!/bin/sh +cd %{_libexecdir}/%{name}/upstream && exec prove -I . -j "$(getconf _NPROCESSORS_ONLN)" +EOF +chmod +x %{buildroot}%{_libexecdir}/%{name}/test %files %license COPYING @@ -191,9 +226,13 @@ find %{buildroot} -type f -name '*.bs' -a -size 0 -delete %{perl_vendorarch}/Module/Build/SDL.pm %{_mandir}/man3/Module::Build::SDL.* +%files tests +%{_libexecdir}/%{name} + %changelog * Tue Oct 07 2025 Petr Pisar - 2.548-31 - Adapt tests to SDL-3.2.24 (bug #2401791) +- Package the tests * Fri Jul 25 2025 Fedora Release Engineering - 2.548-30 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From e3e5245dca682c85a0458baf591fe37fdb68a148 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Tue, 7 Oct 2025 15:48:32 +0200 Subject: [PATCH 29/29] Add upstream tests to gating --- gating.yaml | 1 + tests/upstream-tests.fmf | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 tests/upstream-tests.fmf diff --git a/gating.yaml b/gating.yaml index f126b62..c778f75 100644 --- a/gating.yaml +++ b/gating.yaml @@ -13,3 +13,4 @@ subject_type: koji_build rules: - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.installability.functional} - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpminspect.static-analysis} + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} diff --git a/tests/upstream-tests.fmf b/tests/upstream-tests.fmf new file mode 100644 index 0000000..b138789 --- /dev/null +++ b/tests/upstream-tests.fmf @@ -0,0 +1,4 @@ +summary: Upstream tests +component: perl-SDL +require: perl-SDL-tests +test: /usr/libexec/perl-SDL/test