1 |
pacho 10/11/08 21:40:50 |
2 |
|
3 |
Added: beagle-0.3.9-mono2.8.patch |
4 |
Log: |
5 |
Fix building against mono-2.8 (bug #341195 with a patch created by Alexandre Rostovtsev (and with Arun Raghavan approval). Remove .la files. |
6 |
|
7 |
(Portage version: 2.1.9.24/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 app-misc/beagle/files/beagle-0.3.9-mono2.8.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/beagle/files/beagle-0.3.9-mono2.8.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/beagle/files/beagle-0.3.9-mono2.8.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: beagle-0.3.9-mono2.8.patch |
16 |
=================================================================== |
17 |
Patch to enable compilation against mono-2.8 |
18 |
|
19 |
* Mono-2.8 uses mono-2.pc instead of mono.pc for setting cflags and libs. |
20 |
* Mono-2.8 disables direct access to struct MonoType fields; use accessors |
21 |
instead (mono_type_get_type and mono_field_get_flags have been present in |
22 |
the API since at least mono-1.2, so we do not need any version ifdefs). |
23 |
* Cast FSpot.MetadataStore to IEnumerable in foreach() to prevent CS1640 |
24 |
errors (non-unique enumeration of the type) with mono-2.8's gmcs. |
25 |
|
26 |
diff -ru beagle-0.3.9-orig/configure.in beagle-0.3.9/configure.in |
27 |
--- beagle-0.3.9-orig/configure.in 2010-10-16 01:30:03.807825004 -0400 |
28 |
+++ beagle-0.3.9/configure.in 2010-10-16 01:30:10.385825003 -0400 |
29 |
@@ -59,11 +59,20 @@ |
30 |
AC_MSG_ERROR([You need to install the Mono gmcs compiler]) |
31 |
fi |
32 |
|
33 |
-AC_MSG_CHECKING([for mono.pc]) |
34 |
-if test -z `$PKG_CONFIG --variable=prefix mono`; then |
35 |
- AC_MSG_ERROR([missing the mono.pc file, usually found in the mono-devel package]) |
36 |
+# mono-2.8 and higher uses mono-2.pc instead of mono.pc for cflags and libs |
37 |
+AC_MSG_CHECKING([for mono-2.pc]) |
38 |
+if test -z `$PKG_CONFIG --variable=prefix mono-2`; then |
39 |
+ AC_MSG_RESULT([not found]) |
40 |
+ AC_MSG_CHECKING([for mono.pc]) |
41 |
+ if test -z `$PKG_CONFIG --variable=prefix mono`; then |
42 |
+ AC_MSG_ERROR([missing the mono.pc file, usually found in the mono-devel package]) |
43 |
+ else |
44 |
+ AC_MSG_RESULT([found]) |
45 |
+ mono_pc=mono |
46 |
+ fi |
47 |
else |
48 |
AC_MSG_RESULT([found]) |
49 |
+ mono_pc=mono-2 |
50 |
fi |
51 |
|
52 |
BEAGLE_DEFINES="" |
53 |
@@ -71,10 +80,10 @@ |
54 |
# check that we have the require version of mono |
55 |
|
56 |
# Temporary: check for mono-1.9 |
57 |
-PKG_CHECK_MODULES(MONO, mono >= 1.9, mono_1_9=yes, mono_1_9=no) |
58 |
+PKG_CHECK_MODULES(MONO, $mono_pc >= 1.9, mono_1_9=yes, mono_1_9=no) |
59 |
if test "x$mono_1_9" = "xno"; then |
60 |
AC_MSG_RESULT([missing mono >= 1.9. Searching for mono >= 1.2.4]) |
61 |
- PKG_CHECK_MODULES(MONO, mono >= $MONO_REQUIRED) |
62 |
+ PKG_CHECK_MODULES(MONO, $mono_pc >= $MONO_REQUIRED) |
63 |
else |
64 |
AC_MSG_RESULT([found mono >= 1.9]) |
65 |
BEAGLE_DEFINES="$BEAGLE_DEFINES -define:MONO_1_9" |
66 |
@@ -84,7 +93,7 @@ |
67 |
needed_dlls="Mono.Data.Sqlite Mono.Posix System.Data System.Web ICSharpCode.SharpZipLib" |
68 |
for i in $needed_dlls; do |
69 |
AC_MSG_CHECKING([for $i.dll]) |
70 |
- if test ! -e `$PKG_CONFIG --variable=prefix mono`/lib/mono/2.0/$i.dll; then |
71 |
+ if test ! -e `$PKG_CONFIG --variable=prefix $mono_pc`/lib/mono/2.0/$i.dll; then |
72 |
AC_MSG_ERROR([missing required mono DLL: $i.dll]) |
73 |
else |
74 |
AC_MSG_RESULT([found]) |
75 |
@@ -195,7 +204,7 @@ |
76 |
if test "x$enable_google" = "xyes"; then |
77 |
i="System.Security" |
78 |
AC_MSG_CHECKING([for $i.dll (needed by Google backends)]) |
79 |
- if test ! -e `$PKG_CONFIG --variable=prefix mono`/lib/mono/2.0/$i.dll; then |
80 |
+ if test ! -e `$PKG_CONFIG --variable=prefix $mono_pc`/lib/mono/2.0/$i.dll; then |
81 |
AC_MSG_ERROR([missing required mono DLL: $i.dll]) |
82 |
else |
83 |
AC_MSG_RESULT([found]) |
84 |
@@ -560,7 +569,7 @@ |
85 |
if test "x$enable_qt" != "xno" -a "x$has_qyoto" = "xno"; then |
86 |
i="qt-dotnet" |
87 |
AC_MSG_CHECKING([for $i.dll]) |
88 |
- if test ! -e `$PKG_CONFIG --variable=prefix mono`/lib/mono/2.0/$i.dll; then |
89 |
+ if test ! -e `$PKG_CONFIG --variable=prefix $mono_pc`/lib/mono/2.0/$i.dll; then |
90 |
AC_MSG_ERROR([missing required mono DLL: $i.dll]) |
91 |
else |
92 |
AC_MSG_RESULT([found]) |
93 |
Only in beagle-0.3.9: configure.in.orig |
94 |
diff -ru beagle-0.3.9-orig/Filters/FilterImage.cs beagle-0.3.9/Filters/FilterImage.cs |
95 |
--- beagle-0.3.9-orig/Filters/FilterImage.cs 2008-04-13 15:24:13.000000000 -0400 |
96 |
+++ beagle-0.3.9/Filters/FilterImage.cs 2010-10-16 02:08:10.755825005 -0400 |
97 |
@@ -141,7 +141,7 @@ |
98 |
Resource rights_anon = null; |
99 |
Resource title_anon = null; |
100 |
|
101 |
- foreach (Statement stmt in xmp.Store) { |
102 |
+ foreach (Statement stmt in (IEnumerable)xmp.Store) { |
103 |
if (stmt.Predicate == MetadataStore.Namespaces.Resolve ("dc:subject")) { |
104 |
//Console.WriteLine ("found subject"); |
105 |
subject_anon = stmt.Object; |
106 |
@@ -163,7 +163,7 @@ |
107 |
} |
108 |
} |
109 |
|
110 |
- foreach (Statement stmt in xmp.Store) { |
111 |
+ foreach (Statement stmt in (IEnumerable)xmp.Store) { |
112 |
if (stmt.Subject == subject_anon && |
113 |
stmt.Predicate != MetadataStore.Namespaces.Resolve ("rdf:type")) { |
114 |
AddProperty (Beagle.Property.New ("dc:subject", ((Literal)stmt.Object).Value)); |
115 |
diff -ru beagle-0.3.9-orig/Filters/FilterPdf.cs beagle-0.3.9/Filters/FilterPdf.cs |
116 |
--- beagle-0.3.9-orig/Filters/FilterPdf.cs 2008-04-13 15:31:18.000000000 -0400 |
117 |
+++ beagle-0.3.9/Filters/FilterPdf.cs 2010-10-16 02:22:09.528825003 -0400 |
118 |
@@ -8,6 +8,7 @@ |
119 |
// |
120 |
|
121 |
using System; |
122 |
+using System.Collections; |
123 |
using System.IO; |
124 |
using System.Diagnostics; |
125 |
|
126 |
@@ -220,7 +221,7 @@ |
127 |
Resource rights_anon = null; |
128 |
Resource title_anon = null; |
129 |
|
130 |
- foreach (Statement stmt in xmp.Store) { |
131 |
+ foreach (Statement stmt in (IEnumerable)xmp.Store) { |
132 |
if (stmt.Predicate == MetadataStore.Namespaces.Resolve ("dc:subject")) { |
133 |
//Console.WriteLine ("found subject"); |
134 |
subject_anon = stmt.Object; |
135 |
@@ -239,7 +240,7 @@ |
136 |
} |
137 |
} |
138 |
|
139 |
- foreach (Statement stmt in xmp.Store) { |
140 |
+ foreach (Statement stmt in (IEnumerable)xmp.Store) { |
141 |
if (stmt.Subject == subject_anon && |
142 |
stmt.Predicate != MetadataStore.Namespaces.Resolve ("rdf:type")) { |
143 |
AddProperty (Beagle.Property.New ("dc:subject", ((Literal)stmt.Object).Value)); |
144 |
diff -ru beagle-0.3.9-orig/glue/mono-glue.c beagle-0.3.9/glue/mono-glue.c |
145 |
--- beagle-0.3.9-orig/glue/mono-glue.c 2007-11-26 20:50:05.000000000 -0500 |
146 |
+++ beagle-0.3.9/glue/mono-glue.c 2010-10-16 01:04:19.839825010 -0400 |
147 |
@@ -79,18 +79,18 @@ |
148 |
type = mono_class_get_type (klass); |
149 |
|
150 |
/* This is an array, so drill down into it */ |
151 |
- if (type->type == MONO_TYPE_SZARRAY) |
152 |
+ if (mono_type_get_type (type) == MONO_TYPE_SZARRAY) |
153 |
total += memory_usage_array ((MonoArray *) obj, visited); |
154 |
|
155 |
while ((field = mono_class_get_fields (klass, &iter)) != NULL) { |
156 |
MonoType *ftype = mono_field_get_type (field); |
157 |
gpointer value; |
158 |
|
159 |
- if ((ftype->attrs & (FIELD_ATTRIBUTE_STATIC | FIELD_ATTRIBUTE_HAS_FIELD_RVA)) != 0) |
160 |
+ if ((mono_field_get_flags (field) & (FIELD_ATTRIBUTE_STATIC | FIELD_ATTRIBUTE_HAS_FIELD_RVA)) != 0) |
161 |
continue; |
162 |
|
163 |
/* FIXME: There are probably other types we need to drill down into */ |
164 |
- switch (ftype->type) { |
165 |
+ switch (mono_type_get_type (ftype)) { |
166 |
|
167 |
case MONO_TYPE_CLASS: |
168 |
case MONO_TYPE_OBJECT: |