diff options
Diffstat (limited to 'contrib/libmp4v2')
-rw-r--r-- | contrib/libmp4v2/P00-mingw-static.patch | 16 | ||||
-rw-r--r-- | contrib/libmp4v2/P01-mingw-msvcrt-lower.patch | 31 | ||||
-rw-r--r-- | contrib/libmp4v2/P02-mingw-configure.patch | 26 | ||||
-rw-r--r-- | contrib/libmp4v2/module.defs | 12 |
4 files changed, 83 insertions, 2 deletions
diff --git a/contrib/libmp4v2/P00-mingw-static.patch b/contrib/libmp4v2/P00-mingw-static.patch new file mode 100644 index 000000000..268ff7689 --- /dev/null +++ b/contrib/libmp4v2/P00-mingw-static.patch @@ -0,0 +1,16 @@ +Index: mp4v2/include/mp4v2/platform.h +=================================================================== +--- mp4v2/include/mp4v2/platform.h (revision 272) ++++ mp4v2/include/mp4v2/platform.h (working copy) +@@ -24,8 +24,10 @@ + #if defined( _WIN32 ) || defined( __MINGW32__ ) + # if defined( _WINDLL ) || defined( DLL_EXPORT ) + # define MP4V2_EXPORT __declspec(dllexport) ++# elif defined( _DLL ) || defined( DLL_IMPORT ) ++# define MP4V2_EXPORT __declspec(dllimport) + # else +-# define MP4V2_EXPORT __declspec(dllimport) ++# define MP4V2_EXPORT + # endif + #else + # define MP4V2_EXPORT __attribute__((visibility("default"))) diff --git a/contrib/libmp4v2/P01-mingw-msvcrt-lower.patch b/contrib/libmp4v2/P01-mingw-msvcrt-lower.patch new file mode 100644 index 000000000..384542b06 --- /dev/null +++ b/contrib/libmp4v2/P01-mingw-msvcrt-lower.patch @@ -0,0 +1,31 @@ +diff -Naur libmp4v2.orig/libplatform/io/File_win32.cpp libmp4v2/libplatform/io/File_win32.cpp +--- libmp4v2.orig/libplatform/io/File_win32.cpp 2008-11-16 02:50:26.000000000 -0500 ++++ libmp4v2/libplatform/io/File_win32.cpp 2009-03-13 02:00:09.000000000 -0400 +@@ -8,7 +8,8 @@ + bool + StdioFile::getPosition( Size& pos_ ) + { +- pos_ = _ftelli64( _handle ); ++ fflush( _handle ); // must flush because we're using _fileno routines ++ pos_ = _telli64( _fileno( _handle )); + return pos_ == -1; + } + +@@ -17,6 +18,7 @@ + bool + StdioFile::getSize( Size& size_ ) + { ++ fflush( _handle ); // must flush because we're using _fileno routines + LARGE_INTEGER n; + if( !GetFileSizeEx( (HANDLE)_get_osfhandle( _fileno( _handle )), &n )) + return true; +@@ -29,7 +31,8 @@ + bool + StdioFile::setPosition( Size pos_ ) + { +- return _fseeki64( _handle, pos_, SEEK_SET ) != 0; ++ fflush( _handle ); // must flush because we're using _fileno routines ++ return _lseeki64( _fileno( _handle ), pos_, SEEK_SET ) == -1; + } + + /////////////////////////////////////////////////////////////////////////////// diff --git a/contrib/libmp4v2/P02-mingw-configure.patch b/contrib/libmp4v2/P02-mingw-configure.patch new file mode 100644 index 000000000..ba749201d --- /dev/null +++ b/contrib/libmp4v2/P02-mingw-configure.patch @@ -0,0 +1,26 @@ +diff -Naur libmp4v2.orig/configure.ac libmp4v2/configure.ac +--- libmp4v2.orig/configure.ac 2009-01-10 12:44:40.000000000 -0500 ++++ libmp4v2/configure.ac 2009-03-13 18:18:38.000000000 -0400 +@@ -103,11 +103,11 @@ + X_CXX_ARCH="$X_CXX_ARCH -mwin32" + fi + ;; +-*-*-mingw32) ++*-*-mingw*) + # do not support shared + enable_shared=no + X_PLATFORM=win32 +- X_MINGW_LIBS="$X_MINGW_LIBS -lmsvcr80" ++ X_MINGW_LIBS="$X_MINGW_LIBS" + X_CXX_W="$X_CXX_W -Wno-format" + if test "$enable_mingw_threads" = "yes"; then + X_CXX_ARCH="$X_CXX_ARCH -mthreads" +@@ -197,7 +197,7 @@ + case ${host} in + *-*-cygwin) + ;; +- *-*-mingw32) ++ *-*-mingw*) + ;; + *) + AC_LANG(C++) diff --git a/contrib/libmp4v2/module.defs b/contrib/libmp4v2/module.defs index 4f950a2d5..ede60253e 100644 --- a/contrib/libmp4v2/module.defs +++ b/contrib/libmp4v2/module.defs @@ -5,5 +5,13 @@ LIBMP4V2.FETCH.url = http://download.m0k.org/handbrake/contrib/libmp4v2-2.0-r224 LIBMP4V2.EXTRACT.tarbase = libmp4v2 ## propagate more flags -LIBMP4V2.CONFIGURE.env.CFLAGS = CFLAGS="$(call fn.ARGS,LIBMP4V2.GCC,*archs .g .O)" -LIBMP4V2.CONFIGURE.env.CXXFLAGS = CXXFLAGS="$(call fn.ARGS,LIBMP4V2.GCC,*archs .g .O)" +LIBMP4V2.CONFIGURE.env.CFLAGS = CFLAGS="$(call fn.ARGS,LIBMP4V2.GCC,*archs *D .g .O)" +LIBMP4V2.CONFIGURE.env.CXXFLAGS = CXXFLAGS="$(call fn.ARGS,LIBMP4V2.GCC,*archs *D .g .O)" + +## save some build-time by disabling utils +LIBMP4V2.CONFIGURE.extra += --disable-util + +ifeq ($(BUILD.system),mingw) + ## mingw platform patches configure.ac and requires bootstrap + LIBMP4V2.CONFIGURE.bootstrap = autoreconf -fiv; +endif |