View | Details | Raw Unified | Return to bug 252371 | Differences between
and this patch

Collapse All | Expand All

(-)devel/sdl20/Makefile (-158 / +79 lines)
Lines 1-6 Link Here
1
PORTNAME=	sdl2
1
PORTNAME=	sdl2
2
PORTVERSION=	2.0.12
2
DISTVERSION=	2.0.18
3
PORTREVISION=	7
4
CATEGORIES=	devel
3
CATEGORIES=	devel
5
MASTER_SITES=	https://www.libsdl.org/release/
4
MASTER_SITES=	https://www.libsdl.org/release/
6
DISTNAME=	SDL2-${PORTVERSION}
5
DISTNAME=	SDL2-${PORTVERSION}
Lines 9-15 Link Here
9
COMMENT=	Cross-platform multimedia development API
8
COMMENT=	Cross-platform multimedia development API
10
9
11
LICENSE=	ZLIB
10
LICENSE=	ZLIB
12
LICENSE_FILE=	${WRKSRC}/COPYING.txt
11
LICENSE_FILE=	${WRKSRC}/LICENSE.txt
13
12
14
GNU_CONFIGURE=	yes
13
GNU_CONFIGURE=	yes
15
USES=		gmake iconv libtool localbase:ldflags pathfix pkgconfig
14
USES=		gmake iconv libtool localbase:ldflags pathfix pkgconfig
Lines 21-27 Link Here
21
			--enable-dummyaudio \
20
			--enable-dummyaudio \
22
			--enable-video-dummy \
21
			--enable-video-dummy \
23
			--disable-dbus \
22
			--disable-dbus \
24
			--disable-input-tslib \
23
			--disable-esd --disable-esd-shared \
25
			--disable-rpath
24
			--disable-rpath
26
.if defined(MACHINE_CPU) && ${MACHINE_CPU:Mmmx}
25
.if defined(MACHINE_CPU) && ${MACHINE_CPU:Mmmx}
27
CONFIGURE_ARGS+=	--enable-mmx
26
CONFIGURE_ARGS+=	--enable-mmx
Lines 51-82 Link Here
51
50
52
MAKE_ENV=	V=1
51
MAKE_ENV=	V=1
53
52
54
OPTIONS_DEFINE=		ALSA ASM DLOPEN HIDAPI JACK NAS OSS	\
53
OPTIONS_DEFINE=		ALSA ASM HIDAPI JACK NAS OSS PIPEWARE PTHREADS	\
55
			PULSEAUDIO SAMPLERATE SNDIO PTHREADS		\
54
			PULSEAUDIO SAMPLERATE SDL_ATOMIC SDL_AUDIO	\
56
			SDL_ATOMIC SDL_AUDIO SDL_CPUINFO SDL_EVENTS	\
57
			SDL_FILE SDL_HAPTIC SDL_JOYSTICK SDL_LOADSO	\
58
			SDL_POWER SDL_RENDER SDL_THREADS SDL_TIMERS	\
59
			SDL_VIDEO UDEV VIDEO_KMSDRM VIDEO_OPENGL	\
60
			VIDEO_OPENGLES2 VIDEO_WAYLAND VIDEO_X11
61
OPTIONS_DEFAULT=	ASM DLOPEN OSS PTHREADS SDL_ATOMIC SDL_AUDIO	\
62
			SDL_CPUINFO SDL_EVENTS SDL_FILE SDL_HAPTIC	\
55
			SDL_CPUINFO SDL_EVENTS SDL_FILE SDL_HAPTIC	\
63
			SDL_JOYSTICK SDL_LOADSO SDL_POWER SDL_RENDER	\
56
			SDL_JOYSTICK SDL_LOADSO SDL_POWER SDL_RENDER	\
64
			SDL_THREADS SDL_TIMERS SDL_VIDEO VIDEO_KMSDRM	\
57
			SDL_THREADS SDL_TIMERS SDL_VIDEO SNDIO UDEV	\
65
			VIDEO_OPENGL VIDEO_OPENGLES2 VIDEO_WAYLAND	\
58
			VIDEO_KMSDRM VIDEO_OPENGL VIDEO_OPENGLES1	\
59
			VIDEO_OPENGLES2	VIDEO_VULKAN VIDEO_WAYLAND	\
66
			VIDEO_X11
60
			VIDEO_X11
61
OPTIONS_DEFAULT=	ASM OSS PTHREADS SDL_ATOMIC SDL_AUDIO	\
62
			SDL_CPUINFO SDL_EVENTS SDL_FILE SDL_HAPTIC	\
