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

Collapse All | Expand All

(-)devel/sdl20/Makefile (-144 / +51 lines)
Lines 1-8 Link Here
1
# $FreeBSD: head/devel/sdl20/Makefile 551250 2020-10-03 02:21:47Z pkubaj $
1
# $FreeBSD: head/devel/sdl20/Makefile 551250 2020-10-03 02:21:47Z pkubaj $
2
2
3
PORTNAME=	sdl2
3
PORTNAME=	sdl2
4
PORTVERSION=	2.0.12
4
DISTVERSION=	2.0.14
5
PORTREVISION=	3
6
CATEGORIES=	devel
5
CATEGORIES=	devel
7
MASTER_SITES=	https://www.libsdl.org/release/
6
MASTER_SITES=	https://www.libsdl.org/release/
8
DISTNAME=	SDL2-${PORTVERSION}
7
DISTNAME=	SDL2-${PORTVERSION}
Lines 24-30 Link Here
24
			--enable-video-dummy \
23
			--enable-video-dummy \
25
			--disable-dbus \
24
			--disable-dbus \
26
			--disable-input-tslib \
25
			--disable-input-tslib \
27
			--disable-rpath
26
			--disable-rpath \
27
			--disable-esd --disable-esd-shared
28
.if defined(MACHINE_CPU) && ${MACHINE_CPU:Mmmx}
28
.if defined(MACHINE_CPU) && ${MACHINE_CPU:Mmmx}
29
CONFIGURE_ARGS+=	--enable-mmx
29
CONFIGURE_ARGS+=	--enable-mmx
30
.else
30
.else
Lines 53-59 Link Here
53
53
54
MAKE_ENV=	V=1
54
MAKE_ENV=	V=1
55
55
56
OPTIONS_DEFINE=		ALSA ASM DLOPEN HIDAPI JACK NAS OSS	\
56
OPTIONS_DEFINE=		ALSA ASM DLOPEN HIDAPI JACK NAS OSS		\
57
			PULSEAUDIO SAMPLERATE SNDIO PTHREADS		\
57
			PULSEAUDIO SAMPLERATE SNDIO PTHREADS		\
58
			SDL_ATOMIC SDL_AUDIO SDL_CPUINFO SDL_EVENTS	\
58
			SDL_ATOMIC SDL_AUDIO SDL_CPUINFO SDL_EVENTS	\
59
			SDL_FILE SDL_HAPTIC SDL_JOYSTICK SDL_LOADSO	\
59
			SDL_FILE SDL_HAPTIC SDL_JOYSTICK SDL_LOADSO	\
