diff options
author | 2009-02-21 01:42:31 +0000 | |
---|---|---|
committer | 2009-02-21 01:42:31 +0000 | |
commit | 57022cca19b4482807efda3e592ef67c7efbba9e (patch) | |
tree | 151f11c6a7f10cf2832cca1df1f0d097f7531529 /media-tv/xbmc/files | |
parent | Version bump (diff) | |
download | gentoo-2-57022cca19b4482807efda3e592ef67c7efbba9e.tar.gz gentoo-2-57022cca19b4482807efda3e592ef67c7efbba9e.tar.bz2 gentoo-2-57022cca19b4482807efda3e592ef67c7efbba9e.zip |
Initial ebuild by many people at #198849 (Peter Fern, Rick Harris, etc...) cleaned up by me.
(Portage version: 2.2_rc23/cvs/Linux x86_64)
Diffstat (limited to 'media-tv/xbmc/files')
-rw-r--r-- | media-tv/xbmc/files/xbmc-alsa-params.patch | 17 | ||||
-rw-r--r-- | media-tv/xbmc/files/xbmc-fribidi.patch | 51 | ||||
-rw-r--r-- | media-tv/xbmc/files/xbmc-noexec.patch | 12 | ||||
-rw-r--r-- | media-tv/xbmc/files/xbmc-readsector.patch | 83 |
4 files changed, 163 insertions, 0 deletions
diff --git a/media-tv/xbmc/files/xbmc-alsa-params.patch b/media-tv/xbmc/files/xbmc-alsa-params.patch new file mode 100644 index 000000000000..a15a4b95474a --- /dev/null +++ b/media-tv/xbmc/files/xbmc-alsa-params.patch @@ -0,0 +1,17 @@ +http://xbmc.org/trac/ticket/5946 +http://xbmc.org/forum/archive/index.php/t-29076.html + +we cannot call snd_pcm_bytes_to_frames() as it requires the hw_params to be +committed via snd_pcm_hw_params() as that is what sets up pcm->frame_bits + +--- XBMC/xbmc/cores/AudioRenderers/ALSADirectSound.cpp ++++ XBMC/xbmc/cores/AudioRenderers/ALSADirectSound.cpp +@@ -200,7 +200,7 @@ + nErr = snd_pcm_hw_params_set_period_size_near(m_pPlayHandle, hw_params, &m_maxFrames, 0); + CHECK_ALSA_RETURN(LOGERROR,"hw_params_set_period_size",nErr); + +- m_BufferSize = snd_pcm_bytes_to_frames(m_pPlayHandle,m_dwPacketSize * 10); // buffer big enough - but not too big... ++ m_BufferSize = m_dwPacketSize * 10; // buffer big enough - but not too big... + nErr = snd_pcm_hw_params_set_buffer_size_near(m_pPlayHandle, hw_params, &m_BufferSize); + CHECK_ALSA_RETURN(LOGERROR,"hw_params_set_buffer_size",nErr); + diff --git a/media-tv/xbmc/files/xbmc-fribidi.patch b/media-tv/xbmc/files/xbmc-fribidi.patch new file mode 100644 index 000000000000..1ae6903c072f --- /dev/null +++ b/media-tv/xbmc/files/xbmc-fribidi.patch @@ -0,0 +1,51 @@ +http://xbmc.org/trac/ticket/5283 + +--- xbmc/utils/ArabicShaping.cpp ++++ xbmc/utils/ArabicShaping.cpp +@@ -148,10 +148,10 @@ + for (int i = 0; i < MAP_LENGTH; i++)
+ {
+ if (charsMap[i].code == c)
+- return FRIBIDI_TRUE;
++ return true;
+ }
+
+- return FRIBIDI_FALSE;
++ return false;
+ }
+
+ static CharRep GetCharRep(FriBidiChar c)
+@@ -186,9 +186,9 @@ + for (i = 0; i < TRANS_CHARS_LENGTH; i++)
+ {
+ if (transChars[i] == c)
+- return FRIBIDI_TRUE;
++ return true;
+ }
+- return FRIBIDI_FALSE;
++ return false;
+ }
+
+ FriBidiChar* shape_arabic(FriBidiChar * str, int len)
+--- xbmc/utils/ArabicShaping.h ++++ xbmc/utils/ArabicShaping.h +@@ -30,7 +30,7 @@ + #include "lib/libfribidi/fribidi.h"
+ #else
+ #include <fribidi/fribidi.h>
+-#include <fribidi/fribidi_char_sets.h>
++#include <fribidi/fribidi-char-sets.h>
+ #endif
+
+ /**
+--- xbmc/utils/CharsetConverter.cpp ++++ xbmc/utils/CharsetConverter.cpp +@@ -30,7 +30,7 @@ + #else + #include <iconv.h> + #include <fribidi/fribidi.h> +-#include <fribidi/fribidi_char_sets.h> ++#include <fribidi/fribidi-char-sets.h> + #endif + + #ifdef __APPLE__ diff --git a/media-tv/xbmc/files/xbmc-noexec.patch b/media-tv/xbmc/files/xbmc-noexec.patch new file mode 100644 index 000000000000..f93919fc26c6 --- /dev/null +++ b/media-tv/xbmc/files/xbmc-noexec.patch @@ -0,0 +1,12 @@ +http://xbmc.org/trac/ticket/5945 + +--- xbmc/lib/libPython/XBPythonDllFuncs.S ++++ xbmc/lib/libPython/XBPythonDllFuncs.S +@@ -83,3 +83,7 @@ + FUNCTION(PyFloat_FromDouble) + + #endif ++ ++#if defined(__linux__) && defined(__ELF__) ++.section .note.GNU-stack,"",%progbits ++#endif diff --git a/media-tv/xbmc/files/xbmc-readsector.patch b/media-tv/xbmc/files/xbmc-readsector.patch new file mode 100644 index 000000000000..ceca6cc9d3dd --- /dev/null +++ b/media-tv/xbmc/files/xbmc-readsector.patch @@ -0,0 +1,83 @@ +Enable support for XBMC to read data DVD discs +http://xbmc.org/trac/ticket/5296 + +--- xbmc/xbmc/xbox/IoSupport.cpp ++++ xbmc/xbmc/xbox/IoSupport.cpp +@@ -40,6 +40,7 @@ + #include <linux/limits.h> + #include <sys/types.h> + #include <sys/ioctl.h> ++#include <unistd.h> + #include <fcntl.h> + #include <linux/cdrom.h> + #endif +@@ -445,37 +446,31 @@ + if (hDevice->m_bCDROM) + { + int fd = hDevice->fd; +- int lba = (dwSector + CD_MSF_OFFSET) ; +- int m,s,f; +- union +- { +- struct cdrom_msf msf; +- char buffer[2356]; +- } arg; + +- // convert sector offset to minute, second, frame format +- // since that is what the 'ioctl' requires as input +- f = lba % CD_FRAMES; +- lba /= CD_FRAMES; +- s = lba % CD_SECS; +- lba /= CD_SECS; +- m = lba; ++ // seek to requested sector ++ if (lseek(fd, dwSector * MODE1_DATA_SIZE, SEEK_SET) < 0) ++ { ++ CLog::Log(LOGERROR, "CD: ReadSector Request to read sector %d\n", (int)dwSector); ++ CLog::Log(LOGERROR, "CD: ReadSector error: %s\n", strerror(errno)); ++ OutputDebugString("CD Read error\n"); ++ return (-1); ++ } + +- arg.msf.cdmsf_min0 = m; +- arg.msf.cdmsf_sec0 = s; +- arg.msf.cdmsf_frame0 = f; +- +- int ret = ioctl(fd, CDROMREADMODE1, &arg); +- if (ret==0) ++ // read data block of this sector ++ while (read(fd, lpczBuffer, MODE1_DATA_SIZE) < 0) + { +- memcpy(lpczBuffer, arg.buffer, 2048); +- return 2048; ++ // read was interrupted - try again ++ if (errno == EINTR) ++ continue; ++ ++ // error reading sector ++ CLog::Log(LOGERROR, "CD: ReadSector Request to read sector %d\n", (int)dwSector); ++ CLog::Log(LOGERROR, "CD: ReadSector error: %s\n", strerror(errno)); ++ OutputDebugString("CD Read error\n"); ++ return (-1); + } +- CLog::Log(LOGERROR, "CD: ReadSector Request to read sector %d\n", (int)dwSector); +- CLog::Log(LOGERROR, "CD: ReadSector error: %s\n", strerror(errno)); +- CLog::Log(LOGERROR, "CD: ReadSector minute %d, second %d, frame %d\n", m, s, f); +- OutputDebugString("CD Read error\n"); +- return -1; ++ ++ return MODE1_DATA_SIZE; + } + #endif + LARGE_INTEGER Displacement; +--- xbmc/xbmc/xbox/IoSupport.h ++++ xbmc/xbmc/xbox/IoSupport.h +@@ -40,6 +40,8 @@ + #define DRIVE_CLOSED_MEDIA_PRESENT 4 // Will be send once when the drive just have closed + #define DRIVE_NONE 5 // system doesn't have an optical drive + ++#define MODE1_DATA_SIZE 2048 // Mode1 sector has 2048 bytes of data ++ + #define MODE2_DATA_START 24 // Mode2 raw sector has 24 bytes before the data payload + #define MODE2_DATA_SIZE 2324 // And has 2324 usable bytes + #define RAW_SECTOR_SIZE 2352 // Raw sector size |