Unbreak p5-SDL on amd64, i386.

Patch src/SDL.xs: it had been calling boot_SDL() without the required
arguments, which doesn't work on all platforms.

Also remove a dead HOMEPAGE and add c to WANTLIB.

ok cwen@ afresh1@
This commit is contained in:
gkoehler 2020-02-04 22:50:04 +00:00
parent b4f2f99dd2
commit be83b26049
3 changed files with 35 additions and 16 deletions

View File

@ -1,23 +1,19 @@
# $OpenBSD: Makefile,v 1.19 2019/07/17 14:49:21 danj Exp $
BROKEN-amd64 = perl -e 'use SDL' segfaults
BROKEN-i386 = dependent ports (frozen-bubble, vacuum) fail: loadable library and perl binaries are mismatched (got handshake key 0x2b, needed 0xXXXXXX)
# $OpenBSD: Makefile,v 1.20 2020/02/04 22:50:04 gkoehler Exp $
COMMENT = Simple DirectMedia Layer for Perl
HOMEPAGE = http://sdlperl.org/
MODULES = cpan
VER = 2.1.3
DISTNAME = SDL_Perl-${VER}
PKGNAME = p5-SDL-${VER}
REVISION = 7
REVISION = 8
CATEGORIES = devel graphics
CPAN_AUTHOR = DGOEHRIG
# GPLv2
PERMIT_PACKAGE = Yes
WANTLIB += GL GLU SDL jpeg perl png pthread
WANTLIB += GL GLU SDL c jpeg perl png pthread
RUN_DEPENDS = devel/p5-YAML
BUILD_DEPENDS = ${RUN_DEPENDS}

View File

@ -1,7 +1,8 @@
$OpenBSD: patch-Build_PL,v 1.2 2013/11/03 07:52:02 ajacoutot Exp $
--- Build.PL.orig Wed Oct 5 02:25:49 2005
+++ Build.PL Mon May 25 14:22:30 2009
@@ -35,7 +36,7 @@ my %subsystems =
$OpenBSD: patch-Build_PL,v 1.3 2020/02/04 22:50:04 gkoehler Exp $
Index: Build.PL
--- Build.PL.orig
+++ Build.PL
@@ -35,7 +35,7 @@ my %subsystems =
SDL => {
file => {
from => 'src/SDL.xs',
@ -10,7 +11,7 @@ $OpenBSD: patch-Build_PL,v 1.2 2013/11/03 07:52:02 ajacoutot Exp $
},
libraries => [qw( SDL SDL_image SDL_mixer SDL_net SDL_ttf SDL_gfx
png jpeg smpeg )],
@@ -43,14 +44,14 @@ my %subsystems =
@@ -43,14 +43,14 @@ my %subsystems =
OpenGL => {
file => {
from => 'src/OpenGL.xs',
@ -27,7 +28,7 @@ $OpenBSD: patch-Build_PL,v 1.2 2013/11/03 07:52:02 ajacoutot Exp $
},
libraries => [qw( SDL SDL_image )],
},
@@ -123,6 +124,7 @@ my %xs = map { $subsystems{$_}{file}{from} => $subsyst
@@ -123,6 +123,7 @@ my %xs = map { $subsystems{$_}{file}{from} => $subsyst
keys %subsystems;
my $build = SDL::Build->new(

View File

@ -1,6 +1,12 @@
$OpenBSD: patch-src_SDL_xs,v 1.1.1.1 2009/06/02 21:57:38 sthen Exp $
--- src/SDL.xs.orig Wed Oct 5 02:25:49 2005
+++ src/SDL.xs Thu May 28 14:54:55 2009
$OpenBSD: patch-src_SDL_xs,v 1.2 2020/02/04 22:50:04 gkoehler Exp $
Add missing arguments to boot_SDL(); this fixes a crash or failure in
Perl_xs_handshake() on some arches. This patch does pass the CV of
the wrong function, but the handshake accepts it.
Index: src/SDL.xs
--- src/SDL.xs.orig
+++ src/SDL.xs
@@ -69,7 +69,7 @@ static int sdl_perl_use_smpeg_audio = 0;
#define HAVE_TLS_CONTEXT
#endif
@ -10,6 +16,22 @@ $OpenBSD: patch-src_SDL_xs,v 1.1.1.1 2009/06/02 21:57:38 sthen Exp $
Uint32
sdl_perl_timer_callback ( Uint32 interval, void* param )
@@ -189,13 +189,13 @@ sdl_perl_atexit (void)
#endif
}
-void boot_SDL();
+void boot_SDL(pTHX_ CV *);
void boot_SDL__OpenGL();
XS(boot_SDL_perl)
{
GET_TLS_CONTEXT
- boot_SDL();
+ boot_SDL(aTHX_ cv);
}
MODULE = SDL_perl PACKAGE = SDL
@@ -3911,7 +3911,7 @@ GFXFilledpieColor ( dst, x, y, rad, start, end, color
Sint16 end;
Uint32 color;