63
			SDL_JOYSTICK SDL_LOADSO SDL_POWER SDL_RENDER	\
64
			SDL_THREADS SDL_TIMERS SDL_VIDEO VIDEO_KMSDRM	\
65
			VIDEO_OPENGL VIDEO_OPENGLES1 VIDEO_OPENGLES2	\
66
			VIDEO_VULKAN VIDEO_WAYLAND VIDEO_X11
67
OPTIONS_DEFINE_powerpc=	ALTIVEC
67
OPTIONS_DEFINE_powerpc=	ALTIVEC
68
OPTIONS_DEFINE_powerpc64=	ALTIVEC
68
OPTIONS_DEFINE_powerpc64=	ALTIVEC
69
OPTIONS_DEFAULT_powerpc=	ALTIVEC
69
OPTIONS_DEFAULT_powerpc=	ALTIVEC
70
OPTIONS_DEFAULT_powerpc64=	ALTIVEC
70
OPTIONS_DEFAULT_powerpc64=	ALTIVEC
71
71
72
ALSA_DESC=		Audio output via the ALSA audio architecture
72
ALSA_DESC=		Audio output via the ALSA audio architecture
73
DLOPEN_DESC=		Use dlopen for loading 3rd party libraries
74
HIDAPI_DESC=		Use HIDAPI for low level joystick drivers
73
HIDAPI_DESC=		Use HIDAPI for low level joystick drivers
75
JACK_DESC=		Audio output via the JackD sound server
74
JACK_DESC=		Audio output via the JackD sound server
76
NAS_DESC=		Audio output via the Network Audio System
75
NAS_DESC=		Audio output via the Network Audio System
77
OSS_DESC=		Audio output via the Open Sound System
76
OSS_DESC=		Audio output via the Open Sound System
78
PULSEAUDIO_DESC=	Audio output via the PulseAudio sound server
77
PIPEWARE_DESC=		Audio output via the Pipewire sound server
79
PTHREADS_DESC=		Use POSIX threads for multi-threading
78
PTHREADS_DESC=		Use POSIX threads for multi-threading
79
PULSEAUDIO_DESC=	Audio output via the PulseAudio sound server
80
SAMPLERATE_DESC=	Audio rate conversion via libsamplerate
80
SAMPLERATE_DESC=	Audio rate conversion via libsamplerate
81
SDL_ATOMIC_DESC=	Enable the SDL Atomic subsystem
81
SDL_ATOMIC_DESC=	Enable the SDL Atomic subsystem
82
SDL_AUDIO_DESC=		Enable the SDL Audio subsystem
82
SDL_AUDIO_DESC=		Enable the SDL Audio subsystem
Lines 94-110 Link Here
94
UDEV_DESC=		Use udev for input device detection
94
UDEV_DESC=		Use udev for input device detection
95
VIDEO_KMSDRM_DESC=	KMSDRM display support
95
VIDEO_KMSDRM_DESC=	KMSDRM display support
96
VIDEO_OPENGL_DESC=	OpenGL rendering support
96
VIDEO_OPENGL_DESC=	OpenGL rendering support
97
VIDEO_OPENGLES1_DESC=	OpenGL ES 1.x rendering support
97
VIDEO_OPENGLES2_DESC=	OpenGL ES 2.x rendering support
98
VIDEO_OPENGLES2_DESC=	OpenGL ES 2.x rendering support
99
VIDEO_VULKAN_DESC=	Vulkan rendering support
98
VIDEO_WAYLAND_DESC=	Wayland display support
100
VIDEO_WAYLAND_DESC=	Wayland display support
99
VIDEO_X11_DESC=		X11 display support
101
VIDEO_X11_DESC=		X11 display support
100
102
101
ALTIVEC_CONFIGURE_ENABLE=	altivec
103
ALTIVEC_CONFIGURE_ENABLE=	altivec
104
ALSA_CONFIGURE_ENABLE=		alsa alsa-shared
105
ALSA_LIB_DEPENDS=		libasound.so:audio/alsa-lib
106
ALSA_IMPLIES=			SDL_AUDIO
102
ASM_CONFIGURE_ENABLE=		assembly
107
ASM_CONFIGURE_ENABLE=		assembly
103
DLOPEN_CONFIGURE_ENABLE=	sdl-dlopen
104
DLOPEN_CONFIGURE_OFF=		--disable-video-vulkan
105
HIDAPI_CONFIGURE_ENABLE=	hidapi
108
HIDAPI_CONFIGURE_ENABLE=	hidapi
106
HIDAPI_IMPLIES=			SDL_JOYSTICK
109
HIDAPI_IMPLIES=			SDL_JOYSTICK
110
JACK_CONFIGURE_ENABLE=		jack jack-shared
111
JACK_LIB_DEPENDS=		libjack.so:audio/jack
112
JACK_IMPLIES=			SDL_AUDIO
113
NAS_CONFIGURE_ENABLE=		nas nas-shared
114
NAS_LIB_DEPENDS=		libaudio.so:audio/nas
115
NAS_IMPLIES=			SDL_AUDIO
116
OSS_CONFIGURE_ENABLE=		oss
117
OSS_IMPLIES=			SDL_AUDIO
118
PIPEWARE_CONFIGURE_ENABLE=	pipewire pipewire-shared
119
PIPEWARE_LIB_DEPENDS=		libpipewire-0.3.so:multimedia/pipewire
120
PIPEWARE_IMPLIES=		SDL_AUDIO
107
PTHREADS_CONFIGURE_ENABLE=	pthreads pthread-sem
121
PTHREADS_CONFIGURE_ENABLE=	pthreads pthread-sem
122
PULSEAUDIO_CONFIGURE_ENABLE=	pulseaudio pulseaudio-shared
123
PULSEAUDIO_LIB_DEPENDS=		libpulse.so:audio/pulseaudio
124
PULSEAUDIO_IMPLIES=		SDL_AUDIO
108
SAMPLERATE_CONFIGURE_ENABLE=	libsamplerate libsamplerate-shared
125
SAMPLERATE_CONFIGURE_ENABLE=	libsamplerate libsamplerate-shared
109
SAMPLERATE_LIB_DEPENDS=		libsamplerate.so:audio/libsamplerate
126
SAMPLERATE_LIB_DEPENDS=		libsamplerate.so:audio/libsamplerate
110
SDL_ATOMIC_CONFIGURE_ENABLE=	atomic gcc-atomics
127
SDL_ATOMIC_CONFIGURE_ENABLE=	atomic gcc-atomics
Lines 114-128 Link Here
114
SDL_FILE_CONFIGURE_ENABLE=	filesystem
131
SDL_FILE_CONFIGURE_ENABLE=	filesystem
115
SDL_HAPTIC_CONFIGURE_ENABLE=	haptic
132
SDL_HAPTIC_CONFIGURE_ENABLE=	haptic
116
SDL_JOYSTICK_CONFIGURE_ENABLE=	joystick
133
SDL_JOYSTICK_CONFIGURE_ENABLE=	joystick
134
SDL_JOYSTICK_BUILD_DEPENDS=	${LOCALBASE}/include/linux/input.h:devel/evdev-proto
135
SDL_JOYSTICK_LIB_DEPENDS=	libinotify.so:devel/libinotify
117
SDL_LOADSO_CONFIGURE_ENABLE=	loadso
136
SDL_LOADSO_CONFIGURE_ENABLE=	loadso
118
SDL_POWER_CONFIGURE_ENABLE=	power
137
SDL_POWER_CONFIGURE_ENABLE=	power
119
SDL_RENDER_CONFIGURE_ENABLE=	render
138
SDL_RENDER_CONFIGURE_ENABLE=	render
120
SDL_THREADS_CONFIGURE_ENABLE=	threads
139
SDL_THREADS_CONFIGURE_ENABLE=	threads
121
SDL_TIMERS_CONFIGURE_ENABLE=	timers
140
SDL_TIMERS_CONFIGURE_ENABLE=	timers
122
SDL_VIDEO_CONFIGURE_ENABLE=	video
141
SDL_VIDEO_CONFIGURE_ENABLE=	video
142
SNDIO_CONFIGURE_ENABLE=		sndio sndio-shared
143
SNDIO_LIB_DEPENDS=		libsndio.so:audio/sndio
144
SNDIO_IMPLIES=			SDL_AUDIO
123
UDEV_CONFIGURE_ENABLE=		libudev
145
UDEV_CONFIGURE_ENABLE=		libudev
124
UDEV_LIB_DEPENDS=		libudev.so:devel/libudev-devd
146
UDEV_LIB_DEPENDS=		libudev.so:devel/libudev-devd
125
UDEV_BUILD_DEPENDS=		${LOCALBASE}/include/linux/input.h:devel/evdev-proto
147
UDEV_BUILD_DEPENDS=		${LOCALBASE}/include/linux/input.h:devel/evdev-proto
148
VIDEO_KMSDRM_CONFIGURE_ENABLE=	video-kmsdrm kmsdrm-shared
149
VIDEO_KMSDRM_USES=		gl
150
VIDEO_KMSDRM_USE=		GL=gbm
151
VIDEO_KMSDRM_IMPLIES=		SDL_VIDEO
152
VIDEO_OPENGL_CONFIGURE_ENABLE=	video-opengl
153
VIDEO_OPENGL_USES=		gl
154
VIDEO_OPENGL_USE=		GL=gl
155
VIDEO_OPENGL_IMPLIES=		SDL_VIDEO
156
VIDEO_OPENGLES_CONFIGURE_ENABLE=video-opengles
157
VIDEO_OPENGLES1_CONFIGURE_ENABLE=video-opengles1
158
VIDEO_OPENGLES1_USES=		gl
159
VIDEO_OPENGLES1_USE=		GL=egl,glesv1
160
VIDEO_OPENGLES1_IMPLIES=	SDL_VIDEO VIDEO_OPENGLES
161
VIDEO_OPENGLES2_CONFIGURE_ENABLE=video-opengles2
162
VIDEO_OPENGLES2_USES=		gl
163
VIDEO_OPENGLES2_USE=		GL=egl,glesv2
164
VIDEO_OPENGLES2_IMPLIES=	SDL_VIDEO VIDEO_OPENGLES
165
VIDEO_VULKAN_CONFIGURE_ENABLE=	video-vulkan
166
VIDEO_VULKAN_IMPLIES=		SDL_LOADSO SDL_VIDEO
167
VIDEO_WAYLAND_CONFIGURE_ENABLE=	video-wayland wayland-shared video-wayland-qt-touch
168
VIDEO_WAYLAND_BUILD_DEPENDS=	wayland-protocols>0:graphics/wayland-protocols \
169
				${LOCALBASE}/include/linux/input.h:devel/evdev-proto
