diff options
author | Pacho Ramos <pacho@gentoo.org> | 2010-11-08 21:40:50 +0000 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2010-11-08 21:40:50 +0000 |
commit | 39a98e965e6f66827696997c987ec13f59e132ca (patch) | |
tree | 1a42d19069f0e42e6fb5bbc94f5bc8dd72ba6613 /app-misc/beagle | |
parent | Depend on virtual/jpeg (diff) | |
download | gentoo-2-39a98e965e6f66827696997c987ec13f59e132ca.tar.gz gentoo-2-39a98e965e6f66827696997c987ec13f59e132ca.tar.bz2 gentoo-2-39a98e965e6f66827696997c987ec13f59e132ca.zip |
Fix building against mono-2.8 (bug #341195 with a patch created by Alexandre Rostovtsev (and with Arun Raghavan approval). Remove .la files.
(Portage version: 2.1.9.24/cvs/Linux x86_64)
Diffstat (limited to 'app-misc/beagle')
-rw-r--r-- | app-misc/beagle/ChangeLog | 7 | ||||
-rw-r--r-- | app-misc/beagle/beagle-0.3.9-r4.ebuild | 202 | ||||
-rw-r--r-- | app-misc/beagle/files/beagle-0.3.9-mono2.8.patch | 152 |
3 files changed, 361 insertions, 0 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/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: |