contribs: fix libdvdnav runtime on win32 (patch was deleted when switching to mplayer...
authorRafaël Carré <funman@videolan.org>
Sun, 23 Dec 2007 12:55:08 +0000 (12:55 +0000)
committerRafaël Carré <funman@videolan.org>
Sun, 23 Dec 2007 12:55:08 +0000 (12:55 +0000)
extras/contrib/src/Makefile
extras/contrib/src/Patches/libdvdnav-win32.patch [new file with mode: 0644]

index 88d440f..b52a523 100644 (file)
@@ -1159,14 +1159,20 @@ ifdef SVN
 libdvdnav:
        $(SVN) co $(LIBDVDNAV_SVN)  libdvdnav
        patch -p0 < Patches/libdvdnav.patch
+ifdef HAVE_WIN32
+       patch -p0 < Patches/libdvdnav-win32.patch
+endif
        (cd $@; ./autogen.sh noconfig)
 else
-libdvdnav-$(LIBDVDNAV_VERSION).tar.bz2:
+libdvdnav-$(LIBDVDNAV_VERSION).tar.gz:
        $(WGET) $(LIBDVDNAV_URL)
 
-libdvdnav: libdvdnav-$(LIBDVDNAV_VERSION).tar.bz2
-       $(EXTRACT_BZ2)
+libdvdnav: libdvdnav-$(LIBDVDNAV_VERSION).tar.gz
+       $(EXTRACT_GZ)
        patch -p0 < Patches/libdvdnav.patch
+ifdef HAVE_WIN32
+       patch -p0 < Patches/libdvdnav-win32.patch
+endif
        (cd $@; ./autogen.sh noconfig)
 endif
 
diff --git a/extras/contrib/src/Patches/libdvdnav-win32.patch b/extras/contrib/src/Patches/libdvdnav-win32.patch
new file mode 100644 (file)
index 0000000..4126c6d
--- /dev/null
@@ -0,0 +1,15 @@
+--- libdvdnav.orig/src/remap.c 2007-12-23 13:48:04.000000000 +0100
++++ libdvdnav/src/remap.c      2007-12-23 13:49:45.000000000 +0100
+@@ -203,7 +203,11 @@
+     remap_t *map;
+     /* Build the map filename */
+-    home = getenv("HOME"); assert(home);
++    home = getenv("HOME");
++    if (!home) {
++    fprintf( MSG_OUT, "libdvdnav: Unable to find map for title '%s' (HOME directory not found)\n", title);
++    return NULL;
++    }
+     snprintf(fname, sizeof(fname), "%s/.dvdnav/%s.map", home, title);
+     /* Open the map file */