--- /dev/null
+--- DirectFB-1.7.7/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_timidity.c.orig 2013-12-19 01:16:24.000000000 +0100
++++ DirectFB-1.7.7/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_timidity.c 2017-12-17 20:40:00.879730101 +0100
+@@ -114,6 +114,29 @@
+ }
+
+ static int
++seek_callback( void *ctx, long offset, int whence )
++{
++ IFusionSoundMusicProvider_Timidity_data *data = ctx;
++ if (direct_stream_seekable( data->st )) {
++ long newpos;
++ switch (whence) {
++ case SEEK_SET: newpos = offset; break;
++ case SEEK_CUR: newpos = direct_stream_offset( data->st ) + offset; break;
++ case SEEK_END: newpos = direct_stream_length( data->st ) + offset; break;
++ default: return -1;
++ }
++ direct_stream_seek( data->st, newpos );
++ } else return -1; // not seekable
++}
++
++static long
++tell_callback( void *ctx )
++{
++ IFusionSoundMusicProvider_Timidity_data *data = ctx;
++ return direct_stream_offset( data->st );
++}
++
++static int
+ close_callback( void *ctx )
+ {
+ return 0;
+@@ -363,7 +386,7 @@
+ Timidity_Stop( data, false );
+
+ direct_stream_seek( data->st, 0 );
+- stream = mid_istream_open_callbacks( read_callback, close_callback, data );
++ stream = mid_istream_open_callbacks( read_callback, seek_callback, tell_callback, close_callback, data );
+ if (!stream) {
+ D_ERROR( "IFusionSoundMusicProvider_Timidity: couldn't open input stream!\n" );
+ pthread_mutex_unlock( &data->lock );
+@@ -510,7 +533,7 @@
+ Timidity_Stop( data, false );
+
+ direct_stream_seek( data->st, 0 );
+- stream = mid_istream_open_callbacks( read_callback, close_callback, data );
++ stream = mid_istream_open_callbacks( read_callback, seek_callback, tell_callback, close_callback, data );
+ if (!stream) {
+ D_ERROR( "IFusionSoundMusicProvider_Timidity: couldn't open input stream!\n" );
+ pthread_mutex_unlock( &data->lock );
--- /dev/null
+--- DirectFB-1.7.7/configure.in.orig 2017-12-17 18:38:22.309813442 +0100
++++ DirectFB-1.7.7/configure.in 2017-12-17 18:44:16.376476061 +0100
+@@ -2454,11 +2454,12 @@
+
+ enable_tslib=no
+ if test "$checkfor_tslib" = "yes"; then
+- PKG_CHECK_MODULES([TSLIB], [tslib-1.0 >= 1.0.0], [enable_tslib=yes], [enable_tslib=no])
+- if test "$enable_tslib" = "no"; then
+- PKG_CHECK_MODULES([TSLIB], [tslib-0.0], [enable_tslib=yes], [enable_tslib=no
++ PKG_CHECK_MODULES([TSLIB], [tslib >= 1.0], [enable_tslib=yes],
++ [PKG_CHECK_MODULES([TSLIB], [tslib-1.0 >= 1.0.0], [enable_tslib=yes],
++ [PKG_CHECK_MODULES([TSLIB], [tslib-0.0], [enable_tslib=yes], [enable_tslib=no
+ AC_MSG_WARN([*** no tslib -- tslib driver will not be built.])])
+- fi
++ ])
++ ])
+ fi
+
+ enable_ucb1x00_ts=no
Summary(pl.UTF-8): DirectFB - Wspomaganie grafiki
Name: DirectFB
Version: 1.7.7
-Release: 2
+Release: 3
Epoch: 1
License: LGPL v2+
Group: Libraries
Patch11: %{name}-format.patch
Patch12: x32-asm.patch
Patch13: ffmpeg3.patch
+Patch14: %{name}-tslib.patch
+Patch15: %{name}-libtimidity.patch
URL: http://www.directfb.net/
BuildRequires: Mesa-libEGL-devel
BuildRequires: Mesa-libGLES-devel
BuildRequires: libstdc++-devel
BuildRequires: libsvg-cairo-devel >= 0.1.6
BuildRequires: libtiff-devel >= 4
-BuildRequires: libtimidity-devel >= 0.1.0
+BuildRequires: libtimidity-devel >= 0.2.0
BuildRequires: libtool
BuildRequires: libvdpau-devel >= 0.3
BuildRequires: libvncserver-devel
Group: Libraries
URL: http://www.directfb.org/index.php?path=Platform/FusionSound
Requires: FusionSound = %{epoch}:%{version}-%{release}
+Requires: libtimidity >= 0.2.0
%description -n FusionSound-musicprovider-timidity
MIDI libtimidity music provider module for FusionSound.
%patch11 -p1
%patch12 -p1
%patch13 -p1
+%patch14 -p1
+%patch15 -p1
# video drivers
%{__sed} -i -e 's/checkfor_\(cle266\|cyber5k\|radeon\|savage\|unichrome\|vmware\)=no/checkfor_\1=yes/' configure.in