[vlc-devel] commit: Libdvdread fix on Win$uck$ (Jean-Baptiste Kempf )
git version control
git at videolan.org
Fri Jun 13 08:25:05 CEST 2008
vlc | branch: master | Jean-Baptiste Kempf <jb at altair.videolan.org> | Fri Jun 13 08:26:18 2008 +0200| [cc13469bbbefe6789ad41271fa9d6c539e48d17d]
Libdvdread fix on Win$uck$
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cc13469bbbefe6789ad41271fa9d6c539e48d17d
---
extras/contrib/src/Makefile | 4 +-
extras/contrib/src/Patches/libdvdread-win32.patch | 75 +++++++++++++++++++++
2 files changed, 78 insertions(+), 1 deletions(-)
diff --git a/extras/contrib/src/Makefile b/extras/contrib/src/Makefile
index e308ff3..0f80052 100644
--- a/extras/contrib/src/Makefile
+++ b/extras/contrib/src/Makefile
@@ -1173,7 +1173,9 @@ libdvdread-$(LIBDVDREAD_VERSION).tar.gz:
libdvdread: libdvdread-$(LIBDVDREAD_VERSION).tar.gz
$(EXTRACT_GZ)
-# patch -p 0 < Patches/libdvdread.patch
+#ifdef HAVE_WIN32
+ patch -p 0 < Patches/libdvdread-win32.patch
+#endif
.libdvdread: libdvdread .dvdcss
(cd libdvdread; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --with-libdvdcss=$(PREFIX) && make && make install)
diff --git a/extras/contrib/src/Patches/libdvdread-win32.patch b/extras/contrib/src/Patches/libdvdread-win32.patch
new file mode 100644
index 0000000..8da905a
--- /dev/null
+++ b/extras/contrib/src/Patches/libdvdread-win32.patch
@@ -0,0 +1,75 @@
+--- libdvdread/configure.in 2006-10-06 10:12:31.000000000 +0200
++++ libdvdread.new/configure.in 2008-06-12 06:42:29.000000000 +0200
+@@ -16,7 +16,7 @@
+ AC_DEFINE(__DARWIN__, 1, Have a Mac OS X system)
+ ;;
+ x*mingw32* | x*cygwin*)
+- CFLAGS="${CFLAGS} -Dssize_t=long"
++ CFLAGS="${CFLAGS}"
+ ;;
+ x*)
+ ;;
+@@ -102,6 +102,11 @@
+ [ ],
+ AC_MSG_ERROR(You need libdvdcss (dvdcss.h))
+ )
++ case "x${host}" in
++ x*mingw32* | x*cygwin*)
++ CSS_LIBS=-ldvdcss
++ ;;
++ x*)
+ AC_MSG_CHECKING([for dvdcss_interface_2 in -ldvdcss])
+ saved_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS -ldvdcss"
+@@ -113,6 +118,8 @@
+ ] )
+ LDFLAGS=$saved_LDFLAGS
+ AC_MSG_RESULT([yes])
++ ;;
++ esac
+ else
+ dnl -w added to shutup GCC3.1's cpp warning about -I/usr/local
+ saved_CPPFLAGS=$CPPFLAGS
+@@ -124,6 +131,12 @@
+ CPPFLAGS=$saved_CPPFLAGS
+ saved_CFLAGS=$CFLAGS
+- CFLAGS="$CFLAGS -I$dvdcss_include -L$dvdcss_lib -ldvdcss"
++ CFLAGS="$CFLAGS -I$dvdcss_include "
++ case "x${host}" in
++ x*mingw32* | x*cygwin*)
++ CSS_LIBS="-L$dvdcss_path/lib -R$dvdcss_path/lib -ldvdcss"
++ CSS_CFLAGS=-I$dvdcss_path/include
++ ;;
++ x*)
+ AC_MSG_CHECKING([for dvdcss_interface_2 in -ldvdcss])
+ AC_TRY_LINK([#include <dvdcss/dvdcss.h>],
+ [if(!dvdcss_interface_2) { return 1; }],
+@@ -134,6 +147,8 @@
+ ] )
+ CFLAGS=$saved_CFLAGS
+ AC_MSG_RESULT([yes])
++ ;;
++ esac
+ fi
+ fi
+
+--- libdvdread/dvdread/dvd_reader.c 2006-10-06 09:58:03.000000000 +0200
++++ libdvdread.new/dvdread/dvd_reader.c 2008-06-12 06:42:28.000000000 +0200
+@@ -182,7 +182,7 @@
+
+ dev->align = align;
+ }
+-
++#if 0
+ #ifdef WIN32 /* replacement gettimeofday implementation */
+ #include <sys/timeb.h>
+ static int gettimeofday( struct timeval *tv, void *tz )
+@@ -194,7 +194,7 @@
+ return 0;
+ }
+ #endif
+-
++#endif
+
+ /* Loop over all titles and call dvdcss_title to crack the keys. */
+ static int initAllCSSKeys( dvd_reader_t *dvd )
More information about the vlc-devel
mailing list