mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-08 21:00:05 +02:00
sdl_perl: revbump and build fix for new perl, enable x86, add tests, cleanup
This commit is contained in:
64
dev-perl/sdl_perl/patches/sdl_perl-2.548.patchset
Normal file
64
dev-perl/sdl_perl/patches/sdl_perl-2.548.patchset
Normal file
@@ -0,0 +1,64 @@
|
||||
From 72100262cc7d6cb2e6c882d8be83cd46956a5776 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||
Date: Wed, 12 Jul 2023 17:55:27 +0200
|
||||
Subject: 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
|
||||
|
||||
diff --git a/src/SDLx/Controller/Interface.xs b/src/SDLx/Controller/Interface.xs
|
||||
index 3dc202b..d326c88 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.45.2
|
||||
|
||||
@@ -8,10 +8,11 @@ HOMEPAGE="https://metacpan.org/release/FROGGS/SDL-2.548"
|
||||
COPYRIGHT="2002-2010 SDL Authors"
|
||||
LICENSE="GNU GPL v2
|
||||
SIL v1.1"
|
||||
REVISION="1"
|
||||
REVISION="2"
|
||||
SOURCE_URI="https://cpan.metacpan.org/authors/id/F/FR/FROGGS/SDL-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="252a192bfa9c2070a4883707d139c3a45d9c4518ccd66a1e699b5b7959bd4fb5"
|
||||
SOURCE_DIR="SDL-$portVersion"
|
||||
PATCHES="sdl_perl-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
@@ -19,6 +20,11 @@ SECONDARY_ARCHITECTURES="x86"
|
||||
PROVIDES="
|
||||
sdl_perl$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
if [ -n "$secondaryArchSuffix" ]; then
|
||||
PROVIDES+="
|
||||
sdl_perl = $portVersion
|
||||
"
|
||||
fi
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libGL$secondaryArchSuffix
|
||||
@@ -33,7 +39,7 @@ REQUIRES="
|
||||
lib:libSDL_Pango$secondaryArchSuffix
|
||||
lib:libsmpeg$secondaryArchSuffix
|
||||
lib:libtiff$secondaryArchSuffix
|
||||
alien_sdl
|
||||
alien_sdl$secondaryArchSuffix
|
||||
capture_tiny
|
||||
file_sharedir
|
||||
tie_simple
|
||||
@@ -49,7 +55,7 @@ BUILD_REQUIRES="
|
||||
devel:libSDL_ttf_2.0$secondaryArchSuffix
|
||||
devel:libSDL_gfx$secondaryArchSuffix
|
||||
devel:libSDL_Pango$secondaryArchSuffix
|
||||
alien_sdl
|
||||
alien_sdl$secondaryArchSuffix
|
||||
capture_tiny
|
||||
class_inspector
|
||||
file_sharedir
|
||||
@@ -58,12 +64,13 @@ BUILD_REQUIRES="
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:perl
|
||||
"
|
||||
|
||||
PATCH()
|
||||
{
|
||||
sed -i '/^GetOptions/d' Build.PL
|
||||
}
|
||||
TEST_REQUIRES="
|
||||
algorithm_diff
|
||||
test_most
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
@@ -73,5 +80,10 @@ BUILD()
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
./Build install --installdirs vendor
|
||||
./Build pure_install
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
./Build test
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user