170
VIDEO_WAYLAND_LIB_DEPENDS=	libwayland-egl.so:graphics/wayland \
171
				libxkbcommon.so:x11/libxkbcommon
172
VIDEO_WAYLAND_IMPLIES=		SDL_VIDEO VIDEO_OPENGLES2
173
VIDEO_X11_CONFIGURE_ENABLE=	video-x11 x11-shared \
174
				video-x11-xcursor \
175
				video-x11-xdbe \
176
				video-x11-xinerama \
177
				video-x11-xinput \
178
				video-x11-xfixes \
179
				video-x11-xrandr \
180
				video-x11-scrnsaver \
181
				video-x11-xshape \
182
				video-x11-vm
183
VIDEO_X11_USES=			xorg
184
VIDEO_X11_USE=			XORG=xcursor,xext,xinerama,xi,xfixes,xrandr,xscrnsaver,xxf86vm
185
VIDEO_X11_IMPLIES=		SDL_VIDEO
126
186
127
.include <bsd.port.options.mk>
187
.include <bsd.port.options.mk>
128
188
Lines 132-275 Link Here
132
CFLAGS+=	-B${LOCALBASE}/bin -no-integrated-as
192
CFLAGS+=	-B${LOCALBASE}/bin -no-integrated-as
133
.endif
193
.endif
134
194
135
.if ${PORT_OPTIONS:MALSA}
136
.if !${PORT_OPTIONS:MSDL_AUDIO}
137
IGNORE=	option ALSA requires SDL_AUDIO
138
.endif
139
CONFIGURE_ARGS+=	--enable-alsa --enable-alsa-shared
140
LIB_DEPENDS+=		libasound.so:audio/alsa-lib
141
.else
142
CONFIGURE_ARGS+=	--disable-alsa --disable-alsa-shared
143
.endif
144
145
.if ${PORT_OPTIONS:MJACK}
146
.if !${PORT_OPTIONS:MSDL_AUDIO}
147
IGNORE=	option JACK requires SDL_AUDIO
148
.endif
149
CONFIGURE_ARGS+=	--enable-jack --enable-jack-shared
150
LIB_DEPENDS+=		libjack.so:audio/jack
151
.else
152
CONFIGURE_ARGS+=	--disable-jack --disable-jack-shared
153
.endif
154
155
CONFIGURE_ARGS+=	--disable-esd --disable-esd-shared
156
157
.if ${PORT_OPTIONS:MNAS}
158
.if !${PORT_OPTIONS:MSDL_AUDIO}
159
IGNORE=	option NAS requires SDL_AUDIO
160
.endif
161
CONFIGURE_ARGS+=	--enable-nas --enable-nas-shared
162
LIB_DEPENDS+=		libaudio.so:audio/nas
163
.else
164
CONFIGURE_ARGS+=	--disable-nas --disable-nas-shared
165
.endif
166
167
.if ${PORT_OPTIONS:MOSS}
168
.if !${PORT_OPTIONS:MSDL_AUDIO}
169
IGNORE=	option OSS requires SDL_AUDIO
170
.endif
171
CONFIGURE_ARGS+=	--enable-oss
172
.else
173
CONFIGURE_ARGS+=	--disable-oss
174
.endif
175
176
.if ${PORT_OPTIONS:MPULSEAUDIO}
177
.if !${PORT_OPTIONS:MSDL_AUDIO}
178
IGNORE=	option PULSEAUDIO requires SDL_AUDIO
179
.endif
180
CONFIGURE_ARGS+=	--enable-pulseaudio --enable-pulseaudio-shared
181
.else
182
CONFIGURE_ARGS+=	--disable-pulseaudio --disable-pulseaudio-shared
183
.endif
184
185
.if ${PORT_OPTIONS:MSNDIO}
186
.if !${PORT_OPTIONS:MSDL_AUDIO}
187
IGNORE=	option SNDIO requires SDL_AUDIO
188
.endif
189
CONFIGURE_ARGS+=	--enable-sndio --enable-sndio-shared
190
LIB_DEPENDS+=		libsndio.so:audio/sndio
191
.else
192
CONFIGURE_ARGS+=	--disable-sndio --disable-sndio-shared
193
.endif
194
195
.if ${PORT_OPTIONS:MVIDEO_KMSDRM}
196
.if !${PORT_OPTIONS:MSDL_VIDEO}
197
IGNORE=	option VIDEO_KMSDRM requires SDL_VIDEO
198
.endif
199
CONFIGURE_ARGS+=	--enable-video-kmsdrm --enable-kmsdrm-shared
200
USE_GL+=		gbm
201
.else
202
CONFIGURE_ARGS+=	--disable-video-kmsdrm --disable-video-kmsdrm
203
.endif
204
205
.if ${PORT_OPTIONS:MVIDEO_OPENGL}
206
.if !${PORT_OPTIONS:MSDL_VIDEO}
207
IGNORE=	option VIDEO_OPENGL requires SDL_VIDEO
208
.endif
209
CONFIGURE_ARGS+=	--enable-video-opengl
210
USES+=			gl
211
USE_GL+=		gl
212
.else
213
CONFIGURE_ARGS+=	--disable-video-opengl
214
.endif
215
216
.if ${PORT_OPTIONS:MVIDEO_X11}
217
.if !${PORT_OPTIONS:MSDL_VIDEO}
218
IGNORE=	option VIDEO_X11 requires SDL_VIDEO
219
.endif
220
CONFIGURE_ARGS+=	--enable-video-x11 \
221
			--enable-x11-shared \
