pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: printing with firefox3?



I think the problem might be here:

 http://mxr.mozilla.org/firefox/source/gfx/src/psshared/nsCUPSShim.cpp

which seems to load libcups.so.2 whenever it is available.

I have not checked under what conditions the file gets compiled, but it
appears the most likely candidate for the trouble.

Line 82 of

 http://mxr.mozilla.org/firefox/source/toolkit/library/libxul-rules.mk

also explicitly links to cups, but I don't think that is the problem.

Are the attached (untested) patches the right way to go ?

Bernd Ernesti wrote:
On Tue, Jan 20, 2009 at 09:18:51AM +0200, Yorick Hardy wrote:
You probably need to edit your ~/.gtkrc-2.0 and add

 gtk-print-backends="lpr,file"

as described here

 
http://library.gnome.org/devel/gtk/stable/GtkSettings.html#GtkSettings--gtk-print-backends

I am guessing this is the machine with the cups option enabled ?

Do you happen to have a core dump from one of the other machines (and "thread apply all bt") ?

See my mail with such a trace, where gtk is not build with cups.

The page you mentioned above says that the default gtk-print-backends is 
"file,cups".

Looks like something is not working correctly and the default is still 
"file,cups" if cups
is not enabled during build.

Bernd




--
Kind regards,

Yorick Hardy
--- gfx/src/psshared/nsCUPSShim.cpp.orig        2009-01-20 18:02:07.000000000 
+0200
+++ gfx/src/psshared/nsCUPSShim.cpp     2009-01-20 18:03:16.000000000 +0200
@@ -59,6 +59,7 @@
 PRBool
 nsCUPSShim::Init()
 {
+    @OPTION_CUPS@ return PR_FALSE;
     mCupsLib = PR_LoadLibrary("libcups.so.2");
     if (!mCupsLib)
         return PR_FALSE;
--- www/firefox3/Makefile.orig  2009-01-20 18:05:07.000000000 +0200
+++ www/firefox3/Makefile       2009-01-20 18:11:44.000000000 +0200
@@ -42,6 +42,17 @@
 SUBST_FILES.fix-pc+=   build/unix/*.pc
 SUBST_SED.fix-pc=      -e 's,@PREFIX@,${PREFIX},g'
 
+SUBST_CLASSES+=                opt-cups
+SUBST_STAGE.opt-cups=  post-patch
+SUBST_MESSAGE.opt-cups=        Respect cups option at run-time
+SUBST_FILES.opt-cups+= gfx/src/psshared/nsCUPSShim.cpp
+.if !empty(PKG_OPTIONS:Mcups)
+SUBST_SED.opt-cups=    -e 's,@OPTION_CUPS@,//,g'
+.else
+SUBST_SED.opt-cups=    -e 's,@OPTION_CUPS@,,g'
+.endif
+
+
 # Need this to be able to reuse existing firefox pkgsrc infrastructure
 .PHONY: create-dummy-c-sdk
 pre-configure: create-dummy-c-sdk


Home | Main Index | Thread Index | Old Index