[arch-commits] Commit in beagle/trunk (PKGBUILD mono-2.8.patch)

Jan de Groot jgc at archlinux.org
Tue Dec 7 14:55:37 UTC 2010


    Date: Tuesday, December 7, 2010 @ 09:55:37
  Author: jgc
Revision: 102373

upgpkg: beagle 0.3.9-4
Fix build with mono 2.8

Added:
  beagle/trunk/mono-2.8.patch
Modified:
  beagle/trunk/PKGBUILD

----------------+
 PKGBUILD       |   52 +++++++++++-------
 mono-2.8.patch |  152 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 184 insertions(+), 20 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2010-12-07 14:20:49 UTC (rev 102372)
+++ PKGBUILD	2010-12-07 14:55:37 UTC (rev 102373)
@@ -1,52 +1,64 @@
 # $Id$
 # Maintainer: Daniel Isenmann <daniel @ archlinux.org>
 # Contributor: Shadowhand <woody.gilk at gmail.com>
+
 pkgname=beagle
 pkgver=0.3.9
-pkgrel=3
-pkgdesc="Search tool that ransacks your personal information space"
+pkgrel=4
+pkgdesc="Search tool that ransacks your personal information space to find whatever you are looking for."
 arch=(i686 x86_64)
-url="http://www.gnome.org/projects/beagle/"
+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-applications' 'etc/beagle/crawl-documentation'
-        'etc/beagle/crawl-windows')
+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)
+        beagle-0.3.9-mono-data-sqlite-2.patch
+        mono-2.8.patch)
 md5sums=('b73c12423d2d67133dbb05933f4c8fe1'
          '003ada7acc2724e94e0218e4a6705b4a'
          '73b5a5ea03dc3a7ca71ed41772e4dd82'
-         'd99a93730485b7f9a5e2111a8b2bf440')
+         '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 || return 1
-  sed -i -e 's/libchm.so.1/libchm.so.0/' Util/ChmFile.cs || return 1
-  sed -i -e 's/libgnome-desktop-2.so.2/libgnome-desktop-2.so.11/' search/Beagle.Search.exe.config || return 1
+  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" || return 1
-  patch -Np1 -i "${srcdir}/beagle-0.3.9-gmime24.patch" || return 1
-  patch -Np1 -i "${srcdir}/beagle-0.3.9-mono-data-sqlite-2.patch" || return 1
+  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-libbeagle \
 	--disable-static \
-	--disable-docs || return 1
-  make || return 1
-  make DESTDIR="${pkgdir}" install || return 1
+	--disable-docs
+  make
+  make DESTDIR="${pkgdir}" install
 
-  install -m755 -d "${pkgdir}/var/cache/beagle/indexes" || return 1
-  chown -R 86:86 "${pkgdir}/var/cache/beagle" || return 1
+  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/" || return 1
+  install -m644 COPYING "${pkgdir}/usr/share/licenses/beagle/"
 }

Added: mono-2.8.patch
===================================================================
--- mono-2.8.patch	                        (rev 0)
+++ mono-2.8.patch	2010-12-07 14:55:37 UTC (rev 102373)
@@ -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:




More information about the arch-commits mailing list