diff options
-rw-r--r-- | x11-misc/google-gadgets/ChangeLog | 11 | ||||
-rw-r--r-- | x11-misc/google-gadgets/Manifest | 7 | ||||
-rw-r--r-- | x11-misc/google-gadgets/files/google-gadgets-0.10.0-xulrunner-1.9.patch | 372 | ||||
-rw-r--r-- | x11-misc/google-gadgets/google-gadgets-0.10.0-r1.ebuild | 4 | ||||
-rw-r--r-- | x11-misc/google-gadgets/google-gadgets-0.10.0-r2.ebuild (renamed from x11-misc/google-gadgets/google-gadgets-0.10.0.ebuild) | 45 |
5 files changed, 412 insertions, 27 deletions
diff --git a/x11-misc/google-gadgets/ChangeLog b/x11-misc/google-gadgets/ChangeLog index 983577bea29b..868b67dcdcae 100644 --- a/x11-misc/google-gadgets/ChangeLog +++ b/x11-misc/google-gadgets/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for x11-misc/google-gadgets # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-misc/google-gadgets/ChangeLog,v 1.6 2008/07/16 21:00:38 loki_val Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-misc/google-gadgets/ChangeLog,v 1.7 2008/07/20 09:44:27 loki_val Exp $ + +*google-gadgets-0.10.0-r2 (20 Jul 2008) + + 20 Jul 2008; Peter Alfredsen <loki_val@gentoo.org> + +files/google-gadgets-0.10.0-xulrunner-1.9.patch, + -google-gadgets-0.10.0.ebuild, google-gadgets-0.10.0-r1.ebuild, + +google-gadgets-0.10.0-r2.ebuild: + Add fix to *really* build with xulrunner-1.9 plus fix ggl-gtk sometimes + not being able to quit. *google-gadgets-0.10.0-r1 (16 Jul 2008) diff --git a/x11-misc/google-gadgets/Manifest b/x11-misc/google-gadgets/Manifest index 89fabcd288b5..096e57f26d6d 100644 --- a/x11-misc/google-gadgets/Manifest +++ b/x11-misc/google-gadgets/Manifest @@ -1,5 +1,6 @@ +AUX google-gadgets-0.10.0-xulrunner-1.9.patch 13284 RMD160 4bbb2f3ba511bafddd888a32641ee1e7224739be SHA1 b4ae542da4266e8e3fe70c8ce691e40c3d458b17 SHA256 7644f7b00a0e0b2c798079b6c62c4fd6ace16428e7d23c44e149ceb4ff5ca4d4 DIST google-gadgets-for-linux-0.10.0.tar.gz 2499027 RMD160 c76ba7b37f7bb976c018c5cbdb60e8ec504601dd SHA1 198e71445e5be4f5880b51cc0dfd9c6b51b908e5 SHA256 5367a44d47d60e31fc17dc43b7b1e1d393147bd901cb8c24f7975781e4abed5a -EBUILD google-gadgets-0.10.0-r1.ebuild 4354 RMD160 b33d659cb520d1c1abb90faf1e6176760f324888 SHA1 01089438b9639ece0912d47a1f6fec59181e4882 SHA256 ef679522b9ca8e514d31bf9bbbd327a401e64f5065a8eb623645276f2fd4cf09 -EBUILD google-gadgets-0.10.0.ebuild 4186 RMD160 5b3468c67c1f6310787453d3406e511db06bbd39 SHA1 22bed8c2f79e94c3582a08af5dd64077d1ece2fc SHA256 19d6d7ad98c3a94a13e660ecab234d332ef84ce952f0271d23702ed763d16407 -MISC ChangeLog 1325 RMD160 5271adfbc92efaff5cca4d6c6ffbb502cf5a5777 SHA1 515908d8dee3acfbc29d30902fb33ac1a7ba34c7 SHA256 a0b5d6f506d4275affef8d6936a618e2ba7a73f2d1316667e772df3e9d4241ff +EBUILD google-gadgets-0.10.0-r1.ebuild 4358 RMD160 0e15c42f0aee0037133e13e3628fe47916e281e5 SHA1 c467da858aba5705605209bcd6bbab2cfab5baf1 SHA256 4c8bff27ad62ff42f39f7597a3d701e805347a811283501a49d908f516efa228 +EBUILD google-gadgets-0.10.0-r2.ebuild 4475 RMD160 bd58ddd6168a608ead3b71a2306420c1b7915ac2 SHA1 083e58f4b293eed035fd70b0b29be566e93b1a19 SHA256 45fa1609d20bc8f76b83c5bc41bd25d38863c4e2b488e6fc870451bcfbf921a5 +MISC ChangeLog 1674 RMD160 e7f122737b9eb4accb12f611b826d1e95b99ee89 SHA1 dc3dfdfe4589b672537134ea5b66ac61496fe5cd SHA256 b473dd510fd6c67f59aa6e65aed76fe7343082f13f24d100a076b0f512a3b848 MISC metadata.xml 258 RMD160 e363fac4024fa1d6e8481465c06e42cbe2eb9e2a SHA1 26ea33fa143b55cfa84ee879aab41f1b5e337127 SHA256 960cfc8d2eda3540d50ea76f60889fb72e3dc8342ecd9dce2070517e4469f599 diff --git a/x11-misc/google-gadgets/files/google-gadgets-0.10.0-xulrunner-1.9.patch b/x11-misc/google-gadgets/files/google-gadgets-0.10.0-xulrunner-1.9.patch new file mode 100644 index 000000000000..cb2e65f151f4 --- /dev/null +++ b/x11-misc/google-gadgets/files/google-gadgets-0.10.0-xulrunner-1.9.patch @@ -0,0 +1,372 @@ +Index: extensions/gtkmoz_browser_element/browser_element.cc +=================================================================== +--- extensions/gtkmoz_browser_element/browser_element.cc (revision 712) ++++ extensions/gtkmoz_browser_element/browser_element.cc (revision 713) +@@ -384,10 +384,6 @@ + std::string down_fd_str = StringPrintf("%d", down_pipe_fds[0]); + std::string up_fd_str = StringPrintf("%d", up_pipe_fds[1]); + std::string ret_fd_str = StringPrintf("%d", ret_pipe_fds[0]); +-#ifdef MOZILLA_FIVE_HOME +- // Set appropriate environment variable for running mozilla gecko. +- setenv("MOZILLA_FIVE_HOME", MOZILLA_FIVE_HOME, 0); +-#endif + for (size_t i = 0; kBrowserChildNames[i]; ++i) { + execl(kBrowserChildNames[i], kBrowserChildNames[i], + down_fd_str.c_str(), up_fd_str.c_str(), +Index: extensions/gtkmoz_browser_element/browser_child.cc +=================================================================== +--- extensions/gtkmoz_browser_element/browser_child.cc (revision 712) ++++ extensions/gtkmoz_browser_element/browser_child.cc (revision 713) +@@ -25,12 +25,18 @@ + #include <gtk/gtk.h> + + #define MOZILLA_CLIENT ++ ++#ifdef XPCOM_GLUE ++#include <gtkmozembed_glue.cpp> ++#endif ++ + #include <mozilla-config.h> + #include <gtkmozembed.h> + #include <gtkmozembed_internal.h> + #include <jsapi.h> + #include <jsconfig.h> + ++#include <nsComponentManagerUtils.h> + #include <nsCOMPtr.h> + #include <nsCRT.h> + #include <nsEvent.h> +@@ -772,9 +778,9 @@ + // Register external object (Javascript window.external object). + g_external_object.AddRef(); + nsCOMPtr<nsIGenericFactory> factory; +- rv = NS_NewGenericFactory(getter_AddRefs(factory), +- &kExternalObjectComponentInfo); ++ factory = do_CreateInstance ("@mozilla.org/generic-factory;1", &rv); + NS_ENSURE_SUCCESS(rv, rv); ++ factory->SetComponentInfo(&kExternalObjectComponentInfo); + rv = registrar->RegisterFactory(kExternalObjectComponentInfo.mCID, + EXTOBJ_CLASSNAME, EXTOBJ_CONTRACTID, + factory); +@@ -787,9 +793,9 @@ + + // Register customized content policy. + g_content_policy.AddRef(); +- rv = NS_NewGenericFactory(getter_AddRefs(factory), +- &kContentPolicyComponentInfo); ++ factory = do_CreateInstance ("@mozilla.org/generic-factory;1", &rv); + NS_ENSURE_SUCCESS(rv, rv); ++ factory->SetComponentInfo(&kContentPolicyComponentInfo); + rv = registrar->RegisterFactory(kContentPolicyComponentInfo.mCID, + CONTENT_POLICY_CLASSNAME, + CONTENT_POLICY_CONTRACTID, +@@ -803,8 +809,64 @@ + return rv; + } + ++static bool InitGecko() { ++#ifdef XPCOM_GLUE ++ nsresult rv; ++ ++ NS_LogInit(); ++ static const GREVersionRange kGREVersion = { ++ "1.9a", PR_TRUE, ++ "1.9.*", PR_TRUE ++ }; ++ ++ char xpcom_location[4096]; ++ rv = GRE_GetGREPathWithProperties(&kGREVersion, 1, nsnull, 0, xpcom_location, 4096); ++ if (NS_FAILED(rv)) { ++ g_warning("Failed to find proper Gecko Runtime Environment!"); ++ return false; ++ } ++ ++ // Startup the XPCOM Glue that links us up with XPCOM. ++ rv = XPCOMGlueStartup(xpcom_location); ++ if (NS_FAILED(rv)) { ++ g_warning("Failed to startup XPCOM Glue!"); ++ return false; ++ } ++ ++ rv = GTKEmbedGlueStartup(); ++ if (NS_FAILED(rv)) { ++ g_warning("Failed to startup Gtk Embed Glue!"); ++ return false; ++ } ++ ++ rv = GTKEmbedGlueStartupInternal(); ++ if (NS_FAILED(rv)) { ++ g_warning("Failed to startup Gtk Embed Glue (internal)!"); ++ return false; ++ } ++ ++ char *last_slash = strrchr(xpcom_location, '/'); ++ if (last_slash) ++ *last_slash = '\0'; ++ ++ gtk_moz_embed_set_path(xpcom_location); ++#elif defined(MOZILLA_FIVE_HOME) ++ gtk_moz_embed_set_comp_path(MOZILLA_FIVE_HOME); ++#endif ++ return true; ++} ++ + int main(int argc, char **argv) { ++ if (!g_thread_supported()) ++ g_thread_init(NULL); ++ + gtk_init(&argc, &argv); ++ ++ if (!InitGecko()) { ++ g_warning("Failed to initialize Gecko."); ++ return 1; ++ } ++ + signal(SIGPIPE, OnSigPipe); + if (argc >= 2) + g_down_fd = g_ret_fd = static_cast<int>(strtol(argv[1], NULL, 0)); +Index: hosts/gtk/sidebar_gtk_host.cc +=================================================================== +--- hosts/gtk/sidebar_gtk_host.cc (revision 712) ++++ hosts/gtk/sidebar_gtk_host.cc (revision 713) +@@ -203,9 +203,9 @@ + + void OnHotKeyPressed() { + if (!gadgets_shown_ || sidebar_->IsMinimized()) +- ShowOrHideAllGadgets(true); ++ ShowOrHideAll(true); + else +- ShowOrHideAllGadgets(false); ++ ShowOrHideAll(false); + } + + void OnWorkAreaChange() { +@@ -356,9 +356,9 @@ + + void OnSideBarClose() { + if (!gadgets_shown_ || sidebar_->IsMinimized()) +- ShowOrHideAllGadgets(true); ++ ShowOrHideAll(true); + else +- ShowOrHideAllGadgets(false); ++ ShowOrHideAll(false); + } + + void OnSideBarSizeEvent() { +@@ -1142,9 +1142,14 @@ + return false; + } + ++ void ShowOrHideAll(bool show) { ++ DLOG("ShowOrHideAll(%d)", show); ++ ShowOrHideSideBar(show); ++ ShowOrHideAllGadgets(show); ++ gadgets_shown_ = show; ++ } ++ + void ShowOrHideAllGadgets(bool show) { +- DLOG("ShowOrHideAllGadgets(%d)", show); +- ShowOrHideSideBar(show); + for (GadgetsMap::iterator it = gadgets_.begin(); + it != gadgets_.end(); ++it) { + if (it->second.gadget->GetDisplayTarget() != Gadget::TARGET_SIDEBAR) { +@@ -1158,7 +1163,6 @@ + OnMainViewPopIn(it->first); + } + } +- gadgets_shown_ = show; + } + + void ShowOrHideSideBar(bool show) { +@@ -1421,11 +1425,11 @@ + } + + void ShowAllMenuHandler(const char *str) { +- ShowOrHideAllGadgets(true); ++ ShowOrHideAll(true); + } + + void HideAllMenuHandler(const char *str) { +- ShowOrHideAllGadgets(false); ++ ShowOrHideAll(false); + } + + void AutoHideMenuHandler(const char *str) { +@@ -1551,6 +1555,9 @@ + g_source_remove(impl->auto_hide_source_); + impl->auto_hide_source_ = 0; + } ++ if (widget == impl->sidebar_window_ && !impl->sidebar_->IsMinimized()) { ++ impl->ShowOrHideAllGadgets(true); ++ } + return FALSE; + } + +@@ -1613,9 +1620,9 @@ + #if GTK_CHECK_VERSION(2,10,0) && defined(GGL_HOST_LINUX) + static void StatusIconActivateHandler(GtkWidget *widget, Impl *impl) { + if (!impl->gadgets_shown_ || impl->sidebar_->IsMinimized()) +- impl->ShowOrHideAllGadgets(true); ++ impl->ShowOrHideAll(true); + else +- impl->ShowOrHideAllGadgets(false); ++ impl->ShowOrHideAll(false); + } + + static void StatusIconPopupMenuHandler(GtkWidget *widget, guint button, +Index: ggadget/gtk/single_view_host.cc +=================================================================== +--- ggadget/gtk/single_view_host.cc (revision 712) ++++ ggadget/gtk/single_view_host.cc (revision 713) +@@ -339,9 +339,9 @@ + if (record_states_) + LoadWindowStates(); + +- // Show window immediately. So that following calls against the window can +- // take effect immediately. +- gtk_widget_show_now(window_); ++ // Can't use gtk_widget_show_now() here, because in some cases, it'll cause ++ // nested main loop and prevent ggl-gtk from being quitted. ++ gtk_widget_show(window_); + gtk_window_present(GTK_WINDOW(window_)); + gdk_window_raise(window_->window); + +Index: ggadget/decorated_view_host.cc +=================================================================== +--- ggadget/decorated_view_host.cc (revision 712) ++++ ggadget/decorated_view_host.cc (revision 713) +@@ -82,6 +82,7 @@ + hittest_(HT_CLIENT), + child_resizable_(ViewInterface::RESIZABLE_ZOOM), + auto_restore_view_size_(true), ++ view_state_restored_(false), + child_view_(NULL), + view_element_(new ViewElement(NULL, this, NULL, false)) { + view_element_->SetVisible(true); +@@ -104,6 +105,7 @@ + child_view_ = child_view; + view_element_->SetChildView(child_view); + ++ view_state_restored_ = false; + if (child_view_) { + child_resizable_ = child_view_->GetResizable(); + +@@ -401,7 +403,8 @@ + } + + virtual void SaveViewStates() { +- if (!auto_restore_view_size_) ++ // Don't save view state if the view state is not restored yet. ++ if (!auto_restore_view_size_ || !view_state_restored_) + return; + View *child = GetChildView(); + Gadget *gadget = child ? child->GetGadget() : NULL; +@@ -430,7 +433,8 @@ + View *child = GetChildView(); + Gadget *gadget = child ? child->GetGadget() : NULL; + // Only load view states when the original size has been saved. +- if (gadget) { ++ // Only restore view state once. ++ if (gadget && !view_state_restored_) { + OptionsInterface *opt = gadget->GetOptions(); + ViewElement *elm = GetViewElement(); + std::string prefix(option_prefix_); +@@ -458,6 +462,9 @@ + DLOG("RestoreViewStates(%d): w:%.0lf h:%.0lf s: %.2lf", + gadget->GetInstanceID(), elm->GetPixelWidth(), + elm->GetPixelHeight(), elm->GetScale()); ++ ++ // It's safe to save view state from now on. ++ view_state_restored_ = true; + UpdateViewSize(); + UpdateChildViewSize(); + } +@@ -533,6 +540,7 @@ + HitTest hittest_; + ViewInterface::ResizableMode child_resizable_; + bool auto_restore_view_size_; ++ bool view_state_restored_; + + View *child_view_; + ViewElement *view_element_; +@@ -850,7 +858,7 @@ + + virtual void SaveViewStates() { + Gadget *gadget = GetGadget(); +- if (gadget) { ++ if (gadget && minimized_state_loaded_) { + OptionsInterface *opt = gadget->GetOptions(); + opt->PutInternalValue("main_view_minimized", Variant(minimized_)); + DLOG("SaveViewStates(%d): main view minimized: %s", +Index: configure.ac +=================================================================== +--- configure.ac (revision 712) ++++ configure.ac (revision 713) +@@ -551,15 +551,25 @@ + PKG_CHECK_MODULES(RSVG, librsvg-2.0 >= 2.14.0, [has_rsvg=yes], [has_rsvg=no]) + + # Check gtkmozembed +-PKG_CHECK_MODULES(GTKMOZEMBED, [xulrunner-gtkmozembed xulrunner-js], +- [has_gtkmozembed=xulrunner-gtkmozembed], +- [PKG_CHECK_MODULES(GTKMOZEMBED, [firefox2-gtkmozembed firefox2-js], +- [has_gtkmozembed=firefox2-gtkmozembed], +- [PKG_CHECK_MODULES(GTKMOZEMBED, [firefox-gtkmozembed firefox-js], +- [has_gtkmozembed=firefox-gtkmozembed], +- [PKG_CHECK_MODULES(GTKMOZEMBED, [mozilla-gtkmozembed mozilla-js], +- [has_gtkmozembed=mozilla-gtkmozembed], +- [has_gtkmozembed=no])])])]) ++# Check priority: ++# xulrunner 1.9: mozilla-gtkmozembed-embedding and mozilla-js ++# xulrunner 1.9: libxul-embedding-unstable and mozilla-js ++# xulrunner 1.8: xulrunner-gtkmozembed and xulrunner-js ++# firefox 2.0: firefox2-gtkmozembed and firefox2-js ++# firefox 1.5: firefox-gtkmozembed and firefox-js ++# ++# Add more rules here if your distribution doesn't support above rules. ++PKG_CHECK_MODULES(GTKMOZEMBED, [mozilla-gtkmozembed-embedding mozilla-js], ++ [has_gtkmozembed=mozilla-gtkmozembed-embedding], ++ [PKG_CHECK_MODULES(GTKMOZEMBED, [libxul-embedding-unstable mozilla-js], ++ [has_gtkmozembed=libxul-embedding-unstable], ++ [PKG_CHECK_MODULES(GTKMOZEMBED, [xulrunner-gtkmozembed xulrunner-js], ++ [has_gtkmozembed=xulrunner-gtkmozembed], ++ [PKG_CHECK_MODULES(GTKMOZEMBED, [firefox2-gtkmozembed firefox2-js], ++ [has_gtkmozembed=firefox2-gtkmozembed], ++ [PKG_CHECK_MODULES(GTKMOZEMBED, [firefox-gtkmozembed firefox-js], ++ [has_gtkmozembed=firefox-gtkmozembed], ++ [has_gtkmozembed=no])])])])]) + + if test x$has_dbus = xyes; then + AC_DEFINE(HAVE_DBUS_LIBRARY,1,[Have dbus library]) +@@ -677,21 +687,26 @@ + GTKMOZEMBED_CFLAGS="$GTKMOZEMBED_CFLAGS -I$EMBED_INCDIR/dom" + GTKMOZEMBED_CFLAGS="$GTKMOZEMBED_CFLAGS -I$EMBED_INCDIR/xpconnect" + GTKMOZEMBED_CFLAGS="$GTKMOZEMBED_CFLAGS -I$EMBED_INCDIR/widget" ++ GTKMOZEMBED_LDFLAGS="" + MOZILLA_FIVE_HOME=`$PKG_CONFIG --variable=libdir $has_gtkmozembed` + if test "x$MOZILLA_FIVE_HOME" = "x"; then + # Some distributions doesn't have libdir, so try to extract libdir from LIBS. ++# It usually occurs on some pre xulrunner 1.9 versions. + # @<:@ and @:>@ will be replace by [ and ] by M4. Really evil. ++# FIXME: Following method might not work on systems other than Linux. + MOZILLA_FIVE_HOME=`echo $GTKMOZEMBED_LIBS | sed -e 's/.*-L\(@<:@^ @:>@*\) .*/\1/'` +- if test ! -e "$MOZILLA_FIVE_HOME"; then +- MOZILLA_FIVE_HOME="" ++ # Try to find out the correct xulrunner path. ++ if test -e "$MOZILLA_FIVE_HOME/libxpcom.so"; then ++ XPCOM_PATH=`readlink -f $MOZILLA_FIVE_HOME/libxpcom.so` ++ MOZILLA_FIVE_HOME=`dirname $XPCOM_PATH` + fi + fi +- PREDEFINED_MACROS="$PREDEFINED_MACROS -DMOZILLA_FIVE_HOME=\\\"$MOZILLA_FIVE_HOME\\\"" +- AC_SUBST(MOZILLA_FIVE_HOME) +- if test "x$MOZILLA_FIVE_HOME" != "x"; then ++ if test "x$MOZILLA_FIVE_HOME" != "x" -a -d "$MOZILLA_FIVE_HOME"; then ++ GTKMOZEMBED_CFLAGS="$GTKMOZEMBED_CFLAGS -DMOZILLA_FIVE_HOME=\\\"$MOZILLA_FIVE_HOME\\\"" + GTKMOZEMBED_LDFLAGS="$GTKMOZEMBED_LDFLAGS -R$MOZILLA_FIVE_HOME" +- AC_SUBST(GTKMOZEMBED_LDFLAGS) + fi ++ ++ AC_SUBST(GTKMOZEMBED_LDFLAGS) + fi + + AM_CONDITIONAL( diff --git a/x11-misc/google-gadgets/google-gadgets-0.10.0-r1.ebuild b/x11-misc/google-gadgets/google-gadgets-0.10.0-r1.ebuild index 7955f6273bc9..fe8164673148 100644 --- a/x11-misc/google-gadgets/google-gadgets-0.10.0-r1.ebuild +++ b/x11-misc/google-gadgets/google-gadgets-0.10.0-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/x11-misc/google-gadgets/google-gadgets-0.10.0-r1.ebuild,v 1.1 2008/07/16 21:00:38 loki_val Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-misc/google-gadgets/google-gadgets-0.10.0-r1.ebuild,v 1.2 2008/07/20 09:44:27 loki_val Exp $ EAPI=1 @@ -34,7 +34,7 @@ RDEPEND=">=dev-lang/spidermonkey-1.7.0 >=x11-libs/gtk+-2.12.10 >=x11-libs/pango-1.20.3 gnome-base/librsvg - >=net-libs/xulrunner-1.8.1.14 + >=net-libs/xulrunner-1.8.1.14:1.8 >=net-misc/curl-7.18.1 >=dev-libs/atk-1.22.0 ) diff --git a/x11-misc/google-gadgets/google-gadgets-0.10.0.ebuild b/x11-misc/google-gadgets/google-gadgets-0.10.0-r2.ebuild index 362215eb6804..dc3be832321e 100644 --- a/x11-misc/google-gadgets/google-gadgets-0.10.0.ebuild +++ b/x11-misc/google-gadgets/google-gadgets-0.10.0-r2.ebuild @@ -1,10 +1,10 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/x11-misc/google-gadgets/google-gadgets-0.10.0.ebuild,v 1.1 2008/07/11 20:20:31 loki_val Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-misc/google-gadgets/google-gadgets-0.10.0-r2.ebuild,v 1.1 2008/07/20 09:44:27 loki_val Exp $ EAPI=1 -inherit base eutils +inherit autotools base eutils fdo-mime MY_PN=${PN}-for-linux MY_P=${MY_PN}-${PV} @@ -33,6 +33,7 @@ RDEPEND=">=dev-lang/spidermonkey-1.7.0 >=x11-libs/cairo-1.6.4 >=x11-libs/gtk+-2.12.10 >=x11-libs/pango-1.20.3 + gnome-base/librsvg >=net-libs/xulrunner-1.8.1.14 >=net-misc/curl-7.18.1 >=dev-libs/atk-1.22.0 ) @@ -41,7 +42,8 @@ RDEPEND=">=dev-lang/spidermonkey-1.7.0 >=x11-libs/qt-core-4.4.0 >=x11-libs/qt-webkit-4.4.0 >=x11-libs/qt-xmlpatterns-4.4.0 - >=x11-libs/qt-opengl-4.4.0 )" + >=x11-libs/qt-opengl-4.4.0 + >=x11-libs/qt-script-4.4.0 )" DEPEND="${RDEPEND} >=dev-util/pkgconfig-0.20" @@ -49,6 +51,8 @@ S="${WORKDIR}/${MY_P}" RESTRICT="test" +PATCHES=( "${FILESDIR}/${P}-xulrunner-1.9.patch" ) + pkg_setup() { if ! use qt4 then @@ -93,8 +97,18 @@ pkg_setup() { fi } +src_unpack() { + base_src_unpack + cd "${S}" + eautoreconf +} + src_compile() { - econf --disable-dependecy-tracking \ + #For the time being, the smjs-script runtime is required for both gtk and qt + #versions, but the goal is to make the qt4 version depend only on qt-script. + econf --disable-dependency-tracking \ + --disable-update-desktop-database \ + --disable-update-mime-database \ --disable-werror \ --enable-libxml2-xml-parser \ --enable-smjs-script-runtime \ @@ -112,31 +126,20 @@ src_compile() { $(use_enable qt4 qt-system-framework) \ $(use_enable qt4 qtwebkit-browser-element) \ $(use_enable qt4 qt-xml-http-request) \ + $(use_enable qt4 qt-script-runtime) \ || die "econf failed" emake || die "emake failed" } src_test() { + #If someone wants to guarantee that emake will not make + #tests fail promiscuosly, please do, otherwise we're using make. make check &> "${WORKDIR}"/check } -src_install() { - base_src_install - - #Icon - newicon resources/gadgets.png googlegadgets.png - - # Desktop entries - if use gtk - then - make_desktop_entry "ggl-gtk" "Google Gadgets (GTK)" googlegadgets - make_desktop_entry "ggl-gtk -s" "Google Gadgets (GTK sidebar)" googlegadgets - fi - - if use qt4 - then - make_desktop_entry "ggl-qt" "Google Gadgets (QT)" googlegadgets - fi +pkg_postinst() { + fdo-mime_desktop_database_update + fdo-mime_mime_database_update } curl_die() { |