[SCM] vlc/master: Fix build failure with Iceweasel/Firefox 8.0. Thanks to Mathieu Trudel-Lapierre for backporting the upstream patch.

bdrung at users.alioth.debian.org bdrung at users.alioth.debian.org
Wed Nov 16 23:27:28 UTC 2011


The following commit has been merged in the master branch:
commit c9cdcf434c11e4ee55f2154547dde1a718ad4fbb
Author: Benjamin Drung <bdrung at debian.org>
Date:   Thu Nov 17 00:09:05 2011 +0100

    Fix build failure with Iceweasel/Firefox 8.0. Thanks to Mathieu Trudel-Lapierre for backporting the upstream patch.

diff --git a/debian/patches/bp-xulrunner-npapi-mime.patch b/debian/patches/bp-xulrunner-npapi-mime.patch
new file mode 100644
index 0000000..7e7663d
--- /dev/null
+++ b/debian/patches/bp-xulrunner-npapi-mime.patch
@@ -0,0 +1,145 @@
+From: Rafaël Carré <funman at videolan.org>
+Date: Sun, 13 Nov 2011 15:14:07 -0500
+Subject: [PATCH] Handle NPP_GetMIMEDescription having different return types
+Origin: backport, http://git.videolan.org/?p=npapi-vlc.git;a=commitdiff;h=a9aa594f5101f550e03c31da899c6c1968fb1e00
+Bug-Ubuntu: https://launchpad.net/bugs/890911
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -4595,6 +4595,25 @@
+         if test "${MOZILLA_REQUIRED_HEADERS}" = "0"; then
+             AC_MSG_ERROR([Please install the Firefox development tools; plugin/npapi.h and/or plugin/npruntime.h were not found.])
+         fi
++AC_MSG_CHECKING([if NPP_GetMIMEDescription() returns const])
++AC_COMPILE_IFELSE([AC_LANG_SOURCE([
++   #ifdef WIN32
++   # define XP_WIN 1
++   #else
++  # ifdef __APPLE__
++   #  define XP_MACOSX 1
++   # endif
++   # define XP_UNIX 1
++   #endif
++  #include <npapi.h>
++  const char *NPP_GetMIMEDescription(void);
++])],[
++  AC_MSG_RESULT(yes)
++  AC_DEFINE(NPP_GET_MIME_CONST, [const], [Wether NPP_GetMIMEDescription returns const])
++],[
++  AC_MSG_RESULT(no)
++  AC_DEFINE(NPP_GET_MIME_CONST, [], [Wether NPP_GetMIMEDescription returns const])
++])
+         MOZILLA_REQUIRED_HEADERS=
+         mozilla=:
+         AS_IF([ test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"],[
+@@ -4660,6 +4679,25 @@
+       then
+         AC_MSG_ERROR([Please install the Mozilla development tools, required headers were not found.])
+       fi
++AC_MSG_CHECKING([if NPP_GetMIMEDescription() returns const])
++AC_COMPILE_IFELSE([AC_LANG_SOURCE([
++   #ifdef WIN32
++   # define XP_WIN 1
++   #else
++  # ifdef __APPLE__
++   #  define XP_MACOSX 1
++   # endif
++   # define XP_UNIX 1
++   #endif
++  #include <npapi.h>
++  const char *NPP_GetMIMEDescription(void);
++])],[
++  AC_MSG_RESULT(yes)
++  AC_DEFINE(NPP_GET_MIME_CONST, [const], [Wether NPP_GetMIMEDescription returns const])
++],[
++  AC_MSG_RESULT(no)
++  AC_DEFINE(NPP_GET_MIME_CONST, [], [Wether NPP_GetMIMEDescription returns const])
++])
+       MOZILLA_REQUIRED_HEADERS=
+       CPPFLAGS="${CPPFLAGS_save}"
+       MOZILLA_SDK_PATH="`${MOZILLA_CONFIG} --prefix`"
+--- a/projects/mozilla/support/npunix.cpp
++++ b/projects/mozilla/support/npunix.cpp
+@@ -43,7 +43,9 @@
+  *----------------------------------------------------------------------
+  */
+ 
+-#include "config.h"
++#ifdef HAVE_CONFIG_H
++# include "config.h"
++#endif
+ 
+ #define XP_UNIX 1
+ 
+@@ -767,7 +769,7 @@
+  *  - Netscape uses the return value to identify when an object instance
+  *    of this plugin should be created.
+  */
+-char *
++NPP_GET_MIME_CONST char *
+ NP_GetMIMEDescription(void)
+ {
+     return NPP_GetMIMEDescription();
+--- a/projects/mozilla/support/npwin.cpp
++++ b/projects/mozilla/support/npwin.cpp
+@@ -26,10 +26,12 @@
+  *
+  */
+ 
+-#include "config.h"
+-
+ //#define OJI 1
+ 
++#ifdef HAVE_CONFIG_H
++# include "config.h"
++#endif
++
+ #include "../vlcplugin.h"
+ 
+ #ifndef _NPAPI_H_
+@@ -184,7 +186,7 @@
+     return NPERR_NO_ERROR;
+ }
+ 
+-char * NP_GetMIMEDescription()
++NPP_GET_MIME_CONST char * NP_GetMIMEDescription()
+ {
+   return NPP_GetMIMEDescription();
+ }
+--- a/projects/mozilla/vlcshell.cpp
++++ b/projects/mozilla/vlcshell.cpp
+@@ -25,7 +25,9 @@
+ /*****************************************************************************
+  * Preamble
+  *****************************************************************************/
+-#include "config.h"
++#ifdef HAVE_CONFIG_H
++# include "config.h"
++#endif
+ 
+ #include <stdio.h>
+ #include <string.h>
+@@ -71,7 +73,7 @@
+ /******************************************************************************
+  * UNIX-only API calls
+  *****************************************************************************/
+-char * NPP_GetMIMEDescription( void )
++NPP_GET_MIME_CONST char * NPP_GetMIMEDescription( void )
+ {
+     static char mimetype[] = PLUGIN_MIMETYPES;
+     return mimetype;
+--- a/projects/mozilla/vlcshell.h
++++ b/projects/mozilla/vlcshell.h
+@@ -24,7 +24,11 @@
+ #ifndef __VLCSHELL_H__
+ #define __VLCSHELL_H__
+ 
+-char * NPP_GetMIMEDescription( void );
++#ifdef HAVE_CONFIG_H
++# include "config.h"
++#endif
++
++NPP_GET_MIME_CONST char * NPP_GetMIMEDescription( void );
+ 
+ NPError NPP_Initialize( void );
+ 
diff --git a/debian/patches/series b/debian/patches/series
index df80a76..d33e845 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,4 @@ bp-estonian-update.patch
 bp-estonian-update2.patch
 bp-german-update.patch
 bp-set-channel-map-pulseaudio-1.0.patch
+bp-xulrunner-npapi-mime.patch

-- 
VLC media player packaging



More information about the pkg-multimedia-commits mailing list