Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-perl/SDL/, dev-perl/SDL/files/
Date: Fri, 17 Mar 2023 21:54:09
Message-Id: 1679089940.56703991485dfac2ce34bd1f177191807f69c5fe.sam@gentoo
1 commit: 56703991485dfac2ce34bd1f177191807f69c5fe
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Fri Mar 17 21:21:37 2023 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Fri Mar 17 21:52:20 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=56703991
7
8 dev-perl/SDL: fix build w/ clang 16
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 dev-perl/SDL/SDL-2.548.0-r2.ebuild | 50 ++++++++++++++++++++++
13 .../SDL/files/SDL-2.546-implicit-func-decl.patch | 40 +++++++++++++++++
14 2 files changed, 90 insertions(+)
15
16 diff --git a/dev-perl/SDL/SDL-2.548.0-r2.ebuild b/dev-perl/SDL/SDL-2.548.0-r2.ebuild
17 new file mode 100644
18 index 000000000000..59caa0f55c01
19 --- /dev/null
20 +++ b/dev-perl/SDL/SDL-2.548.0-r2.ebuild
21 @@ -0,0 +1,50 @@
22 +# Copyright 1999-2023 Gentoo Authors
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=8
26 +
27 +DIST_AUTHOR=FROGGS
28 +DIST_VERSION=2.548
29 +inherit perl-module
30 +
31 +DESCRIPTION="Simple DirectMedia Layer (SDL) bindings for perl"
32 +HOMEPAGE="http://sdl.perl.org/ https://search.cpan.org/dist/SDL/ https://github.com/PerlGameDev/SDL"
33 +
34 +LICENSE="GPL-2 OFL-1.1"
35 +SLOT="0"
36 +KEYWORDS="~amd64 ~hppa ~x86"
37 +
38 +RDEPEND="
39 + >=dev-perl/Alien-SDL-1.446
40 + dev-perl/Capture-Tiny
41 + >=virtual/perl-CPAN-1.920.0
42 + >=virtual/perl-ExtUtils-CBuilder-0.260.301
43 + >=dev-perl/File-ShareDir-1.0.0
44 + >=dev-perl/Module-Build-0.400.0
45 + media-libs/libjpeg-turbo
46 + virtual/perl-Scalar-List-Utils
47 + dev-perl/Tie-Simple
48 + media-libs/libpng:0
49 + media-libs/libsdl
50 + media-libs/sdl-gfx
51 + media-libs/sdl-image
52 + media-libs/sdl-mixer
53 + media-libs/sdl-pango
54 + media-libs/sdl-ttf
55 + media-libs/smpeg
56 + media-libs/tiff:0
57 + virtual/glu
58 + virtual/opengl
59 +"
60 +BDEPEND="${RDEPEND}
61 + test? (
62 + >=dev-perl/Test-Most-0.210.0
63 + )
64 +"
65 +
66 +mydoc='CHANGELOG README TODO'
67 +
68 +PATCHES=(
69 + "${FILESDIR}"/${PN}-2.546-pointer.patch
70 + "${FILESDIR}"/${PN}-2.546-implicit-func-decl.patch
71 +)
72
73 diff --git a/dev-perl/SDL/files/SDL-2.546-implicit-func-decl.patch b/dev-perl/SDL/files/SDL-2.546-implicit-func-decl.patch
74 new file mode 100644
75 index 000000000000..9bbee3356486
76 --- /dev/null
77 +++ b/dev-perl/SDL/files/SDL-2.546-implicit-func-decl.patch
78 @@ -0,0 +1,40 @@
79 +https://github.com/PerlGameDev/SDL/pull/299
80 +
81 +From 90d7056288282df9febf04acce6712f4071e4103 Mon Sep 17 00:00:00 2001
82 +From: Ryan Schmidt <git@××××××××××.com>
83 +Date: Wed, 26 Jan 2022 02:55:04 -0600
84 +Subject: [PATCH] Fix implicit declaration of _calc_offset
85 +
86 +--- a/src/SDLx/Surface.xs
87 ++++ b/src/SDLx/Surface.xs
88 +@@ -16,6 +16,14 @@
89 + #include <SDL_gfxPrimitives.h>
90 + #endif
91 +
92 ++int _calc_offset ( SDL_Surface* surface, int x, int y )
93 ++{
94 ++ int offset;
95 ++ offset = (surface->pitch * y) / surface->format->BytesPerPixel;
96 ++ offset += x;
97 ++ return offset;
98 ++}
99 ++
100 + SV * get_pixel32 (SDL_Surface *surface, int x, int y)
101 + {
102 + /* Convert the pixels to 32 bit */
103 +@@ -52,14 +60,6 @@ SV * construct_p_matrix ( SDL_Surface *surface )
104 + return newRV_noinc((SV *)matrix);
105 + }
106 +
107 +-int _calc_offset ( SDL_Surface* surface, int x, int y )
108 +-{
109 +- int offset;
110 +- offset = (surface->pitch * y) / surface->format->BytesPerPixel;
111 +- offset += x;
112 +- return offset;
113 +-}
114 +-
115 + unsigned int _get_pixel(SDL_Surface * surface, int offset)
116 + {
117 + unsigned int value;
118 +