summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2010-11-08 21:40:50 +0000
committerPacho Ramos <pacho@gentoo.org>2010-11-08 21:40:50 +0000
commit8f3a84767b99c95a08d39beb8ff028bcb9a195f6 (patch)
tree8369c546174a56c2036ff17d397db4ad05e3c0c0 /app-misc/beagle
parentDepend on virtual/jpeg (diff)
downloadhistorical-8f3a84767b99c95a08d39beb8ff028bcb9a195f6.tar.gz
historical-8f3a84767b99c95a08d39beb8ff028bcb9a195f6.tar.bz2
historical-8f3a84767b99c95a08d39beb8ff028bcb9a195f6.zip
Fix building against mono-2.8 (bug #341195 with a patch created by Alexandre Rostovtsev (and with Arun Raghavan approval). Remove .la files.
Package-Manager: portage-2.1.9.24/cvs/Linux x86_64
Diffstat (limited to 'app-misc/beagle')
-rw-r--r--app-misc/beagle/ChangeLog7
-rw-r--r--app-misc/beagle/Manifest10
-rw-r--r--app-misc/beagle/beagle-0.3.9-r4.ebuild202
-rw-r--r--app-misc/beagle/files/beagle-0.3.9-mono2.8.patch152
4 files changed, 367 insertions, 4 deletions
diff --git a/app-misc/beagle/ChangeLog b/app-misc/beagle/ChangeLog
index 8e35c67dab39..955dc172eeb5 100644
--- a/app-misc/beagle/ChangeLog
+++ b/app-misc/beagle/ChangeLog
@@ -3,6 +3,13 @@
# $Header: /var/cvsroot/gentoo-x86/app-misc/beagle/ChangeLog,v 1.118
# 2010/09/13 04:26:28 josejx Exp $
+*beagle-0.3.9-r4 (08 Nov 2010)
+
+ 08 Nov 2010; Pacho Ramos <pacho@gentoo.org> +beagle-0.3.9-r4.ebuild,
+ +files/beagle-0.3.9-mono2.8.patch:
+ Fix building against mono-2.8 (bug #341195 with a patch created by
+ Alexandre Rostovtsev (and with Arun Raghavan approval). Remove .la files.
+
07 Oct 2010; Pacho Ramos <pacho@gentoo.org> -beagle-0.3.9-r2.ebuild,
-files/beagle-0.3.9-firefox-3.5.patch, -files/beagle-0.3.9-sqlite.patch,
-files/beagle-log-level-warn.patch, metadata.xml:
diff --git a/app-misc/beagle/Manifest b/app-misc/beagle/Manifest
index 355098259e54..1ce356586bbb 100644
--- a/app-misc/beagle/Manifest
+++ b/app-misc/beagle/Manifest
@@ -5,17 +5,19 @@ AUX beagle-0.3.9-firefox-3.6.patch 7426 RMD160 a2d5679c722cbb904ec9b635f7edb8462
AUX beagle-0.3.9-gmime24.patch 22487 RMD160 3e570097c629f708b9fe106c92132521b9483b9d SHA1 e2c356817d6fc61d0f32f1f9bfbe4e7744891fc2 SHA256 010109ebc1661e90068e6edadb6faa3b45baac465c5661829f3bfc166950a478
AUX beagle-0.3.9-grow-shrink.patch 9509 RMD160 634b3b8531f7c2a65ad851b6722fb715a38d006c SHA1 16d17c5207b05316e19fed596fa04a89cf153eae SHA256 7719d14f824aaa1aca6346b822d4321e8981db473c61a4908f7bbbed4303a9ba
AUX beagle-0.3.9-mono2.6.patch 2082 RMD160 8bf9c71213b26856c5760a4befb225f06e610b65 SHA1 95da286a2a483fbea4ef91df51ac1d04a2b710d7 SHA256 e7996db9bcfe0ba79fe618a499885c0d07b36ce681e2bb593a122827c7f63981
+AUX beagle-0.3.9-mono2.8.patch 6419 RMD160 827baab0c18f16c4a4355c41e381998120dce7a8 SHA1 1a31ce377fd1ac7391cf4312f0a1c321d889760c SHA256 dcc4ff45813404e4d6f4f4ba39444feaf0db279acbbdadcad2ae2fa2ec1ac3e9
AUX beagle-0.3.9-openfix.patch 605 RMD160 18b457cec66adf9b11aea6ffcca6d20e6ea813a5 SHA1 f9bbaf11e3d6b2dc49d55cdee54312de5a96cb85 SHA256 c30eb85aed8ba7b1d5f7726703e5fce90570514df8283f891f7c7447d1daa3eb
AUX beagle-0.3.9-update-tileindex.patch 722 RMD160 00a50f6b87552fcba645f6d336024e75f9d73bb7 SHA1 0b3f3977058f89f59692d655033ab66fd0561e81 SHA256 0fce90205644d010fd329c1ffb6d3c52a84ff5289e01670e0377082df7b4e966
AUX crawl-portage 295 RMD160 979f70ae6172ffbbba21fcf8ab22964d10bf6b1a SHA1 6c8da69912829a6dd8f1bdcacc3d59acb31a9f63 SHA256 14b8423c0590ce9bc8b43ee75b7c51c02ec46031d89baeee8c0100bdc6adb31b
DIST beagle-0.3.9.tar.bz2 1895453 RMD160 f8e26ceeea50e33b04837e1d22f1a6f18fa84c1a SHA1 5fdba6ffd4a210076a954cc22f5b940705b71a6e SHA256 4252710247809df393f318450a391298fa57a3ad7b6043962734997035caf488
EBUILD beagle-0.3.9-r3.ebuild 5802 RMD160 190c55b7717cd5a0ed91f49523e564dc39ff7e92 SHA1 16417b3c6eea21563e0c37e3bdfcb219ee7da541 SHA256 66aba45ff9fe1ab31775943a55d9a3c41e6cde1086d8ed553352f3e559849128
-MISC ChangeLog 20585 RMD160 aad924439448fd997c2597f5d774dd3742627a47 SHA1 5b306983ba5b7cbb3c9d50113da47cdb845fa40d SHA256 f2cde7678468fba61ed8a089afc3bbd8c88a72e69f4b071d1335a36101ec2e9f
+EBUILD beagle-0.3.9-r4.ebuild 6020 RMD160 f3b507aeea59f90660fa09eb9eec0ea4910c054c SHA1 6dee181b4bdae086f4937e1dadbcac93063f745b SHA256 355a41b402c9d7b36d76bcb9b49bce0d5279782a13f55ef708310dc0d20b6e02
+MISC ChangeLog 20871 RMD160 cffa546ba1731dfbeb087b7e6e345f1817f2ff82 SHA1 cbf386692ecceb83f2b01a46e91bccf71aa1c988 SHA256 ddcd88c68aefa6129561bb101b54acf86e3e9c1bef992918b0a837e2d68cd7b0
MISC metadata.xml 2338 RMD160 d2b362d854f48f950d99010537cd9978f02cf983 SHA1 213aa5501dbce6c8806d6c83fbcb80ac2d6023b8 SHA256 1e026522c9fbb32db4e60cd60da0cd73745d2f8b7d07aee889e787b9b688e42d
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
-iEYEARECAAYFAkytg1cACgkQCaWpQKGI+9Q/1QCdHPJs4pNz/2/8HFwIMo13PqJZ
-DOoAn0f3fp5S8VDs2WsJ64n8TLyvu8bP
-=XKLy
+iEYEARECAAYFAkzYbmcACgkQCaWpQKGI+9TKVwCfQ6oloS4goJBiWZ+nc3n+XLSy
+tHMAnRF47rCA0n1C8CH0oN084NXjKyvg
+=mmI5
-----END PGP SIGNATURE-----
diff --git a/app-misc/beagle/beagle-0.3.9-r4.ebuild b/app-misc/beagle/beagle-0.3.9-r4.ebuild
new file mode 100644
index 000000000000..0cc86586b9c6
--- /dev/null
+++ b/app-misc/beagle/beagle-0.3.9-r4.ebuild
@@ -0,0 +1,202 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-misc/beagle/beagle-0.3.9-r4.ebuild,v 1.1 2010/11/08 21:40:50 pacho Exp $
+
+EAPI="3"
+
+inherit base gnome.org eutils mono mozextension autotools
+
+DESCRIPTION="Search tool that ransacks your personal information space to find whatever you're looking for"
+HOMEPAGE="http://www.beagle-project.org/"
+LICENSE="MIT Apache-1.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="avahi chm debug doc eds firefox +galago gtk +pdf +inotify +ole thunderbird +google +xscreensaver"
+
+#See bug 248331 for blocker reason.
+RDEPEND="!!sci-libs/beagle
+ >dev-lang/mono-2.4
+ >=app-shells/bash-3.2
+ app-arch/zip
+ >=dev-db/sqlite-3.3.1
+ >=dev-dotnet/dbus-sharp-0.6.0
+ >=dev-dotnet/dbus-glib-sharp-0.4.1
+ >=dev-dotnet/taglib-sharp-2.0
+ gtk? (
+ x11-libs/libX11
+ >=gnome-base/librsvg-2.22.0
+ sys-devel/gettext
+ >=dev-dotnet/gtk-sharp-2.12.6
+ >=dev-dotnet/gconf-sharp-2.24.0
+ >=dev-dotnet/glade-sharp-2.12.6
+ >=dev-dotnet/gnome-sharp-2.24.0
+ >=dev-dotnet/gnomevfs-sharp-2.24.0
+ x11-misc/xdg-utils
+ >=x11-libs/gtk+-2.14.0
+ >=dev-libs/atk-1.22.0
+ )
+ eds? (
+ >=dev-dotnet/evolution-sharp-0.18.1
+ >=dev-dotnet/gconf-sharp-2.24.0
+ >=dev-dotnet/glib-sharp-2.12.6
+ )
+ ole? (
+ >=app-text/wv-1.2.3
+ >=dev-dotnet/gsf-sharp-0.8.1
+ >=app-office/gnumeric-1.4.3-r3
+ )
+
+ x11-misc/shared-mime-info
+ >=dev-dotnet/glib-sharp-2.12.6
+ dev-libs/gmime:2.4[mono]
+ chm? ( dev-libs/chmlib )
+ pdf? ( >=app-text/poppler-0.12.3-r3[utils] )
+ galago? ( >=dev-dotnet/galago-sharp-0.5.0 )
+ thunderbird? (
+ || (
+ >=mail-client/thunderbird-1.5
+ >=mail-client/thunderbird-bin-1.5
+ )
+ )
+ firefox? (
+ || (
+ >=www-client/firefox-1.5
+ >=www-client/firefox-bin-1.5
+ )
+ )
+ xscreensaver? ( x11-libs/libXScrnSaver )
+ >=dev-libs/libbeagle-0.3.9
+ avahi? ( >=net-dns/avahi-0.6.10[mono] )"
+
+DEPEND="${RDEPEND}
+ doc? ( >=virtual/monodoc-1.2.4 )
+ dev-util/pkgconfig
+ xscreensaver? ( x11-proto/scrnsaverproto )
+ >=dev-util/intltool-0.35"
+
+pkg_setup() {
+ enewgroup beagleindex
+ enewuser beagleindex -1 -1 /var/lib/cache/beagle beagleindex
+ if use thunderbird
+ then
+ if ! use inotify
+ then
+ eerror "You have enabled the thunderbird use flag. This use-flag depends on the inotify use-flag."
+ eerror "Please enable the inotify use-flag also."
+ eerror "See http://bugs.gentoo.org/263781 for more information."
+ die "Please enable the inotify use-flag."
+ fi
+ fi
+}
+
+src_prepare() {
+ # Fix bugs.gnome.org/556243
+ sed -i -e "s:libgnome-desktop-2.so.2:libgnome-desktop-2.so:" \
+ search/Beagle.Search.exe.config || die "gnome-desktop sed failed"
+
+ # Fix when using firefox 3.6
+ epatch "${FILESDIR}/${P}-firefox-3.6.patch"
+
+ # Fix building against gmime-2.4, bug #311499
+ epatch "${FILESDIR}/${P}-gmime24.patch"
+
+ # Remove bogus open check
+ epatch "${FILESDIR}/${P}-openfix.patch"
+
+ # Port to mono-2.6
+ epatch "${FILESDIR}/${P}-mono2.6.patch"
+
+ # Grow/shrink the number beagle-search results based on window size
+ epatch "${FILESDIR}/${P}-grow-shrink.patch"
+
+ # Update tileIndex when removing a tile
+ epatch "${FILESDIR}/${P}-update-tileindex.patch"
+
+ # Support mono-2.8, bug #341195
+ epatch "${FILESDIR}/${P}-mono2.8.patch"
+
+ intltoolize --force --copy --automake || die "intltoolize failed"
+ eautoreconf
+}
+
+src_configure() {
+ econf --disable-static \
+ --disable-dependency-tracking \
+ --disable-epiphany-extension \
+ $(use_enable debug xml-dump) \
+ $(use_enable doc docs) \
+ $(use_enable thunderbird) \
+ $(use_enable eds evolution) \
+ $(use_enable gtk gui) \
+ $(use_enable ole gsf-sharp wv1) \
+ $(use_enable xscreensaver xss) \
+ $(use_enable inotify) \
+ $(use_enable avahi) \
+ $(use_enable google googlebackends)
+}
+
+src_install() {
+ emake DESTDIR="${ED}" install || die "emake install failed."
+
+ dodoc AUTHORS NEWS README || die "dodoc failed"
+
+ declare MOZILLA_FIVE_HOME
+ if use firefox; then
+ xpi_unpack "${S}"/firefox-extension/beagle.xpi \
+ || die "Unable to find Beagle Firefox Extension"
+ mv "${WORKDIR}"/beagle "${WORKDIR}"/firefox-beagle
+
+ if has_version '>=www-client/firefox-1.5'; then
+ MOZILLA_FIVE_HOME="/usr/$(get_libdir)/mozilla-firefox"
+ xpi_install "${WORKDIR}"/firefox-beagle \
+ || die "xpi install for firefox failed!"
+ fi
+ if has_version '>=www-client/firefox-bin-1.5'; then
+ MOZILLA_FIVE_HOME="/opt/firefox"
+ xpi_install "${WORKDIR}"/firefox-beagle \
+ || die "xpi install for firefox-bin failed!"
+ fi
+ fi
+
+ if use thunderbird; then
+ xpi_unpack "${S}"/thunderbird-extension/beagle.xpi \
+ || die "Unable to find Beagle Thunderbird Extension"
+ mv "${WORKDIR}"/beagle "${WORKDIR}"/thunderbird-beagle
+
+ if has_version '>=mail-client/thunderbird-1.5'; then
+ MOZILLA_FIVE_HOME="/usr/$(get_libdir)/mozilla-thunderbird"
+ xpi_install "${WORKDIR}"/thunderbird-beagle \
+ || die "xpi install for thunderbird failed!"
+ fi
+ if has_version '>=mail-client/thunderbird-bin-1.5'; then
+ MOZILLA_FIVE_HOME="/opt/thunderbird"
+ xpi_install "${WORKDIR}"/thunderbird-beagle \
+ || die "xpi install for thunderbird-bin failed!"
+ fi
+ fi
+
+ sed -i -e 's/CRAWL_ENABLED="yes"/CRAWL_ENABLED="no"/' \
+ "${ED}"/etc/beagle/crawl-rules/crawl-*
+
+ insinto /etc/beagle/crawl-rules
+ doins "${FILESDIR}/crawl-portage"
+
+ keepdir "/usr/$(get_libdir)/beagle/Backends"
+ diropts -o beagleindex -g beagleindex
+ keepdir "/var/lib/cache/beagle/indexes"
+
+ find "${ED}" -name "*.la" -delete || die "remove of la files failed"
+}
+
+pkg_postinst() {
+ elog "If available, Beagle greatly benefits from using certain operating"
+ elog "system features such as Extended Attributes and inotify."
+ elog
+ elog "If you want static queryables such as the portage tree and system"
+ elog "documentation you will need to edit the /etc/beagle/crawl-* files"
+ elog "and change CRAWL_ENABLE from 'no' to 'yes'."
+ elog
+ elog "For more info on how to create the optimal beagle environment, and"
+ elog "basic usage info, see the Gentoo page of the Beagle website:"
+ elog "http://www.beagle-project.org/Gentoo_Installation"
+}
diff --git a/app-misc/beagle/files/beagle-0.3.9-mono2.8.patch b/app-misc/beagle/files/beagle-0.3.9-mono2.8.patch
new file mode 100644
index 000000000000..5032434449f5
--- /dev/null
+++ b/app-misc/beagle/files/beagle-0.3.9-mono2.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: