[Bug 226476] www/firefox: update to 60.0

2018-05-12 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=226476

--- Comment #55 from Jan Beich  ---
--enable-debug enables assertions, runtime checks and disables optimizations.
None of which have been tested on FreeBSD. For gdb/lldb only debug symbols and
frame pointer are required e.g.,

  $ env CFLAGS=-g make clean all STRIP= WITHOUT="DEBUG DTRACE OPTIMIZED_CFLAGS"
-C /usr/ports/www/firefox

or

  $ make clean all WITH_DEBUG= WITHOUT="DEBUG DTRACE OPTIMIZED_CFLAGS" -C
/usr/ports/www/firefox

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
___
freebsd-gecko@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-gecko
To unsubscribe, send any mail to "freebsd-gecko-unsubscr...@freebsd.org"


[Bug 226476] www/firefox: update to 60.0

2018-05-12 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=226476

--- Comment #56 from Jan Beich  ---
OPTIMIZED_CFLAGS passes -fomit-frame-pointer unless DEBUG, DTRACE or PROFILE
are enabled.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
___
freebsd-gecko@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-gecko
To unsubscribe, send any mail to "freebsd-gecko-unsubscr...@freebsd.org"


[Bug 226476] www/firefox: update to 60.0

2018-05-12 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=226476