Lines 101-112 Link Here
101
VIDEO_X11_DESC=		X11 display support
101
VIDEO_X11_DESC=		X11 display support
102
102
103
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
104
ASM_CONFIGURE_ENABLE=		assembly
107
ASM_CONFIGURE_ENABLE=		assembly
105
DLOPEN_CONFIGURE_ENABLE=	sdl-dlopen
108
DLOPEN_CONFIGURE_ENABLE=	sdl-dlopen
106
DLOPEN_CONFIGURE_OFF=		--disable-video-vulkan
109
DLOPEN_CONFIGURE_OFF=		--disable-video-vulkan
110
JACK_CONFIGURE_ENABLE=		jack jack-shared
111
JACK_LIB_DEPENDS=		libjack.so:audio/jack
112
JACK_IMPLIES=			SDL_AUDIO
107
HIDAPI_CONFIGURE_ENABLE=	hidapi
113
HIDAPI_CONFIGURE_ENABLE=	hidapi
108
HIDAPI_IMPLIES=			SDL_JOYSTICK
114
HIDAPI_IMPLIES=			SDL_JOYSTICK
115
NAS_CONFIGURE_ENABLE=		nas nas-shared
116
NAS_LIB_DEPENDS=		libaudio.so:audio/nas
117
NAS_IMPLIES=			SDL_AUDIO
118
OSS_CONFIGURE_ENABLE=		oss
119
OSS_IMPLIES=			SDL_AUDIO
109
PTHREADS_CONFIGURE_ENABLE=	pthreads pthread-sem
120
PTHREADS_CONFIGURE_ENABLE=	pthreads pthread-sem
121
PULSEAUDIO_CONFIGURE_ENABLE=	pulseaudio pulseaudio-shared
122
PULSEAUDIO_IMPLIES=		SDL_AUDIO
110
SAMPLERATE_CONFIGURE_ENABLE=	libsamplerate libsamplerate-shared
123
SAMPLERATE_CONFIGURE_ENABLE=	libsamplerate libsamplerate-shared
111
SAMPLERATE_LIB_DEPENDS=		libsamplerate.so:audio/libsamplerate
124
SAMPLERATE_LIB_DEPENDS=		libsamplerate.so:audio/libsamplerate
112
SDL_ATOMIC_CONFIGURE_ENABLE=	atomic gcc-atomics
125
SDL_ATOMIC_CONFIGURE_ENABLE=	atomic gcc-atomics
Lines 116-130 Link Here
116
SDL_FILE_CONFIGURE_ENABLE=	filesystem
129
SDL_FILE_CONFIGURE_ENABLE=	filesystem
117
SDL_HAPTIC_CONFIGURE_ENABLE=	haptic
130
SDL_HAPTIC_CONFIGURE_ENABLE=	haptic
118
SDL_JOYSTICK_CONFIGURE_ENABLE=	joystick
131
SDL_JOYSTICK_CONFIGURE_ENABLE=	joystick
132
SDL_JOYSTICK_BUILD_DEPENDS=	${LOCALBASE}/include/linux/input.h:devel/evdev-proto
119
SDL_LOADSO_CONFIGURE_ENABLE=	loadso
133
SDL_LOADSO_CONFIGURE_ENABLE=	loadso
120
SDL_POWER_CONFIGURE_ENABLE=	power
134
SDL_POWER_CONFIGURE_ENABLE=	power
121
SDL_RENDER_CONFIGURE_ENABLE=	render
135
SDL_RENDER_CONFIGURE_ENABLE=	render
122
SDL_THREADS_CONFIGURE_ENABLE=	threads
136
SDL_THREADS_CONFIGURE_ENABLE=	threads
123
SDL_TIMERS_CONFIGURE_ENABLE=	timers
137
SDL_TIMERS_CONFIGURE_ENABLE=	timers
124
SDL_VIDEO_CONFIGURE_ENABLE=	video
138
SDL_VIDEO_CONFIGURE_ENABLE=	video
139
SNDIO_CONFIGURE_ENABLE=		sndio sndio-shared
140
SNDIO_LIB_DEPENDS=		libsndio.so:audio/sndio
141
SNDIO_IMPLIES=			SDL_AUDIO
125
UDEV_CONFIGURE_ENABLE=		libudev
142
UDEV_CONFIGURE_ENABLE=		libudev
126
UDEV_LIB_DEPENDS=		libudev.so:devel/libudev-devd
143
UDEV_LIB_DEPENDS=		libudev.so:devel/libudev-devd
127
UDEV_BUILD_DEPENDS=		${LOCALBASE}/include/linux/input.h:devel/evdev-proto
144
UDEV_BUILD_DEPENDS=		${LOCALBASE}/include/linux/input.h:devel/evdev-proto
145
VIDEO_KMSDRM_ENABLE=		video-kmsdrm kmsdrm-shared
146
VIDEO_KMSDRM_USES=		gl
147
VIDEO_KMSDRM_USE=		GL=gbm
148
VIDEO_KMSDRM_IMPLIES=		SDL_VIDEO
149
VIDEO_OPENGL_ENABLE=		video-opengl
150
VIDEO_OPENGL_USES=		gl
151
VIDEO_OPENGL_USE=		GL=gl
152
VIDEO_OPENGL_IMPLIES=		SDL_VIDEO
153
VIDEO_OPENGLES2_ENABLE=		video-opengles video-opengles2
154
VIDEO_OPENGLES2_USES=		gl
155
VIDEO_OPENGLES2_USE=		GL=egl,glesv2
156
VIDEO_OPENGLES2_IMPLIES=	SDL_VIDEO
157
VIDEO_WAYLAND_ENABLE=		video-wayland wayland-shared
158
VIDEO_WAYLAND_BUILD_DEPENDS=	wayland-protocols>0:graphics/wayland-protocols \
159
				${LOCALBASE}/include/linux/input.h:devel/evdev-proto
160
VIDEO_WAYLAND_LIB_DEPENDS=	libwayland-egl.so:graphics/wayland \
161
				libxkbcommon.so:x11/libxkbcommon
