diff options
author | Victor Ostorga <vostorga@gentoo.org> | 2009-10-25 03:12:02 +0000 |
---|---|---|
committer | Victor Ostorga <vostorga@gentoo.org> | 2009-10-25 03:12:02 +0000 |
commit | c50ffce10012ad89013d3d2fb5edc1a80b98af4f (patch) | |
tree | 34dc23352f779cfc9ec64b5cbe57ec56d0a1e44a /x11-misc/pcmanfm | |
parent | Automated update of use.local.desc (diff) | |
download | gentoo-2-c50ffce10012ad89013d3d2fb5edc1a80b98af4f.tar.gz gentoo-2-c50ffce10012ad89013d3d2fb5edc1a80b98af4f.tar.bz2 gentoo-2-c50ffce10012ad89013d3d2fb5edc1a80b98af4f.zip |
Allowing pcmanfm to work against shared-mime-info-0.70 , patch thanks to Samuli Suominen <ssuominen@gentoo.org> bug 288820
(Portage version: 2.1.6.13/cvs/Linux i686)
Diffstat (limited to 'x11-misc/pcmanfm')
-rw-r--r-- | x11-misc/pcmanfm/ChangeLog | 10 | ||||
-rw-r--r-- | x11-misc/pcmanfm/files/pcmanfm-0.5.1-shared-mime-info-0.70.patch | 58 | ||||
-rw-r--r-- | x11-misc/pcmanfm/pcmanfm-0.5.1-r1.ebuild | 64 |
3 files changed, 131 insertions, 1 deletions
diff --git a/x11-misc/pcmanfm/ChangeLog b/x11-misc/pcmanfm/ChangeLog index 03c7af96a5fe..bb1d53ad1116 100644 --- a/x11-misc/pcmanfm/ChangeLog +++ b/x11-misc/pcmanfm/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for x11-misc/pcmanfm # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-misc/pcmanfm/ChangeLog,v 1.6 2009/08/15 11:02:58 volkmar Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-misc/pcmanfm/ChangeLog,v 1.7 2009/10/25 03:12:02 vostorga Exp $ + +*pcmanfm-0.5.1-r1 (25 Oct 2009) + + 25 Oct 2009; Víctor Ostorga <vostorga@gentoo.org> + +pcmanfm-0.5.1-r1.ebuild, + +files/pcmanfm-0.5.1-shared-mime-info-0.70.patch: + Allowing pcmanfm to work against shared-mime-info-0.70 , patch thanks to + Samuli Suominen <ssuominen@gentoo.org> bug 288820 15 Aug 2009; Mounir Lamouri <volkmar@gentoo.org> pcmanfm-0.5.1.ebuild: Keywording for ppc. Bug 271148 diff --git a/x11-misc/pcmanfm/files/pcmanfm-0.5.1-shared-mime-info-0.70.patch b/x11-misc/pcmanfm/files/pcmanfm-0.5.1-shared-mime-info-0.70.patch new file mode 100644 index 000000000000..5a8029430e13 --- /dev/null +++ b/x11-misc/pcmanfm/files/pcmanfm-0.5.1-shared-mime-info-0.70.patch @@ -0,0 +1,58 @@ +diff -ur pcmanfm-0.5.1.orig/src/mime-type/mime-cache.c pcmanfm-0.5.1/src/mime-type/mime-cache.c +--- pcmanfm-0.5.1.orig/src/mime-type/mime-cache.c 2009-04-20 20:41:30.000000000 +0300 ++++ pcmanfm-0.5.1/src/mime-type/mime-cache.c 2009-10-24 20:39:51.000000000 +0300 +@@ -40,7 +40,13 @@ + #include <fnmatch.h> + + #define LIB_MAJOR_VERSION 1 +-#define LIB_MAX_MINOR_VERSION 1 ++/* FIXME: since mime-cache 1.2, weight is splitted into three parts ++ * only lower 8 bit contains weight, and higher bits are flags and case-sensitivity. ++ * anyway, since we don't support weight at all, it'll be fixed later. ++ * We claimed that we support 1.2 to cheat pcmanfm as a temporary quick dirty fix ++ * for the broken file manager, but this should be correctly done in the future. ++ * Weight and case-sensitivity are not handled now. */ ++#define LIB_MAX_MINOR_VERSION 2 + #define LIB_MIN_MINOR_VERSION 0 + + /* handle byte order here */ +@@ -57,7 +63,6 @@ + #define GLOB_LIST 20 + #define MAGIC_LIST 24 + #define NAMESPACE_LIST 28 +-#define HEADER_SIZE 32 + + MimeCache* mime_cache_new( const char* file_path ) + { +@@ -111,7 +116,7 @@ + if ( fd < 0 ) + return FALSE; + +- if( fstat ( fd, &statbuf ) < 0 || statbuf.st_size < HEADER_SIZE ) ++ if( fstat ( fd, &statbuf ) < 0 ) + { + close( fd ); + return FALSE; +@@ -346,7 +351,6 @@ + const char* node =nodes + i * 12; + guint32 ch = VAL32(node, 0); + _suffix_pos = suffix; +- + if( G_LIKELY( ch ) ) + { + if( ch == uchar ) +@@ -391,14 +395,12 @@ + + if( G_UNLIKELY( ! filename || ! *filename || 0 == n ) ) + return NULL; +- + if( cache->has_reverse_suffix ) /* since mime.cache ver: 1.1 */ + { + const char *suffix, *leaf_node, *_suffix_pos = (const char*)-1; + fn_len = strlen( filename ); + suffix = g_utf8_find_prev_char( filename, filename + fn_len ); + leaf_node = lookup_reverse_suffix_nodes( cache->buffer, root, n, filename, suffix, &_suffix_pos ); +- + if( leaf_node ) + { + mime_type = cache->buffer + VAL32( leaf_node, 4 ); diff --git a/x11-misc/pcmanfm/pcmanfm-0.5.1-r1.ebuild b/x11-misc/pcmanfm/pcmanfm-0.5.1-r1.ebuild new file mode 100644 index 000000000000..3f1e7f70535f --- /dev/null +++ b/x11-misc/pcmanfm/pcmanfm-0.5.1-r1.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-misc/pcmanfm/pcmanfm-0.5.1-r1.ebuild,v 1.1 2009/10/25 03:12:02 vostorga Exp $ + +EAPI="2" +inherit autotools eutils fdo-mime + +DESCRIPTION="Extremely fast and lightweight tabbed file manager" +HOMEPAGE="http://pcmanfm.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="hal" + +RDEPEND="virtual/fam + x11-libs/cairo + x11-libs/gtk+:2 + x11-misc/shared-mime-info + x11-themes/gnome-icon-theme + x11-libs/startup-notification + hal? ( sys-apps/hal )" +DEPEND="${RDEPEND} + dev-util/pkgconfig + sys-devel/gettext" + +src_prepare() { + # Don't break Gnome & possibly other environments, bug 272318 + epatch "${FILESDIR}"/pcmanfm-find.desktop.patch + epatch "${FILESDIR}"/${P}-shared-mime-info-0.70.patch + eautoreconf +} + +src_configure() { + econf $(use_enable hal) +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + dodoc AUTHORS ChangeLog NEWS README TODO || die "dodoc failed" +} + +pkg_postinst() { + fdo-mime_desktop_database_update + fdo-mime_mime_database_update + + if has_version app-admin/fam ; then + elog "You are using fam as your file alteration monitor," + elog "so you must have famd started before running pcmanfm." + elog + elog "To add famd to the default runlevel and start it, run:" + elog + elog "# rc-update add famd default" + elog "# /etc/init.d/famd start" + elog + elog "It is recommended you use gamin instead of fam." + fi +} + +pkg_postrm() { + fdo-mime_desktop_database_update + fdo-mime_mime_database_update +} |