From 210be1a4ed295d32487e5bcccdd35a73954c41e4 Mon Sep 17 00:00:00 2001 From: Christian Krause Date: Aug 16 2010 22:58:58 +0000 Subject: * Tue Aug 17 2010 Christian Krause - 1.7.4-1 - Update to development release 1.7.4 (BZ 623624) - Remove upstreamed patches - Add patches to avoid calling update-mime-database or update-desktop-database during "make install" - Cleanup scriptlets - Add update-mime-database to %post / %postun --- diff --git a/.gitignore b/.gitignore index 58e81b0..139e900 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ banshee-1-1.6.1.tar.bz2 +banshee-1-1.7.4.tar.bz2 diff --git a/0001-Add-usr-lib-banshee-1-Backends-to-library-path.patch b/0001-Add-usr-lib-banshee-1-Backends-to-library-path.patch deleted file mode 100644 index 6d02fa2..0000000 --- a/0001-Add-usr-lib-banshee-1-Backends-to-library-path.patch +++ /dev/null @@ -1,29 +0,0 @@ -From ef90643d5af60f4f0e07360fdcb2a9769ed01404 Mon Sep 17 00:00:00 2001 -From: Christian Krause -Date: Fri, 18 Jun 2010 21:51:11 +0200 -Subject: [PATCH] Add /usr/lib/banshee-1/Backends/ to library path - -- mono runtime needs to find libbnpx11.so imported by -Banshee.NowPlaying.X11.dll -- extend LD_LIBRARY_PATH in banshee startup script to -include /usr/lib/banshee-1/Backends ---- - src/Clients/Booter/banshee-1.linux.in | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/src/Clients/Booter/banshee-1.linux.in b/src/Clients/Booter/banshee-1.linux.in -index 86e55d1..af85d8f 100644 ---- a/src/Clients/Booter/banshee-1.linux.in -+++ b/src/Clients/Booter/banshee-1.linux.in -@@ -7,7 +7,7 @@ MONO_EXE="@expanded_libdir@/@PACKAGE@/$exec_asm" - BANSHEE_EXEC_NAME=$(basename $0) - BANSHEE_CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/banshee-1" - --export LD_LIBRARY_PATH=@expanded_libdir@:@expanded_libdir@/@PACKAGE@:@expanded_libdir@/@PACKAGE@/Extensions${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH} -+export LD_LIBRARY_PATH=@expanded_libdir@:@expanded_libdir@/@PACKAGE@:@expanded_libdir@/@PACKAGE@/Extensions:@expanded_libdir@/@PACKAGE@/Backends${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH} - export GST_PLUGIN_PATH=@expanded_libdir@/@PACKAGE@/gstreamer-0.10${GST_PLUGIN_PATH+:$GST_PLUGIN_PATH} - if [ $BANSHEE_EXEC_NAME = "muinshee" ]; then - BANSHEE_CLIENT="Muinshee" --- -1.6.6.1 - diff --git a/banshee-1.6.1-transparent-icon.patch b/banshee-1.6.1-transparent-icon.patch deleted file mode 100644 index 3150cd3..0000000 --- a/banshee-1.6.1-transparent-icon.patch +++ /dev/null @@ -1,209 +0,0 @@ -diff -uNr banshee-1-1.6.1.old2/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/X11NotificationArea.cs banshee-1-1.6.1/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/X11NotificationArea.cs ---- banshee-1-1.6.1.old2/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/X11NotificationArea.cs 2009-11-22 17:19:34.000000000 +0100 -+++ banshee-1-1.6.1/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/X11NotificationArea.cs 2010-06-26 22:35:34.000000000 +0200 -@@ -46,11 +46,14 @@ - { - private uint stamp; - private Orientation orientation; -+ private Visual visual; -+ private bool visual_is_rgba; - - private IntPtr selection_atom; - private IntPtr manager_atom; - private IntPtr system_tray_opcode_atom; - private IntPtr orientation_atom; -+ private IntPtr visual_atom; - private IntPtr message_data_atom; - private IntPtr manager_window; - private FilterFunc filter; -@@ -122,6 +125,18 @@ - orientation = Orientation.Horizontal; - AddEvents ((int)EventMask.PropertyChangeMask); - filter = new FilterFunc (ManagerFilter); -+ -+ Display display = Screen.Display; -+ IntPtr xdisplay = gdk_x11_display_get_xdisplay (display.Handle); -+ selection_atom = XInternAtom (xdisplay, "_NET_SYSTEM_TRAY_S" + Screen.Number.ToString (), false); -+ manager_atom = XInternAtom (xdisplay, "MANAGER", false); -+ system_tray_opcode_atom = XInternAtom (xdisplay, "_NET_SYSTEM_TRAY_OPCODE", false); -+ orientation_atom = XInternAtom (xdisplay, "_NET_SYSTEM_TRAY_ORIENTATION", false); -+ visual_atom = XInternAtom (xdisplay, "_NET_SYSTEM_TRAY_VISUAL", false); -+ message_data_atom = XInternAtom (xdisplay, "_NET_SYSTEM_TRAY_MESSAGE_DATA", false); -+ -+ Screen.RootWindow.AddFilter (filter); -+ UpdateManagerWindow (false); - } - - [GLib.ConnectBefore] -@@ -130,14 +145,29 @@ - Gtk.Widget widget = (Gtk.Widget)obj; - Gdk.Rectangle area = args.Event.Area; - -- widget.GdkWindow.ClearArea (area.X, area.Y, area.Width, area.Height); -+ if (visual_is_rgba) { -+ Cairo.Context cr = Gdk.CairoHelper.Create (widget.GdkWindow); -+ cr.SetSourceRGBA (0, 0, 0, 0); -+ cr.Operator = Cairo.Operator.Source; -+ Gdk.CairoHelper.Region (cr, args.Event.Region); -+ cr.Fill (); -+ -+ ((IDisposable)cr.Target).Dispose (); -+ ((IDisposable)cr).Dispose (); -+ } else { -+ widget.GdkWindow.ClearArea (area.X, area.Y, area.Width, area.Height); -+ } - } - - private void MakeTransparentAgain (object obj, Gtk.StyleSetArgs args) - { - Gtk.Widget widget = (Gtk.Widget)obj; - -- widget.GdkWindow.SetBackPixmap (null, true); -+ if (visual_is_rgba) { -+ widget.GdkWindow.Background = Gdk.Color.Zero; -+ } else { -+ widget.GdkWindow.SetBackPixmap (null, true); -+ } - } - - private void MakeTransparent (object obj, EventArgs args) -@@ -147,26 +177,37 @@ - return; - - widget.AppPaintable = true; -- widget.DoubleBuffered = false; -- widget.GdkWindow.SetBackPixmap (null, true); -+ if (visual_is_rgba) { -+ widget.GdkWindow.Background = Gdk.Color.Zero; -+ } else { -+ widget.DoubleBuffered = false; -+ widget.GdkWindow.SetBackPixmap (null, true); -+ } - widget.ExposeEvent += TransparentExposeEvent; - widget.StyleSet += MakeTransparentAgain; - } - -+ private void SetColormap () -+ { -+ Gtk.Widget widget = (Gtk.Widget)this; -+ -+ if (visual == null || visual == Screen.SystemVisual) { -+ widget.Colormap = Screen.SystemColormap; -+ } else if (visual == Screen.RgbVisual) { -+ widget.Colormap = Screen.RgbColormap; -+ } else if (visual == Screen.RgbaVisual) { -+ widget.Colormap = Screen.RgbaColormap; -+ } else { -+ widget.Colormap = new Colormap (visual, false); -+ } -+ } -+ - protected override void OnRealized () - { -+ SetColormap (); - base.OnRealized (); - MakeTransparent (this, EventArgs.Empty); -- Display display = Screen.Display; -- IntPtr xdisplay = gdk_x11_display_get_xdisplay (display.Handle); -- selection_atom = XInternAtom (xdisplay, "_NET_SYSTEM_TRAY_S" + Screen.Number.ToString (), false); -- manager_atom = XInternAtom (xdisplay, "MANAGER", false); -- system_tray_opcode_atom = XInternAtom (xdisplay, "_NET_SYSTEM_TRAY_OPCODE", false); -- orientation_atom = XInternAtom (xdisplay, "_NET_SYSTEM_TRAY_ORIENTATION", false); -- message_data_atom = XInternAtom (xdisplay, "_NET_SYSTEM_TRAY_MESSAGE_DATA", false); -- UpdateManagerWindow (false); - SendDockRequest (); -- Screen.RootWindow.AddFilter (filter); - } - - protected override void OnAdded (Gtk.Widget child) -@@ -216,11 +257,23 @@ - gdkwin.AddFilter (filter); - } - -- if (dock_if_realized && IsRealized) { -- SendDockRequest (); -- } -- - GetOrientationProperty (); -+ GetVisualProperty (); -+ -+ if (IsRealized) { -+ if ((visual == null && Visual == Screen.SystemVisual) -+ || visual == Visual) { -+ // Already have the right visual, can just dock -+ if (dock_if_realized) { -+ SendDockRequest (); -+ } -+ } else { -+ // Need to re-realize the widget to get the right visual -+ Hide (); -+ Unrealize (); -+ Show (); -+ } -+ } - } - } - -@@ -334,6 +387,54 @@ - } - } - -+ private void GetVisualProperty () -+ { -+ IntPtr display; -+ IntPtr type; -+ int format; -+ IntPtr prop_return; -+ IntPtr nitems, bytes_after; -+ int error, result; -+ -+ if (manager_window == IntPtr.Zero) { -+ return; -+ } -+ -+ display = gdk_x11_display_get_xdisplay (Display.Handle); -+ -+ gdk_error_trap_push (); -+ type = IntPtr.Zero; -+ -+ result = XGetWindowProperty (display, manager_window, visual_atom, (IntPtr) 0, -+ (IntPtr) System.Int32.MaxValue, false, (IntPtr) XAtom.VisualId, out type, out format, -+ out nitems, out bytes_after, out prop_return); -+ -+ error = gdk_error_trap_pop (); -+ -+ if (error != 0 || result != 0) { -+ return; -+ } -+ -+ if (type == (IntPtr) XAtom.VisualId) { -+ int visual_id = Marshal.ReadInt32 (prop_return); -+ IntPtr raw_ret = gdk_x11_screen_lookup_visual (Screen.Handle, visual_id); -+ visual = GLib.Object.GetObject(raw_ret) as Gdk.Visual; -+ } -+ -+ // TODO the proper check is (visual->red_prec + visual->blue_prec + visual->green_prec < visual->depth) -+ visual_is_rgba = visual != null && visual == Screen.RgbaVisual; -+ -+ // we can't be double-buffered when we aren't using a real RGBA visual -+ DoubleBuffered = visual_is_rgba; -+ -+ if (prop_return != IntPtr.Zero) { -+ XFree (prop_return); -+ } -+ } -+ -+ [DllImport ("libgdk-x11-2.0.so.0")] -+ private static extern IntPtr gdk_x11_screen_lookup_visual (IntPtr screen, int visual_id); -+ - [DllImport ("libgdk-x11-2.0.so.0")] - private static extern IntPtr gdk_x11_display_get_xdisplay (IntPtr display); - -@@ -462,6 +563,7 @@ - - private enum XAtom { - Cardinal = 6, -+ VisualId = 32, - LASTAtom - } - diff --git a/banshee-1.7.4-no-update-desktop-database.patch b/banshee-1.7.4-no-update-desktop-database.patch new file mode 100644 index 0000000..3e378fa --- /dev/null +++ b/banshee-1.7.4-no-update-desktop-database.patch @@ -0,0 +1,12 @@ +diff -uNr banshee-1-1.7.4.old/data/desktop-files/Makefile.in banshee-1-1.7.4/data/desktop-files/Makefile.in +--- banshee-1-1.7.4.old/data/desktop-files/Makefile.in 2010-08-11 21:42:54.000000000 +0200 ++++ banshee-1-1.7.4/data/desktop-files/Makefile.in 2010-08-15 15:25:22.000000000 +0200 +@@ -595,8 +595,6 @@ + + @INTLTOOL_DESKTOP_RULE@ + +-install-data-hook: +- test "$(top_srcdir)" = "$(top_builddir)" && update-desktop-database $(DESTDIR)$(datadir)/applications || : + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: diff --git a/banshee-1.7.4-no-update-mime-database.patch b/banshee-1.7.4-no-update-mime-database.patch new file mode 100644 index 0000000..8d5941e --- /dev/null +++ b/banshee-1.7.4-no-update-mime-database.patch @@ -0,0 +1,14 @@ +diff -uNr banshee-1-1.7.4.old/src/Extensions/Banshee.AmazonMp3/Makefile.in banshee-1-1.7.4/src/Extensions/Banshee.AmazonMp3/Makefile.in +--- banshee-1-1.7.4.old/src/Extensions/Banshee.AmazonMp3/Makefile.in 2010-08-11 21:42:59.000000000 +0200 ++++ banshee-1-1.7.4/src/Extensions/Banshee.AmazonMp3/Makefile.in 2010-08-15 14:57:26.000000000 +0200 +@@ -844,10 +844,6 @@ + bamz: bamz.in + @echo ' GEN $@'; sed 's,@bansheedir@,$(pkglibdir),g' < $< > $@ + +-define EXTRA_INSTALL_DATA_HOOK +- test "$(top_srcdir)" = "$(top_builddir)" && update-mime-database -V $(DESTDIR)$(datadir)/mime || : +-endef +- + all: $(ASSEMBLY_FILE) theme-icons + + run: diff --git a/banshee.spec b/banshee.spec index 11d75d4..135344e 100644 --- a/banshee.spec +++ b/banshee.spec @@ -1,5 +1,5 @@ %global mono_shared %{_builddir}/%{?buildsubdir} -%global mainver 1.6.1 +%global mainver 1.7.4 #%global gitdate 20091216 #%global gitcommit 8e29a44269cd4b2a27822e62815f5bc6e22dfb58 @@ -7,7 +7,7 @@ Name: banshee Version: %{mainver}%{?patchver} #Release: 0.1.%{gitdate}git%{?dist} -Release: 5%{?dist} +Release: 1%{?dist} Summary: Easily import, manage, and play selections from your music collection Group: Applications/Multimedia @@ -17,20 +17,16 @@ URL: http://banshee-project.org/ # based on libdrm's make-git-snapshot.sh # sh banshee-make-git-snapshot.sh #Source0: %{name}-%{gitdate}.tar.bz2 -Source0: http://download.banshee-project.org/banshee/stable/%{mainver}/banshee-1-%{version}.tar.bz2 +Source0: http://download.banshee-project.org/banshee/unstable/%{mainver}/banshee-1-%{version}.tar.bz2 Source1: README.Fedora #Source2: %{name}-make-git-snapshot.sh # for snapshots only: don't run configure at the end of autogen.sh #Patch0: %{name}-noconf.patch -# avoid DllNotFoundException: libbnpx11 -# https://bugzilla.gnome.org/show_bug.cgi?id=622028 -Patch1: 0001-Add-usr-lib-banshee-1-Backends-to-library-path.patch - -# https://bugzilla.gnome.org/show_bug.cgi?id=588255 -# https://bugzilla.gnome.org/attachment.cgi?id=164158 (white spaces fixed) -Patch2: banshee-1.6.1-transparent-icon.patch +# https://bugzilla.gnome.org/show_bug.cgi?id=625264 +Patch1: banshee-1.7.4-no-update-mime-database.patch +Patch2: banshee-1.7.4-no-update-desktop-database.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -91,6 +87,7 @@ BuildRequires: desktop-file-utils BuildRequires: autoconf automake libtool +Requires: shared-mime-info Requires: gstreamer-plugins-good Requires: podsleuth >= 0.6.6 Requires: libmtp-hal @@ -147,9 +144,9 @@ developing applications that use %{name}-musicbrainz. #%setup -q -n %{name}-%{gitdate} # Snapshots only #%patch0 -p1 -b .noconf -%patch1 -p1 -b .ldlibdir_fix cp -p %{SOURCE1} . -%patch2 -p1 -b .transparent_icon +%patch1 -p1 -b .no-update-mime-database +%patch2 -p1 -b .no-update-desktop-database %build export MONO_SHARED_DIR=%mono_shared @@ -188,22 +185,21 @@ desktop-file-install --vendor gnome --delete-original \ %{__rm} -rf %{buildroot} %post -update-desktop-database %{_datadir}/applications - +update-desktop-database &> /dev/null || : +update-mime-database %{_datadir}/mime &> /dev/null || : touch --no-create %{_datadir}/icons/hicolor || : -if [ -x %{_bindir}/gtk-update-icon-cache ]; then - %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : -fi - %postun -update-desktop-database %{_datadir}/applications +update-desktop-database &> /dev/null || : +update-mime-database %{_datadir}/mime &> /dev/null || : -touch --no-create %{_datadir}/icons/hicolor || : -if [ -x %{_bindir}/gtk-update-icon-cache ]; then - %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : +if [ $1 -eq 0 ] ; then + touch --no-create %{_datadir}/icons/hicolor &>/dev/null + gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : fi +%posttrans +gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %files -f %{name}-1.lang %defattr(-,root,root,-) @@ -212,6 +208,7 @@ fi %doc COPYING AUTHORS README README.Fedora NEWS %{_bindir}/banshee-1 %{_bindir}/muinshee +%{_bindir}/bamz %exclude %{_libdir}/banshee-1/MusicBrainz.dll* %{_libdir}/banshee-1 %{_datadir}/applications/*.desktop @@ -219,7 +216,8 @@ fi %{_datadir}/dbus-1/services/org.bansheeproject.CollectionIndexer.service %{_datadir}/banshee-1/ %{_datadir}/icons/hicolor/*/apps/media-player-banshee.png -#%exclude %{_datadir}/icons/hicolor/icon-theme.cache +%{_datadir}/gnome/help/banshee +%{_datadir}/mime/packages/* %files devel %defattr(-,root,root,-) @@ -237,6 +235,14 @@ fi %changelog +* Tue Aug 17 2010 Christian Krause - 1.7.4-1 +- Update to development release 1.7.4 (BZ 623624) +- Remove upstreamed patches +- Add patches to avoid calling update-mime-database or + update-desktop-database during "make install" +- Cleanup scriptlets +- Add update-mime-database to %%post / %%postun + * Sat Jun 26 2010 Christian Krause - 1.6.1-5 - Fix status icon transparency (BZ 533308) diff --git a/sources b/sources index c23954e..538c40e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c3456dfa052d9a323f68d3763212c23d banshee-1-1.6.1.tar.bz2 +364eb71089d3268591a53c8211daa9d4 banshee-1-1.7.4.tar.bz2