162
VIDEO_WAYLAND_IMPLIES=		SDL_VIDEO VIDEO_OPENGLES2
163
VIDEO_X11_ENABLE=		video-x11 x11-shared \
164
				video-x11-xcursor \
165
				video-x11-xinerama \
166
				video-x11-xinput \
167
				video-x11-xrandr \
168
				video-x11-scrnsaver \
169
				video-x11-xshape \
170
				video-x11-vm
171
VIDEO_X11_USES=			xorg
172
VIDEO_X11_USE=			XORG=xinerama,xcursor,xi,xrandr,xscrnsaver,xxf86vm,xext
173
VIDEO_X11_IMPLIES=		SDL_VIDEO
128
174
129
.include <bsd.port.options.mk>
175
.include <bsd.port.options.mk>
130
176
Lines 134-277 Link Here
134
CFLAGS+=	-B${LOCALBASE}/bin -no-integrated-as
180
CFLAGS+=	-B${LOCALBASE}/bin -no-integrated-as
135
.endif
181
.endif
136
182
137
.if ${PORT_OPTIONS:MALSA}
138
.if !${PORT_OPTIONS:MSDL_AUDIO}
139
IGNORE=	option ALSA requires SDL_AUDIO
140
.endif
141
CONFIGURE_ARGS+=	--enable-alsa --enable-alsa-shared
142
LIB_DEPENDS+=		libasound.so:audio/alsa-lib
143
.else
144
CONFIGURE_ARGS+=	--disable-alsa --disable-alsa-shared
145
.endif
146
147
.if ${PORT_OPTIONS:MJACK}
148
.if !${PORT_OPTIONS:MSDL_AUDIO}
149
IGNORE=	option JACK requires SDL_AUDIO
150
.endif
151
CONFIGURE_ARGS+=	--enable-jack --enable-jack-shared
152
LIB_DEPENDS+=		libjack.so:audio/jack
153
.else
154
CONFIGURE_ARGS+=	--disable-jack --disable-jack-shared
155
.endif
156
157
CONFIGURE_ARGS+=	--disable-esd --disable-esd-shared
158
159
.if ${PORT_OPTIONS:MNAS}
160
.if !${PORT_OPTIONS:MSDL_AUDIO}
161
IGNORE=	option NAS requires SDL_AUDIO
162
.endif
163
CONFIGURE_ARGS+=	--enable-nas --enable-nas-shared
164
LIB_DEPENDS+=		libaudio.so:audio/nas
165
.else
166
CONFIGURE_ARGS+=	--disable-nas --disable-nas-shared
167
.endif
168
169
.if ${PORT_OPTIONS:MOSS}
170
.if !${PORT_OPTIONS:MSDL_AUDIO}
171
IGNORE=	option OSS requires SDL_AUDIO
172
.endif
173
CONFIGURE_ARGS+=	--enable-oss
174
.else
175
CONFIGURE_ARGS+=	--disable-oss
176
.endif
177
178
.if ${PORT_OPTIONS:MPULSEAUDIO}
179
.if !${PORT_OPTIONS:MSDL_AUDIO}
180
IGNORE=	option PULSEAUDIO requires SDL_AUDIO
181
.endif
182
CONFIGURE_ARGS+=	--enable-pulseaudio --enable-pulseaudio-shared
183
.else
184
CONFIGURE_ARGS+=	--disable-pulseaudio --disable-pulseaudio-shared
185
.endif
186
187
.if ${PORT_OPTIONS:MSNDIO}
188
.if !${PORT_OPTIONS:MSDL_AUDIO}
189
IGNORE=	option SNDIO requires SDL_AUDIO
190
.endif
191
CONFIGURE_ARGS+=	--enable-sndio --enable-sndio-shared
192
LIB_DEPENDS+=		libsndio.so:audio/sndio
193
.else
194
CONFIGURE_ARGS+=	--disable-sndio --disable-sndio-shared
195
.endif
196
197
.if ${PORT_OPTIONS:MVIDEO_KMSDRM}
198
.if !${PORT_OPTIONS:MSDL_VIDEO}
199
IGNORE=	option VIDEO_KMSDRM requires SDL_VIDEO
200
.endif
201
CONFIGURE_ARGS+=	--enable-video-kmsdrm --enable-kmsdrm-shared
202
USE_GL+=		gbm
203
.else
204
CONFIGURE_ARGS+=	--disable-video-kmsdrm --disable-video-kmsdrm
205
.endif
206
207
.if ${PORT_OPTIONS:MVIDEO_OPENGL}
208
.if !${PORT_OPTIONS:MSDL_VIDEO}
209
IGNORE=	option VIDEO_OPENGL requires SDL_VIDEO
210
.endif
211
CONFIGURE_ARGS+=	--enable-video-opengl
212
USES+=			gl
213
USE_GL+=		gl
214
.else
215
CONFIGURE_ARGS+=	--disable-video-opengl
216
.endif
217
218
.if ${PORT_OPTIONS:MVIDEO_X11}
219
.if !${PORT_OPTIONS:MSDL_VIDEO}
220
IGNORE=	option VIDEO_X11 requires SDL_VIDEO
221
.endif
222
CONFIGURE_ARGS+=	--enable-video-x11 \
223
			--enable-x11-shared \
