diff options
author | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2023-10-12 22:47:46 +0200 |
---|---|---|
committer | James Le Cuirot <chewi@gentoo.org> | 2023-10-16 23:59:25 +0100 |
commit | ef322d4cfd144c61c1bd7c51fd8ff7018f55b752 (patch) | |
tree | a090f3e025d5f960de2d2c7c4cf86d9bf2688aac /dev-perl | |
parent | games-simulation/corsix-th: Fix USE=doc with better Lua handling (diff) | |
download | gentoo-ef322d4cfd144c61c1bd7c51fd8ff7018f55b752.tar.gz gentoo-ef322d4cfd144c61c1bd7c51fd8ff7018f55b752.tar.bz2 gentoo-ef322d4cfd144c61c1bd7c51fd8ff7018f55b752.zip |
dev-perl/SDL: Fix for Perl 5.37.1+
Taken from https://github.com/PerlGameDev/SDL/pull/304
Signed-off-by: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Closes: https://github.com/gentoo/gentoo/pull/33317
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'dev-perl')
-rw-r--r-- | dev-perl/SDL/SDL-2.548.0-r2.ebuild | 1 | ||||
-rw-r--r-- | dev-perl/SDL/files/SDL-2.548-perl537_sv_nv.patch | 65 |
2 files changed, 66 insertions, 0 deletions
diff --git a/dev-perl/SDL/SDL-2.548.0-r2.ebuild b/dev-perl/SDL/SDL-2.548.0-r2.ebuild index 2d1e3ed28ed2..fb0d8ac093be 100644 --- a/dev-perl/SDL/SDL-2.548.0-r2.ebuild +++ b/dev-perl/SDL/SDL-2.548.0-r2.ebuild @@ -52,4 +52,5 @@ PERL_RM_FILES=( PATCHES=( "${FILESDIR}"/${PN}-2.546-pointer.patch "${FILESDIR}"/${PN}-2.546-implicit-func-decl.patch + "${FILESDIR}"/${PN}-2.548-perl537_sv_nv.patch ) diff --git a/dev-perl/SDL/files/SDL-2.548-perl537_sv_nv.patch b/dev-perl/SDL/files/SDL-2.548-perl537_sv_nv.patch new file mode 100644 index 000000000000..7ca3914eed6f --- /dev/null +++ b/dev-perl/SDL/files/SDL-2.548-perl537_sv_nv.patch @@ -0,0 +1,65 @@ +From d734d03862d7dcc776bd2fa3ba662cdd5879b32e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com> +Source: https://github.com/PerlGameDev/SDL/pull/304 +Date: Wed, 12 Jul 2023 17:55:27 +0200 +Subject: [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 +--- + 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); |