rpms/nspluginwrapper/devel nspluginwrapper.sh.in, NONE, 1.1 nspluginwrapper-0.9.91.4-rh.patch, 1.5, 1.6 nspluginwrapper.spec, 1.8, 1.9 plugin-config.sh.in, 1.2, 1.3 sources, 1.4, 1.5

Martin Stransky (stransky) fedora-extras-commits at redhat.com
Fri Aug 10 09:52:27 UTC 2007


Author: stransky

Update of /cvs/pkgs/rpms/nspluginwrapper/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv17734

Modified Files:
	nspluginwrapper-0.9.91.4-rh.patch nspluginwrapper.spec 
	plugin-config.sh.in sources 
Added Files:
	nspluginwrapper.sh.in 
Log Message:
removed mozembeded dependency, excluded totem plugins from wrapping, xpcom support is optional now


--- NEW FILE nspluginwrapper.sh.in ---
#!/bin/sh
#
# Copyright 2007 Red Hat, Inc.
#
# This software may be freely redistributed under the terms of the GNU
# public license.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# Configuration file for nspluginwrapper

# List of plugins what are excluded from wrapping
# Names of plugins are separated by ':'
export IGNORE_WRAP="EXCLUDE_LIST"

# List of plugins what are excluded from linking
export IGNORE_LINK=""

nspluginwrapper-0.9.91.4-rh.patch:

Index: nspluginwrapper-0.9.91.4-rh.patch
===================================================================
RCS file: /cvs/pkgs/rpms/nspluginwrapper/devel/nspluginwrapper-0.9.91.4-rh.patch,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- nspluginwrapper-0.9.91.4-rh.patch	8 Aug 2007 09:04:27 -0000	1.5
+++ nspluginwrapper-0.9.91.4-rh.patch	10 Aug 2007 09:52:24 -0000	1.6
@@ -1,5 +1,5 @@
 --- nspluginwrapper-0.9.91.4/Makefile.rh	2007-04-03 07:31:22.000000000 +0200
-+++ nspluginwrapper-0.9.91.4/Makefile	2007-08-07 17:25:56.000000000 +0200
++++ nspluginwrapper-0.9.91.4/Makefile	2007-08-10 10:50:00.000000000 +0200
 @@ -52,23 +52,6 @@ ifneq (,$(findstring $(OS),netbsd dragon
  X_LDFLAGS += -Wl,--rpath,$(x11prefix)/$(lib64)
  endif
@@ -235,8 +235,8 @@
  		-Wl,--version-script,$(patsubst $(LSB_OBJ_DIR)/%.o,$(LSB_SRC_DIR)/%.Version,$<) \
  		-Wl,-soname,`grep "$(patsubst $(LSB_OBJ_DIR)/%.o,%,$<) " $(LSB_SRC_DIR)/LibNameMap.txt | cut -f2 -d' '`
 --- nspluginwrapper-0.9.91.4/configure.rh	2007-04-02 23:42:24.000000000 +0200
-+++ nspluginwrapper-0.9.91.4/configure	2007-08-07 17:25:56.000000000 +0200
-@@ -21,44 +21,16 @@ TMPS="${TMPDIR1}/npw-conf-${RANDOM}-$$-$
++++ nspluginwrapper-0.9.91.4/configure	2007-08-10 10:59:17.000000000 +0200
+@@ -21,45 +21,18 @@ TMPS="${TMPDIR1}/npw-conf-${RANDOM}-$$-$
  
  # default parameters
  prefix="/usr"
@@ -283,9 +283,11 @@
 -    ;;
 -esac
  bigendian="no"
++with_xpcom="no"
  
  # find source path
-@@ -77,6 +49,9 @@ case "$opt" in
+ # XXX: we assume an absolute path is given when launching configure, 
+@@ -77,6 +50,9 @@ case "$opt" in
  --prefix=*)
      prefix=`echo $opt | cut -d '=' -f 2`
      ;;
@@ -295,7 +297,7 @@
  --pkglibdir=*)
      pkglibdir=`echo $opt | cut -d '=' -f 2`
      ;;
