Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Oct 2018 04:10:10 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r483217 - in head/devel/sdl20: . files
Message-ID:  <201810280410.w9S4AA9K064368@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Sun Oct 28 04:10:10 2018
New Revision: 483217
URL: https://svnweb.freebsd.org/changeset/ports/483217

Log:
  devel/sdl20: expose EGL and Wayland support
  
  PR:		223018 (based on)
  Submitted by:	Greg V <greg@unrelenting.technology>
  Approved by:	maintainer timeout (1 year)

Added:
  head/devel/sdl20/files/patch-configure   (contents, props changed)
Modified:
  head/devel/sdl20/Makefile   (contents, props changed)

Modified: head/devel/sdl20/Makefile
==============================================================================
--- head/devel/sdl20/Makefile	Sun Oct 28 03:07:52 2018	(r483216)
+++ head/devel/sdl20/Makefile	Sun Oct 28 04:10:10 2018	(r483217)
@@ -16,8 +16,7 @@ GNU_CONFIGURE=	yes
 USES=		gmake iconv libtool localbase:ldflags pathfix pkgconfig
 USE_LDCONFIG=	yes
 
-CONFIGURE_ARGS+=	--disable-video-opengles \
-			--disable-altivec \
+CONFIGURE_ARGS+=	--disable-altivec \
 			--disable-arts \
 			--enable-diskaudio \
 			--enable-dummyaudio \
@@ -58,7 +57,8 @@ OPTIONS_DEFINE=		ALSA ASM DLOPEN ESOUND JACK NAS OSS S
 			SDL_CPUINFO SDL_EVENTS SDL_FILE SDL_HAPTIC	\
 			SDL_JOYSTICK SDL_LOADSO SDL_POWER SDL_RENDER	\
 			SDL_THREADS SDL_TIMERS SDL_VIDEO VIDEO_KMSDRM	\
-			VIDEO_OPENGL VIDEO_X11
+			VIDEO_OPENGL VIDEO_OPENGLES2 VIDEO_WAYLAND	\
+			VIDEO_X11
 OPTIONS_DEFAULT=	ASM DLOPEN OSS PTHREADS SDL_ATOMIC SDL_AUDIO	\
 			SDL_CPUINFO SDL_EVENTS SDL_FILE SDL_HAPTIC	\
 			SDL_JOYSTICK SDL_LOADSO SDL_POWER SDL_RENDER	\
@@ -87,9 +87,11 @@ SDL_RENDER_DESC=	Enable the SDL Render subsystem
 SDL_THREADS_DESC=	Enable the SDL Threads subsystem
 SDL_TIMERS_DESC=	Enable the SDL Timers subsystem
 SDL_VIDEO_DESC=		Enable the SDL Video subsystem
-VIDEO_KMSDRM_DESC=	KMSDRM rendering support
+VIDEO_KMSDRM_DESC=	KMSDRM display support
 VIDEO_OPENGL_DESC=	OpenGL rendering support
-VIDEO_X11_DESC=		X11 rendering support
+VIDEO_OPENGLES2_DESC=	OpenGL ES 2.x rendering support
+VIDEO_WAYLAND_DESC=	Wayland display support
+VIDEO_X11_DESC=		X11 display support
 
 ASM_CONFIGURE_ENABLE=		assembly
 DLOPEN_CONFIGURE_ENABLE=	sdl-dlopen
@@ -225,6 +227,36 @@ CONFIGURE_ARGS+=	--disable-video-x11 \
 			--disable-video-x11-scrnsaver \
 			--disable-video-x11-xshape \
 			--disable-video-x11-vm
+.endif
+
+.if ${PORT_OPTIONS:MVIDEO_OPENGLES2}
+.if !${PORT_OPTIONS:MSDL_VIDEO}
+IGNORE=	option VIDEO_OPENGLES2 requires SDL_VIDEO
+.endif
+CONFIGURE_ARGS+=	--enable-video-opengles \
+			--enable-video-opengles2
+USE_GL+=		egl glesv2
+.else
+CONFIGURE_ARGS+=	--disable-video-opengles \
+			--disable-video-opengles2
+.endif
+
+.if ${PORT_OPTIONS:MVIDEO_WAYLAND}
+.if !${PORT_OPTIONS:MSDL_VIDEO}
+IGNORE=	option VIDEO_WAYLAND requires SDL_VIDEO
+.endif
+.if !${PORT_OPTIONS:MVIDEO_OPENGLES2}
+IGNORE=	option VIDEO_WAYLAND requires VIDEO_OPENGLES2
+.endif
+CONFIGURE_ARGS+=	--enable-video-wayland \
+			--enable-wayland-shared
+BUILD_DEPENDS+=		wayland-protocols>0:graphics/wayland-protocols \
+			${LOCALBASE}/include/linux/input.h:multimedia/v4l_compat
+LIB_DEPENDS+=		libwayland-egl.so:graphics/wayland \
+			libxkbcommon.so:x11/libxkbcommon
+.else
+CONFIGURE_ARGS+=	--disable-video-wayland \
+			--disable-wayland-shared
 .endif
 
 .include <bsd.port.pre.mk>