224
			--enable-video-x11-xcursor \
225
			--enable-video-x11-xinerama \
226
			--enable-video-x11-xinput \
227
			--enable-video-x11-xrandr \
228
			--enable-video-x11-scrnsaver \
229
			--enable-video-x11-xshape \
230
			--enable-video-x11-vm
231
USES+=		xorg
232
USE_XORG+=	xinerama xcursor xi xrandr xscrnsaver xxf86vm xext
233
.else
234
CONFIGURE_ARGS+=	--disable-video-x11 \
235
			--disable-x11-shared \
236
			--disable-video-x11-xcursor \
237
			--disable-video-x11-xinerama \
238
			--disable-video-x11-xinput \
239
			--disable-video-x11-xrandr \
240
			--disable-video-x11-scrnsaver \
241
			--disable-video-x11-xshape \
242
			--disable-video-x11-vm
243
.endif
244
245
.if ${PORT_OPTIONS:MVIDEO_OPENGLES2}
246
.if !${PORT_OPTIONS:MSDL_VIDEO}
247
IGNORE=	option VIDEO_OPENGLES2 requires SDL_VIDEO
248
.endif
249
CONFIGURE_ARGS+=	--enable-video-opengles \
250
			--enable-video-opengles2
251
USE_GL+=		egl glesv2
252
.else
253
CONFIGURE_ARGS+=	--disable-video-opengles \
254
			--disable-video-opengles2
255
.endif
256
257
.if ${PORT_OPTIONS:MVIDEO_WAYLAND}
258
.if !${PORT_OPTIONS:MSDL_VIDEO}
259
IGNORE=	option VIDEO_WAYLAND requires SDL_VIDEO
260
.endif
261
.if !${PORT_OPTIONS:MVIDEO_OPENGLES2}
262
IGNORE=	option VIDEO_WAYLAND requires VIDEO_OPENGLES2
263
.endif
264
CONFIGURE_ARGS+=	--enable-video-wayland \
265
			--enable-wayland-shared
266
BUILD_DEPENDS+=		wayland-protocols>0:graphics/wayland-protocols \
267
			${LOCALBASE}/include/linux/input.h:devel/evdev-proto
268
LIB_DEPENDS+=		libwayland-egl.so:graphics/wayland \
269
			libxkbcommon.so:x11/libxkbcommon
270
.else
271
CONFIGURE_ARGS+=	--disable-video-wayland \
272
			--disable-wayland-shared
273
.endif
274
275
.include <bsd.port.pre.mk>
183
.include <bsd.port.pre.mk>
276
184
277
.if !empty(ICONV_LIB)
185
.if !empty(ICONV_LIB)
Lines 279-286 Link Here
279
.endif
187
.endif
280
188
281
post-patch:
189
post-patch:
282
	@${REINPLACE_CMD} -e '/ CheckInputEvents$$/d' \
190
	@${REINPLACE_CMD} -e 's/-liconv/${ICONV_LIB}/g' ${WRKSRC}/configure
283
		-e 's/-liconv/${ICONV_LIB}/g' ${WRKSRC}/configure
284
# Clang does not provide _m_prefetch
191
# Clang does not provide _m_prefetch
285
	@${REINPLACE_CMD} 's/_m_prefetch/__builtin_prefetch/' \
192
	@${REINPLACE_CMD} 's/_m_prefetch/__builtin_prefetch/' \
