[packages/DirectFB] - added tslib patch (handle tslib >= 1.4) - added libtimidity patch (adjust for libtimidity 0.2.x) -

qboosh qboosh at pld-linux.org
Sun Dec 17 21:02:44 CET 2017


commit abe160a68011b9541201e4662d06bca7f8ffce73
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Dec 17 21:03:47 2017 +0100

    - added tslib patch (handle tslib >= 1.4)
    - added libtimidity patch (adjust for libtimidity 0.2.x)
    - release 3

 DirectFB-libtimidity.patch | 50 ++++++++++++++++++++++++++++++++++++++++++++++
 DirectFB-tslib.patch       | 19 ++++++++++++++++++
 DirectFB.spec              |  9 +++++++--
 3 files changed, 76 insertions(+), 2 deletions(-)
---
diff --git a/DirectFB.spec b/DirectFB.spec
index 457c702..aad4c82 100644
--- a/DirectFB.spec
+++ b/DirectFB.spec
@@ -25,7 +25,7 @@ Summary:	DirectFB - Hardware graphics acceleration
 Summary(pl.UTF-8):	DirectFB - Wspomaganie grafiki
 Name:		DirectFB
 Version:	1.7.7
-Release:	2
+Release:	3
 Epoch:		1
 License:	LGPL v2+
 Group:		Libraries
@@ -50,6 +50,8 @@ Patch10:	%{name}-libmpeg3.patch
 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
@@ -77,7 +79,7 @@ BuildRequires:	libpng-devel >= 2:1.4.0
 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
@@ -862,6 +864,7 @@ Summary(pl.UTF-8):	Moduł FusionSound dostarczający muzykę MIDI przez libtimid
 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.
@@ -944,6 +947,8 @@ Statyczna biblioteka sawman.
 %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
diff --git a/DirectFB-libtimidity.patch b/DirectFB-libtimidity.patch
new file mode 100644
index 0000000..2704610
--- /dev/null
+++ b/DirectFB-libtimidity.patch
@@ -0,0 +1,50 @@
+--- 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 );
diff --git a/DirectFB-tslib.patch b/DirectFB-tslib.patch
new file mode 100644
index 0000000..699ec05
--- /dev/null
+++ b/DirectFB-tslib.patch
@@ -0,0 +1,19 @@
+--- 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
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/DirectFB.git/commitdiff/abe160a68011b9541201e4662d06bca7f8ffce73



More information about the pld-cvs-commit mailing list