Jonathan Gray writes:
> On Sat, Aug 10, 2013 at 09:55:00PM +1000, Jonathan Gray wrote:
> > Even though it still isn't released there are a few projects
> > that now require it so I've added a quick port of the release
> > candidate as devel/sdl2 in the openbsd-wip repo.  Attached
> > here as well.
> 
> and now it has been released, so here is an updated port.

Below is a patch to emulators/mupen64plus to build with SDL2 for
testing purposes.

On both i386 and amd64, I get this behavior which didn't happen before:

Video: Initializing OpenGL Device Context.
Core: Setting 32-bit video mode: 640x480
Core Error: SDL_SetVideoMode failed: Failed loading libGL.so.1: File not found
Video Error: Failed to set 32-bit video mode: 640x480
Core Status: Rom closed.



Index: Makefile.inc
===================================================================
RCS file: /cvs/ports/emulators/mupen64plus/Makefile.inc,v
retrieving revision 1.6
diff -u -p -u -p -r1.6 Makefile.inc
--- Makefile.inc        5 Sep 2013 03:26:29 -0000       1.6
+++ Makefile.inc        20 Sep 2013 05:42:53 -0000
@@ -14,6 +14,7 @@ CONFIGURE_STYLE ?=    none
 USE_GMAKE ?=           Yes
 MAKE_FLAGS +=          CC=${CC} \
                        CXX=${CXX} \
+                       SDL_CONFIG=sdl2-config \
                        V=1 \
                        OPTFLAGS=
 
Index: audio-sdl/Makefile
===================================================================
RCS file: /cvs/ports/emulators/mupen64plus/audio-sdl/Makefile,v
retrieving revision 1.5
diff -u -p -u -p -r1.5 Makefile
--- audio-sdl/Makefile  5 Sep 2013 03:26:29 -0000       1.5
+++ audio-sdl/Makefile  20 Sep 2013 05:42:53 -0000
@@ -1,13 +1,14 @@
 # $OpenBSD: Makefile,v 1.5 2013/09/05 03:26:29 bentley Exp $
 
 COMMENT =              n64 emulator sdl audio plugin
+REVISION =             0
 
 # GPLv2+
 PERMIT_PACKAGE_CDROM = Yes
 
-WANTLIB =              SDL pthread samplerate speexdsp
+WANTLIB =              SDL2 pthread samplerate speexdsp
 LIB_DEPENDS =          audio/speex \
-                       devel/sdl \
+                       devel/sdl2 \
                        audio/libsamplerate
 
 MUPEN64PLUS_MOD =      audio-sdl
Index: core/Makefile
===================================================================
RCS file: /cvs/ports/emulators/mupen64plus/core/Makefile,v
retrieving revision 1.6
diff -u -p -u -p -r1.6 Makefile
--- core/Makefile       5 Sep 2013 03:26:29 -0000       1.6
+++ core/Makefile       20 Sep 2013 05:42:54 -0000
@@ -2,12 +2,13 @@
 
 COMMENT =              n64 emulator core
 SHARED_LIBS =          mupen64plus 2.2 # 2.0
+REVISION =             0
 
 # GPLv2+
 PERMIT_PACKAGE_CDROM = Yes
 
-WANTLIB =              GL GLU c m stdc++ z freetype png pthread SDL
-LIB_DEPENDS =          devel/sdl \
+WANTLIB =              GL GLU c m stdc++ z freetype png pthread SDL2
+LIB_DEPENDS =          devel/sdl2 \
                        graphics/png \
                        print/freetype
 