222
			--enable-video-x11-xcursor \
223
			--enable-video-x11-xinerama \
224
			--enable-video-x11-xinput \
225
			--enable-video-x11-xrandr \
226
			--enable-video-x11-scrnsaver \
227
			--enable-video-x11-xshape \
228
			--enable-video-x11-vm
229
USES+=		xorg
230
USE_XORG+=	xinerama xcursor xi xrandr xscrnsaver xxf86vm xext
231
.else
232
CONFIGURE_ARGS+=	--disable-video-x11 \
233
			--disable-x11-shared \
234
			--disable-video-x11-xcursor \
235
			--disable-video-x11-xinerama \
236
			--disable-video-x11-xinput \
237
			--disable-video-x11-xrandr \
238
			--disable-video-x11-scrnsaver \
239
			--disable-video-x11-xshape \
240
			--disable-video-x11-vm
241
.endif
242
243
.if ${PORT_OPTIONS:MVIDEO_OPENGLES2}
244
.if !${PORT_OPTIONS:MSDL_VIDEO}
245
IGNORE=	option VIDEO_OPENGLES2 requires SDL_VIDEO
246
.endif
247
CONFIGURE_ARGS+=	--enable-video-opengles \
248
			--enable-video-opengles2
249
USE_GL+=		egl glesv2
250
.else
251
CONFIGURE_ARGS+=	--disable-video-opengles \
252
			--disable-video-opengles2