Added: head/devel/sdl20/files/patch-configure
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/sdl20/files/patch-configure	Sun Oct 28 04:10:10 2018	(r483217)
@@ -0,0 +1,41 @@
+--- configure.orig	2017-10-23 19:27:45 UTC
++++ configure
+@@ -24567,9 +24567,9 @@ if test x$video_wayland = xyes; then
+     WAYLAND_CORE_PROTOCOL_SOURCE='$(gen)/wayland-protocol.c'
+     WAYLAND_CORE_PROTOCOL_HEADER='$(gen)/wayland-client-protocol.h'
+     WAYLAND_PROTOCOLS_UNSTABLE_SOURCES=`echo $WAYLAND_PROTOCOLS_UNSTABLE |\
+-        sed 's,[^ ]\+,\\$(gen)/&-protocol.c,g'`
++        sed -E 's,[^ ]+,\\$(gen)/&-protocol.c,g'`
+     WAYLAND_PROTOCOLS_UNSTABLE_HEADERS=`echo $WAYLAND_PROTOCOLS_UNSTABLE |\
+-        sed 's,[^ ]\+,\\$(gen)/&-client-protocol.h,g'`
++        sed -E 's,[^ ]+,\\$(gen)/&-client-protocol.h,g'`
+     GEN_SOURCES="$GEN_SOURCES $WAYLAND_CORE_PROTOCOL_SOURCE $WAYLAND_PROTOCOLS_UNSTABLE_SOURCES"
+     GEN_HEADERS="$GEN_HEADERS $WAYLAND_CORE_PROTOCOL_HEADER $WAYLAND_PROTOCOLS_UNSTABLE_HEADERS"
+ 
+@@ -24588,20 +24588,20 @@ $WAYLAND_CORE_PROTOCOL_HEADER: $WAYLAND_CORE_PROTOCOL_
+ 	\$(RUN_CMD_CC)\$(LIBTOOL) --tag=CC --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \$< -o \$@"
+ 
+     WAYLAND_PROTOCOLS_CLIENT_HEADER_UNSTABLE_DEPENDS=`for p in $WAYLAND_PROTOCOLS_UNSTABLE;\
+-        do echo ; echo \$p | sed\
+-        "s,^\\([a-z\\-]\\+\\)-unstable-\\(v[0-9]\+\\)\$,\\$(gen)/&-client-protocol.h: $WAYLAND_PROTOCOLS_DIR/unstable/\1/&.xml\\\\
++        do echo ; echo \$p | sed -E\
++        "s,^([a-z\\-]+)-unstable-(v[0-9]+)\$,\\$(gen)/&-client-protocol.h: $WAYLAND_PROTOCOLS_DIR/unstable/\1/&.xml\\\\
+ 	\\$(SHELL) \\$(auxdir)/mkinstalldirs \\$(gen)\\\\
+ 	\\$(RUN_CMD_GEN)\\$(WAYLAND_SCANNER) client-header \\$< \\$@," ; done`
+ 
+     WAYLAND_PROTOCOLS_CODE_UNSTABLE_DEPENDS=`for p in $WAYLAND_PROTOCOLS_UNSTABLE;\
+-        do echo ; echo \$p | sed\
+-        "s,^\\([a-z\\-]\\+\\)-unstable-\\(v[0-9]\+\\)\$,\\$(gen)/&-protocol.c: $WAYLAND_PROTOCOLS_DIR/unstable/\1/&.xml\\\\
++        do echo ; echo \$p | sed -E\
++        "s,^([a-z\\-]+)-unstable-(v[0-9]+)\$,\\$(gen)/&-protocol.c: $WAYLAND_PROTOCOLS_DIR/unstable/\1/&.xml\\\\
+ 	\\$(SHELL) \\$(auxdir)/mkinstalldirs \\$(gen)\\\\
+ 	\\$(RUN_CMD_GEN)\\$(WAYLAND_SCANNER) code \\$< \\$@," ; done`
+ 
+     WAYLAND_PROTOCOLS_OBJECTS_UNSTABLE=`for p in $WAYLAND_PROTOCOLS_UNSTABLE;\
+-        do echo ; echo \$p | sed\
+-        "s,^\\([a-z\\-]\\+\\)-unstable-\\(v[0-9]\+\\)\$,\\\$(objects)/&-protocol.lo: \\$(gen)/&-protocol.c \\$(gen)/&-client-protocol.h\\\\
++        do echo ; echo \$p | sed -E\
++        "s,^([a-z\\-]+)-unstable-(v[0-9]+)\$,\\\$(objects)/&-protocol.lo: \\$(gen)/&-protocol.c \\$(gen)/&-client-protocol.h\\\\
+ 	\\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@," ; done`
+ 
+     WAYLAND_PROTOCOLS_DEPENDS="



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810280410.w9S4AA9K064368>