-@@ -86,20 +61,11 @@ case "$opt" in
+@@ -86,20 +62,11 @@ case "$opt" in
  --target-cpu=*)
      target_cpu=`echo $opt | cut -d '=' -f 2 | sed -e 's/^i.86$/i386/'`
      ;;
@@ -320,7 +322,7 @@
      ;;
  --with-lib32=*)
      lib32=`echo $opt | cut -d '=' -f 2`
-@@ -108,7 +74,7 @@ case "$opt" in
+@@ -108,7 +75,7 @@ case "$opt" in
      lib64=`echo $opt | cut -d '=' -f 2`
      ;;
  --with-x11-prefix=*)
@@ -329,7 +331,13 @@
      ;;
  --with-cc=*)
      cc=`echo $opt | cut -d '=' -f 2`
-@@ -119,72 +85,30 @@ case "$opt" in
+@@ -116,75 +83,36 @@ case "$opt" in
+ --with-cxx=*)
+     cxx=`echo $opt | cut -d '=' -f 2`
+     ;;
++--with-xpcom=*)
++    with_xpcom=`echo $opt | cut -d '=' -f 2`
++    ;;
  esac
  done
  
@@ -419,7 +427,7 @@
  fi
  
  # check for __attribute__((visibility())) support
-@@ -261,12 +185,6 @@ if test -z "$CFLAGS"; then
+@@ -261,12 +189,6 @@ if test -z "$CFLAGS"; then
  	CFLAGS="$CFLAGS -mtune=generic"
      fi
  fi
@@ -432,7 +440,7 @@
  
  # check for pkg-config
  pkgconfig=`which pkg-config`
-@@ -298,7 +216,7 @@ fi
+@@ -298,7 +220,7 @@ fi
  rm -f $TMPC $TMPE
  
  # check for GTK+ 2.0 compile CFLAGS
@@ -441,7 +449,7 @@
      if $pkgconfig --exists gtk+-2.0; then
  	GTK_CFLAGS=`$pkgconfig --cflags gtk+-2.0`
  	GTK_LDFLAGS=`$pkgconfig --libs gtk+-2.0`
-@@ -319,27 +237,19 @@ EOF
+@@ -319,27 +241,31 @@ EOF
  	exit 1
      fi
      rm -f $TMPC $TMPE
@@ -449,15 +457,15 @@
 +
 +# check for Gecko compile CFLAGS
 +if $pkgconfig --exists firefox-plugin; then
-+    GECKO_CFLAGS=`$pkgconfig --cflags firefox-plugin --cflags firefox-xpcom --cflags firefox-gtkmozembed`
-+    GECKO_LDFLAGS=`$pkgconfig --libs firefox-xpcom --libs firefox-plugin --libs firefox-gtkmozembed`
-+    GECKO_LIBDIR=`$pkgconfig --libs-only-L firefox-xpcom | sed -e "s|-L||" -e "s| ||g"`
++    GECKO_CFLAGS=`$pkgconfig --cflags firefox-plugin`
++    GECKO_LDFLAGS=`$pkgconfig --libs firefox-plugin`
++    GECKO_LIBDIR=""
 +else
 +    echo "gecko-devel not found"
 +    exit 1
  fi
  
- # check for X11 base dir
+-# check for X11 base dir
 -if test -z "$x_base_dirs"; then
 -    x_base_dirs="
 -	/usr
@@ -474,12 +482,24 @@
 -	    x_base_dir=$dir
 -	    break
 -	fi
--    fi
++# check for XPCOM compile CFLAGS
++if [ $with_xpcom == "yes" ]; then
++    if $pkgconfig --exists firefox-xpcom; then
++	GECKO_CFLAGS="$GECKO_CFLAGS"`$pkgconfig --cflags firefox-xpcom`
++        GECKO_LDFLAGS="$GECKO_LDFLAGS"`$pkgconfig --libs firefox-xpcom`
++	GECKO_LIBDIR="$GECKO_LIBDIR"`$pkgconfig --libs-only-L firefox-xpcom | sed -e "s|-L||" -e "s| ||g"`
++    else
++	echo "gecko-devel (XPCOM) not found"
++        exit 1
+     fi
 -done
