diff options
author | 2015-11-18 12:23:25 +0100 | |
---|---|---|
committer | 2015-11-18 12:23:25 +0100 | |
commit | 1caee4b09647ef670c16b4c4e8b4b0877b2b9c0b (patch) | |
tree | e65da2bb023bf5f52f31b8f89a39942c50d3f66a /x11-libs | |
download | bleeding-edge-1caee4b09647ef670c16b4c4e8b4b0877b2b9c0b.tar.gz bleeding-edge-1caee4b09647ef670c16b4c4e8b4b0877b2b9c0b.tar.bz2 bleeding-edge-1caee4b09647ef670c16b4c4e8b4b0877b2b9c0b.zip |
pcmanfm using gtk3, newest sys-block/tgt, portage-utils with qtail, net-mail/libdbx with dbx2mbox
Diffstat (limited to 'x11-libs')
-rw-r--r-- | x11-libs/libfm/Manifest | 1 | ||||
-rw-r--r-- | x11-libs/libfm/files/0002-Fix-gdk_window_get_device_position-device-argument.patch | 60 | ||||
-rw-r--r-- | x11-libs/libfm/files/libfm-eacces.patch | 24 | ||||
-rw-r--r-- | x11-libs/libfm/libfm-1.2.3-r2.ebuild | 130 |
4 files changed, 215 insertions, 0 deletions
diff --git a/x11-libs/libfm/Manifest b/x11-libs/libfm/Manifest new file mode 100644 index 0000000..7361d3d --- /dev/null +++ b/x11-libs/libfm/Manifest @@ -0,0 +1 @@ +DIST libfm-1.2.3.tar.xz 898256 SHA256 c692f1624a4cbc8d1dd55f3b3f3369fbf5d26f63a916e2c295230b2344e1fbf9 SHA512 f4c214daffc47f05ba31c65203ab0542a03f5a246ea4bb62b6b365ac3fa120a1a51e37b00f8a43afe56875eb69f9be327ac724dafb6fc2de13aa77deea23f443 WHIRLPOOL ae5354c5ef5154ebce8a9124b47e0a645171d50d4034fd1e6000ff084acc15261398029c58b067b9027d4ba68d36d8addf91a28678c91a3fbd9ce0806e9b6046 diff --git a/x11-libs/libfm/files/0002-Fix-gdk_window_get_device_position-device-argument.patch b/x11-libs/libfm/files/0002-Fix-gdk_window_get_device_position-device-argument.patch new file mode 100644 index 0000000..831d3dc --- /dev/null +++ b/x11-libs/libfm/files/0002-Fix-gdk_window_get_device_position-device-argument.patch @@ -0,0 +1,60 @@ +From 3355a737e0a4dcb87bda28868c30b70b1cd2eb34 Mon Sep 17 00:00:00 2001 +From: Mamoru TASAKA <mtasaka@fedoraproject.org> +Date: Sat, 23 May 2015 15:51:55 +0900 +Subject: [PATCH] Fix gdk_window_get_device_position device argument + +http://sourceforge.net/p/pcmanfm/bugs/959/ +--- + src/gtk-compat.h | 2 ++ + src/gtk/fm-dnd-auto-scroll.c | 5 +++-- + src/gtk/fm-folder-view.c | 5 +++-- + 3 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/src/gtk-compat.h b/src/gtk-compat.h +index 3f37fab..e460f74 100644 +--- a/src/gtk-compat.h ++++ b/src/gtk-compat.h +@@ -33,6 +33,8 @@ G_BEGIN_DECLS + gdk_window_get_pointer(win,xptr,yptr,mptr) + #else + # define gdk_cursor_unref(obj) g_object_unref(obj) ++# define GDK_GET_DEVICE_FROM_WINDOW(window) \ ++ gdk_device_manager_get_client_pointer (gdk_display_get_device_manager (gdk_window_get_display(window))) + #endif + + #if !GTK_CHECK_VERSION(2, 21, 0) +diff --git a/src/gtk/fm-dnd-auto-scroll.c b/src/gtk/fm-dnd-auto-scroll.c +index 72d866a..2861355 100644 +--- a/src/gtk/fm-dnd-auto-scroll.c ++++ b/src/gtk/fm-dnd-auto-scroll.c +@@ -55,8 +55,9 @@ static gboolean on_auto_scroll(gpointer user_data) + if(g_source_is_destroyed(g_main_current_source())) + return FALSE; + +- gdk_window_get_device_position (gtk_widget_get_window(widget), +- gtk_get_current_event_device(), ++ GdkWindow *window = gtk_widget_get_window(widget); ++ gdk_window_get_device_position (window, ++ GDK_GET_DEVICE_FROM_WINDOW(window), + &x, &y, NULL); + gtk_widget_get_allocation(widget, &allocation); + +diff --git a/src/gtk/fm-folder-view.c b/src/gtk/fm-folder-view.c +index 21e7dff..8ee020e 100644 +--- a/src/gtk/fm-folder-view.c ++++ b/src/gtk/fm-folder-view.c +@@ -1106,8 +1106,9 @@ static void popup_position_func(GtkMenu *menu, gint *x, gint *y, + gtk_widget_realize(GTK_WIDGET(menu)); + /* get all the relative coordinates */ + gtk_widget_get_allocation(widget, &a); +- gdk_window_get_device_position(gtk_widget_get_window(widget), +- gtk_get_current_event_device(), &x2, &y2, NULL); ++ GdkWindow *window = gtk_widget_get_window(widget); ++ gdk_window_get_device_position(window, ++ GDK_GET_DEVICE_FROM_WINDOW(window), &x2, &y2, NULL); + gtk_widget_get_allocation(GTK_WIDGET(menu), &ma); + parent_window = gtk_widget_get_parent_window(widget); + screen = gtk_widget_get_screen(widget); +-- +2.4.1 + diff --git a/x11-libs/libfm/files/libfm-eacces.patch b/x11-libs/libfm/files/libfm-eacces.patch new file mode 100644 index 0000000..97824b7 --- /dev/null +++ b/x11-libs/libfm/files/libfm-eacces.patch @@ -0,0 +1,24 @@ +--- libfm-1.2.2.1/src/base/fm-file-launcher.c.orig 2014-08-24 00:18:48.000000000 +0200 ++++ libfm-1.2.2.1/src/base/fm-file-launcher.c 2014-10-07 23:36:17.813228153 +0200 +@@ -195,7 +195,20 @@ gboolean fm_launch_files(GAppLaunchConte + continue; + targets = g_list_prepend(targets, fi); + } +- folders = g_list_prepend(folders, fi); ++ if (fm_file_info_is_accessible(fi)) ++ folders = g_list_prepend(folders, fi); ++ else ++ { ++ filename = fm_path_to_str(fm_file_info_get_path(fi)); ++ g_set_error(&err, G_IO_ERROR, g_io_error_from_errno(EACCES), ++ _("Cannot open the folder '%s': %s"), filename, ++ g_strerror(EACCES)); ++ g_free(filename); ++ g_message(err->message); ++ if (launcher->error) ++ launcher->error(ctx, err, NULL, user_data); ++ g_clear_error(&err); ++ } + } + else if (fm_file_info_is_desktop_entry(fi)) + { diff --git a/x11-libs/libfm/libfm-1.2.3-r2.ebuild b/x11-libs/libfm/libfm-1.2.3-r2.ebuild new file mode 100644 index 0000000..77eb2e3 --- /dev/null +++ b/x11-libs/libfm/libfm-1.2.3-r2.ebuild @@ -0,0 +1,130 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools fdo-mime multilib vala + +MY_PV=${PV/_/} +MY_P="${PN}-${MY_PV}" +DESCRIPTION="A library for file management" +HOMEPAGE="http://pcmanfm.sourceforge.net/" +SRC_URI="mirror://sourceforge/project/pcmanfm/PCManFM%20%2B%20Libfm%20%28tarball%20release%29/LibFM/${P}.tar.xz" + +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~mips ~ppc ~x86 ~amd64-linux ~x86-linux" +LICENSE="GPL-2" +SLOT="0/4.3.0" #copy ABI_VERSION because it seems upstream change it randomly +IUSE="+automount debug doc examples exif +gtk +gtk3 udisks vala" + +COMMON_DEPEND="dev-libs/glib:2 + gtk3? ( x11-libs/gtk+:3 ) + !gtk3? ( gtk? ( x11-libs/gtk+:2 ) ) + lxde-base/menu-cache + ~x11-libs/libfm-extra-${PV}" +RDEPEND="${COMMON_DEPEND} + !lxde-base/lxshortcut + x11-misc/shared-mime-info + automount? ( + udisks? ( gnome-base/gvfs[udev,udisks] ) + !udisks? ( gnome-base/gvfs[udev] ) + ) + exif? ( media-libs/libexif )" +DEPEND="${COMMON_DEPEND} + vala? ( $(vala_depend) ) + doc? ( + dev-util/gtk-doc + ) + app-arch/xz-utils + dev-util/intltool + virtual/pkgconfig + sys-devel/gettext" + +S="${WORKDIR}"/${MY_P} + +REQUIRED_USE="udisks? ( automount ) doc? ( gtk )" + +src_prepare() { + epatch "${FILESDIR}/0002-Fix-gdk_window_get_device_position-device-argument.patch" + epatch "${FILESDIR}/libfm-eacces.patch" + + if ! use doc; then + sed -ie '/^SUBDIR.*=/s#docs##' "${S}"/Makefile.am || die "sed failed" + sed -ie '/^[[:space:]]*docs/d' configure.ac || die "sed failed" + fi + sed -i -e "s:-O0::" -e "/-DG_ENABLE_DEBUG/s: -g::" \ + configure.ac || die "sed failed" + + #disable unused translations. Bug #356029 + for trans in app-chooser ask-rename exec-file file-prop preferred-apps \ + progress;do + echo "data/ui/"${trans}.ui >> po/POTFILES.in + done + #Remove -Werror for automake-1.12. Bug #421101 + sed -i "s:-Werror::" configure.ac || die + + # subslot sanity check + local sub_slot=${SLOT#*/} + local libfm_major_abi=$(sed -rne '/ABI_VERSION/s:.*=::p' src/Makefile.am | tr ':' '.') + + if [[ ${sub_slot} != ${libfm_major_abi} ]]; then + eerror "Ebuild sub-slot (${sub_slot}) does not match ABI_VERSION(${libfm_major_abi})" + eerror "Please update SLOT variable as follows:" + eerror " SLOT=\"${SLOT%%/*}/${libfm_major_abi}\"" + eerror + die "sub-slot sanity check failed" + fi + + eautoreconf + rm -r autom4te.cache || die + use vala && export VALAC="$(type -p valac-$(vala_best_api_version))" +} + +src_configure() { + econf \ + --sysconfdir="${EPREFIX}/etc" \ + --disable-dependency-tracking \ + --disable-static \ + $(use_enable examples demo) \ + $(use_enable exif) \ + $(use_enable debug) \ + $(use_enable udisks) \ + $(use_enable vala actions) \ + $(use_with gtk) \ + $(usex gtk3 --with-gtk=3 "" "" "") \ + $(use_enable doc gtk-doc) \ + --with-html-dir=/usr/share/doc/${PF}/html +} + +src_install() { + default + find "${D}" -name '*.la' -exec rm -f '{}' + + # Sometimes a directory is created instead of a symlink. No idea why... + # It is wrong anyway. We expect a libfm-1.0 directory and then a libfm + # symlink to it. + if [[ -h ${D}/usr/include/${PN} || -d ${D}/usr/include/${PN} ]]; then + rm -r "${D}"/usr/include/${PN} + fi + # Remove files installed by split-off libfm-extra package + rm "${D}"/usr/include/libfm-1.0/fm-{extra,version,xml-file}.h + rm "${D}"/usr/$(get_libdir)/libfm-extra* + rm "${D}"/usr/$(get_libdir)/pkgconfig/libfm-extra.pc +} + +pkg_preinst() { + # Resolve the symlink mess. Bug #439570 + [[ -d "${ROOT}"/usr/include/${PN} ]] && \ + rm -rf "${ROOT}"/usr/include/${PN} + if [[ -d "${D}"/usr/include/${PN}-1.0 ]]; then + cd "${D}"/usr/include + ln -s --force ${PN}-1.0 ${PN} + fi +} + +pkg_postinst() { + fdo-mime_mime_database_update +} + +pkg_postrm() { + fdo-mime_mime_database_update +} |