Prepared updated diff after some off-list discussion with awolk@ and
sthen@. I've tested it with the consumers that I had anything to run
with (I don't have roms to test emulators and none of the id games).
The following consumers run with brief testing of 2-5 minutes:
audiality2,sdl2-gfx/-net(via manaplus),sdl2-image/-mixer(via cataclysm),
0ad,blobwars,cataclysm-dda,chromium-bsu,koboredux,lugaru,megaglest,
neverball,redeclipse(1.6.0),scummvm,sdlpop,starfighter,stone-soup,
tbftss,tome4,warzone2100,imv,mpv
The only one that doesn't run of the tested ports is speeddreams, but
I understand this didn't launch with SDL2 for a different reason prior
to this (https://marc.info/?l=openbsd-ports&m=151415029920289&w=2).
Speed dreams may need a closer look then at some point. Here is the
console log that I'm getting: https://pastebin.com/TrKWBbeH
Some points about the diff:
- disabled jack audio which is otherwise built now
- now ldepends on libsamplerate
- it seems that several applications like speed dreams, sdl-jstest, and
FNA games only accept gamecontroller API if haptic (force feedback)
is supported. This patch circumvents this by not returning
SDL_SetError in that case, working at least with sdl-jstest and FNA
games, and removing at least this error message from speed dreams
- the x11window patch is no longer needed (upstream fixed it)
Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/sdl2/Makefile,v
retrieving revision 1.18
diff -u -p -r1.18 Makefile
--- Makefile 23 Oct 2017 17:10:38 -0000 1.18
+++ Makefile 7 Jan 2018 20:04:41 -0000
@@ -1,19 +1,23 @@
# $OpenBSD: Makefile,v 1.18 2017/10/23 17:10:38 sthen Exp $
COMMENT= cross-platform multimedia library
-BROKEN-hppa= src/atomic/SDL_spinlock.c:101:2: error: \#error Please implement for your platform.
+BROKEN-hppa= src/atomic/SDL_spinlock.c:101:2: error: \
+ #error Please implement for your platform.
-V= 2.0.5
-REVISION= 2
+V= 2.0.7
DISTNAME= SDL2-${V}
PKGNAME= sdl2-${V}
CATEGORIES= devel
MASTER_SITES= http://www.libsdl.org/release/
-SHARED_LIBS= SDL2 0.3
+SHARED_LIBS= SDL2 0.4 # 0.7
+
+LIB_DEPENDS= audio/libsamplerate
HOMEPAGE= http://www.libsdl.org/
+MAINTANER= Thomas Frohwein <frohwein@ymail.com>
+
# zlib
PERMIT_PACKAGE_CDROM= Yes
@@ -29,6 +33,7 @@ CONFIGURE_ARGS+= --disable-alsa \
--disable-dbus \
--disable-esd \
--disable-ibus \
+ --disable-jack \
--disable-libudev \
--disable-nas \
--disable-oss \
@@ -37,7 +42,7 @@ CONFIGURE_ARGS+= --disable-alsa \
CONFIGURE_ENV+= ac_cv_lib_usb_hid_init=no \
ac_cv_header_usb_h=no
-WANTLIB= m pthread sndio usbhid
+WANTLIB= m pthread sndio usbhid samplerate
# GL/X11/Xext/Xrender/Xrandr are dlopen'd by SDL
WANTLIB+= GL X11 Xau Xdmcp Xext Xrandr Xrender xcb
Index: distinfo
===================================================================
RCS file: /cvs/ports/devel/sdl2/distinfo,v
retrieving revision 1.5
diff -u -p -r1.5 distinfo
--- distinfo 10 Nov 2016 10:08:04 -0000 1.5
+++ distinfo 7 Jan 2018 20:04:41 -0000
@@ -1,2 +1,2 @@
-SHA256 (SDL2-2.0.5.tar.gz) = RCA4z1WWWWny/wbZdgMYE95kOvnJ7cnjMb12HCQuh4U=
-SIZE (SDL2-2.0.5.tar.gz) = 4209352
+SHA256 (SDL2-2.0.7.tar.gz) = 7jXHTEMT4u2hBLFLG4b324SgTuq5Qw1W4AHOomi/TV4=
+SIZE (SDL2-2.0.7.tar.gz) = 4432499
Index: patches/patch-Makefile_in
===================================================================
RCS file: /cvs/ports/devel/sdl2/patches/patch-Makefile_in,v
retrieving revision 1.3
diff -u -p -r1.3 patch-Makefile_in
--- patches/patch-Makefile_in 10 Nov 2016 10:08:04 -0000 1.3
+++ patches/patch-Makefile_in 7 Jan 2018 20:04:41 -0000
@@ -1,11 +1,14 @@
$OpenBSD: patch-Makefile_in,v 1.3 2016/11/10 10:08:04 jca Exp $
---- Makefile.in.orig Thu Oct 20 05:56:26 2016
-+++ Makefile.in Thu Oct 20 22:23:28 2016
-@@ -121,7 +121,7 @@ LT_AGE = @LT_AGE@
+
+Should make sure only libSDL2, not libSDL2-2.0 are installed
+Index: Makefile.in
+--- Makefile.in.orig
++++ Makefile.in
+@@ -122,7 +122,7 @@ LT_AGE = @LT_AGE@
LT_CURRENT = @LT_CURRENT@
LT_RELEASE = @LT_RELEASE@
LT_REVISION = @LT_REVISION@
--LT_LDFLAGS = -no-undefined -rpath $(DESTDIR)$(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
+-LT_LDFLAGS = -no-undefined -rpath $(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
+LT_LDFLAGS = -no-undefined -rpath $(DESTDIR)$(libdir) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET)
Index: patches/patch-src_SDL_c
===================================================================
RCS file: patches/patch-src_SDL_c
diff -N patches/patch-src_SDL_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_SDL_c 7 Jan 2018 20:04:41 -0000
@@ -0,0 +1,27 @@
+$OpenBSD$
+
+disable breaking if no haptic feedback support which disallows gamecontroller API
+pretend to be Linux in SDL_GetPlatform to allow compatibility with FNA games
+until OpenBSD support has been rolled out (estimated end of 2018)
+
+Index: src/SDL.c
+--- src/SDL.c.orig
++++ src/SDL.c
+@@ -227,8 +227,6 @@ SDL_InitSubSystem(Uint32 flags)
+ }
+ }
+ SDL_PrivateSubsystemRefCountIncr(SDL_INIT_HAPTIC);
+-#else
+- return SDL_SetError("SDL not built with haptic (force feedback) support");
+
No comments:
Post a Comment