++fi
++
++# check for X11 base dir
  if test -z "$x_base_dir"; then
      echo "X11 environment not found"
      exit 1
-@@ -450,15 +360,14 @@ EOF
+@@ -450,40 +376,37 @@ EOF
  echo "Standard options:"
  echo "  --help                      print this message"
  echo "  --prefix=PREFIX             install in PREFIX [$prefix]"
@@ -496,7 +516,12 @@
  echo "  --with-lib32=NAME           use NAME as the 32-bit library dir name [$lib32]"
  echo "  --with-lib64=NAME           use NAME as the 64-bit library dir name [$lib64]"
  echo "  --with-x11-prefix=PREFIX    use PREFIX as the X11 base dir [autodetect]"
-@@ -470,17 +379,13 @@ exit 1
+ echo "  --with-cc=CC                use C compiler CC [$cc]"
+ echo "  --with-cxx=CXX              use C++ compiler CXX [$cxx]"
++echo "  --with-xpcom=yes/no         compile and link with XPCOM support"
+ echo ""
+ echo "NOTE: The object files are built at the place where configure is launched"
+ exit 1
  fi
  
  echo "Install prefix            $prefix"
@@ -515,7 +540,11 @@
  echo "host big endian           $bigendian"
  echo "target OS                 $target_os"
  echo "target CPU                $target_cpu"
-@@ -494,16 +399,16 @@ echo "/* Automatically generated by conf
++echo "XPCOM support             $with_xpcom"
+ 
+ config_mak="config-host.mak"
+ echo "# Automatically generated by configure - do not modify" > $config_mak
+@@ -494,16 +417,16 @@ echo "/* Automatically generated by conf
  echo "CC=$cc" >> $config_mak
  echo "CXX=$cxx" >> $config_mak
  echo "CFLAGS=$CFLAGS" >> $config_mak
@@ -538,7 +567,7 @@
  if test "$host_os" = "linux"; then
      echo "OS=linux" >> $config_mak
      echo "#define HOST_LINUX 1" >> $config_h
-@@ -524,6 +429,8 @@ else
+@@ -524,6 +447,8 @@ else
      echo "Unsupported OS"
      exit 1
  fi
@@ -547,7 +576,7 @@
  if test "$host_cpu" = "i386" ; then
      echo "ARCH=i386" >> $config_mak
      echo "#define HOST_I386 1" >> $config_h
-@@ -565,16 +472,13 @@ if test -n "$fbigendian" ; then
+@@ -565,18 +490,21 @@ if test -n "$fbigendian" ; then
  fi
  
  echo "SRC_PATH=$source_path" >> $config_mak
@@ -566,8 +595,16 @@
 +echo "#define LIBDIR \"$base_libdir\"" >> $config_h
  echo "x11prefix=$x_base_dir" >> $config_mak
  
++if [ $with_xpcom == "yes" ]; then
++    echo "#define USE_XPCOM 1" >> $config_h
++else
++    echo "#define USE_XPCOM 0" >> $config_h
++fi
++
  VERSION=`sed < $source_path/$PACKAGE.spec -n '/^\%define version[	]*/s///p'`
-@@ -597,8 +501,14 @@ else
+ RELEASE=`sed < $source_path/$PACKAGE.spec -n '/^\%define release[	]*/s///p'`
+ SVNDATE=`sed < $source_path/$PACKAGE.spec -n '/^\%define svndate[ 	]*/s///p'`
+@@ -597,8 +525,14 @@ else
      echo "#define NPW_VERSION \"$VERSION\"" >> $config_h
  fi
  
@@ -583,7 +620,7 @@
  
  if test "$has_visibility_attribute" = "yes"; then
      echo "#define attribute_hidden __attribute__((visibility(\"hidden\")))" >> $config_h
-@@ -626,9 +536,8 @@ config_h="config.h"
+@@ -626,9 +560,8 @@ config_h="config.h"
  echo "/* Automatically generated by configure - do not modify */" > $config_h
  echo "#include \"config-host.h\"" >> $config_h
  
@@ -595,7 +632,7 @@
  
  if test "$target_os" = "linux"; then
      echo "TARGET_OS=linux" >> $config_mak
