From 415856bdd4f48ab4f2732996f0bae58595092bbe Mon Sep 17 00:00:00 2001 From: Parabola Date: Tue, 5 Apr 2011 14:26:38 +0000 Subject: Tue Apr 5 14:26:38 UTC 2011 --- extra/beagle/PKGBUILD | 64 ++ extra/beagle/beagle-0.3.9-gmime24.patch | 703 +++++++++++++++++++++ extra/beagle/beagle-0.3.9-mono-data-sqlite-2.patch | 81 +++ extra/beagle/beagle-0.3.9-spew.patch | 12 + extra/beagle/beagle.install | 8 + extra/beagle/mono-2.8.patch | 152 +++++ 6 files changed, 1020 insertions(+) create mode 100644 extra/beagle/PKGBUILD create mode 100644 extra/beagle/beagle-0.3.9-gmime24.patch create mode 100644 extra/beagle/beagle-0.3.9-mono-data-sqlite-2.patch create mode 100644 extra/beagle/beagle-0.3.9-spew.patch create mode 100644 extra/beagle/beagle.install create mode 100644 extra/beagle/mono-2.8.patch (limited to 'extra/beagle') diff --git a/extra/beagle/PKGBUILD b/extra/beagle/PKGBUILD new file mode 100644 index 000000000..37bfe2b29 --- /dev/null +++ b/extra/beagle/PKGBUILD @@ -0,0 +1,64 @@ +# $Id: PKGBUILD 102373 2010-12-07 14:55:37Z jgc $ +# Maintainer: Daniel Isenmann +# Contributor: Shadowhand + +pkgname=beagle +pkgver=0.3.9 +pkgrel=4 +pkgdesc="Search tool that ransacks your personal information space to find whatever you are looking for." +arch=(i686 x86_64) +url="http://beagle-project.org/" +license=('custom') +depends=('gnome-sharp>=2.24.1' 'gmime>=2.4.10' 'evolution-sharp>=0.20.0' 'libexif' 'librsvg>=2.26.0' 'sqlite3>=3.6.13' 'libxss' 'wv>=1.2.4' 'chmlib' 'gsf-sharp>=0.8.1' 'libsm' 'xdg-utils' 'ndesk-dbus-glib' 'mono>=2.4' 'taglib-sharp') +makedepends=('intltool' 'zip' 'pkgconfig') +options=('!libtool') +backup=('etc/beagle/crawl-rules/crawl-manpages' + 'etc/beagle/crawl-rules/crawl-windows' + 'etc/beagle/crawl-rules/crawl-applications' + 'etc/beagle/crawl-rules/crawl-documentation' + 'etc/beagle/crawl-rules/crawl-monodoc' + 'etc/beagle/crawl-rules/crawl-executables') +install=beagle.install +source=(http://ftp.gnome.org/pub/GNOME/sources/${pkgname}/0.3/${pkgname}-${pkgver}.tar.bz2 + beagle-0.3.9-spew.patch + beagle-0.3.9-gmime24.patch + beagle-0.3.9-mono-data-sqlite-2.patch + mono-2.8.patch) +md5sums=('b73c12423d2d67133dbb05933f4c8fe1' + '003ada7acc2724e94e0218e4a6705b4a' + '73b5a5ea03dc3a7ca71ed41772e4dd82' + 'd99a93730485b7f9a5e2111a8b2bf440' + '7ef884a29c17b73a20cb09fac0536a47') + +build() { + export "MONO_SHARED_DIR=${srcdir}/.wabi" + mkdir -p "${MONO_SHARED_DIR}" + + cd "${srcdir}/${pkgname}-${pkgver}" + sed -i -e 's/CRAWL_USER=beagleindex/CRAWL_USER=beaglidx/' tools/beagle-crawl-system.in + sed -i -e 's/libchm.so.1/libchm.so.0/' Util/ChmFile.cs + sed -i -e 's/libgnome-desktop-2.so.2/libgnome-desktop-2.so.17/' search/Beagle.Search.exe.config + sed -i -e 's/python/python2/' tools/keygrabber.py + + patch -Np1 -i "${srcdir}/beagle-0.3.9-spew.patch" + patch -Np1 -i "${srcdir}/beagle-0.3.9-mono-data-sqlite-2.patch" + patch -Np1 -i "${srcdir}/beagle-0.3.9-gmime24.patch" + patch -Np1 -i "${srcdir}/mono-2.8.patch" + + libtoolize --force + autoreconf + + sed -i -e 's/gmime-sharp/gmime-sharp-2.4/' configure + + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ + --enable-inotify \ + --disable-static \ + --disable-docs + make + make DESTDIR="${pkgdir}" install + + install -m755 -d "${pkgdir}/var/cache/beagle/indexes" + chown -R 86:86 "${pkgdir}/var/cache/beagle" + install -m755 -d "${pkgdir}/usr/share/licenses/beagle" + install -m644 COPYING "${pkgdir}/usr/share/licenses/beagle/" +} diff --git a/extra/beagle/beagle-0.3.9-gmime24.patch b/extra/beagle/beagle-0.3.9-gmime24.patch new file mode 100644 index 000000000..7d943dabf --- /dev/null +++ b/extra/beagle/beagle-0.3.9-gmime24.patch @@ -0,0 +1,703 @@ +diff -upNr beagle-0.3.9.orign/beagled/EvolutionMailQueryable/EvolutionMailIndexableGenerator.cs beagle-0.3.9/beagled/EvolutionMailQueryable/EvolutionMailIndexableGenerator.cs +--- beagle-0.3.9.orign/beagled/EvolutionMailQueryable/EvolutionMailIndexableGenerator.cs 2008-04-25 20:17:04.000000000 +0200 ++++ beagle-0.3.9/beagled/EvolutionMailQueryable/EvolutionMailIndexableGenerator.cs 2009-01-28 12:33:17.000000000 +0100 +@@ -333,28 +333,46 @@ namespace Beagle.Daemon.EvolutionMailQue + indexable.AddProperty (Property.NewUnsearched ("fixme:folder", this.folder_name)); + + GMime.InternetAddressList addrs; +- +- addrs = message.GetRecipients (GMime.Message.RecipientType.To); +- foreach (GMime.InternetAddress ia in addrs) { +- if (this.folder_name == "Sent" && ia.AddressType != GMime.InternetAddressType.Group) +- indexable.AddProperty (Property.NewUnsearched ("fixme:sentTo", ia.Addr)); ++ ++ if (this.folder_name == "Sent") { ++ addrs = message.GetRecipients (GMime.RecipientType.To); ++ foreach (GMime.InternetAddress ia in addrs) { ++ if (ia is GMime.InternetAddressMailbox) { ++ GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox; ++ ++ indexable.AddProperty (Property.NewUnsearched ("fixme:sentTo", mailbox.Address)); ++ } ++ } ++ ++ addrs.Dispose (); + } +- addrs.Dispose (); +- +- addrs = message.GetRecipients (GMime.Message.RecipientType.Cc); +- foreach (GMime.InternetAddress ia in addrs) { +- if (this.folder_name == "Sent" && ia.AddressType != GMime.InternetAddressType.Group) +- indexable.AddProperty (Property.NewUnsearched ("fixme:sentTo", ia.Addr)); ++ ++ if (this.folder_name == "Sent") { ++ addrs = message.GetRecipients (GMime.RecipientType.Cc); ++ foreach (GMime.InternetAddress ia in addrs) { ++ if (ia is GMime.InternetAddressMailbox) { ++ GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox; ++ ++ indexable.AddProperty (Property.NewUnsearched ("fixme:sentTo", mailbox.Address)); ++ } ++ } ++ ++ addrs.Dispose (); + } +- addrs.Dispose (); +- +- addrs = GMime.InternetAddressList.ParseString (GMime.Utils.HeaderDecodePhrase (message.Sender)); +- foreach (GMime.InternetAddress ia in addrs) { +- if (this.folder_name != "Sent" && ia.AddressType != GMime.InternetAddressType.Group) +- indexable.AddProperty (Property.NewUnsearched ("fixme:gotFrom", ia.Addr)); ++ ++ if (this.folder_name != "Sent") { ++ addrs = GMime.InternetAddressList.Parse (message.Sender); ++ foreach (GMime.InternetAddress ia in addrs) { ++ if (ia is GMime.InternetAddressMailbox) { ++ GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox; ++ ++ indexable.AddProperty (Property.NewUnsearched ("fixme:gotFrom", mailbox.Address)); ++ } ++ } ++ ++ addrs.Dispose (); + } +- addrs.Dispose (); +- ++ + if (this.folder_name == "Sent") + indexable.AddProperty (Property.NewFlag ("fixme:isSent")); + +@@ -750,48 +768,54 @@ namespace Beagle.Daemon.EvolutionMailQue + } + + GMime.InternetAddressList addrs; +- addrs = GMime.InternetAddressList.ParseString (messageInfo.to); ++ addrs = GMime.InternetAddressList.Parse (messageInfo.to); + foreach (GMime.InternetAddress ia in addrs) { ++ GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox; ++ + if (!have_content) { + indexable.AddProperty (Property.NewUnsearched ("fixme:to", ia.ToString (false))); +- if (ia.AddressType != GMime.InternetAddressType.Group) +- indexable.AddProperty (Property.New ("fixme:to_address", ia.Addr)); +- ++ if (ia is GMime.InternetAddressMailbox) ++ indexable.AddProperty (Property.New ("fixme:to_address", mailbox.Address)); ++ + indexable.AddProperty (Property.New ("fixme:to_name", ia.Name)); + } +- +- if (this.folder_name == "Sent" && ia.AddressType != GMime.InternetAddressType.Group) +- indexable.AddProperty (Property.NewUnsearched ("fixme:sentTo", ia.Addr)); ++ ++ if (this.folder_name == "Sent" && ia is GMime.InternetAddressMailbox) ++ indexable.AddProperty (Property.NewUnsearched ("fixme:sentTo", mailbox.Address)); + } + addrs.Dispose (); + +- addrs = GMime.InternetAddressList.ParseString (messageInfo.cc); ++ addrs = GMime.InternetAddressList.Parse (messageInfo.cc); + foreach (GMime.InternetAddress ia in addrs) { ++ GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox; ++ + if (!have_content) { + indexable.AddProperty (Property.NewUnsearched ("fixme:cc", ia.ToString (false))); +- if (ia.AddressType != GMime.InternetAddressType.Group) +- indexable.AddProperty (Property.New ("fixme:cc_address", ia.Addr)); +- ++ if (ia is GMime.InternetAddressMailbox) ++ indexable.AddProperty (Property.New ("fixme:cc_address", mailbox.Address)); ++ + indexable.AddProperty (Property.New ("fixme:cc_name", ia.Name)); + } +- +- if (this.folder_name == "Sent" && ia.AddressType != GMime.InternetAddressType.Group) +- indexable.AddProperty (Property.NewUnsearched ("fixme:sentTo", ia.Addr)); ++ ++ if (this.folder_name == "Sent" && ia is GMime.InternetAddressMailbox) ++ indexable.AddProperty (Property.NewUnsearched ("fixme:sentTo", mailbox.Address)); + } + addrs.Dispose (); + +- addrs = GMime.InternetAddressList.ParseString (messageInfo.from); ++ addrs = GMime.InternetAddressList.Parse (messageInfo.from); + foreach (GMime.InternetAddress ia in addrs) { ++ GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox; ++ + if (!have_content) { + indexable.AddProperty (Property.NewUnsearched ("fixme:from", ia.ToString (false))); +- if (ia.AddressType != GMime.InternetAddressType.Group) +- indexable.AddProperty (Property.New ("fixme:from_address", ia.Addr)); +- ++ if (ia is GMime.InternetAddressMailbox) ++ indexable.AddProperty (Property.New ("fixme:from_address", mailbox.Address)); ++ + indexable.AddProperty (Property.New ("fixme:from_name", ia.Name)); + } + +- if (this.folder_name != "Sent" && ia.AddressType != GMime.InternetAddressType.Group) +- indexable.AddProperty (Property.NewUnsearched ("fixme:gotFrom", ia.Addr)); ++ if (this.folder_name != "Sent" && ia is GMime.InternetAddressMailbox) ++ indexable.AddProperty (Property.NewUnsearched ("fixme:gotFrom", mailbox.Address)); + } + addrs.Dispose (); + +diff -upNr beagle-0.3.9.orign/beagled/GoogleBackends/GMailSearchDriver.cs beagle-0.3.9/beagled/GoogleBackends/GMailSearchDriver.cs +--- beagle-0.3.9.orign/beagled/GoogleBackends/GMailSearchDriver.cs 2008-04-25 21:26:19.000000000 +0200 ++++ beagle-0.3.9/beagled/GoogleBackends/GMailSearchDriver.cs 2009-01-28 12:33:17.000000000 +0100 +@@ -322,38 +322,47 @@ namespace Beagle.Daemon.GoogleBackend { + hit.AddProperty (Property.NewDate ("fixme:date", message.Date.ToUniversalTime ())); + + GMime.InternetAddressList addrs; +- addrs = message.GetRecipients (GMime.Message.RecipientType.To); ++ addrs = message.GetRecipients (GMime.RecipientType.To); + foreach (GMime.InternetAddress ia in addrs) { + hit.AddProperty (Property.NewUnsearched ("fixme:to", ia.ToString (false))); +- if (ia.AddressType != GMime.InternetAddressType.Group) +- hit.AddProperty (Property.New ("fixme:to_address", ia.Addr)); +- ++ if (ia is GMime.InternetAddressMailbox) { ++ GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox; ++ ++ hit.AddProperty (Property.New ("fixme:to_address", mailbox.Address)); ++ } ++ + hit.AddProperty (Property.New ("fixme:to_name", ia.Name)); + } + addrs.Dispose (); + +- addrs = message.GetRecipients (GMime.Message.RecipientType.Cc); ++ addrs = message.GetRecipients (GMime.RecipientType.Cc); + foreach (GMime.InternetAddress ia in addrs) { + hit.AddProperty (Property.NewUnsearched ("fixme:cc", ia.ToString (false))); +- if (ia.AddressType != GMime.InternetAddressType.Group) +- hit.AddProperty (Property.New ("fixme:cc_address", ia.Addr)); +- ++ if (ia is GMime.InternetAddressMailbox) { ++ GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox; ++ ++ hit.AddProperty (Property.New ("fixme:cc_address", mailbox.Address)); ++ } ++ + hit.AddProperty (Property.New ("fixme:cc_name", ia.Name)); + } + addrs.Dispose (); + +- addrs = GMime.InternetAddressList.ParseString (GMime.Utils.HeaderDecodePhrase (message.Sender)); ++ addrs = GMime.InternetAddressList.Parse (message.Sender); + foreach (GMime.InternetAddress ia in addrs) { + hit.AddProperty (Property.NewUnsearched ("fixme:from", ia.ToString (false))); +- if (ia.AddressType != GMime.InternetAddressType.Group) +- hit.AddProperty (Property.New ("fixme:from_address", ia.Addr)); +- ++ if (ia is GMime.InternetAddressMailbox) { ++ GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox; ++ ++ hit.AddProperty (Property.New ("fixme:from_address", mailbox.Address)); ++ } ++ + hit.AddProperty (Property.New ("fixme:from_name", ia.Name)); + } + addrs.Dispose (); + + foreach (GMime.References refs in message.References) +- hit.AddProperty (Property.NewUnsearched ("fixme:reference", refs.Msgid)); ++ hit.AddProperty (Property.NewUnsearched ("fixme:reference", refs.MessageId)); + + string list_id = message.GetHeader ("List-Id"); + if (list_id != null) +diff -upNr beagle-0.3.9.orign/beagled/KMailQueryable/KMailIndexer.cs beagle-0.3.9/beagled/KMailQueryable/KMailIndexer.cs +--- beagle-0.3.9.orign/beagled/KMailQueryable/KMailIndexer.cs 2008-02-10 21:24:19.000000000 +0100 ++++ beagle-0.3.9/beagled/KMailQueryable/KMailIndexer.cs 2009-01-28 12:33:17.000000000 +0100 +@@ -407,28 +407,46 @@ namespace Beagle.Daemon.KMailQueryable { + indexable.AddProperty (Property.NewUnsearched ("fixme:folder", folder_name)); + + GMime.InternetAddressList addrs; +- +- addrs = message.GetRecipients (GMime.Message.RecipientType.To); +- foreach (GMime.InternetAddress ia in addrs) { +- if (folder_name == Queryable.SentMailFolderName && ia.AddressType != GMime.InternetAddressType.Group) +- indexable.AddProperty (Property.NewKeyword ("fixme:sentTo", ia.Addr)); +- } +- addrs.Dispose (); +- +- addrs = message.GetRecipients (GMime.Message.RecipientType.Cc); +- foreach (GMime.InternetAddress ia in addrs) { +- if (folder_name == Queryable.SentMailFolderName && ia.AddressType != GMime.InternetAddressType.Group) +- indexable.AddProperty (Property.NewKeyword ("fixme:sentTo", ia.Addr)); +- } +- addrs.Dispose (); +- +- addrs = GMime.InternetAddressList.ParseString (GMime.Utils.HeaderDecodePhrase (message.Sender)); +- foreach (GMime.InternetAddress ia in addrs) { +- if (folder_name != Queryable.SentMailFolderName && ia.AddressType != GMime.InternetAddressType.Group) +- indexable.AddProperty (Property.NewKeyword ("fixme:gotFrom", ia.Addr)); ++ ++ if (folder_name == Queryable.SentMailFolderName) { ++ addrs = message.GetRecipients (GMime.RecipientType.To); ++ foreach (GMime.InternetAddress ia in addrs) { ++ if (ia is GMime.InternetAddressMailbox) { ++ GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox; ++ ++ indexable.AddProperty (Property.NewKeyword ("fixme:sentTo", mailbox.Address)); ++ } ++ } ++ ++ addrs.Dispose (); + } +- addrs.Dispose (); +- ++ ++ if (folder_name == Queryable.SentMailFolderName) { ++ addrs = message.GetRecipients (GMime.RecipientType.Cc); ++ foreach (GMime.InternetAddress ia in addrs) { ++ if (ia is GMime.InternetAddressMailbox) { ++ GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox; ++ ++ indexable.AddProperty (Property.NewKeyword ("fixme:sentTo", mailbox.Address)); ++ } ++ } ++ ++ addrs.Dispose (); ++ } ++ ++ if (folder_name != Queryable.SentMailFolderName) { ++ addrs = GMime.InternetAddressList.Parse (message.Sender); ++ foreach (GMime.InternetAddress ia in addrs) { ++ if (ia is GMime.InternetAddressMailbox) { ++ GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox; ++ ++ indexable.AddProperty (Property.NewKeyword ("fixme:gotFrom", mailbox.Address)); ++ } ++ } ++ ++ addrs.Dispose (); ++ } ++ + if (folder_name == Queryable.SentMailFolderName) + indexable.AddProperty (Property.NewFlag ("fixme:isSent")); + else { +diff -upNr beagle-0.3.9.orign/beagled/ThunderbirdQueryable/ThunderbirdQueryable.cs beagle-0.3.9/beagled/ThunderbirdQueryable/ThunderbirdQueryable.cs +--- beagle-0.3.9.orign/beagled/ThunderbirdQueryable/ThunderbirdQueryable.cs 2008-07-18 16:27:59.000000000 +0200 ++++ beagle-0.3.9/beagled/ThunderbirdQueryable/ThunderbirdQueryable.cs 2009-01-28 12:33:17.000000000 +0100 +@@ -367,9 +367,14 @@ namespace Beagle.Daemon.ThunderbirdQuery + message.Subject = Mime.HeaderDecodeText (GetText (document, "Subject")); + message.Sender = Mime.HeaderDecodePhrase (GetText (document, "Author")); + message.MessageId = GetText (document, "MessageId"); +- message.SetDate (DateTimeUtil.UnixToDateTimeUtc (Convert.ToInt64 (GetText (document, "Date"))), 0); +- message.AddRecipientsFromString ("To", Mime.HeaderDecodePhrase (GetText (document, "Recipients"))); +- ++ message.Date = DateTimeUtil.UnixToDateTimeUtc (Convert.ToInt64 (GetText (document, "Date"))); ++ ++ string str = GetText (document, "Recipients"); ++ GMime.InternetAddressList recipients = GMime.InternetAddressList.Parse (str); ++ foreach (GMime.InternetAddress ia in recipients) ++ message.To.Add (ia); ++ recipients.Dispose (); ++ + return message; + } + +@@ -434,7 +439,7 @@ namespace Beagle.Daemon.ThunderbirdQuery + + // We _know_ that the stream comes from a StreamReader, which uses UTF8 by + // default. So we use that here when parsing our string. +- return (str != null ? Encoding.UTF8.GetString (str, 0, pos) : string.Empty); ++ return (str != null ? System.Text.Encoding.UTF8.GetString (str, 0, pos) : string.Empty); + } + + // This spell "charset=" +@@ -462,7 +467,7 @@ namespace Beagle.Daemon.ThunderbirdQuery + // instead of UTF-8 in some cases and that will really mess things up. + byte[] buffer = null; + int c, header_length = 0, newlines = 0, charset_pos = 0; +- Encoding enc = Encoding.UTF8; ++ System.Text.Encoding enc = System.Text.Encoding.UTF8; + try { + do { + c = stream.BaseStream.ReadByte (); +@@ -491,7 +496,7 @@ namespace Beagle.Daemon.ThunderbirdQuery + stream.BaseStream.Read (buffer, 0, buffer.Length); + + // We need to use correct encoding +- enc = Encoding.GetEncoding (encoding_str); ++ enc = System.Text.Encoding.GetEncoding (encoding_str); + } catch { + } finally { + stream.Close (); +diff -upNr beagle-0.3.9.orign/configure beagle-0.3.9/configure +--- beagle-0.3.9.orign/configure 2008-07-19 13:20:36.000000000 +0200 ++++ beagle-0.3.9/configure 2009-01-28 12:35:43.000000000 +0100 +@@ -2791,7 +2791,7 @@ MONODOC_REQUIRED=1.2.4 + NDESK_DBUS_REQUIRED=0.5.2 + NDESK_DBUS_GLIB_REQUIRED=0.3.0 + GTK_SHARP_REQUIRED=2.10.0 +-GMIME_SHARP_REQUIRED=2.2.0 ++GMIME_SHARP_REQUIRED=2.4.0 + EVOLUTION_SHARP_REQUIRED=0.13.3 + GSF_SHARP_REQUIRED=0.6 + GTK_REQUIRED=2.10.0 +@@ -25660,7 +25660,7 @@ if test -n "$PKG_CONFIG"; then + glade-sharp-2.0 >= \$GTK_SHARP_REQUIRED + gnome-sharp-2.0 >= \$GTK_SHARP_REQUIRED + gnome-vfs-sharp-2.0 >= \$GTK_SHARP_REQUIRED +- gmime-sharp >= \$GMIME_SHARP_REQUIRED ++ gmime-sharp-2.4 >= \$GMIME_SHARP_REQUIRED + \"") >&5 + ($PKG_CONFIG --exists --print-errors " + gtk-sharp-2.0 >= $GTK_SHARP_REQUIRED +@@ -25668,7 +25668,7 @@ if test -n "$PKG_CONFIG"; then + glade-sharp-2.0 >= $GTK_SHARP_REQUIRED + gnome-sharp-2.0 >= $GTK_SHARP_REQUIRED + gnome-vfs-sharp-2.0 >= $GTK_SHARP_REQUIRED +- gmime-sharp >= $GMIME_SHARP_REQUIRED ++ gmime-sharp-2.4 >= $GMIME_SHARP_REQUIRED + ") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +@@ -25679,7 +25679,7 @@ if test -n "$PKG_CONFIG"; then + glade-sharp-2.0 >= $GTK_SHARP_REQUIRED + gnome-sharp-2.0 >= $GTK_SHARP_REQUIRED + gnome-vfs-sharp-2.0 >= $GTK_SHARP_REQUIRED +- gmime-sharp >= $GMIME_SHARP_REQUIRED ++ gmime-sharp-2.4 >= $GMIME_SHARP_REQUIRED + " 2>/dev/null` + else + pkg_failed=yes +@@ -25699,7 +25699,7 @@ if test -n "$PKG_CONFIG"; then + glade-sharp-2.0 >= \$GTK_SHARP_REQUIRED + gnome-sharp-2.0 >= \$GTK_SHARP_REQUIRED + gnome-vfs-sharp-2.0 >= \$GTK_SHARP_REQUIRED +- gmime-sharp >= \$GMIME_SHARP_REQUIRED ++ gmime-sharp-2.4 >= \$GMIME_SHARP_REQUIRED + \"") >&5 + ($PKG_CONFIG --exists --print-errors " + gtk-sharp-2.0 >= $GTK_SHARP_REQUIRED +@@ -25707,7 +25707,7 @@ if test -n "$PKG_CONFIG"; then + glade-sharp-2.0 >= $GTK_SHARP_REQUIRED + gnome-sharp-2.0 >= $GTK_SHARP_REQUIRED + gnome-vfs-sharp-2.0 >= $GTK_SHARP_REQUIRED +- gmime-sharp >= $GMIME_SHARP_REQUIRED ++ gmime-sharp-2.4 >= $GMIME_SHARP_REQUIRED + ") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +@@ -25718,7 +25718,7 @@ if test -n "$PKG_CONFIG"; then + glade-sharp-2.0 >= $GTK_SHARP_REQUIRED + gnome-sharp-2.0 >= $GTK_SHARP_REQUIRED + gnome-vfs-sharp-2.0 >= $GTK_SHARP_REQUIRED +- gmime-sharp >= $GMIME_SHARP_REQUIRED ++ gmime-sharp-2.4 >= $GMIME_SHARP_REQUIRED + " 2>/dev/null` + else + pkg_failed=yes +@@ -25744,7 +25744,7 @@ fi + glade-sharp-2.0 >= $GTK_SHARP_REQUIRED + gnome-sharp-2.0 >= $GTK_SHARP_REQUIRED + gnome-vfs-sharp-2.0 >= $GTK_SHARP_REQUIRED +- gmime-sharp >= $GMIME_SHARP_REQUIRED ++ gmime-sharp-2.4 >= $GMIME_SHARP_REQUIRED + "` + else + BEAGLE_UI_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors " +@@ -25753,7 +25753,7 @@ fi + glade-sharp-2.0 >= $GTK_SHARP_REQUIRED + gnome-sharp-2.0 >= $GTK_SHARP_REQUIRED + gnome-vfs-sharp-2.0 >= $GTK_SHARP_REQUIRED +- gmime-sharp >= $GMIME_SHARP_REQUIRED ++ gmime-sharp-2.4 >= $GMIME_SHARP_REQUIRED + "` + fi + # Put the nasty error message in config.log where it belongs +@@ -25765,7 +25765,7 @@ fi + glade-sharp-2.0 >= $GTK_SHARP_REQUIRED + gnome-sharp-2.0 >= $GTK_SHARP_REQUIRED + gnome-vfs-sharp-2.0 >= $GTK_SHARP_REQUIRED +- gmime-sharp >= $GMIME_SHARP_REQUIRED ++ gmime-sharp-2.4 >= $GMIME_SHARP_REQUIRED + ) were not met: + + $BEAGLE_UI_PKG_ERRORS +@@ -25783,7 +25783,7 @@ echo "$as_me: error: Package requirement + glade-sharp-2.0 >= $GTK_SHARP_REQUIRED + gnome-sharp-2.0 >= $GTK_SHARP_REQUIRED + gnome-vfs-sharp-2.0 >= $GTK_SHARP_REQUIRED +- gmime-sharp >= $GMIME_SHARP_REQUIRED ++ gmime-sharp-2.4 >= $GMIME_SHARP_REQUIRED + ) were not met: + + $BEAGLE_UI_PKG_ERRORS +@@ -26167,18 +26167,18 @@ if test -n "$PKG_CONFIG"; then + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"evolution-sharp >= \$EVOLUTION_SHARP_REQUIRED \\ + gconf-sharp-2.0 >= \$GTK_SHARP_REQUIRED \\ + glib-sharp-2.0 >= \$GTK_SHARP_REQUIRED +- gmime-sharp >= \$GMIME_SHARP_REQUIRED\"") >&5 ++ gmime-sharp-2.4 >= \$GMIME_SHARP_REQUIRED\"") >&5 + ($PKG_CONFIG --exists --print-errors "evolution-sharp >= $EVOLUTION_SHARP_REQUIRED \ + gconf-sharp-2.0 >= $GTK_SHARP_REQUIRED \ + glib-sharp-2.0 >= $GTK_SHARP_REQUIRED +- gmime-sharp >= $GMIME_SHARP_REQUIRED") 2>&5 ++ gmime-sharp-2.4 >= $GMIME_SHARP_REQUIRED") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_EVO_CFLAGS=`$PKG_CONFIG --cflags "evolution-sharp >= $EVOLUTION_SHARP_REQUIRED \ + gconf-sharp-2.0 >= $GTK_SHARP_REQUIRED \ + glib-sharp-2.0 >= $GTK_SHARP_REQUIRED +- gmime-sharp >= $GMIME_SHARP_REQUIRED" 2>/dev/null` ++ gmime-sharp-2.4 >= $GMIME_SHARP_REQUIRED" 2>/dev/null` + else + pkg_failed=yes + fi +@@ -26194,18 +26194,18 @@ if test -n "$PKG_CONFIG"; then + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"evolution-sharp >= \$EVOLUTION_SHARP_REQUIRED \\ + gconf-sharp-2.0 >= \$GTK_SHARP_REQUIRED \\ + glib-sharp-2.0 >= \$GTK_SHARP_REQUIRED +- gmime-sharp >= \$GMIME_SHARP_REQUIRED\"") >&5 ++ gmime-sharp-2.4 >= \$GMIME_SHARP_REQUIRED\"") >&5 + ($PKG_CONFIG --exists --print-errors "evolution-sharp >= $EVOLUTION_SHARP_REQUIRED \ + gconf-sharp-2.0 >= $GTK_SHARP_REQUIRED \ + glib-sharp-2.0 >= $GTK_SHARP_REQUIRED +- gmime-sharp >= $GMIME_SHARP_REQUIRED") 2>&5 ++ gmime-sharp-2.4 >= $GMIME_SHARP_REQUIRED") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_EVO_LIBS=`$PKG_CONFIG --libs "evolution-sharp >= $EVOLUTION_SHARP_REQUIRED \ + gconf-sharp-2.0 >= $GTK_SHARP_REQUIRED \ + glib-sharp-2.0 >= $GTK_SHARP_REQUIRED +- gmime-sharp >= $GMIME_SHARP_REQUIRED" 2>/dev/null` ++ gmime-sharp-2.4 >= $GMIME_SHARP_REQUIRED" 2>/dev/null` + else + pkg_failed=yes + fi +@@ -26227,12 +26227,12 @@ fi + EVO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "evolution-sharp >= $EVOLUTION_SHARP_REQUIRED \ + gconf-sharp-2.0 >= $GTK_SHARP_REQUIRED \ + glib-sharp-2.0 >= $GTK_SHARP_REQUIRED +- gmime-sharp >= $GMIME_SHARP_REQUIRED"` ++ gmime-sharp-2.4 >= $GMIME_SHARP_REQUIRED"` + else + EVO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "evolution-sharp >= $EVOLUTION_SHARP_REQUIRED \ + gconf-sharp-2.0 >= $GTK_SHARP_REQUIRED \ + glib-sharp-2.0 >= $GTK_SHARP_REQUIRED +- gmime-sharp >= $GMIME_SHARP_REQUIRED"` ++ gmime-sharp-2.4 >= $GMIME_SHARP_REQUIRED"` + fi + # Put the nasty error message in config.log where it belongs + echo "$EVO_PKG_ERRORS" >&5 +@@ -26781,12 +26781,12 @@ if test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" + shared-mime-info +- gmime-sharp >= \$GMIME_SHARP_REQUIRED ++ gmime-sharp-2.4 >= \$GMIME_SHARP_REQUIRED + glib-sharp-2.0 >= \$GTK_SHARP_REQUIRED + \"") >&5 + ($PKG_CONFIG --exists --print-errors " + shared-mime-info +- gmime-sharp >= $GMIME_SHARP_REQUIRED ++ gmime-sharp-2.4 >= $GMIME_SHARP_REQUIRED + glib-sharp-2.0 >= $GTK_SHARP_REQUIRED + ") 2>&5 + ac_status=$? +@@ -26794,7 +26794,7 @@ if test -n "$PKG_CONFIG"; then + (exit $ac_status); }; then + pkg_cv_BEAGLED_CFLAGS=`$PKG_CONFIG --cflags " + shared-mime-info +- gmime-sharp >= $GMIME_SHARP_REQUIRED ++ gmime-sharp-2.4 >= $GMIME_SHARP_REQUIRED + glib-sharp-2.0 >= $GTK_SHARP_REQUIRED + " 2>/dev/null` + else +@@ -26811,12 +26811,12 @@ if test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" + shared-mime-info +- gmime-sharp >= \$GMIME_SHARP_REQUIRED ++ gmime-sharp-2.4 >= \$GMIME_SHARP_REQUIRED + glib-sharp-2.0 >= \$GTK_SHARP_REQUIRED + \"") >&5 + ($PKG_CONFIG --exists --print-errors " + shared-mime-info +- gmime-sharp >= $GMIME_SHARP_REQUIRED ++ gmime-sharp-2.4 >= $GMIME_SHARP_REQUIRED + glib-sharp-2.0 >= $GTK_SHARP_REQUIRED + ") 2>&5 + ac_status=$? +@@ -26824,7 +26824,7 @@ if test -n "$PKG_CONFIG"; then + (exit $ac_status); }; then + pkg_cv_BEAGLED_LIBS=`$PKG_CONFIG --libs " + shared-mime-info +- gmime-sharp >= $GMIME_SHARP_REQUIRED ++ gmime-sharp-2.4 >= $GMIME_SHARP_REQUIRED + glib-sharp-2.0 >= $GTK_SHARP_REQUIRED + " 2>/dev/null` + else +@@ -26847,13 +26847,13 @@ fi + if test $_pkg_short_errors_supported = yes; then + BEAGLED_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors " + shared-mime-info +- gmime-sharp >= $GMIME_SHARP_REQUIRED ++ gmime-sharp-2.4 >= $GMIME_SHARP_REQUIRED + glib-sharp-2.0 >= $GTK_SHARP_REQUIRED + "` + else + BEAGLED_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors " + shared-mime-info +- gmime-sharp >= $GMIME_SHARP_REQUIRED ++ gmime-sharp-2.4 >= $GMIME_SHARP_REQUIRED + glib-sharp-2.0 >= $GTK_SHARP_REQUIRED + "` + fi +@@ -26862,7 +26862,7 @@ fi + + { { echo "$as_me:$LINENO: error: Package requirements ( + shared-mime-info +- gmime-sharp >= $GMIME_SHARP_REQUIRED ++ gmime-sharp-2.4 >= $GMIME_SHARP_REQUIRED + glib-sharp-2.0 >= $GTK_SHARP_REQUIRED + ) were not met: + +@@ -26877,7 +26877,7 @@ See the pkg-config man page for more det + " >&5 + echo "$as_me: error: Package requirements ( + shared-mime-info +- gmime-sharp >= $GMIME_SHARP_REQUIRED ++ gmime-sharp-2.4 >= $GMIME_SHARP_REQUIRED + glib-sharp-2.0 >= $GTK_SHARP_REQUIRED + ) were not met: + +@@ -26924,7 +26924,7 @@ BEAGLED_LIBS="$BEAGLED_LIBS $GSF_SHARP_L + + + GSF_SHARP_PREFIX=`$PKG_CONFIG --variable=prefix gsf-sharp` +-GMIME_SHARP_PREFIX=`$PKG_CONFIG --variable=prefix gmime-sharp` ++GMIME_SHARP_PREFIX=`$PKG_CONFIG --variable=prefix gmime-sharp-2.4` + + + # Check whether --enable-epiphany-extension was given. +diff -upNr beagle-0.3.9.orign/Filters/FilterMail.cs beagle-0.3.9/Filters/FilterMail.cs +--- beagle-0.3.9.orign/Filters/FilterMail.cs 2008-06-12 02:20:07.000000000 +0200 ++++ beagle-0.3.9/Filters/FilterMail.cs 2009-01-28 12:33:17.000000000 +0100 +@@ -126,7 +126,7 @@ namespace Beagle.Filters { + + // Messages that are multipart/alternative shouldn't be considered as having + // attachments. Unless of course they do. +- if (mime_part is GMime.Multipart && mime_part.ContentType.Subtype.ToLower () != "alternative") ++ if (mime_part is GMime.Multipart && mime_part.ContentType.MediaSubtype.ToLower () != "alternative") + return true; + + return false; +@@ -140,34 +140,43 @@ namespace Beagle.Filters { + AddProperty (Property.NewDate ("fixme:date", message.Date.ToUniversalTime ())); + + GMime.InternetAddressList addrs; +- addrs = this.message.GetRecipients (GMime.Message.RecipientType.To); ++ addrs = this.message.GetRecipients (GMime.RecipientType.To); + foreach (GMime.InternetAddress ia in addrs) { + AddProperty (Property.NewUnsearched ("fixme:to", ia.ToString (false))); +- if (ia.AddressType != GMime.InternetAddressType.Group) +- AddProperty (Property.New ("fixme:to_address", ia.Addr)); +- ++ if (ia is GMime.InternetAddressMailbox) { ++ GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox; ++ ++ AddProperty (Property.New ("fixme:to_address", mailbox.Address)); ++ } ++ + AddProperty (Property.New ("fixme:to_name", ia.Name)); + AddEmailLink (ia); + } + addrs.Dispose (); + +- addrs = this.message.GetRecipients (GMime.Message.RecipientType.Cc); ++ addrs = this.message.GetRecipients (GMime.RecipientType.Cc); + foreach (GMime.InternetAddress ia in addrs) { + AddProperty (Property.NewUnsearched ("fixme:cc", ia.ToString (false))); +- if (ia.AddressType != GMime.InternetAddressType.Group) +- AddProperty (Property.New ("fixme:cc_address", ia.Addr)); +- ++ if (ia is GMime.InternetAddressMailbox) { ++ GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox; ++ ++ AddProperty (Property.New ("fixme:cc_address", mailbox.Address)); ++ } ++ + AddProperty (Property.New ("fixme:cc_name", ia.Name)); + AddEmailLink (ia); + } + addrs.Dispose (); + +- addrs = GMime.InternetAddressList.ParseString (GMime.Utils.HeaderDecodePhrase (this.message.Sender)); ++ addrs = GMime.InternetAddressList.Parse (this.message.Sender); + foreach (GMime.InternetAddress ia in addrs) { + AddProperty (Property.NewUnsearched ("fixme:from", ia.ToString (false))); +- if (ia.AddressType != GMime.InternetAddressType.Group) +- AddProperty (Property.New ("fixme:from_address", ia.Addr)); +- ++ if (ia is GMime.InternetAddressMailbox) { ++ GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox; ++ ++ AddProperty (Property.New ("fixme:from_address", mailbox.Address)); ++ } ++ + AddProperty (Property.New ("fixme:from_name", ia.Name)); + AddEmailLink (ia); + } +@@ -184,7 +193,7 @@ namespace Beagle.Filters { + AddProperty (Property.NewUnsearched ("fixme:msgid", GMime.Utils.DecodeMessageId (msgid))); + + foreach (GMime.References refs in this.message.References) +- AddProperty (Property.NewUnsearched ("fixme:reference", refs.Msgid)); ++ AddProperty (Property.NewUnsearched ("fixme:reference", refs.MessageId)); + + string list_id = this.message.GetHeader ("List-Id"); + if (list_id != null) +@@ -345,16 +354,15 @@ namespace Beagle.Filters { + } + } else if (mime_part is GMime.Multipart) { + GMime.Multipart multipart = (GMime.Multipart) mime_part; +- +- int num_parts = multipart.Number; ++ int num_parts = multipart.Count; + + // If the mimetype is multipart/alternative, we only want to index + // one part -- the richest one we can filter. +- if (mime_part.ContentType.Subtype.ToLower () == "alternative") { ++ if (mime_part.ContentType.MediaSubtype.ToLower () == "alternative") { + // The richest formats are at the end, so work from there + // backward. + for (int i = num_parts - 1; i >= 0; i--) { +- GMime.Object subpart = multipart.GetPart (i); ++ GMime.Object subpart = multipart[i]; + + if (IsMimeTypeHandled (subpart.ContentType.ToString ())) { + part = subpart; +@@ -370,7 +378,7 @@ namespace Beagle.Filters { + // the parts, treat them like a bunch of attachments. + if (part == null) { + for (int i = 0; i < num_parts; i++) { +- using (GMime.Object subpart = multipart.GetPart (i)) ++ using (GMime.Object subpart = multipart[i]) + this.OnEachPart (subpart); + } + } +@@ -400,7 +408,7 @@ namespace Beagle.Filters { + } else if (mime_type == "text/html") { + no_child_needed = true; + html_part = true; +- string enc = part.GetContentTypeParameter ("charset"); ++ string enc = part.ContentType.GetParameter ("charset"); + // DataWrapper.Stream is a very limited stream + // and does not allow Seek or Tell + // HtmlFilter requires Stream.Position=0. +@@ -473,7 +481,7 @@ namespace Beagle.Filters { + if (length != -1) + child.AddProperty (Property.NewUnsearched ("fixme:filesize", length)); + +- if (part.ContentType.Type.ToLower () == "text") ++ if (part.ContentType.MediaType.ToLower () == "text") + child.SetTextReader (new StreamReader (stream)); + else + child.SetBinaryStream (stream); diff --git a/extra/beagle/beagle-0.3.9-mono-data-sqlite-2.patch b/extra/beagle/beagle-0.3.9-mono-data-sqlite-2.patch new file mode 100644 index 000000000..ef090be9e --- /dev/null +++ b/extra/beagle/beagle-0.3.9-mono-data-sqlite-2.patch @@ -0,0 +1,81 @@ +--- beagle-0.3.9/Util/FSpotTools.cs.orig 2010-01-30 14:45:38.000000000 +0100 ++++ beagle-0.3.9/Util/FSpotTools.cs 2010-01-30 14:47:00.000000000 +0100 +@@ -85,8 +85,12 @@ + while (reader == null) { + try { + reader = command.ExecuteReader (); +- } catch (SqliteBusyException) { +- Thread.Sleep (50); ++ } catch (SqliteException e) { ++ if (e.ErrorCode == SQLiteErrorCode.Busy) { ++ Thread.Sleep (50); ++ } else { ++ throw; ++ } + } + } + reader.Close (); +--- beagle-0.3.9/beagled/SqliteUtils.cs.orig 2010-01-30 14:47:14.000000000 +0100 ++++ beagle-0.3.9/beagled/SqliteUtils.cs 2010-01-30 14:53:16.000000000 +0100 +@@ -55,8 +55,13 @@ + try { + ret = command.ExecuteNonQuery (); + break; +- } catch (SqliteBusyException ex) { +- Thread.Sleep (50); ++ } catch (SqliteException ex) { ++ if (ex.ErrorCode == SQLiteErrorCode.Busy) { ++ Thread.Sleep (50); ++ } else { ++ Log.Error(ex, "SQL that caused the exception: {0}", command_text); ++ throw; ++ } + } catch (Exception e) { + Log.Error (e, "SQL that caused the exception: {0}", command_text); + throw; +@@ -79,8 +84,13 @@ + try { + ret = command.ExecuteNonQuery (); + break; +- } catch (SqliteBusyException ex) { +- Thread.Sleep (50); ++ } catch (SqliteException ex) { ++ if (ex.ErrorCode == SQLiteErrorCode.Busy) { ++ Thread.Sleep (50); ++ } else { ++ Log.Error(ex, "SQL that caused the exception: {0}", command.CommandText); ++ throw; ++ } + } catch (Exception e) { + Log.Error ( e, "SQL that caused the exception: {0}", command.CommandText); + throw; +@@ -96,8 +106,12 @@ + while (reader == null) { + try { + reader = command.ExecuteReader (); +- } catch (SqliteBusyException ex) { +- Thread.Sleep (50); ++ } catch (SqliteException ex) { ++ if (ex.ErrorCode == SQLiteErrorCode.Busy) { ++ Thread.Sleep (50); ++ } else { ++ throw; ++ } + } + } + return reader; +@@ -108,8 +122,12 @@ + while (true) { + try { + return reader.Read (); +- } catch (SqliteBusyException ex) { +- Thread.Sleep (50); ++ } catch (SqliteException ex) { ++ if (ex.ErrorCode == SQLiteErrorCode.Busy) { ++ Thread.Sleep (50); ++ } else { ++ throw; ++ } + } + } + } diff --git a/extra/beagle/beagle-0.3.9-spew.patch b/extra/beagle/beagle-0.3.9-spew.patch new file mode 100644 index 000000000..6e31c964c --- /dev/null +++ b/extra/beagle/beagle-0.3.9-spew.patch @@ -0,0 +1,12 @@ +diff -upNr beagle-0.3.9.orign/beagled/BeagleDaemon.cs beagle-0.3.9/beagled/BeagleDaemon.cs +--- beagle-0.3.9.orign/beagled/BeagleDaemon.cs 2008-06-11 20:42:20.000000000 +0200 ++++ beagle-0.3.9/beagled/BeagleDaemon.cs 2009-01-31 12:44:23.000000000 +0100 +@@ -456,7 +456,7 @@ namespace Beagle.Daemon { + // debugging this code, after all... + // arg_debug ? LogLevel.Debug : LogLevel.Warn + +- Log.Initialize (PathFinder.LogDir, "Beagle", LogLevel.Debug, arg_fg); ++ Log.Initialize (PathFinder.LogDir, "Beagle", arg_debug ? LogLevel.Debug : LogLevel.Warn, arg_fg); + Log.Always ("Starting Beagle Daemon (version {0})", ExternalStringsHack.Version); + Log.Always ("Running on {0}", SystemInformation.MonoRuntimeVersion); + Log.Always ("Command Line: {0}", diff --git a/extra/beagle/beagle.install b/extra/beagle/beagle.install new file mode 100644 index 000000000..bfc90ecd1 --- /dev/null +++ b/extra/beagle/beagle.install @@ -0,0 +1,8 @@ +post_install() { + getent group beaglidx >/dev/null || usr/sbin/groupadd -g 86 beaglidx + getent passwd beaglidx >/dev/null || usr/sbin/useradd -c 'User for Beagle indexing' -u 86 -g beaglidx -d '/' -s /bin/false beaglidx +} + +post_upgrade() { + post_install $1 +} diff --git a/extra/beagle/mono-2.8.patch b/extra/beagle/mono-2.8.patch new file mode 100644 index 000000000..503243444 --- /dev/null +++ b/extra/beagle/mono-2.8.patch @@ -0,0 +1,152 @@ +Patch to enable compilation against mono-2.8 + +* Mono-2.8 uses mono-2.pc instead of mono.pc for setting cflags and libs. +* Mono-2.8 disables direct access to struct MonoType fields; use accessors +instead (mono_type_get_type and mono_field_get_flags have been present in +the API since at least mono-1.2, so we do not need any version ifdefs). +* Cast FSpot.MetadataStore to IEnumerable in foreach() to prevent CS1640 +errors (non-unique enumeration of the type) with mono-2.8's gmcs. + +diff -ru beagle-0.3.9-orig/configure.in beagle-0.3.9/configure.in +--- beagle-0.3.9-orig/configure.in 2010-10-16 01:30:03.807825004 -0400 ++++ beagle-0.3.9/configure.in 2010-10-16 01:30:10.385825003 -0400 +@@ -59,11 +59,20 @@ + AC_MSG_ERROR([You need to install the Mono gmcs compiler]) + fi + +-AC_MSG_CHECKING([for mono.pc]) +-if test -z `$PKG_CONFIG --variable=prefix mono`; then +- AC_MSG_ERROR([missing the mono.pc file, usually found in the mono-devel package]) ++# mono-2.8 and higher uses mono-2.pc instead of mono.pc for cflags and libs ++AC_MSG_CHECKING([for mono-2.pc]) ++if test -z `$PKG_CONFIG --variable=prefix mono-2`; then ++ AC_MSG_RESULT([not found]) ++ AC_MSG_CHECKING([for mono.pc]) ++ if test -z `$PKG_CONFIG --variable=prefix mono`; then ++ AC_MSG_ERROR([missing the mono.pc file, usually found in the mono-devel package]) ++ else ++ AC_MSG_RESULT([found]) ++ mono_pc=mono ++ fi + else + AC_MSG_RESULT([found]) ++ mono_pc=mono-2 + fi + + BEAGLE_DEFINES="" +@@ -71,10 +80,10 @@ + # check that we have the require version of mono + + # Temporary: check for mono-1.9 +-PKG_CHECK_MODULES(MONO, mono >= 1.9, mono_1_9=yes, mono_1_9=no) ++PKG_CHECK_MODULES(MONO, $mono_pc >= 1.9, mono_1_9=yes, mono_1_9=no) + if test "x$mono_1_9" = "xno"; then + AC_MSG_RESULT([missing mono >= 1.9. Searching for mono >= 1.2.4]) +- PKG_CHECK_MODULES(MONO, mono >= $MONO_REQUIRED) ++ PKG_CHECK_MODULES(MONO, $mono_pc >= $MONO_REQUIRED) + else + AC_MSG_RESULT([found mono >= 1.9]) + BEAGLE_DEFINES="$BEAGLE_DEFINES -define:MONO_1_9" +@@ -84,7 +93,7 @@ + needed_dlls="Mono.Data.Sqlite Mono.Posix System.Data System.Web ICSharpCode.SharpZipLib" + for i in $needed_dlls; do + AC_MSG_CHECKING([for $i.dll]) +- if test ! -e `$PKG_CONFIG --variable=prefix mono`/lib/mono/2.0/$i.dll; then ++ if test ! -e `$PKG_CONFIG --variable=prefix $mono_pc`/lib/mono/2.0/$i.dll; then + AC_MSG_ERROR([missing required mono DLL: $i.dll]) + else + AC_MSG_RESULT([found]) +@@ -195,7 +204,7 @@ + if test "x$enable_google" = "xyes"; then + i="System.Security" + AC_MSG_CHECKING([for $i.dll (needed by Google backends)]) +- if test ! -e `$PKG_CONFIG --variable=prefix mono`/lib/mono/2.0/$i.dll; then ++ if test ! -e `$PKG_CONFIG --variable=prefix $mono_pc`/lib/mono/2.0/$i.dll; then + AC_MSG_ERROR([missing required mono DLL: $i.dll]) + else + AC_MSG_RESULT([found]) +@@ -560,7 +569,7 @@ + if test "x$enable_qt" != "xno" -a "x$has_qyoto" = "xno"; then + i="qt-dotnet" + AC_MSG_CHECKING([for $i.dll]) +- if test ! -e `$PKG_CONFIG --variable=prefix mono`/lib/mono/2.0/$i.dll; then ++ if test ! -e `$PKG_CONFIG --variable=prefix $mono_pc`/lib/mono/2.0/$i.dll; then + AC_MSG_ERROR([missing required mono DLL: $i.dll]) + else + AC_MSG_RESULT([found]) +Only in beagle-0.3.9: configure.in.orig +diff -ru beagle-0.3.9-orig/Filters/FilterImage.cs beagle-0.3.9/Filters/FilterImage.cs +--- beagle-0.3.9-orig/Filters/FilterImage.cs 2008-04-13 15:24:13.000000000 -0400 ++++ beagle-0.3.9/Filters/FilterImage.cs 2010-10-16 02:08:10.755825005 -0400 +@@ -141,7 +141,7 @@ + Resource rights_anon = null; + Resource title_anon = null; + +- foreach (Statement stmt in xmp.Store) { ++ foreach (Statement stmt in (IEnumerable)xmp.Store) { + if (stmt.Predicate == MetadataStore.Namespaces.Resolve ("dc:subject")) { + //Console.WriteLine ("found subject"); + subject_anon = stmt.Object; +@@ -163,7 +163,7 @@ + } + } + +- foreach (Statement stmt in xmp.Store) { ++ foreach (Statement stmt in (IEnumerable)xmp.Store) { + if (stmt.Subject == subject_anon && + stmt.Predicate != MetadataStore.Namespaces.Resolve ("rdf:type")) { + AddProperty (Beagle.Property.New ("dc:subject", ((Literal)stmt.Object).Value)); +diff -ru beagle-0.3.9-orig/Filters/FilterPdf.cs beagle-0.3.9/Filters/FilterPdf.cs +--- beagle-0.3.9-orig/Filters/FilterPdf.cs 2008-04-13 15:31:18.000000000 -0400 ++++ beagle-0.3.9/Filters/FilterPdf.cs 2010-10-16 02:22:09.528825003 -0400 +@@ -8,6 +8,7 @@ + // + + using System; ++using System.Collections; + using System.IO; + using System.Diagnostics; + +@@ -220,7 +221,7 @@ + Resource rights_anon = null; + Resource title_anon = null; + +- foreach (Statement stmt in xmp.Store) { ++ foreach (Statement stmt in (IEnumerable)xmp.Store) { + if (stmt.Predicate == MetadataStore.Namespaces.Resolve ("dc:subject")) { + //Console.WriteLine ("found subject"); + subject_anon = stmt.Object; +@@ -239,7 +240,7 @@ + } + } + +- foreach (Statement stmt in xmp.Store) { ++ foreach (Statement stmt in (IEnumerable)xmp.Store) { + if (stmt.Subject == subject_anon && + stmt.Predicate != MetadataStore.Namespaces.Resolve ("rdf:type")) { + AddProperty (Beagle.Property.New ("dc:subject", ((Literal)stmt.Object).Value)); +diff -ru beagle-0.3.9-orig/glue/mono-glue.c beagle-0.3.9/glue/mono-glue.c +--- beagle-0.3.9-orig/glue/mono-glue.c 2007-11-26 20:50:05.000000000 -0500 ++++ beagle-0.3.9/glue/mono-glue.c 2010-10-16 01:04:19.839825010 -0400 +@@ -79,18 +79,18 @@ + type = mono_class_get_type (klass); + + /* This is an array, so drill down into it */ +- if (type->type == MONO_TYPE_SZARRAY) ++ if (mono_type_get_type (type) == MONO_TYPE_SZARRAY) + total += memory_usage_array ((MonoArray *) obj, visited); + + while ((field = mono_class_get_fields (klass, &iter)) != NULL) { + MonoType *ftype = mono_field_get_type (field); + gpointer value; + +- if ((ftype->attrs & (FIELD_ATTRIBUTE_STATIC | FIELD_ATTRIBUTE_HAS_FIELD_RVA)) != 0) ++ if ((mono_field_get_flags (field) & (FIELD_ATTRIBUTE_STATIC | FIELD_ATTRIBUTE_HAS_FIELD_RVA)) != 0) + continue; + + /* FIXME: There are probably other types we need to drill down into */ +- switch (ftype->type) { ++ switch (mono_type_get_type (ftype)) { + + case MONO_TYPE_CLASS: + case MONO_TYPE_OBJECT: -- cgit v1.2.3-54-g00ecf