253
.endif
254
255
.if ${PORT_OPTIONS:MVIDEO_WAYLAND}
256
.if !${PORT_OPTIONS:MSDL_VIDEO}
257
IGNORE=	option VIDEO_WAYLAND requires SDL_VIDEO
258
.endif
259
.if !${PORT_OPTIONS:MVIDEO_OPENGLES2}
260
IGNORE=	option VIDEO_WAYLAND requires VIDEO_OPENGLES2
261
.endif
262
CONFIGURE_ARGS+=	--enable-video-wayland \
263
			--enable-wayland-shared
264
BUILD_DEPENDS+=		wayland-protocols>0:graphics/wayland-protocols \
265
			${LOCALBASE}/include/linux/input.h:devel/evdev-proto
266
LIB_DEPENDS+=		libwayland-egl.so:graphics/wayland \
267
			libxkbcommon.so:x11/libxkbcommon
268
.else
269
CONFIGURE_ARGS+=	--disable-video-wayland \
270
			--disable-wayland-shared
271
.endif
272
273
.include <bsd.port.pre.mk>
195
.include <bsd.port.pre.mk>
274
196
275
.if !empty(ICONV_LIB)
197
.if !empty(ICONV_LIB)
Lines 277-284 Link Here
277
.endif
199
.endif
278
200
279
post-patch:
201
post-patch:
280
	@${REINPLACE_CMD} -e '/ CheckInputEvents$$/d' \
