libfm: use upstream patch, use finalAttrs pattern and remove with lib; (#371519)
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
--- a/src/actions/action.c
|
||||
+++ b/src/actions/action.c
|
||||
@@ -2047,7 +2047,7 @@
|
||||
gchar* _tmp9_ = NULL;
|
||||
_tmp0_ = fm_all_actions;
|
||||
g_hash_table_remove_all (_tmp0_);
|
||||
- _tmp2_ = _tmp1_ = g_get_system_data_dirs ();
|
||||
+ _tmp2_ = _tmp1_ = (gchar **)g_get_system_data_dirs ();
|
||||
dirs = _tmp2_;
|
||||
dirs_length1 = _vala_array_length (_tmp1_);
|
||||
_dirs_size_ = dirs_length1;
|
||||
@@ -1,11 +0,0 @@
|
||||
--- a/src/gtk/exo/exo-icon-view.c
|
||||
+++ b/src/gtk/exo/exo-icon-view.c
|
||||
@@ -2819,7 +2819,7 @@
|
||||
/* allocate a new event to forward */
|
||||
new_event = gdk_event_copy ((GdkEvent *) event);
|
||||
g_object_unref (G_OBJECT (new_event->key.window));
|
||||
- new_event->key.window = g_object_ref (G_OBJECT (gtk_widget_get_window (icon_view->priv->search_entry)));
|
||||
+ new_event->key.window = (GdkWindow *)g_object_ref (G_OBJECT (gtk_widget_get_window (icon_view->priv->search_entry)));
|
||||
|
||||
/* send the event to the search entry. If the "preedit-changed" signal is
|
||||
* emitted during this event, priv->search_imcontext_changed will be set.
|
||||
@@ -1,11 +0,0 @@
|
||||
--- a/src/gtk/fm-dnd-dest.c
|
||||
+++ b/src/gtk/fm-dnd-dest.c
|
||||
@@ -458,7 +458,7 @@
|
||||
gtk_action_set_sensitive(act, FALSE);
|
||||
}
|
||||
}
|
||||
- ri.menu = g_object_ref(gtk_ui_manager_get_widget(ui, "/popup"));
|
||||
+ ri.menu = (GtkMenu *)g_object_ref(gtk_ui_manager_get_widget(ui, "/popup"));
|
||||
g_signal_connect(ri.menu, "selection-done", G_CALLBACK(gtk_widget_destroy), NULL);
|
||||
unmap_handler = g_signal_connect(ri.menu, "unmap",
|
||||
G_CALLBACK(run_unmap_handler), &ri);
|
||||
@@ -1,11 +0,0 @@
|
||||
--- a/src/gtk/fm-standard-view.c
|
||||
+++ b/src/gtk/fm-standard-view.c
|
||||
@@ -637,7 +637,7 @@
|
||||
"text", FM_FOLDER_MODEL_COL_NAME );
|
||||
if(fv->renderer_text)
|
||||
g_object_unref(fv->renderer_text);
|
||||
- fv->renderer_text = g_object_ref_sink(render);
|
||||
+ fv->renderer_text = (FmCellRendererText *)g_object_ref_sink(render);
|
||||
exo_icon_view_set_search_column((ExoIconView*)fv->view, FM_FOLDER_MODEL_COL_NAME);
|
||||
g_signal_connect(fv->view, "item-activated", G_CALLBACK(on_icon_view_item_activated), fv);
|
||||
g_signal_connect(fv->view, "selection-changed", G_CALLBACK(on_sel_changed), fv);
|
||||
@@ -2,6 +2,7 @@
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
fetchpatch,
|
||||
glib,
|
||||
intltool,
|
||||
menu-cache,
|
||||
@@ -18,20 +19,21 @@ let
|
||||
gtk = if withGtk3 then gtk3 else gtk2;
|
||||
inherit (lib) optional optionalString;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = if extraOnly then "libfm-extra" else "libfm";
|
||||
version = "1.3.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/pcmanfm/libfm-${version}.tar.xz";
|
||||
url = "mirror://sourceforge/pcmanfm/libfm-${finalAttrs.version}.tar.xz";
|
||||
sha256 = "sha256-pQQmMDBM+OXYz/nVZca9VG8ii0jJYBU+02ajTofK0eU=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./0001-fm-load-all-actions.patch
|
||||
./0002-exo-icon-view-key-press-event.patch
|
||||
./0003-ask-action-on-drop.patch
|
||||
./0004-create-icon-view.patch
|
||||
# Add casts to fix -Werror=incompatible-pointer-types
|
||||
(fetchpatch {
|
||||
url = "https://github.com/lxde/libfm/commit/fbcd183335729fa3e8dd6a837c13a23ff3271000.patch";
|
||||
hash = "sha256-RbX8jkP/5ao6NWEnv8Pgy4zwZaiDsslGlRRWdoV3enA=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
@@ -52,6 +54,11 @@ stdenv.mkDerivation rec {
|
||||
|
||||
installFlags = [ "sysconfdir=${placeholder "out"}/etc" ];
|
||||
|
||||
postPatch = ''
|
||||
# Ensure the files are re-generated from Vala sources.
|
||||
rm src/actions/*.c
|
||||
'';
|
||||
|
||||
# libfm-extra is pulled in by menu-cache and thus leads to a collision for libfm
|
||||
postInstall = optionalString (!extraOnly) ''
|
||||
rm $out/lib/libfm-extra.so $out/lib/libfm-extra.so.* $out/lib/libfm-extra.la $out/lib/pkgconfig/libfm-extra.pc
|
||||
@@ -59,12 +66,12 @@ stdenv.mkDerivation rec {
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
broken = stdenv.hostPlatform.isDarwin;
|
||||
homepage = "https://blog.lxde.org/category/pcmanfm/";
|
||||
license = licenses.lgpl21Plus;
|
||||
license = lib.licenses.lgpl21Plus;
|
||||
description = "Glib-based library for file management";
|
||||
maintainers = [ maintainers.ttuegel ];
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
maintainers = with lib.maintainers; [ ttuegel ];
|
||||
platforms = lib.platforms.linux ++ lib.platforms.darwin;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user