GNOME Bugzilla – Bug 414457
Need a way to control where the browser plugin goes
Last modified: 2007-06-20 10:25:21 UTC
Please describe the problem: totem currently installs its browser-plugin into $(libdir)/mozilla/plugins unconditionally. This is hardcoded as plugindir in browser-plugin/Makefile.am and as xptdir in browser-plugin/idl/Makefile.am. $(libdir)/mozilla/plugins is fine with me as default value, but there needs to be a way to change it from configure. Reason: Some distributions use a versioned browser-plugins directory like $(libdir)/mozilla-$(version)/plugins, others don't ship mozilla at all any more and therefore have a global plugin directory for all browsers (/usr/lib/browser-plugins in the case of the distribution I'm using). Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information: I am reporting this as a defect and not as an enhancement because it looks like configure.in does already contain some bits to support this: MOZILLA_PLUGINDIR="${MOZILLA_PLUGINDIR:-$MOZILLA_LIBDIR}" AC_ARG_VAR([MOZILLA_PLUGINDIR],[Where to install the plugin to]) And ./configure --help shows: MOZILLA_PLUGINDIR Where to install the plugin to But Makefile.am does not actually make use of the given value. This is inconsistent.
Created attachment 83865 [details] [review] Re-use AC_ARG_VAR([MOZILLA_PLUGINDIR]) to achieve the desired effect This patch removes the hardcoded definition plugindir and xptdir from the Makefiles and sets them from configure instead, re-using the already existing, but unused check for MOZILLA_PLUGINDIR. The default remains unchanged - ${libdir}/mozilla/plugins - but can now be customized by setting the MOZILLA_PLUGINDIR environment variable for configure, as already advertized by configure --help. No attempt is made to guess the plugindir because this would conflict with jhbuild and there are no guarantees that the user wants to run the plugin in the same browser he is compiling the plugin against. Note that the strage-looking quoting style is necessary to prevent expansion of ${libdir} within the configure script. This expansion has to happen within the Makefile, otherwise it would result in problems like 409695 and prevent users from redefining libdir during make by running "make install libdir=/somewhere/else".
Patch looks OK to me.
*** Bug 448725 has been marked as a duplicate of this bug. ***
Can we runtime check plugin directory instead of hard code "$(libdir}/mozilla/plugins" since we already check browser? I mean use $MOZILLA_LIBDIR/plugins. so if user has mozilla, it will be set to /usr/lib/mozilla/plugins, if user has firefox, "/usr/lib/firefox/plugins" will be used.
--- browser-plugin/Makefile.am +++ browser-plugin/Makefile.am @@ -1,6 +1,6 @@ SUBDIRS = idl -plugindir = $(libdir)/mozilla/plugins +plugindir = $(MOZILLA_PLUGINDIR) plugin_LTLIBRARIES = BUILT_SOURCES = --- browser-plugin/idl/Makefile.am +++ browser-plugin/idl/Makefile.am @@ -30,7 +30,7 @@ MULLY_IDLS = \ totemIMullYPlayer.idl -xptdir = $(libdir)/mozilla/plugins +xptdir = $(MOZILLA_PLUGINDIR) xpt_DATA = ALL_IDLS =
2007-06-20 Bastien Nocera <hadess@hadess.net> * browser-plugin/Makefile.am: * browser-plugin/idl/Makefile.am: * configure.in: Patch from Andreas Hanke <andreas.hanke@gmx-topmail.de> to respect the MOZILLA_PLUGINDIR destination variable (Closes: #414457)