202
	@${REINPLACE_CMD} -e 's/-liconv/${ICONV_LIB}/g' ${WRKSRC}/configure
281
		-e 's/-liconv/${ICONV_LIB}/g' ${WRKSRC}/configure
282
# Clang does not provide _m_prefetch
203
# Clang does not provide _m_prefetch
283
	@${REINPLACE_CMD} 's/_m_prefetch/__builtin_prefetch/' \
204
	@${REINPLACE_CMD} 's/_m_prefetch/__builtin_prefetch/' \
284
		${WRKSRC}/configure ${WRKSRC}/src/video/SDL_blit_A.c
205
		${WRKSRC}/configure ${WRKSRC}/src/video/SDL_blit_A.c
(-)devel/sdl20/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1583890578
1
TIMESTAMP = 1638578013
2
SHA256 (SDL2-2.0.12.tar.gz) = 349268f695c02efbc9b9148a70b85e58cefbbf704abd3e91be654db7f1e2c863
2
SHA256 (SDL2-2.0.18.tar.gz) = 94d40cd73dbfa10bb6eadfbc28f355992bb2d6ef6761ad9d4074eff95ee5711c
3
SIZE (SDL2-2.0.12.tar.gz) = 5720162
3
SIZE (SDL2-2.0.18.tar.gz) = 7294032
(-)devel/sdl20/files/patch-include_SDL__endian.h (-11 lines)
Lines 1-11 Link Here
1
--- include/SDL_endian.h.orig	2020-10-03 02:13:42 UTC
2
+++ include/SDL_endian.h
3
@@ -44,6 +44,8 @@
4
 #define SDL_BYTEORDER  __BYTE_ORDER
5
 #elif defined(__OpenBSD__)
6
 #include <endian.h>
7
+#elif defined(__FreeBSD__)
8
+#include <sys/endian.h>
9
 #define SDL_BYTEORDER  BYTE_ORDER
10
 #else
11
 #if defined(__hppa__) || \
(-)devel/sdl20/files/patch-noegl (-7 / +7 lines)
Lines 1-12 Link Here
1
--- src/video/kmsdrm/SDL_kmsdrmvideo.c.orig	2020-03-11 01:36:18 UTC
1
--- src/video/kmsdrm/SDL_kmsdrmvideo.c.orig
2
+++ src/video/kmsdrm/SDL_kmsdrmvideo.c
2
+++ src/video/kmsdrm/SDL_kmsdrmvideo.c
3
@@ -391,7 +391,9 @@ KMSDRM_CreateSurfaces(_THIS, SDL_Window * window)
3
@@ -1407,7 +1407,9 @@ KMSDRM_CreateSurfaces(_THIS, SDL_Window * window)
4
     Uint32 height = dispdata->mode.vdisplay;
4
     uint32_t surface_flags = GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING;
5
     Uint32 surface_fmt = GBM_FORMAT_XRGB8888;
5
     uint32_t width, height;
6
     Uint32 surface_flags = GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING;
6
7
+#if SDL_VIDEO_OPENGL_EGL
7
+#if SDL_VIDEO_OPENGL_EGL
8
     EGLContext egl_context;
8
     EGLContext egl_context;
