> From [EMAIL PROTECTED] Sat Jul 12 00:31:36 2008 > From: Claudio Jeker <[EMAIL PROTECTED]> > To: ports@openbsd.org > Subject: firefox and MOZ_PLUGIN_PATH > Mail-Followup-To: Claudio Jeker <[EMAIL PROTECTED]>, > ports@openbsd.org > MIME-Version: 1.0 > Content-Type: text/plain; charset=us-ascii > Content-Disposition: inline > User-Agent: Mutt/1.5.16 (2007-06-09) > X-Loop: ports@openbsd.org > Precedence: bulk > Sender: [EMAIL PROTECTED] > > The mozilla-firefox startup script should not overwrite MOZ_PLUGIN_PATH. > This allows me to have a normal firefox and a bloatzilla with plugins that > like to crash. I think mozilla-firefox should set the MOZ_PLUGIN_PATH to a > default if it is not yet defined. So here is my diff for this.
Hey, Yup, mozilla-firefox should allow to specify MOZ_PLUGIN_PATH. However, with your diff, if MOZ_PLUGIN_PATH is set, system plugins do not work anymore. How about this one? Index: Makefile =================================================================== RCS file: /cvs/ports/www/mozilla-firefox/Makefile,v retrieving revision 1.95 diff -u -r1.95 Makefile --- Makefile 4 Jul 2008 13:47:25 -0000 1.95 +++ Makefile 11 Jul 2008 21:39:13 -0000 @@ -7,7 +7,7 @@ VER= 2.0.0.15 DISTNAME= mozilla -PKGNAME= mozilla-firefox-${VER} +PKGNAME= mozilla-firefox-${VER}p0 SO_VERSION= 19.0 # NOTE: Must bump minor version if any shlib's are removed from the # components dir to avoid pkg_add -r issues. @@ -116,7 +116,8 @@ pre-configure: @perl -pi -e 's|_LOCALBASE_|${LOCALBASE}|g; s|_X11BASE_|${X11BASE}|g' \ ${WRKSRC}/browser/app/mozilla.in \ - ${WRKSRC}/js/src/xpconnect/shell/Makefile.in + ${WRKSRC}/js/src/xpconnect/shell/Makefile.in \ + ${WRKSRC}/xpcom/io/nsAppFileLocationProvider.cpp @perl -pi -e 's|_SO_VERSION_|${SO_VERSION}|g' \ ${WRKSRC}/xpcom/components/nsNativeComponentLoader.cpp Index: patches/patch-browser_app_mozilla_in =================================================================== RCS file: /cvs/ports/www/mozilla-firefox/patches/patch-browser_app_mozilla_in,v retrieving revision 1.8 diff -u -r1.8 patch-browser_app_mozilla_in --- patches/patch-browser_app_mozilla_in 28 Nov 2007 20:22:25 -0000 1.8 +++ patches/patch-browser_app_mozilla_in 11 Jul 2008 21:39:13 -0000 @@ -1,7 +1,7 @@ $OpenBSD: patch-browser_app_mozilla_in,v 1.8 2007/11/28 20:22:25 martynas Exp $ --- browser/app/mozilla.in.orig Thu Nov 8 10:53:19 2007 -+++ browser/app/mozilla.in Tue Nov 27 11:43:00 2007 -@@ -92,7 +92,13 @@ moz_pis_startstop_scripts() ++++ browser/app/mozilla.in Sat Jul 12 00:36:06 2008 +@@ -92,6 +92,11 @@ moz_pis_startstop_scripts() #uncomment for debugging #set -x @@ -11,11 +11,9 @@ +fi + moz_libdir=%MOZAPPDIR% -+MOZ_PLUGIN_PATH=_LOCALBASE_/lib/mozilla-plugins MRE_HOME=%MREDIR% - # Use run-mozilla.sh in the current dir if it exists -@@ -172,7 +178,11 @@ do +@@ -172,7 +177,9 @@ do esac done @@ -23,8 +21,6 @@ +if [ `_X11BASE_/bin/fc-list | wc -l` -eq 0 ]; then + export GDK_USE_XFT=0 +fi -+ -+export MOZ_PLUGIN_PATH MRE_HOME ## Start addon scripts moz_pis_startstop_scripts "start" Index: patches/patch-xpcom_io_nsAppFileLocationProvider_cpp =================================================================== RCS file: patches/patch-xpcom_io_nsAppFileLocationProvider_cpp diff -N patches/patch-xpcom_io_nsAppFileLocationProvider_cpp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-xpcom_io_nsAppFileLocationProvider_cpp 11 Jul 2008 21:39:13 -0000 @@ -0,0 +1,26 @@ +$OpenBSD$ +--- xpcom/io/nsAppFileLocationProvider.cpp.orig Sat Jun 17 03:13:35 2006 ++++ xpcom/io/nsAppFileLocationProvider.cpp Sat Jul 12 00:35:31 2008 +@@ -215,6 +215,12 @@ nsAppFileLocationProvider::GetFile(const char *prop, P + if (NS_SUCCEEDED(rv)) + rv = localFile->AppendRelativeNativePath(PLUGINS_DIR_NAME); + } ++ else if (nsCRT::strcmp(prop, "_LOCALBASE_/lib/mozilla-plugins") == 0) ++ { ++ rv = NS_NewNativeLocalFile(nsDependentCString( ++ "_LOCALBASE_/lib/mozilla-plugins"), PR_TRUE, ++ getter_AddRefs(localFile)); ++ } + #if defined(XP_MAC) || defined(XP_MACOSX) + else if (nsCRT::strcmp(prop, NS_MACOSX_USER_PLUGIN_DIR) == 0) + { +@@ -617,7 +623,8 @@ nsAppFileLocationProvider::GetFiles(const char *prop, + + *_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, "_LOCALBASE_/lib/mozilla-plugins", ++ 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;