After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 414457 - Need a way to control where the browser plugin goes
Need a way to control where the browser plugin goes
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: Browser plugin (obsolete)
2.17.x
Other All
: Normal normal
: ---
Assigned To: totem-browser-maint
totem-browser-maint
: 448725 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-03-04 03:41 UTC by Andreas Hanke
Modified: 2007-06-20 10:25 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
Re-use AC_ARG_VAR([MOZILLA_PLUGINDIR]) to achieve the desired effect (955 bytes, patch)
2007-03-04 05:30 UTC, Andreas Hanke
committed Details | Review

Description Andreas Hanke 2007-03-04 03:41:34 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.
Comment 1 Andreas Hanke 2007-03-04 05:30:30 UTC
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".
Comment 2 Philip Withnall 2007-06-15 19:33:07 UTC
Patch looks OK to me.
Comment 3 Christian Persch 2007-06-18 10:35:48 UTC
*** Bug 448725 has been marked as a duplicate of this bug. ***
Comment 4 jerry tan 2007-06-20 07:41:58 UTC
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.

Comment 5 jerry tan 2007-06-20 07:59:11 UTC
--- 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 =

Comment 6 Bastien Nocera 2007-06-20 10:25:21 UTC
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)