-@@ -647,6 +556,10 @@ if test "$target_cpu" = "i386" ; then
+@@ -647,6 +580,10 @@ if test "$target_cpu" = "i386" ; then
      echo "TARGET_ARCH=i386" >> $config_mak
      echo "#define TARGET_ARCH \"i386\"" >> $config_h
      echo "#define TARGET_I386 1" >> $config_h
@@ -606,7 +643,7 @@
  elif test "$target_cpu" = "ppc" ; then
      echo "TARGET_ARCH=ppc" >> $config_mak
      echo "#define TARGET_ARCH \"ppc\"" >> $config_h
-@@ -665,3 +578,7 @@ if test "$source_path_used" = "yes" ; th
+@@ -665,3 +602,7 @@ if test "$source_path_used" = "yes" ; th
      esac
      ln -sf $source_path/Makefile Makefile
  fi
@@ -615,7 +652,7 @@
 +echo "DONT_STRIP=yes" >> $config_mak
 +
 --- nspluginwrapper-0.9.91.4/src/npw-wrapper.c.rh	2007-04-02 21:52:57.000000000 +0200
-+++ nspluginwrapper-0.9.91.4/src/npw-wrapper.c	2007-08-07 17:25:56.000000000 +0200
++++ nspluginwrapper-0.9.91.4/src/npw-wrapper.c	2007-08-10 10:50:00.000000000 +0200
 @@ -42,6 +42,7 @@
  
  #include "rpc.h"
@@ -624,7 +661,48 @@
  #include "utils.h"
  
  #define XP_UNIX 1
