From d6652971ba690df550ae2163563e65c0816227aabe3c245a4e26c07e10e17a7e Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Tue, 31 May 2011 13:57:41 +0000 Subject: [PATCH] Accepting request 72287 from home:vuntz:branches:GNOME:Apps Fix build OBS-URL: https://build.opensuse.org/request/show/72287 OBS-URL: https://build.opensuse.org/package/show/GNOME:Apps/gnote?expand=0&rev=9 --- gnote-no-deprecated.patch | 30 ++++++++++++++++++++++++++++++ gnote.changes | 9 +++++++++ gnote.spec | 11 +++++++++-- 3 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 gnote-no-deprecated.patch diff --git a/gnote-no-deprecated.patch b/gnote-no-deprecated.patch new file mode 100644 index 0000000..428d125 --- /dev/null +++ b/gnote-no-deprecated.patch @@ -0,0 +1,30 @@ +commit 49cefcc356732b25f34e8b1badabbab079c8377b +Author: Vincent Untz +Date: Tue May 31 15:45:26 2011 +0200 + + Stop using some deprecated GdkDrawable API + + https://bugzilla.gnome.org/show_bug.cgi?id=651551 + +diff --git a/libtomboy/tomboyutil.c b/libtomboy/tomboyutil.c +index 77e71f9..661cb9f 100644 +--- a/libtomboy/tomboyutil.c ++++ b/libtomboy/tomboyutil.c +@@ -73,7 +73,7 @@ tomboy_window_move_to_current_workspace (GtkWindow *window) + { + GdkWindow *gdkwin = gtk_widget_get_window(GTK_WIDGET (window)); + GdkWindow *rootwin = +- gdk_screen_get_root_window (gdk_drawable_get_screen (gdkwin)); ++ gdk_screen_get_root_window (gdk_window_get_screen (gdkwin)); + + GdkAtom current_desktop = + gdk_atom_intern ("_NET_CURRENT_DESKTOP", FALSE); +@@ -107,7 +107,7 @@ tomboy_window_move_to_current_workspace (GtkWindow *window) + xev.xclient.window = GDK_WINDOW_XID (gdkwin); + xev.xclient.message_type = + gdk_x11_atom_to_xatom_for_display( +- gdk_drawable_get_display (gdkwin), ++ gdk_window_get_display (gdkwin), + wm_desktop); + xev.xclient.format = 32; + xev.xclient.data.l[0] = workspace; diff --git a/gnote.changes b/gnote.changes index 226c126..4c4dc22 100644 --- a/gnote.changes +++ b/gnote.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Tue May 31 14:55:17 CEST 2011 - vuntz@opensuse.org + +- Disable the build of the applet with a %build_applet define, + unless %favor_gtk2 is set (which means we don't build against + GNOME 3). +- Add gnote-no-deprecated.patch to not use some deprecated APIs + that break the build. + ------------------------------------------------------------------- Thu May 12 10:09:32 UTC 2011 - feeyo@cronosproject.org diff --git a/gnote.spec b/gnote.spec index 66b3190..20e5433 100644 --- a/gnote.spec +++ b/gnote.spec @@ -15,17 +15,19 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild - +%define build_applet %{?favor_gtk2} Name: gnote Version: 0.7.4 Release: 1 +# FIXME: on version upgrade, check if build_applet is still needed (last checked: 0.7.4) License: GNU GPL v3 or later Summary: A Port of Tomboy to C++ Group: Productivity/Text/Editors Url: http://live.gnome.org/Gnote Source: %{name}-%{version}.tar.bz2 +# PATCH-FIX-UPSTREAM gnote-no-deprecated.patch bgo#651551 vuntz@opensuse.org -- Do not use deprecated API +Patch0: gnote-no-deprecated.patch BuildRequires: boost-devel >= 1.34 BuildRequires: fdupes BuildRequires: gcc-c++ @@ -34,7 +36,9 @@ BuildRequires: gnome-doc-utils-devel BuildRequires: gtkmm2-devel >= 2.20 BuildRequires: gtkspell-devel BuildRequires: intltool +%if 0%{?build_applet} BuildRequires: libpanelappletmm-devel +%endif BuildRequires: libuuid-devel BuildRequires: libxml2-devel BuildRequires: libxslt-devel @@ -51,6 +55,7 @@ to come). Synchronization support is being worked on. %lang_package %prep %setup -q +%patch0 -p1 %build %configure --disable-static --disable-schemas-install --disable-scrollkeeper --enable-dbus @@ -95,8 +100,10 @@ test "%{buildroot}" != "/" && %__rm -rf %{buildroot} %dir %{_datadir}/omf/%{name}/ %doc %{_datadir}/omf/%{name}/%{name}-C.omf %{_bindir}/gnote +%if 0%{?build_applet} %{_prefix}/lib/gnote-applet %{_libdir}/bonobo/servers/GNOME_GnoteApplet.server +%endif %{_libdir}/gnote/ %{_datadir}/applications/gnote.desktop %{_datadir}/gnote/