diff options
author | Dudemanguy | 2024-02-24 15:10:21 -0600 |
---|---|---|
committer | Dudemanguy | 2024-02-24 16:05:48 -0600 |
commit | e309bdd52300a1c707680c0914bbdb8f5e5f4b09 (patch) | |
tree | 5ff7224f38a25496ec51897365fcba03b80e5a52 | |
parent | 7f145f1da9bc96a5ca3a48cd10d1639a0d72c472 (diff) | |
download | aur-e309bdd52300a1c707680c0914bbdb8f5e5f4b09.tar.gz |
2.78.4-1.1
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | 0002-glocalfileinfo-add-a-dbus-thumbnail-generator.patch | 55 | ||||
-rw-r--r-- | PKGBUILD | 11 |
3 files changed, 37 insertions, 33 deletions
@@ -1,7 +1,7 @@ pkgbase = glib2-patched-thumbnailer pkgdesc = GLib2 patched with ahodesuka's thumbnailer patch. pkgver = 2.78.4 - pkgrel = 1 + pkgrel = 1.1 url = https://gist.github.com/Dudemanguy/d199759b46a79782cc1b301649dec8a5 arch = x86_64 license = LGPL @@ -45,7 +45,7 @@ pkgbase = glib2-patched-thumbnailer b2sums = SKIP b2sums = SKIP b2sums = 94c73ca7070c239494873dd52d6ee09382bbb5b1201f7afd737cfa140b1a2fb0744b2c2831baf3943d1d072550c35888d21ce6f19f89481ff9d1a60d9a0b30e0 - b2sums = 7f6bc830e8ccf0ef8d1afa178af5141f2ff6b9387efd6675a27627ff90548b854c68bfc928b680833352b055de316f92726391909884f89c7a042825a942c03b + b2sums = 5eed57eccc15fa9994228815874200135e9ee682b9bd718dae4b486eb3a65f2efb8121f45afedd4dd33208297738b5f1f489cb9a798a896540a505b32a37cc08 b2sums = 14c9211c0557f6d8d9a914f1b18b7e0e23f79f4abde117cb03ab119b95bf9fa9d7a712aa0a29beb266468aeb352caa3a9e4540503cfc9fe0bbaf764371832a96 b2sums = d30d349b4cb4407839d9074ce08f5259b8a5f3ca46769aabc621f17d15effdb89c4bf19bd23603f6df3d59f8d1adaded0f4bacd0333afcab782f2d048c882858 diff --git a/0002-glocalfileinfo-add-a-dbus-thumbnail-generator.patch b/0002-glocalfileinfo-add-a-dbus-thumbnail-generator.patch index 2540c332e1fd..55167c699d43 100644 --- a/0002-glocalfileinfo-add-a-dbus-thumbnail-generator.patch +++ b/0002-glocalfileinfo-add-a-dbus-thumbnail-generator.patch @@ -1,14 +1,14 @@ -From 23253d184e8769e3d596c58666c07fe0912000ae Mon Sep 17 00:00:00 2001 +From 01ce72fb8086fb6984e4409739a821408045612e Mon Sep 17 00:00:00 2001 From: Dudemanguy <random342@airmail.cc> -Date: Fri, 17 Mar 2023 09:43:52 -0500 +Date: Sat, 24 Feb 2024 15:07:31 -0600 Subject: [PATCH] glocalfileinfo: add a dbus thumbnail generator --- - gio/glocalfileinfo.c | 181 +++++++++++++++++++++++++++++++++++++++++-- - 1 file changed, 174 insertions(+), 7 deletions(-) + gio/glocalfileinfo.c | 186 +++++++++++++++++++++++++++++++++++++++++-- + 1 file changed, 179 insertions(+), 7 deletions(-) diff --git a/gio/glocalfileinfo.c b/gio/glocalfileinfo.c -index bccad04b9..4de0744d4 100644 +index 4f51427f5..5e1698da0 100644 --- a/gio/glocalfileinfo.c +++ b/gio/glocalfileinfo.c @@ -68,6 +68,12 @@ @@ -41,7 +41,7 @@ index bccad04b9..4de0744d4 100644 #ifndef G_OS_WIN32 typedef struct { -@@ -1457,18 +1473,132 @@ get_thumbnail_dirname_from_size (ThumbnailSize size) +@@ -1419,18 +1435,137 @@ get_thumbnail_dirname_from_size (ThumbnailSize size) g_return_val_if_reached (NULL); } @@ -98,6 +98,7 @@ index bccad04b9..4de0744d4 100644 + NULL, + &error); + ++ g_main_context_push_thread_default (thread_context); + proxy = g_dbus_proxy_new_sync (connection, + G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, + NULL, @@ -109,8 +110,7 @@ index bccad04b9..4de0744d4 100644 + if (!proxy) + { + g_warning ("generate_thumbnail (): g_dbus_proxy_new_sync failed"); -+ g_main_loop_unref (state.mainloop); -+ return FALSE; ++ goto done; + } + else + g_debug("generate_thumbnail (): connected to D-Bus"); @@ -118,7 +118,6 @@ index bccad04b9..4de0744d4 100644 + g_signal_connect (G_OBJECT (proxy), "g-signal", + G_CALLBACK (thumbnailer_signal_cb), &state); + -+ g_main_context_push_thread_default (thread_context); + result = g_dbus_proxy_call_sync (proxy, + "Queue", + g_variant_new("(^as^asssu)", @@ -134,14 +133,20 @@ index bccad04b9..4de0744d4 100644 + if (!result || error) + { + g_warning ("generate_thumbnail (): g_dbus_proxy_call_sync() failed: %s", error->message); -+ return FALSE; ++ goto done; + } + g_variant_get (result, "(u)", &(state.handle)); + g_variant_unref (result); + // block until the loop is terminated in thumbnailer_signal_cb () + g_main_loop_run (state.mainloop); -+ g_object_unref (proxy); -+ g_object_unref (connection); ++ ++done: ++ if (proxy) ++ g_object_unref (proxy); ++ ++ if (connection) ++ g_object_unref (connection); ++ + g_main_loop_unref (state.mainloop); + g_main_context_pop_thread_default (thread_context); + g_main_context_unref (thread_context); @@ -175,7 +180,7 @@ index bccad04b9..4de0744d4 100644 guint32 failed_attr_id; guint32 is_valid_attr_id; guint32 path_attr_id; -@@ -1545,6 +1675,7 @@ get_thumbnail_attributes (const char *path, +@@ -1507,6 +1642,7 @@ get_thumbnail_attributes (const char *path, _g_file_info_set_attribute_byte_string_by_id (info, path_attr_id, filename); _g_file_info_set_attribute_boolean_by_id (info, is_valid_attr_id, thumbnail_verify (filename, uri, stat_buf)); @@ -183,7 +188,7 @@ index bccad04b9..4de0744d4 100644 } else { -@@ -1559,9 +1690,31 @@ get_thumbnail_attributes (const char *path, +@@ -1521,9 +1657,31 @@ get_thumbnail_attributes (const char *path, _g_file_info_set_attribute_boolean_by_id (info, failed_attr_id, TRUE); _g_file_info_set_attribute_boolean_by_id (info, is_valid_attr_id, thumbnail_verify (filename, uri, stat_buf)); @@ -198,16 +203,16 @@ index bccad04b9..4de0744d4 100644 + if (content_type) + { + g_debug ("invoking Freedesktop Thumbnailer for %s (%s)", uri, content_type); -+ if(generate_thumbnail (uri, content_type)) ++ if (generate_thumbnail (uri, content_type)) + { + /* Now that the thumbnail is generated, find it. */ + get_thumbnail_attributes (path, info, stat_buf, size, FALSE); + } -+ else ++ /*else + { + _g_file_info_set_attribute_boolean_by_id (info, G_FILE_ATTRIBUTE_ID_THUMBNAILING_FAILED, TRUE); + _g_file_info_set_attribute_boolean_by_id (info, G_FILE_ATTRIBUTE_ID_THUMBNAIL_IS_VALID, FALSE); -+ } ++ }*/ + } +#endif /* FREEDESKTOP_THUMBNAILER */ + } @@ -215,7 +220,7 @@ index bccad04b9..4de0744d4 100644 g_free (basename); g_free (filename); g_free (uri); -@@ -1952,6 +2105,18 @@ _g_local_file_info_get (const char *basename, +@@ -1914,6 +2072,18 @@ _g_local_file_info_get (const char *basename, info = g_file_info_new (); @@ -234,7 +239,7 @@ index bccad04b9..4de0744d4 100644 /* Make sure we don't set any unwanted attributes */ g_file_info_set_attribute_mask (info, attribute_matcher); -@@ -2087,7 +2252,9 @@ _g_local_file_info_get (const char *basename, +@@ -2049,7 +2219,9 @@ _g_local_file_info_get (const char *basename, _g_file_attribute_matcher_matches_id (attribute_matcher, G_FILE_ATTRIBUTE_ID_STANDARD_ICON) || _g_file_attribute_matcher_matches_id (attribute_matcher, @@ -245,7 +250,7 @@ index bccad04b9..4de0744d4 100644 { char *content_type = get_content_type (basename, path, stat_ok ? &statbuf : NULL, is_symlink, symlink_broken, flags, FALSE); -@@ -2203,7 +2370,7 @@ _g_local_file_info_get (const char *basename, +@@ -2165,7 +2337,7 @@ _g_local_file_info_get (const char *basename, _g_file_attribute_matcher_matches_id (attribute_matcher, G_FILE_ATTRIBUTE_ID_THUMBNAILING_FAILED)) { @@ -254,7 +259,7 @@ index bccad04b9..4de0744d4 100644 } if (_g_file_attribute_matcher_matches_id (attribute_matcher, -@@ -2213,7 +2380,7 @@ _g_local_file_info_get (const char *basename, +@@ -2175,7 +2347,7 @@ _g_local_file_info_get (const char *basename, _g_file_attribute_matcher_matches_id (attribute_matcher, G_FILE_ATTRIBUTE_ID_THUMBNAILING_FAILED_NORMAL)) { @@ -263,7 +268,7 @@ index bccad04b9..4de0744d4 100644 } if (_g_file_attribute_matcher_matches_id (attribute_matcher, -@@ -2223,7 +2390,7 @@ _g_local_file_info_get (const char *basename, +@@ -2185,7 +2357,7 @@ _g_local_file_info_get (const char *basename, _g_file_attribute_matcher_matches_id (attribute_matcher, G_FILE_ATTRIBUTE_ID_THUMBNAILING_FAILED_LARGE)) { @@ -272,7 +277,7 @@ index bccad04b9..4de0744d4 100644 } if (_g_file_attribute_matcher_matches_id (attribute_matcher, -@@ -2233,7 +2400,7 @@ _g_local_file_info_get (const char *basename, +@@ -2195,7 +2367,7 @@ _g_local_file_info_get (const char *basename, _g_file_attribute_matcher_matches_id (attribute_matcher, G_FILE_ATTRIBUTE_ID_THUMBNAILING_FAILED_XLARGE)) { @@ -281,7 +286,7 @@ index bccad04b9..4de0744d4 100644 } if (_g_file_attribute_matcher_matches_id (attribute_matcher, -@@ -2243,7 +2410,7 @@ _g_local_file_info_get (const char *basename, +@@ -2205,7 +2377,7 @@ _g_local_file_info_get (const char *basename, _g_file_attribute_matcher_matches_id (attribute_matcher, G_FILE_ATTRIBUTE_ID_THUMBNAILING_FAILED_XXLARGE)) { @@ -291,5 +296,5 @@ index bccad04b9..4de0744d4 100644 vfs = g_vfs_get_default (); -- -2.40.0 +2.43.2 @@ -5,7 +5,7 @@ pkgname=glib2-patched-thumbnailer pkgver=2.78.4 -pkgrel=1 +pkgrel=1.1 pkgdesc="GLib2 patched with ahodesuka's thumbnailer patch." url="https://gist.github.com/Dudemanguy/d199759b46a79782cc1b301649dec8a5" arch=(x86_64) @@ -33,7 +33,7 @@ source=( b2sums=('SKIP' 'SKIP' '94c73ca7070c239494873dd52d6ee09382bbb5b1201f7afd737cfa140b1a2fb0744b2c2831baf3943d1d072550c35888d21ce6f19f89481ff9d1a60d9a0b30e0' - '7f6bc830e8ccf0ef8d1afa178af5141f2ff6b9387efd6675a27627ff90548b854c68bfc928b680833352b055de316f92726391909884f89c7a042825a942c03b' + '5eed57eccc15fa9994228815874200135e9ee682b9bd718dae4b486eb3a65f2efb8121f45afedd4dd33208297738b5f1f489cb9a798a896540a505b32a37cc08' '14c9211c0557f6d8d9a914f1b18b7e0e23f79f4abde117cb03ab119b95bf9fa9d7a712aa0a29beb266468aeb352caa3a9e4540503cfc9fe0bbaf764371832a96' 'd30d349b4cb4407839d9074ce08f5259b8a5f3ca46769aabc621f17d15effdb89c4bf19bd23603f6df3d59f8d1adaded0f4bacd0333afcab782f2d048c882858') @@ -77,10 +77,9 @@ build() { meson compile -C build } -#skip this; test fails -#check() { -# meson test -C build --no-suite flaky --no-suite slow --print-errorlogs -#} +check() { + meson test -C build --no-suite flaky --no-suite slow --print-errorlogs +} package() { meson install -C build --destdir "$pkgdir" |