summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--x11-libs/libfm/Manifest1
-rw-r--r--x11-libs/libfm/files/add_file_compare_attributes.patch53
-rw-r--r--x11-libs/libfm/files/libfm-fix-use-after-free.diff23
-rw-r--r--x11-libs/libfm/libfm-1.3.1.ebuild (renamed from x11-libs/libfm/libfm-1.3.0-r1.ebuild)25
4 files changed, 37 insertions, 65 deletions
diff --git a/x11-libs/libfm/Manifest b/x11-libs/libfm/Manifest
deleted file mode 100644
index d6a5093d..00000000
--- a/x11-libs/libfm/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST libfm-1.3.0.tar.gz 1288574 BLAKE2B 24a7ee923f5d51fddd934e85930533408dfd0c7c099e12b55e18820aa20b47605b1c0a005b5519c35dd8f8dc6042cf01d140602ef53609d1e86ce78c8540091a SHA512 1bac0779c6dad52ef722998dc3859a5868eaacfd2ec41e8966d92ec4c57c2e060c8811bf8fe172e6305707e3f018b412379cdb336a29de29d081d3f7cceeec0e
diff --git a/x11-libs/libfm/files/add_file_compare_attributes.patch b/x11-libs/libfm/files/add_file_compare_attributes.patch
deleted file mode 100644
index 65f0323c..00000000
--- a/x11-libs/libfm/files/add_file_compare_attributes.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-diff --git a/src/gtk/fm-progress-dlg.c b/src/gtk/fm-progress-dlg.c
-index 49aebe47..1d124a60 100644
---- a/src/gtk/fm-progress-dlg.c
-+++ b/src/gtk/fm-progress-dlg.c
-@@ -166,6 +166,8 @@ static gint on_ask_rename(FmFileOpsJob* job, FmFileInfo* src, FmFileInfo* dest,
- GtkLabel *src_fi, *dest_fi;
- GtkEntry *filename;
- GtkToggleButton *apply_all;
-+ char* comparedate;
-+ char* comparesize;
- char* tmp;
- const char* disp_size;
- FmPath* path;
-@@ -200,18 +202,34 @@ static gint on_ask_rename(FmFileOpsJob* job, FmFileInfo* src, FmFileInfo* dest,
- gtk_window_set_transient_for(GTK_WINDOW(dlg), GTK_WINDOW(data->dlg));
-
- gtk_image_set_from_gicon(src_icon, G_ICON(icon), GTK_ICON_SIZE_DIALOG);
-+ if (fm_file_info_get_mtime(src) > fm_file_info_get_mtime(dest))
-+ comparedate = _("newer");
-+ else
-+ if (fm_file_info_get_mtime(src) < fm_file_info_get_mtime(dest))
-+ comparedate = _("older");
-+ else
-+ if (fm_file_info_get_mtime(src) == fm_file_info_get_mtime(dest))
-+ comparedate = _("same date/time");
- disp_size = fm_file_info_get_disp_size(src);
- if(disp_size)
- {
-- tmp = g_strdup_printf(_("Type: %s\nSize: %s\nModified: %s"),
-- fm_file_info_get_desc(src), disp_size,
-- fm_file_info_get_disp_mtime(src));
-+ if (fm_file_info_get_size(src) > fm_file_info_get_size(dest))
-+ comparesize = _("larger");
-+ else
-+ if (fm_file_info_get_size(src) < fm_file_info_get_size(dest))
-+ comparesize = _("less");
-+ else
-+ if (fm_file_info_get_size(src) == fm_file_info_get_size(dest))
-+ comparesize = _("same size");
-+ tmp = g_strdup_printf(_("Type: %s\nSize: %s (%s)\nModified: %s (%s)"),
-+ fm_file_info_get_desc(src), disp_size, comparesize,
-+ fm_file_info_get_disp_mtime(src), comparedate);
- }
- else
- {
-- tmp = g_strdup_printf(_("Type: %s\nModified: %s"),
-+ tmp = g_strdup_printf(_("Type: %s\nModified: %s (%s)"),
- fm_file_info_get_desc(src),
-- fm_file_info_get_disp_mtime(src));
-+ fm_file_info_get_disp_mtime(src), comparedate);
- }
-
- gtk_label_set_text(src_fi, tmp);
diff --git a/x11-libs/libfm/files/libfm-fix-use-after-free.diff b/x11-libs/libfm/files/libfm-fix-use-after-free.diff
new file mode 100644
index 00000000..4a0ae61c
--- /dev/null
+++ b/x11-libs/libfm/files/libfm-fix-use-after-free.diff
@@ -0,0 +1,23 @@
+diff -Naur libfm-1.2.3/src/base/fm-config.c libfm-1.2.3-fix-uaf-new2/src/base/fm-config.c
+--- libfm-1.2.3/src/base/fm-config.c 2014-10-14 18:29:21.000000000 +0200
++++ libfm-1.2.3-fix-uaf-new2/src/base/fm-config.c 2016-06-18 18:23:35.721837971 +0200
+@@ -346,7 +346,8 @@
+ cfg->modules_blacklist = NULL;
+ cfg->system_modules_blacklist = NULL;
+ _cfg_monitor_free(cfg);
+- g_free(cfg->_cfg_name);
++ if(name != cfg->_cfg_name)
++ g_free(cfg->_cfg_name);
+ if(G_LIKELY(!name))
+ name = "libfm/libfm.conf";
+ else
+@@ -363,7 +364,8 @@
+ }
+ }
+
+- cfg->_cfg_name = g_strdup(name);
++ if(name != cfg->_cfg_name)
++ cfg->_cfg_name = g_strdup(name);
+ dirs = g_get_system_config_dirs();
+ /* bug SF #887: first dir in XDG_CONFIG_DIRS is the most relevant
+ so we shoult process the list in reverse order */
diff --git a/x11-libs/libfm/libfm-1.3.0-r1.ebuild b/x11-libs/libfm/libfm-1.3.1.ebuild
index ddf591da..2ed54cd0 100644
--- a/x11-libs/libfm/libfm-1.3.0-r1.ebuild
+++ b/x11-libs/libfm/libfm-1.3.1.ebuild
@@ -1,19 +1,19 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=7
-inherit autotools fdo-mime multilib vala
+inherit autotools multilib vala xdg-utils
MY_PV=${PV/_/}
MY_P="${PN}-${MY_PV}"
DESCRIPTION="A library for file management"
-HOMEPAGE="http://pcmanfm.sourceforge.net/"
+HOMEPAGE="https://wiki.lxde.org/en/PCManFM"
SRC_URI="https://github.com/lxde/libfm/archive/${PV}.tar.gz -> ${MY_P}.tar.gz"
-KEYWORDS="amd64"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~mips ~ppc ~x86 ~amd64-linux ~x86-linux"
LICENSE="GPL-2"
-SLOT="0/5.0.1" #copy ABI_VERSION because it seems upstream change it randomly
+SLOT="0/5.2.1" #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.18:2
@@ -42,10 +42,9 @@ DEPEND="${COMMON_DEPEND}
S="${WORKDIR}"/${MY_P}
-REQUIRED_USE="udisks? ( automount ) doc? ( gtk ) gtk3? ( gtk )"
+REQUIRED_USE="udisks? ( automount ) doc? ( gtk )"
src_prepare() {
- epatch "${FILESDIR}"/add_file_compare_attributes.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"
@@ -76,9 +75,11 @@ src_prepare() {
eautoreconf
rm -r autom4te.cache || die
use vala && export VALAC="$(type -p valac-$(vala_best_api_version))"
+
+ eapply_user
}
-src_configure() {
+ src_configure() {
if use gtk3; then
econf \
--sysconfdir="${EPREFIX}/etc" \
@@ -133,9 +134,11 @@ pkg_preinst() {
}
pkg_postinst() {
- fdo-mime_mime_database_update
+ xdg_mimeinfo_database_update
+ xdg_desktop_database_update
}
pkg_postrm() {
- fdo-mime_mime_database_update
+ xdg_mimeinfo_database_update
+ xdg_desktop_database_update
}