firefox-7 and environment, startup script

poyopoyo at puripuri.plala.or.jp poyopoyo at puripuri.plala.or.jp
Fri Sep 30 01:36:23 UTC 2011


At Thu, 29 Sep 2011 19:17:38 +0200,
Beat Gätzi wrote:
> Looks like this is caused by the startup improvements in Firefox 7:
> https://bugzilla.mozilla.org/show_bug.cgi?id=552864
> 
> This makes our MOZ_PLUGIN_PATH patch to run-mozilla.sh useless
> (see ports/www/firefox/files/patch-build_unix_run-mozilla.sh).

Thanks. That lengthy discussion seems to be mainly about getting rid
of LD_LIBRARY_PATH from startup script and not about other
environments set in the script. As MOZ_PLUGIN_PATH was our hack, we
should provide replacement of our plugins-out-of-the-box mechanism
(searching ${LOCALBASE}/npapi/symlinks/firefox for plugins) at least
because it stopped working now.

perhaps sed -e 's|/usr/lib/mozilla/plugins|${LOCALBASE}/npapi/symlinks/firefox|'
in xpcom/io/nsAppFileLocationProvider.cpp ? It seems this is THE
MOZILLA WAY(TM) to provide system-wide default plugins directory.
As we would never have /usr/lib/mozilla, no problem for us to embed
ours, isn't it?

There is a room of discussion for other archs than i386/amd64 but I
confirmed this works on my 9-BETA2(pre-broken-socket)/amd64.

-- 
kuro

==
fix our system-wide plugin directory detection.

diff -urN ../local/firefox/Makefile firefox/Makefile
--- ../local/firefox/Makefile	2011-09-29 01:19:48.000000000 +0900
+++ firefox/Makefile	2011-09-30 09:35:40.637038079 +0900
@@ -7,7 +7,7 @@
 
 PORTNAME=	firefox
 DISTVERSION=	7.0
-PORTREVISION=	1
+PORTREVISION=	2
 PORTEPOCH=	1
 CATEGORIES=	www ipv6
 MASTER_SITES=	${MASTER_SITE_MOZILLA}
@@ -117,7 +117,8 @@
 	@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \
 		${WRKSRC}/security/manager/ssl/src/Makefile.in \
 		${WRKSRC}/js/src/config/mkdepend/Makefile.in \
-		${WRKSRC}/js/src/config/config.mk
+		${WRKSRC}/js/src/config/config.mk \
+		${WRKSRC}/xpcom/io/nsAppFileLocationProvider.cpp
 	@${REINPLACE_CMD} -e 's|-lc_r|${PTHREAD_LIBS}|g ; \
 		s|-lpthread|${PTHREAD_LIBS}|g ; \
 		s|echo aout|echo elf|g ; \
diff -urN ../local/firefox/files/patch-xpcom-io-nsAppFileLocationProvider.cpp firefox/files/patch-xpcom-io-nsAppFileLocationProvider.cpp
--- ../local/firefox/files/patch-xpcom-io-nsAppFileLocationProvider.cpp	1970-01-01 09:00:00.000000000 +0900
+++ firefox/files/patch-xpcom-io-nsAppFileLocationProvider.cpp	2011-09-30 10:21:23.147035632 +0900
@@ -0,0 +1,11 @@
+--- ./xpcom/io/nsAppFileLocationProvider.cpp.orig	2011-09-23 05:20:43.000000000 +0900
++++ ./xpcom/io/nsAppFileLocationProvider.cpp	2011-09-30 09:05:57.027032294 +0900
+@@ -238,7 +238,7 @@
+ #if defined(HAVE_USR_LIB64_DIR) && defined(__LP64__)
+           "/usr/lib64/mozilla/plugins";
+ #else
+-          "/usr/lib/mozilla/plugins";
++          "%%LOCALBASE%%/lib/npapi/symlinks/firefox";
+ #endif
+         rv = NS_NewNativeLocalFile(nsDependentCString(sysLPlgDir),
+                                    PR_FALSE, getter_AddRefs(localFile));


More information about the freebsd-gecko mailing list