This is the second revision of the nsplugins patch. The first revision did not
work.  This one does.

This patch adds /usr/$(get_libdir)/nsplugins and /usr/$(get_libdir)/nsbrowser/plugins 
to the search path for plugins.  The point of this patch is to provide a place
to install netscape-compatible plugins which can be used by any of
mozilla/firefox/thunderbird/seamonkey, for example the acroread plugin.  This
obviates the code in nsplugins.eclass except for inst_plugin

Note that mozilla/firefox/thunderbird/seamonkey handle dup plugins like this:
First by mtime order (more recent takes precedence), second by alpha order.

01 Aug 2005 agriffis

--- mozilla/xpcom/io/nsAppFileLocationProvider.cpp.agriffis	2005-08-01 15:53:34.000000000 -0400
+++ mozilla/xpcom/io/nsAppFileLocationProvider.cpp	2005-08-01 22:18:21.766663456 -0400
@@ -196,6 +196,14 @@
         if (NS_SUCCEEDED(rv))
             rv = localFile->AppendRelativeNativePath(PLUGINS_DIR_NAME);
     }
+    else if (nsCRT::strcmp(prop, GENTOO_NSPLUGINS_DIR) == 0)
+    {
+        rv = NS_NewNativeLocalFile(nsDependentCString(GENTOO_NSPLUGINS_DIR), PR_TRUE, getter_AddRefs(localFile));
+    }
+    else if (nsCRT::strcmp(prop, GENTOO_NSBROWSER_PLUGINS_DIR) == 0)
+    {
+        rv = NS_NewNativeLocalFile(nsDependentCString(GENTOO_NSBROWSER_PLUGINS_DIR), PR_TRUE, getter_AddRefs(localFile));
+    }
 #if defined(XP_MAC) || defined(XP_MACOSX)
     else if (nsCRT::strcmp(prop, NS_MACOSX_USER_PLUGIN_DIR) == 0)
     {
@@ -579,7 +587,7 @@
 
         *_retval = new nsAppDirectoryEnumerator(this, keys);
 #else
-        static const char* keys[] = { nsnull, NS_USER_PLUGINS_DIR, NS_APP_PLUGINS_DIR, nsnull };
+        static const char* keys[] = { nsnull, GENTOO_NSPLUGINS_DIR, GENTOO_NSBROWSER_PLUGINS_DIR, NS_USER_PLUGINS_DIR, NS_APP_PLUGINS_DIR, nsnull };
         if (!keys[0] && !(keys[0] = PR_GetEnv("MOZ_PLUGIN_PATH"))) {
             static const char nullstr = 0;
             keys[0] = &nullstr;