Index: core/patches/patch-src_api_vidext_sdl2_compat_h
===================================================================
RCS file: core/patches/patch-src_api_vidext_sdl2_compat_h
diff -N core/patches/patch-src_api_vidext_sdl2_compat_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ core/patches/patch-src_api_vidext_sdl2_compat_h     20 Sep 2013 05:42:54 
-0000
@@ -0,0 +1,35 @@
+$OpenBSD$
+
+Remove SDL unicode keycode compat code.
+
+From upstream rev 605:19666321119f.
+https://bitbucket.org/richard42/mupen64plus-core/commits/19666321119f641f535da20bdfe8cf6a3c6c13f6
+
+--- src/api/vidext_sdl2_compat.h.orig  Thu Sep 19 22:43:56 2013
++++ src/api/vidext_sdl2_compat.h       Thu Sep 19 22:44:07 2013
+@@ -529,25 +529,6 @@ SDL_CompatEventFilter(void *userdata, SDL_Event * even
+             SDL_PushEvent(&fake);
+             break;
+         }
+-    case SDL_KEYDOWN:
+-    case SDL_KEYUP:
+-        {
+-            Uint32 unicode = 0;
+-            if (event->key.type == SDL_KEYDOWN && event->key.keysym.sym < 
256) {
+-                unicode = event->key.keysym.sym;
+-                if (unicode >= 'a' && unicode <= 'z') {
+-                    int shifted = !!(event->key.keysym.mod & KMOD_SHIFT);
+-                    int capslock = !!(event->key.keysym.mod & KMOD_CAPS);
+-                    if ((shifted ^ capslock) != 0) {
+-                        unicode = SDL_toupper(unicode);
+-                    }
+-                }
+-            }
+-            if (unicode) {
+-                event->key.keysym.unicode = unicode;
+-            }
+-            break;
+-        }
+     case SDL_TEXTINPUT:
+         {
+             /* FIXME: Generate an old style key repeat event if needed */
Index: input-sdl/Makefile
===================================================================
RCS file: /cvs/ports/emulators/mupen64plus/input-sdl/Makefile,v
retrieving revision 1.5
diff -u -p -u -p -r1.5 Makefile
--- input-sdl/Makefile  5 Sep 2013 03:26:30 -0000       1.5
+++ input-sdl/Makefile  20 Sep 2013 05:42:54 -0000
@@ -1,12 +1,13 @@
 # $OpenBSD: Makefile,v 1.5 2013/09/05 03:26:30 bentley Exp $
 
 COMMENT =              n64 emulator input plugin
+REVISION =             0
 
 # GPLv2+
 PERMIT_PACKAGE_CDROM = Yes
 
-WANTLIB =              SDL pthread
-LIB_DEPENDS =          devel/sdl
+WANTLIB =              SDL2 pthread
+LIB_DEPENDS =          devel/sdl2
 
 MUPEN64PLUS_MOD =      input-sdl
 
Index: ui-console/Makefile
===================================================================
RCS file: /cvs/ports/emulators/mupen64plus/ui-console/Makefile,v
retrieving revision 1.7
diff -u -p -u -p -r1.7 Makefile
--- ui-console/Makefile 5 Sep 2013 03:26:31 -0000       1.7
+++ ui-console/Makefile 20 Sep 2013 05:42:54 -0000
@@ -1,12 +1,13 @@
 # $OpenBSD: Makefile,v 1.7 2013/09/05 03:26:31 bentley Exp $
 
 COMMENT =              n64 emulator command-line ui plugin
+REVISION =             0
 
 # GPLv2+
 PERMIT_PACKAGE_CDROM = Yes
 
-WANTLIB =              SDL c pthread
-LIB_DEPENDS =          devel/sdl
+WANTLIB =              SDL2 c pthread
+LIB_DEPENDS =          devel/sdl2
 
 MUPEN64PLUS_MOD =      ui-console
 
Index: video-glide64/Makefile
===================================================================
RCS file: /cvs/ports/emulators/mupen64plus/video-glide64/Makefile,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 Makefile
--- video-glide64/Makefile      5 Sep 2013 03:26:31 -0000       1.3
+++ video-glide64/Makefile      20 Sep 2013 05:42:54 -0000
@@ -1,6 +1,7 @@
 # $OpenBSD: Makefile,v 1.3 2013/09/05 03:26:31 bentley Exp $
 
 COMMENT =              n64 emulator video plugin
+REVISION =             0
 
 # XXX upstream was inconsistent with numbering this release (2.0 vs 2.0.0)
 VERSION =              2.0.0
@@ -10,8 +11,8 @@ PERMIT_PACKAGE_CDROM =        Yes
 
 WRKDIST =              ${WRKDIR}/mupen64plus-${MUPEN64PLUS_MOD}
 
-WANTLIB =              GL SDL c m pthread stdc++
-LIB_DEPENDS =          devel/sdl
+WANTLIB =              GL SDL2 c m pthread stdc++
+LIB_DEPENDS =          devel/sdl2
 
 MUPEN64PLUS_MOD =      video-glide64
 
Index: video-glide64mk2/Makefile
===================================================================
RCS file: /cvs/ports/emulators/mupen64plus/video-glide64mk2/Makefile,v
retrieving revision 1.1.1.1
diff -u -p -u -p -r1.1.1.1 Makefile
--- video-glide64mk2/Makefile   5 Sep 2013 03:32:36 -0000       1.1.1.1
+++ video-glide64mk2/Makefile   20 Sep 2013 05:42:55 -0000
@@ -1,6 +1,7 @@
 # $OpenBSD: Makefile,v 1.1.1.1 2013/09/05 03:32:36 bentley Exp $
 
 COMMENT =              n64 emulator video plugin
+REVISION =             0
 
 # GPLv2+
 PERMIT_PACKAGE_CDROM = Yes
@@ -9,8 +10,8 @@ MODULES =              gcc4
 MODGCC4_LANGS =                c c++
 MODGCC4_ARCHS =                i386 amd64
 
-WANTLIB =              GL SDL boost_filesystem boost_system c m png pthread z
-LIB_DEPENDS =          devel/boost devel/sdl graphics/png
+WANTLIB =              GL SDL2 boost_filesystem boost_system c m png pthread z
+LIB_DEPENDS =          devel/boost devel/sdl2 graphics/png
 
 MUPEN64PLUS_MOD =      video-glide64mk2
 
Index: video-rice/Makefile
===================================================================
RCS file: /cvs/ports/emulators/mupen64plus/video-rice/Makefile,v
retrieving revision 1.6
diff -u -p -u -p -r1.6 Makefile
--- video-rice/Makefile 5 Sep 2013 03:26:32 -0000       1.6
+++ video-rice/Makefile 20 Sep 2013 05:42:55 -0000
@@ -1,12 +1,13 @@
 # $OpenBSD: Makefile,v 1.6 2013/09/05 03:26:32 bentley Exp $
 
 COMMENT =              n64 emulator opengl video plugin
+REVISION =             0
 
 # GPLv2+
 PERMIT_PACKAGE_CDROM = Yes
 
-WANTLIB =              GL SDL m png pthread stdc++
-LIB_DEPENDS =          devel/sdl graphics/png
+WANTLIB =              GL SDL2 m png pthread stdc++
+LIB_DEPENDS =          devel/sdl2 graphics/png
 MUPEN64PLUS_MOD =      video-rice
 
 .include <bsd.port.mk>
Index: video-z64/Makefile
===================================================================
RCS file: /cvs/ports/emulators/mupen64plus/video-z64/Makefile,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 Makefile
--- video-z64/Makefile  5 Sep 2013 03:26:33 -0000       1.3
+++ video-z64/Makefile  20 Sep 2013 05:42:55 -0000
@@ -1,6 +1,7 @@
 # $OpenBSD: Makefile,v 1.3 2013/09/05 03:26:33 bentley Exp $
 
 COMMENT =              n64 emulator video plugin
+REVISION =             0
 
 # XXX upstream was inconsistent with numbering this release (2.0 vs 2.0.0)
 VERSION =              2.0.0
@@ -10,9 +11,9 @@ PERMIT_PACKAGE_CDROM =        Yes
 
 WRKDIST =              ${WRKDIR}/mupen64plus-${MUPEN64PLUS_MOD}
 
-WANTLIB =              GL GLEW SDL c m pthread stdc++
+WANTLIB =              GL GLEW SDL2 c m pthread stdc++
 LIB_DEPENDS =          graphics/glew \
-                       devel/sdl
+                       devel/sdl2
 
 MUPEN64PLUS_MOD =      video-z64
 

Reply via email to