Mercurial > mxe-octave
diff src/xine-lib-2-build_fixes.patch @ 3629:5aba05f2226e
update xine-lib, add mman-win32
* dist-files.mk: add mman-win32-1-include_name_change.patch, mman-win32.mk, add xine-lib-*.patch files.
* index.html: add mman-win32
* src/mman-win32-1-include_name_change.patch: new file.
* src/mman-win32.mk: new file.
* src/xine-lib-1-configure_ac.patch: new file
* src/xine-lib-1-fixes.patch: removed
* src/xine-lib-2-build_fixes.patch: new file.
* src/xine-lib-3-more_build_fixes.patch: new file
* src/xine-lib-4-mkdir.patch: new file.
* src/xine-lib-5-change_mma_h_to_mma_win32_h.patch: new file
* src/xine-lib.mk: update version
author | John Donoghue <john.donoghue@ieee.org> |
---|---|
date | Sun, 29 Jun 2014 15:46:35 -0400 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/xine-lib-2-build_fixes.patch Sun Jun 29 15:46:35 2014 -0400 @@ -0,0 +1,306 @@ +This file is part of MXE. +See index.html for further information. + +diff -urN xine-lib-1.2.4/configure.ac xine-lib-1.2.4-patch/configure.ac +--- xine-lib-1.2.4/configure.ac 2013-12-17 11:45:43.657189416 +0200 ++++ xine-lib-1.2.4-patch/configure.ac 2013-12-17 14:57:28.907822042 +0200 +@@ -544,7 +544,7 @@ + + if test "$WIN32_SYS" = "mingw32"; then + WIN32_INCLUDES='-I$(top_srcdir)/win32/include' +- LIBS="-lwinmm -lwsock32 $LIBS" ++ LIBS="-lwinmm -lwsock32 -lmman $LIBS" + LDFLAGS="-Wl,--enable-stdcall-fixup $LDFLAGS" + dnl iberty has been needed only in older versions + AC_CHECK_LIB(iberty, strncomp, [GOOM_LIBS="-liberty"]) +diff -urN xine-lib-1.2.4/include/xine/xine_internal.h xine-lib-1.2.4-patch/include/xine/xine_internal.h +--- xine-lib-1.2.4/include/xine/xine_internal.h 2013-09-18 13:04:54.000000000 +0300 ++++ xine-lib-1.2.4-patch/include/xine/xine_internal.h 2013-12-17 15:14:55.229127435 +0200 +@@ -55,6 +55,26 @@ + /* used by plugin loader */ + #define XINE_VERSION_CODE XINE_MAJOR_VERSION*10000+XINE_MINOR_VERSION*100+XINE_SUB_VERSION + ++// Add there to support them on MinGW ++#define timeradd(a, b, result) \ ++ do { \ ++ (result)->tv_sec = (a)->tv_sec + (b)->tv_sec; \ ++ (result)->tv_usec = (a)->tv_usec + (b)->tv_usec; \ ++ if ((result)->tv_usec >= 1000000L) { \ ++ ++(result)->tv_sec; \ ++ (result)->tv_usec -= 1000000L; \ ++ } \ ++ } while (0) ++ ++#define timersub(a, b, result) \ ++ do { \ ++ (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \ ++ (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \ ++ if ((result)->tv_usec < 0) { \ ++ --(result)->tv_sec; \ ++ (result)->tv_usec += 1000000L; \ ++ } \ ++ } while (0) + + /* + * log constants +diff -urN xine-lib-1.2.4/include/xine/xineutils.h xine-lib-1.2.4-patch/include/xine/xineutils.h +--- xine-lib-1.2.4/include/xine/xineutils.h 2013-09-18 13:04:54.000000000 +0300 ++++ xine-lib-1.2.4-patch/include/xine/xineutils.h 2013-12-20 12:29:33.465030673 +0200 +@@ -119,8 +119,8 @@ + + + /* Optimized/fast memcpy */ +- +-extern void *(* xine_fast_memcpy)(void *to, const void *from, size_t len) XINE_PROTECTED; ++//extern void *xine_fast_memcpy(void *to, const void *from, size_t len); ++#define xine_fast_memcpy(a, b, c) memcpy(a, b, c) + + /* + * Debug stuff +diff -urN xine-lib-1.2.4/misc/Makefile.am xine-lib-1.2.4-patch/misc/Makefile.am +--- xine-lib-1.2.4/misc/Makefile.am 2012-02-05 21:17:01.000000000 +0200 ++++ xine-lib-1.2.4-patch/misc/Makefile.am 2013-12-19 09:20:56.937982071 +0200 +@@ -21,7 +21,7 @@ + pkgconfig_DATA=libxine.pc + + xine_list_@XINE_SERIES@_SOURCES = xine-list.c +-xine_list_@XINE_SERIES@_LDADD = $(XINE_LIB) ++xine_list_@XINE_SERIES@_LDADD = $(XINE_LIB) $(top_builddir)/src/xine-utils/libxineutils.la + + fontdir = $(pkgdatadir)/fonts + dist_font_DATA = \ +diff -urN xine-lib-1.2.4/src/audio_dec/xine_lpcm_decoder.c xine-lib-1.2.4-patch/src/audio_dec/xine_lpcm_decoder.c +--- xine-lib-1.2.4/src/audio_dec/xine_lpcm_decoder.c 2013-09-18 13:04:54.000000000 +0300 ++++ xine-lib-1.2.4-patch/src/audio_dec/xine_lpcm_decoder.c 2013-12-17 15:18:20.459131654 +0200 +@@ -41,7 +41,11 @@ + #include <sys/types.h> + #include <sys/stat.h> + #include <fcntl.h> ++#ifdef __MINGW32__ ++#include <winsock.h> ++#else + #include <arpa/inet.h> /* htons */ ++#endif + #include <netinet/in.h> /* ntohs */ + + #include <xine/xine_internal.h> +diff -urN xine-lib-1.2.4/src/demuxers/demux_ts.c xine-lib-1.2.4-patch/src/demuxers/demux_ts.c +--- xine-lib-1.2.4/src/demuxers/demux_ts.c 2013-09-23 23:56:56.000000000 +0300 ++++ xine-lib-1.2.4-patch/src/demuxers/demux_ts.c 2013-12-18 12:04:09.269573623 +0200 +@@ -146,7 +146,11 @@ + #include <fcntl.h> + #include <unistd.h> + #include <string.h> +-#include <arpa/inet.h> ++#ifdef __MINGW32__ ++#include <winsock.h> ++#else ++#include <arpa/inet.h> /* htons */ ++#endif + + #ifdef HAVE_FFMPEG_AVUTIL_H + # include <crc.h> +diff -urN xine-lib-1.2.4/src/input/libdvdnav/dvdnav_internal.h xine-lib-1.2.4-patch/src/input/libdvdnav/dvdnav_internal.h +--- xine-lib-1.2.4/src/input/libdvdnav/dvdnav_internal.h 2009-11-30 23:28:34.000000000 +0200 ++++ xine-lib-1.2.4-patch/src/input/libdvdnav/dvdnav_internal.h 2013-12-18 11:56:09.153450165 +0200 +@@ -64,11 +64,11 @@ + /* pthread_mutex_* wrapper for win32 */ + #include <windows.h> + #include <process.h> +-typedef CRITICAL_SECTION pthread_mutex_t; +-#define pthread_mutex_init(a, b) InitializeCriticalSection(a) +-#define pthread_mutex_lock(a) EnterCriticalSection(a) +-#define pthread_mutex_unlock(a) LeaveCriticalSection(a) +-#define pthread_mutex_destroy(a) ++// typedef CRITICAL_SECTION pthread_mutex_t; ++// #define pthread_mutex_init(a, b) InitializeCriticalSection(a) ++// #define pthread_mutex_lock(a) EnterCriticalSection(a) ++// #define pthread_mutex_unlock(a) LeaveCriticalSection(a) ++// #define pthread_mutex_destroy(a) + + #include <io.h> /* read() */ + #define lseek64 _lseeki64 +diff -urN xine-lib-1.2.4/src/post/deinterlace/speedy.c xine-lib-1.2.4-patch/src/post/deinterlace/speedy.c +--- xine-lib-1.2.4/src/post/deinterlace/speedy.c 2012-05-26 23:49:59.000000000 +0300 ++++ xine-lib-1.2.4-patch/src/post/deinterlace/speedy.c 2013-12-20 12:24:59.608986588 +0200 +@@ -1392,28 +1392,28 @@ + } + #endif + +- +-#define speedy_memcpy_c xine_fast_memcpy +-#define speedy_memcpy_mmx xine_fast_memcpy +-#define speedy_memcpy_mmxext xine_fast_memcpy ++//#undef xine_fast_memcpy ++//#define speedy_memcpy_c xine_fast_memcpy ++//#define speedy_memcpy_mmx xine_fast_memcpy ++//#define speedy_memcpy_mmxext xine_fast_memcpy + + + static void blit_packed422_scanline_c( uint8_t *dest, const uint8_t *src, int width ) + { +- speedy_memcpy_c( dest, src, width*2 ); ++ memcpy( dest, src, width*2 ); + } + + #if defined(ARCH_X86) || defined(ARCH_X86_64) + static void blit_packed422_scanline_mmx( uint8_t *dest, const uint8_t *src, int width ) + { +- speedy_memcpy_mmx( dest, src, width*2 ); ++ memcpy( dest, src, width*2 ); + } + #endif + + #if defined(ARCH_X86) || defined(ARCH_X86_64) + static void blit_packed422_scanline_mmxext( uint8_t *dest, const uint8_t *src, int width ) + { +- speedy_memcpy_mmxext( dest, src, width*2 ); ++ memcpy( dest, src, width*2 ); + } + #endif + +@@ -2602,7 +2602,8 @@ + kill_chroma_packed422_inplace_scanline = kill_chroma_packed422_inplace_scanline_c; + mirror_packed422_inplace_scanline = mirror_packed422_inplace_scanline_c; + halfmirror_packed422_inplace_scanline = halfmirror_packed422_inplace_scanline_c; +- speedy_memcpy = speedy_memcpy_c; ++ speedy_memcpy = memcpy; ++ //speedy_memcpy = speedy_memcpy_c; + diff_packed422_block8x8 = diff_packed422_block8x8_c; + a8_subpix_blit_scanline = a8_subpix_blit_scanline_c; + quarter_blit_vertical_packed422_scanline = quarter_blit_vertical_packed422_scanline_c; +@@ -2644,7 +2645,8 @@ + invert_colour_packed422_inplace_scanline = invert_colour_packed422_inplace_scanline_mmx; + vfilter_chroma_121_packed422_scanline = vfilter_chroma_121_packed422_scanline_mmx; + vfilter_chroma_332_packed422_scanline = vfilter_chroma_332_packed422_scanline_mmx; +- speedy_memcpy = speedy_memcpy_mmxext; ++ //speedy_memcpy = speedy_memcpy_mmxext; ++ speedy_memcpy = memcpy; + } else if( speedy_accel & MM_ACCEL_X86_MMX ) { + if( verbose ) { + printf( "speedycode: Using MMX optimized functions.\n" ); +@@ -2660,7 +2662,8 @@ + invert_colour_packed422_inplace_scanline = invert_colour_packed422_inplace_scanline_mmx; + vfilter_chroma_121_packed422_scanline = vfilter_chroma_121_packed422_scanline_mmx; + vfilter_chroma_332_packed422_scanline = vfilter_chroma_332_packed422_scanline_mmx; +- speedy_memcpy = speedy_memcpy_mmx; ++ //speedy_memcpy = speedy_memcpy_mmx; ++ speedy_memcpy = memcpy; + } else { + if( verbose ) { + printf( "speedycode: No MMX or MMXEXT support detected, using C fallbacks.\n" ); +diff -urN xine-lib-1.2.4/src/vdr/input_vdr.c xine-lib-1.2.4-patch/src/vdr/input_vdr.c +--- xine-lib-1.2.4/src/vdr/input_vdr.c 2013-09-18 13:04:54.000000000 +0300 ++++ xine-lib-1.2.4-patch/src/vdr/input_vdr.c 2013-12-20 12:23:36.313756861 +0200 +@@ -28,13 +28,13 @@ + #include <fcntl.h> + #include <unistd.h> + #include <sys/stat.h> +-#include <sys/poll.h> ++// #include <sys/poll.h> + #include <errno.h> + #include <pthread.h> + + #include <sys/socket.h> + #include <netinet/in.h> +-#include <resolv.h> ++// #include <resolv.h> + #include <netdb.h> + + #define LOG_MODULE "input_vdr" +@@ -1919,7 +1919,7 @@ + filename = strdup(filename); + + _x_mrl_unescape (filename); +- this->fh = xine_open_cloexec(filename, O_RDONLY | O_NONBLOCK); ++ this->fh = xine_open_cloexec(filename, O_RDONLY); + + lprintf("filename '%s'\n", filename); + +@@ -1934,7 +1934,7 @@ + } + + { +- struct pollfd poll_fh = { this->fh, POLLIN, 0 }; ++ /*struct pollfd poll_fh = { this->fh, POLLIN, 0 }; + + int r = poll(&poll_fh, 1, 300); + if (1 != r) +@@ -1945,10 +1945,10 @@ + _("timeout expired during setup phase")); + free (filename); + return 0; +- } ++ }*/ + } + +- fcntl(this->fh, F_SETFL, ~O_NONBLOCK & fcntl(this->fh, F_GETFL, 0)); ++ //fcntl(this->fh, F_SETFL, ~O_NONBLOCK & fcntl(this->fh, F_GETFL, 0)); + + /* eat initial handshake byte */ + { +@@ -2098,7 +2098,7 @@ + if ((this->fh = vdr_plugin_open_socket(this, host, port + 0)) == -1) + return 0; + +- fcntl(this->fh, F_SETFL, ~O_NONBLOCK & fcntl(this->fh, F_GETFL, 0)); ++ //fcntl(this->fh, F_SETFL, ~O_NONBLOCK & fcntl(this->fh, F_GETFL, 0)); + + if ((this->fh_control = vdr_plugin_open_socket(this, host, port + 1)) == -1) + return 0; +diff -urN xine-lib-1.2.4/src/video_dec/libjpeg.c xine-lib-1.2.4-patch/src/video_dec/libjpeg.c +--- xine-lib-1.2.4/src/video_dec/libjpeg.c 2012-11-23 22:08:21.000000000 +0200 ++++ xine-lib-1.2.4-patch/src/video_dec/libjpeg.c 2013-12-18 10:01:45.755428630 +0200 +@@ -26,6 +26,7 @@ + #endif + + ++ + #include <stdlib.h> + #include <string.h> + #include <sys/types.h> +@@ -33,6 +34,7 @@ + #include <fcntl.h> + #include <unistd.h> + #include <stdio.h> ++#include <basetsd.h> + + #define LOG_MODULE "jpeg_video_decoder" + #define LOG_VERBOSE +diff -urN xine-lib-1.2.4/src/xine-utils/memcpy.c xine-lib-1.2.4-patch/src/xine-utils/memcpy.c +--- xine-lib-1.2.4/src/xine-utils/memcpy.c 2013-09-18 19:58:32.000000000 +0300 ++++ xine-lib-1.2.4-patch/src/xine-utils/memcpy.c 2013-12-20 12:30:01.733448201 +0200 +@@ -55,7 +55,7 @@ + #include <xine/xine_internal.h> + #include "../xine-engine/xine_private.h" + +-void *(* xine_fast_memcpy)(void *to, const void *from, size_t len); ++ + + /* Original comments from mplayer (file: aclib.c) + This part of code was taken by me from Linux-2.4.3 and slightly modified +@@ -558,7 +558,7 @@ + && (config_flags & memcpy_method[method].cpu_require) == + memcpy_method[method].cpu_require ) { + lprintf("using %s memcpy()\n", memcpy_method[method].name ); +- xine_fast_memcpy = memcpy_method[method].function; ++ // xine_fast_memcpy = memcpy_method[method].function; + return; + } else { + xprintf(xine, XINE_VERBOSITY_DEBUG, "xine: will probe memcpy on startup\n" ); +@@ -603,13 +603,13 @@ + (config_flags & memcpy_method[best].cpu_require) == + memcpy_method[best].cpu_require ) { + lprintf("using %s memcpy()\n", memcpy_method[best].name ); +- xine_fast_memcpy = memcpy_method[best].function; ++ // xine_fast_memcpy = memcpy_method[best].function; + return; + } + + best = 0; + +- xine_fast_memcpy = memcpy; ++ // xine_fast_memcpy = memcpy; + + if( (buf1 = malloc(BUFSIZE)) == NULL ) + return;