9
+#endif
9
+#endif
10
 
10
 
11
     if (!KMSDRM_gbm_device_is_format_supported(viddata->gbm, surface_fmt, surface_flags)) {
11
    int ret = 0;
12
         SDL_LogWarn(SDL_LOG_CATEGORY_VIDEO, "GBM surface format not supported. Trying anyway.");
12
(-)devel/sdl20/files/patch-src_cpuinfo_SDL__cpuinfo.c (-33 lines)
Lines 1-33 Link Here
1
--- src/cpuinfo/SDL_cpuinfo.c.orig	2020-03-11 01:36:18 UTC
2
+++ src/cpuinfo/SDL_cpuinfo.c
3
@@ -53,6 +53,9 @@
4
 #include <sys/param.h>
5
 #include <sys/sysctl.h> /* For AltiVec check */
6
 #include <machine/cpu.h>
7
+#elif defined(__FreeBSD__) && defined(__powerpc__)
8
+#include <machine/cpu.h>
9
+#include <sys/auxv.h>
10
 #elif SDL_ALTIVEC_BLITTERS && HAVE_SETJMP
11
 #include <signal.h>
12
 #include <setjmp.h>
13
@@ -110,7 +113,7 @@
14
 #define CPU_HAS_AVX512F (1 << 12)
15
 #define CPU_HAS_ARM_SIMD (1 << 13)
16
 
17
-#if SDL_ALTIVEC_BLITTERS && HAVE_SETJMP && !__MACOSX__ && !__OpenBSD__
18
+#if SDL_ALTIVEC_BLITTERS && HAVE_SETJMP && !__MACOSX__ && !__OpenBSD__ && !__FreeBSD__
19
 /* This is the brute force way of detecting instruction sets...
20
    the idea is borrowed from the libmpeg2 library - thanks!
21
  */
22
@@ -325,6 +328,11 @@ CPU_haveAltiVec(void)
23
     int error = sysctl(selectors, 2, &hasVectorUnit, &length, NULL, 0);
24
     if (0 == error)
25
         altivec = (hasVectorUnit != 0);
26
+#elif defined(__FreeBSD__) && defined(__powerpc__)
27
+    unsigned long cpufeatures;
28
+    elf_aux_info(AT_HWCAP, &cpufeatures, sizeof(cpufeatures));
29
+    altivec = cpufeatures & PPC_FEATURE_HAS_ALTIVEC;
30
+    return altivec;
31
 #elif SDL_ALTIVEC_BLITTERS && HAVE_SETJMP
32
     void (*handler) (int sig);
33
     handler = signal(SIGILL, illegal_instruction);
(-)devel/sdl20/files/patch-wayland (-70 lines)
Lines 1-70 Link Here
1
From 8babda2c206949ad9c4f42e64bf8ae3e35b2e709 Mon Sep 17 00:00:00 2001
2
From: "Ryan C. Gordon" <icculus@icculus.org>
3
Date: Thu, 16 Jul 2020 13:18:19 -0400
4
Subject: [PATCH] egl: SDL_EGL_LoadLibaryOnly() shouldn't set
5
 _this->gl_config.driver_loaded = 1
6
7
This is handled in in the higher-level SDL_GL_LoadLibrary().
8
9
All uses of SDL_EGL_LoadLibrary (which calls the Only version) are just
10
target-specific wrappers for their own GL_LoadLibrary hook, with two
11
exceptions which now handle driver_loaded correctly (although it's
12
questionable if these init-if-no-one-did-it-correctly-already code blocks
13
should exist at all, fwiw).
14
15
Fixes Bugzilla #5190.
16
---
17
 src/video/SDL_egl.c                     | 2 --
18
 src/video/cocoa/SDL_cocoaopengles.m     | 2 ++
19
 src/video/windows/SDL_windowsopengles.c | 3 ++-
20
 3 files changed, 4 insertions(+), 3 deletions(-)
21
22
diff --git a/src/video/SDL_egl.c b/src/video/SDL_egl.c
23
index 58939053c..3358f47b8 100644
24
--- src/video/SDL_egl.c
25
+++ src/video/SDL_egl.c
26
@@ -438,8 +438,6 @@ SDL_EGL_LoadLibraryOnly(_THIS, const char *egl_path)
27
     LOAD_FUNC_EGLEXT(eglQueryDevicesEXT);
28
     LOAD_FUNC_EGLEXT(eglGetPlatformDisplayEXT);
29
 
30
-    _this->gl_config.driver_loaded = 1;
31
-
32
     if (path) {
33
         SDL_strlcpy(_this->gl_config.driver_path, path, sizeof(_this->gl_config.driver_path) - 1);
34
     } else {
35
diff --git a/src/video/cocoa/SDL_cocoaopengles.m b/src/video/cocoa/SDL_cocoaopengles.m
36
index a45a9f57c..0f551de10 100644
37
--- src/video/cocoa/SDL_cocoaopengles.m
38
+++ src/video/cocoa/SDL_cocoaopengles.m
39
@@ -109,10 +109,12 @@
40
 
41
 
42
     if (_this->egl_data == NULL) {
43
+        SDL_assert(!_this->gl_config.driver_loaded);
44
         if (SDL_EGL_LoadLibrary(_this, NULL, EGL_DEFAULT_DISPLAY, 0) < 0) {
45
             SDL_EGL_UnloadLibrary(_this);
46
             return -1;
47
         }
48
+        _this->gl_config.driver_loaded = 1;
49
     }
50
   
51
     /* Create the GLES window surface */
52
diff --git a/src/video/windows/SDL_windowsopengles.c b/src/video/windows/SDL_windowsopengles.c
53
index e4bfe49cc..5ee46d83c 100644
54
--- src/video/windows/SDL_windowsopengles.c
55
+++ src/video/windows/SDL_windowsopengles.c
56
@@ -107,12 +107,13 @@ WIN_GLES_SetupWindow(_THIS, SDL_Window * window)
57
     SDL_Window *current_win = SDL_GL_GetCurrentWindow();
58
     SDL_GLContext current_ctx = SDL_GL_GetCurrentContext();
59
 
60
-
61
     if (_this->egl_data == NULL) {
62
+        SDL_assert(!_this->gl_config.driver_loaded);
63
         if (SDL_EGL_LoadLibrary(_this, NULL, EGL_DEFAULT_DISPLAY, 0) < 0) {
64
             SDL_EGL_UnloadLibrary(_this);
65
             return -1;
66
         }
67
+        _this->gl_config.driver_loaded = 1;
68
     }
69
   
70
     /* Create the GLES window surface */
(-)devel/sdl20/pkg-plist (-1 / +4 lines)
Lines 16-30 Link Here
16
include/SDL2/SDL_gamecontroller.h
16
include/SDL2/SDL_gamecontroller.h
17
include/SDL2/SDL_gesture.h
17
include/SDL2/SDL_gesture.h
18
include/SDL2/SDL_haptic.h
18
include/SDL2/SDL_haptic.h
19
include/SDL2/SDL_hidapi.h
19
include/SDL2/SDL_hints.h
20
include/SDL2/SDL_hints.h
20
include/SDL2/SDL_joystick.h
21
include/SDL2/SDL_joystick.h
21
include/SDL2/SDL_keyboard.h
22
include/SDL2/SDL_keyboard.h
22
include/SDL2/SDL_keycode.h
23
include/SDL2/SDL_keycode.h
23
include/SDL2/SDL_loadso.h
24
include/SDL2/SDL_loadso.h
25
include/SDL2/SDL_locale.h
24
include/SDL2/SDL_log.h
26
include/SDL2/SDL_log.h
25
include/SDL2/SDL_main.h
27
include/SDL2/SDL_main.h
26
include/SDL2/SDL_messagebox.h
28
include/SDL2/SDL_messagebox.h
27
include/SDL2/SDL_metal.h
29
include/SDL2/SDL_metal.h
30
include/SDL2/SDL_misc.h
28
include/SDL2/SDL_mouse.h
31
include/SDL2/SDL_mouse.h
29
include/SDL2/SDL_mutex.h
32
include/SDL2/SDL_mutex.h
30
include/SDL2/SDL_name.h
33
include/SDL2/SDL_name.h
Lines 76-82 Link Here
76
lib/cmake/SDL2/sdl2-config-version.cmake
79
lib/cmake/SDL2/sdl2-config-version.cmake
77
lib/cmake/SDL2/sdl2-config.cmake
80
lib/cmake/SDL2/sdl2-config.cmake
78
lib/libSDL2-2.0.so.0
81
lib/libSDL2-2.0.so.0
79
lib/libSDL2-2.0.so.0.12.0
82
lib/libSDL2-2.0.so.0.18.0
80
lib/libSDL2.a
83
lib/libSDL2.a
81
lib/libSDL2.so
84
lib/libSDL2.so
82
lib/libSDL2_test.a
85
lib/libSDL2_test.a

Return to bug 252371