--- Comment #57 from jakub_l...@mailplus.pl ---
(In reply to Jan Beich from comment #55)

> $ make clean all WITH_DEBUG= WITHOUT="DEBUG DTRACE OPTIMIZED_CFLAGS" -C 
> /usr/ports/www/firefox

During linking unfortunately ld went pfault and ate 8GB of RAM and 4GB of swap,
looked hopeless, so I've terminated it.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
freebsd-gecko@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-gecko
To unsubscribe, send any mail to "freebsd-gecko-unsubscr...@freebsd.org"


[Bug 226476] www/firefox: update to 60.0

2018-05-12 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=226476

--- Comment #58 from Jan Beich  ---
(In reply to jakub_lach from comment #57)
Try building firefox with non-debug symbols and frame pointer. Get a backtrace
then rebuild the affected functions with debug symbols. If backtrace looks
corrupted or incomplete rebuild every library dependency with debug symbols,
including libc/libthr/rtld.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
___
freebsd-gecko@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-gecko
To unsubscribe, send any mail to "freebsd-gecko-unsubscr...@freebsd.org"


FreeBSD Port: firefox-60.0_2,1 missing 'Print to LPR'

2018-05-12 Thread Stephen Gunn

Hi,

First, thank you for maintaining this port.

I'm running Firefox 60.0_2,1 on 11.1-RELEASE-p10.  In the print dialog, 
the option 'Print to LPR' no longer shows up, only 'Print to File'.  If 
I install firefox-esr, then 'Print to LPR' is again present.


I strongly suspect it's related to a switch to gtk-3.0 in the most 
recent versions of Firefox.  I think gtk3 by default expects CUPS 
printing, but I'm using LPD.  There is supposed to be a way to specify 
that you still want printing in the gtk3 settings.ini file, by setting 
gtk-print-backends = "lpr, file", but it doesn't work.


I looked, and on my machine, gtk print backend libraries are installed 
in /usr/local/lib/gtk-3.0/3.0.0/printbackends, so it seems like it 
should work, yet it does not.


I believe this will be an issue for any application that uses gtk3, 
where printing is done with native LPD and not CUPS.


I also started up a thread in the forums, and I'm not the only one 
seeing the issue.


https://forums.freebsd.org/threads/no-print-to-lpr-in-firefox-print-dialog.65805/

Thanks again,

Stephen


___
freebsd-gecko@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-gecko
To unsubscribe, send any mail to "freebsd-gecko-unsubscr...@freebsd.org"


Re: FreeBSD Port: firefox-60.0_2,1 missing 'Print to LPR'

2018-05-12 Thread Jan Beich
Stephen Gunn  writes:

> I'm running Firefox 60.0_2,1 on 11.1-RELEASE-p10. In the print
> dialog, the option 'Print to LPR' no longer shows up, only 'Print to
> File'. If I install firefox-esr, then 'Print to LPR' is again
> present.

LPR backend doesn't support PDF, so 'Print to LPR' disappeared after
Firefox 59 removed GTK_PRINT_CAPABILITY_GENERATE_PS. Try the attached
patch to confirm.

https://bugzilla.mozilla.org/show_bug.cgi?id=1425188
https://bugzilla.mozilla.org/show_bug.cgi?id=1322653

Revert bug 1425188 in order to restore 'Print to LPR' option.

diff --git widget/gtk/nsDeviceContextSpecG.cpp 
widget/gtk/nsDeviceContextSpecG.cpp
index a90f13b43b006..ca2449aa766f5 100644
--- widget/gtk/nsDeviceContextSpecG.cpp
+++ widget/gtk/nsDeviceContextSpecG.cpp
@@ -150,8 +150,8 @@ already_AddRefed 
nsDeviceContextSpecGTK::MakePrintTarget()
   // Determine the real format with some GTK magic
   if (format == nsIPrintSettings::kOutputFormatNative) {
 if (mIsPPreview) {
-  // There is nothing to detect on Print Preview, use PDF.
-  format = nsIPrintSettings::kOutputFormatPDF;
+  // There is nothing to detect on Print Preview, use PS.
+  format = nsIPrintSettings::kOutputFormatPS;
 } else {
   return nullptr;
 }
diff --git widget/gtk/nsPrintDialogGTK.cpp widget/gtk/nsPrintDialogGTK.cpp
index d499fd2f37729..75ec90c2f9c9a 100644
--- widget/gtk/nsPrintDialogGTK.cpp
+++ widget/gtk/nsPrintDialogGTK.cpp
@@ -180,6 +180,7 @@ 
nsPrintDialogWidgetGTK::nsPrintDialogWidgetGTK(nsPIDOMWindowOuter *aParent,
   | GTK_PRINT_CAPABILITY_REVERSE
   | GTK_PRINT_CAPABILITY_SCALE
   | GTK_PRINT_CAPABILITY_GENERATE_PDF
+  | GTK_PRINT_CAPABILITY_GENERATE_PS
 )
   );
 
diff --git widget/gtk/nsPrintSettingsGTK.cpp widget/gtk/nsPrintSettingsGTK.cpp
index 44dc63375a598..dafab1795d943 100644
--- widget/gtk/nsPrintSettingsGTK.cpp
+++ widget/gtk/nsPrintSettingsGTK.cpp
@@ -214,12 +214,22 @@ NS_IMETHODIMP nsPrintSettingsGTK::GetOutputFormat(int16_t 
*aOutputFormat)
 return rv;
   }
 
-  if (format == nsIPrintSettings::kOutputFormatNative &&
-  GTK_IS_PRINTER(mGTKPrinter)) {
-if (gtk_printer_accepts_pdf(mGTKPrinter)) {
-  format = nsIPrintSettings::kOutputFormatPDF;
-} else {
-  format = nsIPrintSettings::kOutputFormatPS;
+  if (format == nsIPrintSettings::kOutputFormatNative) {
+const gchar* fmtGTK =
+  gtk_print_settings_get(mPrintSettings,
+ GTK_PRINT_SETTINGS_OUTPUT_FILE_FORMAT);
+if (fmtGTK) {
+  if (nsDependentCString(fmtGTK).EqualsIgnoreCase("pdf")) {
+format = nsIPrintSettings::kOutputFormatPDF;
+  } else {
+format = nsIPrintSettings::kOutputFormatPS;
+  }
+} else if (GTK_IS_PRINTER(mGTKPrinter)) {
+  if (gtk_printer_accepts_pdf(mGTKPrinter)) {
+format = nsIPrintSettings::kOutputFormatPDF;
+  } else {
+format = nsIPrintSettings::kOutputFormatPS;
+  }
 }
   }
 
@@ -424,7 +434,11 @@ nsPrintSettingsGTK::SetToFileName(const nsAString& 
aToFileName)
 return NS_OK;
   }
 
-  gtk_print_settings_set(mPrintSettings, 
GTK_PRINT_SETTINGS_OUTPUT_FILE_FORMAT, "pdf");
+  if (StringEndsWith(aToFileName, NS_LITERAL_STRING(".ps"))) {
+gtk_print_settings_set(mPrintSettings, 
GTK_PRINT_SETTINGS_OUTPUT_FILE_FORMAT, "ps");
+  } else {
+gtk_print_settings_set(mPrintSettings, 
GTK_PRINT_SETTINGS_OUTPUT_FILE_FORMAT, "pdf");
+  }
 
   nsCOMPtr file;
   nsresult rv = NS_NewLocalFile(aToFileName, true, getter_AddRefs(file));
diff --git widget/nsPrintSettingsService.cpp widget/nsPrintSettingsService.cpp
index ad50088a48082..df1879ecdbf39 100644
--- widget/nsPrintSettingsService.cpp
+++ widget/nsPrintSettingsService.cpp
@@ -612,14 +612,6 @@ nsPrintSettingsService::ReadPrefs(nsIPrintSettings* aPS,
 
   if (aFlags & nsIPrintSettings::kInitSaveToFileName) {
 if (GETSTRPREF(kPrintToFileName, str)) {
-  if (StringEndsWith(str, NS_LITERAL_STRING(".ps"))) {
-// We only support PDF since bug 1425188 landed.  Users may still have
-// prefs with .ps filenames if they last saved a file as Postscript
-// though, so we fix that up here.  (The pref values will be
-// overwritten the next time they save to file as a PDF.)
-str.Truncate(str.Length() - 2);
-str.AppendLiteral("pdf");
-  }
   aPS->SetToFileName(str);
   DUMP_STR(kReadStr, kPrintToFileName, str.get());
 }

> I strongly suspect it's related to a switch to gtk-3.0 in the most
> recent versions of Firefox. I think gtk3 by default expects CUPS
> printing, but I'm using LPD. There is supposed to be a way to specify
> that you still want printing in the gtk3 settings.ini file, by setting
> gtk-print-backends = "lpr, file", but it doesn't work.

Upstream appears to only test "cups" and "file". CUPS option is enabled
by default in x11-toolkits/gtk30 and x11-toolkits/gtk20.

D