-@@ -1742,9 +1743,9 @@ static void do_plugin_init(int is_NP_Ini
+@@ -182,7 +183,7 @@ g_NPN_GetValue(NPP instance, NPNVariable
+   if (mozilla_funcs.getvalue == NULL)
+ 	return NPERR_INVALID_FUNCTABLE_ERROR;
+ 
+-  D(bug("NPN_GetValue instance=%p, variable=%d\n", instance, variable));
++  D(bug("NPN_GetValue instance=%p, variable=%d\n", instance, variable & 0xffff));
+   NPError ret = mozilla_funcs.getvalue(instance, variable, value);
+   D(bug(" return: %d [%s]\n", ret, string_of_NPError(ret)));
+   return ret;
+@@ -190,20 +191,20 @@ g_NPN_GetValue(NPP instance, NPNVariable
+ 
+ static int handle_NPN_GetValue(rpc_connection_t *connection)
+ {
+-  D(bug("handle_NPN_GetValue\n"));
+-
+   NPP instance;
+   uint32_t variable;
++
+   int error = rpc_method_get_args(connection,
+ 								  RPC_TYPE_NPP, &instance,
+ 								  RPC_TYPE_UINT32, &variable,
+ 								  RPC_TYPE_INVALID);
+-
+   if (error != RPC_ERROR_NO_ERROR) {
+ 	npw_perror("NPN_GetValue() get args", error);
+ 	return error;
+   }
+ 
++  D(bug("handle_NPN_GetValue() - variable %d\n",variable & 0xffff));
++
+   NPError ret = NPERR_GENERIC_ERROR;
+   switch (rpc_type_of_NPNVariable(variable)) {
+   case RPC_TYPE_BOOLEAN:
+@@ -220,6 +221,7 @@ static int handle_NPN_GetValue(rpc_conne
+ 	}
+   }
+ 
++  D(bug("NPN_GetValue() - Unknown type of variable %d\n",variable & 0xffff));
+   abort();
+ }
+ 
+@@ -1742,9 +1744,9 @@ static void do_plugin_init(int is_NP_Ini
    static int init_count = 0;
    ++init_count;
    char viewer_path[PATH_MAX];
@@ -636,8 +714,8 @@
  
    // Cache MIME info and plugin name/description
    if (g_plugin.name == NULL && g_plugin.description == NULL && g_plugin.formats == NULL) {
---- /dev/null	2007-08-08 09:09:51.648543469 +0200
-+++ nspluginwrapper-0.9.91.4/src/npw-dir.c	2007-08-07 17:25:56.000000000 +0200
+--- /dev/null	2007-08-10 09:09:49.649070069 +0200
++++ nspluginwrapper-0.9.91.4/src/npw-dir.c	2007-08-10 10:50:00.000000000 +0200
 @@ -0,0 +1,97 @@
 +/*
 + *  npw-dir.h - Directory management for nspluginwrapper
@@ -737,7 +815,7 @@
 +  return(p_path);
 +}
 --- nspluginwrapper-0.9.91.4/src/debug.h.rh	2007-03-04 16:01:22.000000000 +0100
-+++ nspluginwrapper-0.9.91.4/src/debug.h	2007-08-07 17:25:56.000000000 +0200
++++ nspluginwrapper-0.9.91.4/src/debug.h	2007-08-10 10:50:00.000000000 +0200
 @@ -29,7 +29,7 @@ extern void npw_printf(const char *forma
  extern void npw_vprintf(const char *format, va_list args) attribute_hidden;
  
@@ -748,7 +826,7 @@
  #else
  #define D(x) ;
 --- nspluginwrapper-0.9.91.4/src/sysdeps.h.rh	2007-03-04 16:01:22.000000000 +0100
-+++ nspluginwrapper-0.9.91.4/src/sysdeps.h	2007-08-07 17:25:56.000000000 +0200
++++ nspluginwrapper-0.9.91.4/src/sysdeps.h	2007-08-10 10:50:00.000000000 +0200
 @@ -43,8 +43,8 @@
  #define NPW_VIEWER NPW_VIEWER_BASE
  #define NPW_WRAPPER_BASE "npwrapper"
@@ -760,8 +838,98 @@
  #define NPW_PLUGIN_IDENT "NPW:" NPW_VERSION
  #define NPW_PLUGIN_IDENT_SIZE 32
  typedef struct __attribute__((packed)) {
+--- nspluginwrapper-0.9.91.4/src/npw-viewer.c.rh	2007-04-02 21:52:57.000000000 +0200
++++ nspluginwrapper-0.9.91.4/src/npw-viewer.c	2007-08-10 10:50:00.000000000 +0200
+@@ -53,10 +53,6 @@
+ #define DEBUG 1
+ #include "debug.h"
+ 
+-
+-// [UNIMPLEMENTED] Define to use XPCOM emulation
+-#define USE_XPCOM 0
+-
+ // Define to use XEMBED
+ #define USE_XEMBED 1
+ 
+@@ -541,11 +537,15 @@ invoke_NPN_GetValue(NPP instance, NPNVar
+ 	return NPERR_GENERIC_ERROR;
+   }
+ 
++  D(bug("invoke_NPN_GetValue, variable = %d\n", variable & 0xffff));
++
+   int32_t ret;
+   switch (rpc_type_of_NPNVariable(variable)) {
+   case RPC_TYPE_BOOLEAN:
+ 	{
+ 	  uint32_t b = 0;
++	  D(bug("invoke_NPN_GetValue, type = boolean\n"));
++
+ 	  error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_INT32, &ret, RPC_TYPE_BOOLEAN, &b, RPC_TYPE_INVALID);
+ 	  if (error != RPC_ERROR_NO_ERROR) {
+ 		npw_perror("NPN_GetValue() wait for reply", error);
+@@ -558,6 +558,7 @@ invoke_NPN_GetValue(NPP instance, NPNVar
+   case RPC_TYPE_NP_OBJECT:
+ 	{
+ 	  NPObject *npobj = NULL;
++	  D(bug("invoke_NPN_GetValue, type = object\n"));
+ 	  error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_INT32, &ret, RPC_TYPE_NP_OBJECT, &npobj, RPC_TYPE_INVALID);
+ 	  if (error != RPC_ERROR_NO_ERROR) {
+ 		npw_perror("NPN_GetValue() wait for reply", error);
+@@ -567,8 +568,12 @@ invoke_NPN_GetValue(NPP instance, NPNVar
+ 	  *((NPObject **)value) = npobj;
+ 	  break;
+ 	}
++  default:
++	{
++    	  npw_printf("invoke_NPN_GetValue: WARNING: unhandled type variable %d\n", variable & 0xffff);
++    	  break;
++	}
+   }
+-
+   return ret;
+ }
+ 
+@@ -591,11 +596,19 @@ g_NPN_GetValue(NPP instance, NPNVariable
+   case NPNVserviceManager: {
+ 	nsIServiceManager *sm;
+ 	int ret = NS_GetServiceManager(&sm);
+-	if (NS_FAILED(ret))
++	if (NS_FAILED(ret)) {
++          npw_printf("WARNING: NS_GetServiceManager failed\n");
+ 	  return NPERR_GENERIC_ERROR;
++	}
+ 	*(nsIServiceManager **)value = sm;
+ 	break;
+   }
++  case NPNVDOMElement:
++    	npw_printf("WARNING: NPNVDOMElement is not supported by NPN_GetValue()\n");
++    	return NPERR_INVALID_PARAM;
++  case NPNVDOMWindow:
++    	npw_printf("WARNING: NPNVDOMWindow is not supported by NPN_GetValue()\n");
++	return NPERR_INVALID_PARAM;
+ #endif
+ #if USE_XEMBED
+   case NPNVSupportsXEmbedBool:
+@@ -603,12 +616,13 @@ g_NPN_GetValue(NPP instance, NPNVariable
+   case NPNVWindowNPObject:
+   case NPNVPluginElementNPObject: {
+ 	int ret = invoke_NPN_GetValue(instance, variable, value);
+-	if (ret == NPERR_NO_ERROR)
+-	  return ret;
+-	// fall-through
++	if(ret != NPERR_NO_ERROR)
++          npw_printf("WARNING: error %d returner for %d from NPN_GetValue()\n", ret, variable & 0xffff);
++        return ret;
++	
+   }
+   default:
+-	npw_printf("WARNING: unhandled variable %d in NPN_GetValue()\n", variable);
++	npw_printf("WARNING: unhandled variable %d in NPN_GetValue()\n", variable & 0xffff);
+ 	return NPERR_INVALID_PARAM;
+   }
+ 
 --- nspluginwrapper-0.9.91.4/src/npw-viewer.sh.rh	2007-04-02 21:52:57.000000000 +0200
-+++ nspluginwrapper-0.9.91.4/src/npw-viewer.sh	2007-08-07 17:25:56.000000000 +0200
++++ nspluginwrapper-0.9.91.4/src/npw-viewer.sh	2007-08-10 10:50:00.000000000 +0200
 @@ -4,7 +4,13 @@
  #
  OS="`uname -s`"
@@ -831,8 +999,19 @@
  # Expand PATH for RealPlayer package on NetBSD (realplay)
  if test "$OS" = "NetBSD"; then
      REALPLAYER_HOME="/usr/pkg/lib/RealPlayer"
---- /dev/null	2007-08-08 09:09:51.648543469 +0200
-+++ nspluginwrapper-0.9.91.4/src/npw-dir.h	2007-08-07 17:25:56.000000000 +0200
+--- nspluginwrapper-0.9.91.4/src/npw-rpc.c.rh	2007-04-02 21:52:57.000000000 +0200
++++ nspluginwrapper-0.9.91.4/src/npw-rpc.c	2007-08-10 10:50:00.000000000 +0200
+@@ -49,6 +49,8 @@ int rpc_type_of_NPNVariable(int variable
+   case NPNVSupportsXEmbedBool:
+ 	type = RPC_TYPE_BOOLEAN;
+ 	break;
++  case NPNVDOMElement:
++  case NPNVDOMWindow:
+   case NPNVWindowNPObject:
+   case NPNVPluginElementNPObject:
+ 	type = RPC_TYPE_NP_OBJECT;
+--- /dev/null	2007-08-10 09:09:49.649070069 +0200
++++ nspluginwrapper-0.9.91.4/src/npw-dir.h	2007-08-10 10:50:00.000000000 +0200
 @@ -0,0 +1,35 @@
 +/*
 + *  npw-dir.h - Directory management for nspluginwrapper
@@ -870,7 +1049,7 @@
 +
 +#endif
 --- nspluginwrapper-0.9.91.4/src/npw-config.c.rh	2007-04-02 22:42:15.000000000 +0200
-+++ nspluginwrapper-0.9.91.4/src/npw-config.c	2007-08-08 10:38:06.000000000 +0200
++++ nspluginwrapper-0.9.91.4/src/npw-config.c	2007-08-10 10:50:00.000000000 +0200
 @@ -38,10 +38,15 @@
  #include <pwd.h>
  #include <dirent.h>


Index: nspluginwrapper.spec
===================================================================
RCS file: /cvs/pkgs/rpms/nspluginwrapper/devel/nspluginwrapper.spec,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- nspluginwrapper.spec	9 Aug 2007 13:27:57 -0000	1.8
+++ nspluginwrapper.spec	10 Aug 2007 09:52:24 -0000	1.9
@@ -2,12 +2,18 @@
 # rpm -q --provides firefox-devel | grep gecko-devel
 %define gecko_ver 1.8.1.6
 
-%define plugin_config_version 1.4
+%define plugin_config_version 1.5
 %define plugin_config_name plugin-config-%{plugin_config_version}
 %define plugin_config_binary plugin-config
 
+# Compile with XPCOM support
+%define xpcom_support 		0
+
 # Compile as a debug package?
-%define make_debug_package 0
+%define make_debug_package 	0
+
+# Excluded plugins
+%define exclude_list 		"libtotem-*"
 
 # Target defines
 %if "%{_target_cpu}" == "i386"
@@ -59,10 +65,11 @@
 Summary:	A compatibility layer for Netscape 4 plugins
 Name:		nspluginwrapper
 Version:	0.9.91.4
-Release:	14%{?dist}
+Release:	15%{?dist}
 Source0:	%{name}-%{version}%{?svndate:-%{svndate}}.tar.bz2
 Source1:        %{plugin_config_name}.tar.gz 
 Source2:        plugin-config.sh.in
+Source3:        %{name}.sh.in
 Patch0:		nspluginwrapper-0.9.91.4-rh.patch
 License:	GPL
 Group:		Networking/WWW
@@ -70,7 +77,11 @@
 Provides:	%{name} = %{version}-%{release}
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot
 Requires:	%{_bindir}/linux32 
+%if %{xpcom_support}
 Requires:	gecko-libs = %{gecko_ver}
+%else
+Requires:	gecko-libs
+%endif
 BuildRequires:	pkgconfig gtk2-devel glib
 BuildRequires:	libXt-devel cairo-devel
 BuildRequires:	gecko-devel
@@ -114,6 +125,12 @@
     export LDFLAGS="-m32 -L%{libdir32}"
 %endif
 
+%if %{xpcom_support}
+    export XPCOM_SUPPORT="yes"
+%else
+    export XPCOM_SUPPORT="no"
+%endif
+
 mkdir %{build_dir}
 pushd %{build_dir}
 ../configure 					\
@@ -124,6 +141,7 @@
 	    --with-lib32=%{lib32}		\
 	    --with-lib64=%{lib64}		\
 	    --with-base-lib=%{lib}		\
+	    --with-xpcom="$XPCOM_SUPPORT"	\
 	    --with-base-libdir=%{libdir}	\
 	    --with-x11-prefix=/usr	    
 	    
@@ -141,6 +159,7 @@
 
 mkdir -p $RPM_BUILD_ROOT%{_bindir}
 mkdir -p $RPM_BUILD_ROOT%{plugindir}
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
 
 make -C %{build_dir} install DESTDIR=$RPM_BUILD_ROOT
 
@@ -158,9 +177,14 @@
 GECKO_VERSION=`pkg-config --modversion firefox-plugin`
 
 cat %{SOURCE2} | %{__sed} -e "s|FIREFOX_VERSION|$GECKO_VERSION|g" \
+                          -e "s|USE_XPCOM|%{xpcom_support}|g" 	  \
     > $RPM_BUILD_ROOT%{_bindir}/mozilla-plugin-config
 chmod 755 $RPM_BUILD_ROOT%{_bindir}/mozilla-plugin-config
 
+cat %{SOURCE3} | %{__sed} -e "s|EXCLUDE_LIST|%{exclude_list}|g" \
+    > $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name}
+chmod 644 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name}
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -168,9 +192,10 @@
 if [ -x /usr/bin/mozilla-plugin-config ]; then
     /usr/bin/mozilla-plugin-config
 fi
-%postun
+
+%preun
 if [ -x /usr/bin/mozilla-plugin-config ]; then
-    /usr/bin/mozilla-plugin-config
+    /usr/bin/mozilla-plugin-config -r > /dev/null 2>&1
 fi
 
 %files
@@ -186,8 +211,14 @@
 %{pkgdir}/npviewer
 %{plugindir}/npwrapper.so
 %{_bindir}/mozilla-plugin-config
+%{_sysconfdir}/sysconfig/%{name}
 
 %changelog
+* Fri Aug 10 2007 Martin Stransky <stransky at redhat.com> 0.9.91.4-15
+- removed mozembeded dependency
+- excluded totem plugins from wrapping
+- xpcom support is optional now
+
 * Thu Aug 9 2007 Christopher Aillon <caillon at redhat.com> 0.9.91.4-14
 - Rebuild against newer gecko
 


Index: plugin-config.sh.in
===================================================================
RCS file: /cvs/pkgs/rpms/nspluginwrapper/devel/plugin-config.sh.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- plugin-config.sh.in	8 Aug 2007 09:04:27 -0000	1.2
+++ plugin-config.sh.in	10 Aug 2007 09:52:24 -0000	1.3
@@ -23,7 +23,7 @@
 ## 
 ## Usage:
 ##
-## $ mozilla-plugin-config
+## $ mozilla-plugin-config [options]
 ##
 ## This script is meant to configure plugins from the mozilla
 ## rpm installation.
@@ -46,18 +46,22 @@
 		;;
 esac
 
-if [ ! -x $MOZ_LIB_DIR/firefox-FIREFOX_VERSION/firefox-bin ]; then
-    if [ ! -x $SECONDARY_LIB_DIR/firefox-FIREFOX_VERSION/firefox-bin ]; then
-	echo "Error: $MOZ_LIB_DIR/firefox-FIREFOX_VERSION/firefox-bin not found"
-	if [ -d $SECONDARY_LIB_DIR ]; then
-	    echo "       $SECONDARY_LIB_DIR/firefox-FIREFOX_VERSION/firefox-bin not found"
+if [ "USE_XPCOM" -eq "1" ]; then
+    if [ ! -x $MOZ_LIB_DIR/firefox-FIREFOX_VERSION/firefox-bin ]; then
+	if [ ! -x $SECONDARY_LIB_DIR/firefox-FIREFOX_VERSION/firefox-bin ]; then
+	    echo "Error: $MOZ_LIB_DIR/firefox-FIREFOX_VERSION/firefox-bin not found"
+	    if [ -d $SECONDARY_LIB_DIR ]; then
+		echo "       $SECONDARY_LIB_DIR/firefox-FIREFOX_VERSION/firefox-bin not found"
+	    fi
+	    exit 1
 	fi
-	exit 1
+	MOZ_LIB_DIR="$SECONDARY_LIB_DIR"
     fi
-    MOZ_LIB_DIR="$SECONDARY_LIB_DIR"
+    export LD_LIBRARY_PATH=$MOZ_LIB_DIR/firefox-FIREFOX_VERSION
 fi
 
-export LD_LIBRARY_PATH=$MOZ_LIB_DIR/firefox-FIREFOX_VERSION
+# Add system-wide configuration
+. /etc/sysconfig/nspluginwrapper
 
 # Set-up installed plugins
 if [ $# -eq 0 ]; then 


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/nspluginwrapper/devel/sources,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- sources	8 Aug 2007 09:04:27 -0000	1.4
+++ sources	10 Aug 2007 09:52:24 -0000	1.5
@@ -1,2 +1,2 @@
 76df5586c229844d28b5db40368e8912  nspluginwrapper-0.9.91.4.tar.bz2
-7e8fc000910a2a95022085dcde58024a  plugin-config-1.4.tar.gz
+dbf2b4e07b230534c31693c0f604981c  plugin-config-1.5.tar.gz




More information about the fedora-extras-commits mailing list