286
		${WRKSRC}/configure ${WRKSRC}/src/video/SDL_blit_A.c
193
		${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 = 1609652899
2
SHA256 (SDL2-2.0.12.tar.gz) = 349268f695c02efbc9b9148a70b85e58cefbbf704abd3e91be654db7f1e2c863
2
SHA256 (SDL2-2.0.14.tar.gz) = d8215b571a581be1332d2106f8036fcb03d12a70bae01e20f424976d275432bc
3
SIZE (SDL2-2.0.12.tar.gz) = 5720162
3
SIZE (SDL2-2.0.14.tar.gz) = 6089974
(-)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 (-24 lines)
Lines 1-24 Link Here
1
--- src/cpuinfo/SDL_cpuinfo.c.orig	2020-03-11 01:36:18 UTC
2
+++ src/cpuinfo/SDL_cpuinfo.c
3
@@ -49,7 +49,7 @@
4
 #endif
5
 #if defined(__MACOSX__) && (defined(__ppc__) || defined(__ppc64__))
6
 #include <sys/sysctl.h>         /* For AltiVec check */
7
-#elif defined(__OpenBSD__) && defined(__powerpc__)
8
+#elif (defined(__OpenBSD__) || defined(__FreeBSD__)) && defined(__powerpc__)
9
 #include <sys/param.h>
10
 #include <sys/sysctl.h> /* For AltiVec check */
11
 #include <machine/cpu.h>
12
@@ -314,9 +314,11 @@ CPU_haveAltiVec(void)
13
 {
14
     volatile int altivec = 0;
15
 #ifndef SDL_CPUINFO_DISABLED
16
-#if (defined(__MACOSX__) && (defined(__ppc__) || defined(__ppc64__))) || (defined(__OpenBSD__) && defined(__powerpc__))
17
+#if (defined(__MACOSX__) && (defined(__ppc__) || defined(__ppc64__))) || (defined(__OpenBSD__) && defined(__powerpc__)) || (defined(__FreeBSD__) && defined(__powerpc__))
18
 #ifdef __OpenBSD__
19
     int selectors[2] = { CTL_MACHDEP, CPU_ALTIVEC };
20
+#elif __FreeBSD__
21
+    int selectors[2] = { CTL_HW, PPC_FEATURE_HAS_ALTIVEC };
22
 #else
23
     int selectors[2] = { CTL_HW, HW_VECTORUNIT };
24
 #endif
(-)devel/sdl20/pkg-plist (-1 / +3 lines)
Lines 21-30 Link Here
21
include/SDL2/SDL_keyboard.h
21
include/SDL2/SDL_keyboard.h
22
include/SDL2/SDL_keycode.h
22
include/SDL2/SDL_keycode.h
23
include/SDL2/SDL_loadso.h
23
include/SDL2/SDL_loadso.h
24
include/SDL2/SDL_locale.h
24
include/SDL2/SDL_log.h
25
include/SDL2/SDL_log.h
25
include/SDL2/SDL_main.h
26
include/SDL2/SDL_main.h
26
include/SDL2/SDL_messagebox.h
27
include/SDL2/SDL_messagebox.h
27
include/SDL2/SDL_metal.h
28
include/SDL2/SDL_metal.h
29
include/SDL2/SDL_misc.h
28
include/SDL2/SDL_mouse.h
30
include/SDL2/SDL_mouse.h
29
include/SDL2/SDL_mutex.h
31
include/SDL2/SDL_mutex.h
30
include/SDL2/SDL_name.h
32
include/SDL2/SDL_name.h
Lines 76-82 Link Here
76
lib/cmake/SDL2/sdl2-config-version.cmake
78
lib/cmake/SDL2/sdl2-config-version.cmake
77
lib/cmake/SDL2/sdl2-config.cmake
79
lib/cmake/SDL2/sdl2-config.cmake
78
lib/libSDL2-2.0.so.0
80
lib/libSDL2-2.0.so.0
79
lib/libSDL2-2.0.so.0.12.0
81
lib/libSDL2-2.0.so.0.14.0
80
lib/libSDL2.a
82
lib/libSDL2.a
81
lib/libSDL2.so
83
lib/libSDL2.so
82
lib/libSDL2_test.a
84
lib/libSDL2_test.a

Return to bug 252371