Skip Menu |

This queue is for tickets about the Gtk2-MozEmbed CPAN distribution.

Report information
The Basics
Id: 37168
Status: resolved
Priority: 0/
Queue: Gtk2-MozEmbed

People
Owner: Nobody in particular
Requestors: boriss [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.07
Fixed in: (no value)



Subject: firefox 3.0 compatibility patch
Attached xulrunner.patch (against 0.07) causes examples/pumzilla to work on Ubuntu 8.04 using xulrunner-1.9-dev package. Please consider the patch for inclusion.
On Fri Jun 27 07:04:32 2008, BOSU wrote: Show quoted text
> Attached xulrunner.patch (against 0.07) causes examples/pumzilla to work > on Ubuntu 8.04 using xulrunner-1.9-dev package. > > Please consider the patch for inclusion.
And now for the actual patch :)
Index: Gtk2-MozEmbed-0.07/xs/GtkMozEmbed.xs =================================================================== --- Gtk2-MozEmbed-0.07.orig/xs/GtkMozEmbed.xs 2008-06-07 14:05:35.000000000 +0300 +++ Gtk2-MozEmbed-0.07/xs/GtkMozEmbed.xs 2008-06-27 14:02:44.000000000 +0300 @@ -233,6 +233,9 @@ BOOT: #include "register.xsh" #include "boot.xsh" +#if defined(XULRUNNER_PATH) + gtk_moz_embed_set_path(XULRUNNER_PATH); +#endif /* XULRUNNER_PATH */ gperl_signal_set_marshaller_for (GTK_TYPE_MOZ_EMBED, "new_window", gtk2perl_moz_embed_new_window_marshal); Index: Gtk2-MozEmbed-0.07/Makefile.PL =================================================================== --- Gtk2-MozEmbed-0.07.orig/Makefile.PL 2008-06-27 14:02:23.000000000 +0300 +++ Gtk2-MozEmbed-0.07/Makefile.PL 2008-06-27 14:02:44.000000000 +0300 @@ -72,6 +72,12 @@ $pkg => "GTK_MOZ_EMBED", ); +if ($pkgcfg{libs} =~ m#xulrunner-devel-([^/]+)#) { + open(my $fh, ">>build/gtkmozembed2perl-version.h") or die; + print $fh "#define XULRUNNER_PATH \"/usr/lib/xulrunner-$1\"\n"; + close $fh; +} + my $mozembed = ExtUtils::Depends->new('Gtk2::MozEmbed', 'Gtk2', ($use_dom ? ('Mozilla::DOM') : ()));
On Fri Jun 27 07:04:32 2008, BOSU wrote: Show quoted text
> Attached xulrunner.patch (against 0.07) causes examples/pumzilla to work > on Ubuntu 8.04 using xulrunner-1.9-dev package. > > Please consider the patch for inclusion.
Thanks for the patch. I modified it slightly to be more generic (attached). It does indeed prevent examples/pumzilla from segfaulting. But it's still not working correctly for me: the window comes up but I'm unable to load any URL. Whatever I do, the Gtk2::MozEmbed widget seems to be completely unresponsive. Does this work for you?
Index: Makefile.PL =================================================================== RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2-MozEmbed/Makefile.PL,v retrieving revision 1.12 diff -u -d -p -u -r1.12 Makefile.PL @@ -65,17 +66,24 @@ Gtk2::CodeGen->parse_maps('gtkmozembed2p Gtk2::CodeGen->write_boot(ignore => qr/^Gtk2::MozEmbed$/); my ($pkg) = $pkgcfg{pkg} =~ /^(\S+)/; -print "Compiling agains $pkg\n"; +print "Compiling against $pkg\n"; ExtUtils::PkgConfig->write_version_macros ( "build/gtkmozembed2perl-version.h", $pkg => "GTK_MOZ_EMBED", ); +# See if an SDK directory is set and if so, set up a define for later use. +my $inc = $pkgcfg{cflags}; +my $sdk_dir = ExtUtils::PkgConfig->variable ($pkg, 'sdkdir'); +if (defined $sdk_dir && $sdk_dir ne '') { + $inc .= qq( -DGTK_MOZ_EMBED_PERL_SDK_DIR="\\"$sdk_dir\\""); +} + my $mozembed = ExtUtils::Depends->new('Gtk2::MozEmbed', 'Gtk2', ($use_dom ? ('Mozilla::DOM') : ())); -$mozembed->set_inc($pkgcfg{cflags}); +$mozembed->set_inc($inc); $mozembed->set_libs($pkgcfg{libs}); $mozembed->add_xs(@xs_files); $mozembed->add_pm('MozEmbed.pm' => '$(INST_LIBDIR)/MozEmbed.pm'); Index: xs/GtkMozEmbed.xs =================================================================== RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2-MozEmbed/xs/GtkMozEmbed.xs,v retrieving revision 1.6 diff -u -d -p -u -r1.6 GtkMozEmbed.xs --- xs/GtkMozEmbed.xs 20 Dec 2005 20:34:40 -0000 1.6 +++ xs/GtkMozEmbed.xs 29 Jun 2008 10:56:41 -0000 @@ -268,6 +268,9 @@ BOOT: "dom_mouse_out", gtk2perl_moz_embed_dom_mouse_marshal); #endif /* ifdef __cplusplus */ +#ifdef GTK_MOZ_EMBED_PERL_SDK_DIR + gtk_moz_embed_set_path (GTK_MOZ_EMBED_PERL_SDK_DIR); +#endif =for object Gtk2::MozEmbed::main
Subject: Re: [rt.cpan.org #37168] firefox 3.0 compatibility patch
Date: Sun, 29 Jun 2008 21:27:14 +0300
To: bug-Gtk2-MozEmbed [...] rt.cpan.org
From: "Boris Sukholitko" <boriss [...] gmail.com>
On Sun, Jun 29, 2008 at 2:05 PM, Torsten Schoenfeld via RT <bug-Gtk2-MozEmbed@rt.cpan.org> wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=37168 > > > On Fri Jun 27 07:04:32 2008, BOSU wrote:
>> Attached xulrunner.patch (against 0.07) causes examples/pumzilla to work >> on Ubuntu 8.04 using xulrunner-1.9-dev package. >> >> Please consider the patch for inclusion.
> > Thanks for the patch. I modified it slightly to be more generic > (attached). It does indeed prevent examples/pumzilla from segfaulting. > But it's still not working correctly for me: the window comes up but > I'm unable to load any URL. Whatever I do, the Gtk2::MozEmbed widget > seems to be completely unresponsive. > > Does this work for you? >
Yes it does. I've seen the same unresponsiveness before the patch. Do you have /usr/lib/xulrunner-1.9 in your /etc/ld.so.conf? Thanks, Boris.
On Fri Jun 27 07:05:34 2008, BOSU wrote: Show quoted text
> And now for the actual patch :)
OK, my patch was garbage. It tried to set the path to /usr/lib/xulrunner-devel-1.9.0.1, instead of /usr/lib/xulrunner-1.9.0.1. The latter works, the former. So your patch is good, mine is not. Consequently, I've applied your patch and released 0.08. It's available from Sourceforge and on its way to CPAN. Please reopen this ticket if you still have issues.