From 2e308a49e42bdc3facdd55a2d2da2d2fcd4b504e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Mon, 4 Mar 2024 23:44:26 +0700 Subject: [PATCH] caja-extensions: update to 1.28.0. --- srcpkgs/caja-av | 1 + .../patches/1-gtk-radio-button-id.patch | 24 ---- .../patches/2-sendto-gupnp-1.6.patch | 132 ------------------ .../caja-extensions/patches/3-xattr-mtp.patch | 58 -------- srcpkgs/caja-extensions/template | 31 ++-- 5 files changed, 22 insertions(+), 224 deletions(-) create mode 120000 srcpkgs/caja-av delete mode 100644 srcpkgs/caja-extensions/patches/1-gtk-radio-button-id.patch delete mode 100644 srcpkgs/caja-extensions/patches/2-sendto-gupnp-1.6.patch delete mode 100644 srcpkgs/caja-extensions/patches/3-xattr-mtp.patch diff --git a/srcpkgs/caja-av b/srcpkgs/caja-av new file mode 120000 index 00000000000..9c237ae5529 --- /dev/null +++ b/srcpkgs/caja-av @@ -0,0 +1 @@ +caja-extensions \ No newline at end of file diff --git a/srcpkgs/caja-extensions/patches/1-gtk-radio-button-id.patch b/srcpkgs/caja-extensions/patches/1-gtk-radio-button-id.patch deleted file mode 100644 index 0304c76793b..00000000000 --- a/srcpkgs/caja-extensions/patches/1-gtk-radio-button-id.patch +++ /dev/null @@ -1,24 +0,0 @@ -From dac72f1d7b4ab1f24bdc64bd2b3f96bd0e30e489 Mon Sep 17 00:00:00 2001 -From: David Henry -Date: Fri, 18 Nov 2022 22:28:01 +0000 -Subject: [PATCH] Fix missing GtkRadioButton id - -Add missing id to custom scale radio button referenced in caja-image-resizer.c -This fixes issue #104. ---- - image-converter/caja-image-resize.ui | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/image-converter/caja-image-resize.ui b/image-converter/caja-image-resize.ui -index 5fe0ea35..f3bcbce4 100644 ---- a/image-converter/caja-image-resize.ui -+++ b/image-converter/caja-image-resize.ui -@@ -183,7 +183,7 @@ - False - 8 - -- -+ - Scale: - True - True diff --git a/srcpkgs/caja-extensions/patches/2-sendto-gupnp-1.6.patch b/srcpkgs/caja-extensions/patches/2-sendto-gupnp-1.6.patch deleted file mode 100644 index 9e454bb0dea..00000000000 --- a/srcpkgs/caja-extensions/patches/2-sendto-gupnp-1.6.patch +++ /dev/null @@ -1,132 +0,0 @@ -From 652e145d2c5e2a9658eed7a665fe5a295503940b Mon Sep 17 00:00:00 2001 -From: Xiaotian Wu -Date: Mon, 16 Oct 2023 10:42:27 +0800 -Subject: [PATCH] sendto: require gupnp-1.6 - ---- - configure.ac | 6 ++--- - sendto/plugins/upnp/upnp.c | 48 ++++++++++++++++++++++---------------- - 2 files changed, 30 insertions(+), 24 deletions(-) - -diff --git a/configure.ac b/configure.ac -index a6c506c..5fedb4b 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -100,7 +100,7 @@ if test "x$enable_sendto" = "xyes"; then - GTHREAD_REQUIRED=2.6.0 - DBUS_REQUIRED=1.0 - DBUS_GLIB_REQUIRED=0.60 -- GUPNP_REQUIRED=0.13 -+ GUPNP_REQUIRED=1.6 - PKG_CHECK_MODULES(SENDTO, - glib-2.0 >= $GLIB_REQUIRED - gthread-2.0 >= $GTHREAD_REQUIRED -@@ -214,9 +214,7 @@ if test "x$enable_sendto" = "xyes"; then - fi - ;; - upnp) -- PKG_CHECK_MODULES(UPNP, gupnp-1.2 >= $GUPNP_REQUIRED, -- enable_upnp=yes AC_DEFINE([HAS_GUPNP_VERSION_1_2], 1, ["Version is at least 1.2"]), enable_upnp=no) -- PKG_CHECK_MODULES(UPNP, gupnp-1.0 >= $GUPNP_REQUIRED, -+ PKG_CHECK_MODULES(UPNP, gupnp-1.6 >= $GUPNP_REQUIRED, - enable_upnp=yes, enable_upnp=no) - if test "${enable_upnp}" != "yes" ; then - sendto_plugin_error_or_ignore "you need gupnp installed to build the upnp plugin" -diff --git a/sendto/plugins/upnp/upnp.c b/sendto/plugins/upnp/upnp.c -index 7b6775b..b770e37 100644 ---- a/sendto/plugins/upnp/upnp.c -+++ b/sendto/plugins/upnp/upnp.c -@@ -87,25 +87,37 @@ check_required_actions (GUPnPServiceIntrospection *introspection) - } - - static void --get_introspection_cb (GUPnPServiceInfo *service_info, -- GUPnPServiceIntrospection *introspection, const GError *error, -- gpointer user_data) -+get_introspection_cb (GObject *source_object, -+ GAsyncResult *res, -+ gpointer user_data) - { - GUPnPDeviceInfo *device_info; - gchar *name; - const gchar *udn, *interface; - GtkTreeIter iter; - GUPnPContext *context; -+ GError *error = NULL; - - device_info = GUPNP_DEVICE_INFO (user_data); - -- if (introspection != NULL) { -- /* If introspection is available, make sure required actions -- * are implemented. -- */ -- if (!check_required_actions (introspection)) -- goto error; -- } -+ GUPnPServiceIntrospection *introspection = -+ gupnp_service_info_introspect_finish (GUPNP_SERVICE_INFO (GUPNP_SERVICE_INFO (source_object)), -+ res, -+ &error); -+ if (error) { -+ g_warning ("Failed to create introspection for '%s': %s", -+ gupnp_service_info_get_udn (GUPNP_SERVICE_INFO (source_object)), -+ error->message); -+ g_clear_error (&error); -+ goto error; -+ } -+ -+ /* If introspection is available, make sure required actions -+ * are implemented. -+ */ -+ if (!check_required_actions (introspection)) { -+ goto error; -+ } - - udn = gupnp_device_info_get_udn (device_info); - if (G_UNLIKELY (udn == NULL)) -@@ -129,10 +141,8 @@ get_introspection_cb (GUPnPServiceInfo *service_info, - -1); - - g_free (name); -- -+ g_object_unref (introspection); - error: -- /* We don't need the proxy objects anymore */ -- g_object_unref (service_info); - g_object_ref (device_info); - } - -@@ -148,9 +158,10 @@ device_proxy_available_cb (GUPnPControlPoint *cp, - return; - } - -- gupnp_service_info_get_introspection_async (info, -- get_introspection_cb, -- g_object_ref (proxy)); -+ gupnp_service_info_introspect_async (info, -+ NULL, -+ get_introspection_cb, -+ g_object_ref (proxy)); - } - - static void -@@ -211,11 +222,7 @@ init (NstPlugin *plugin) - return FALSE; - g_free (upload_cmd); - --#ifdef HAS_GUPNP_VERSION_1_2 - context_manager = gupnp_context_manager_create (0); --#else -- context_manager = gupnp_context_manager_new (NULL, 0); --#endif - g_assert (context_manager != NULL); - g_signal_connect (context_manager, "context-available", - G_CALLBACK (on_context_available), NULL); -@@ -275,6 +282,7 @@ send_files (NstPlugin *plugin, - g_ptr_array_add (argv, "15"); /* discovery timeout (seconds) */ - g_ptr_array_add (argv, "-e"); - g_ptr_array_add (argv, interface); -+ g_ptr_array_add (argv, "-u"); - g_ptr_array_add (argv, udn); - for (l = file_list ; l; l=l->next) { - gchar *file_path; diff --git a/srcpkgs/caja-extensions/patches/3-xattr-mtp.patch b/srcpkgs/caja-extensions/patches/3-xattr-mtp.patch deleted file mode 100644 index d4f2441c26d..00000000000 --- a/srcpkgs/caja-extensions/patches/3-xattr-mtp.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 91cc4665e9d707fd1015fb5c952816d13ef37693 Mon Sep 17 00:00:00 2001 -From: Goffredo Baroncelli -Date: Sun, 6 Nov 2022 16:17:04 +0100 -Subject: [PATCH] xattr-tags-extension: avoid check xattr for mtp:// and - gphoto2:// - -Some protocols (like mtp://), doesn't support xattr. In this -case avoid to check the xattr-tags to not have -poor performance. - -This patch blacklist mtp:// and gphoto2://. ---- - xattr-tags/caja-xattr-tags-extension.c | 23 +++++++++++++++++++++++ - 1 file changed, 23 insertions(+) - -diff --git a/xattr-tags/caja-xattr-tags-extension.c b/xattr-tags/caja-xattr-tags-extension.c -index a3c8993..ab6450d 100644 ---- a/xattr-tags/caja-xattr-tags-extension.c -+++ b/xattr-tags/caja-xattr-tags-extension.c -@@ -50,6 +50,16 @@ typedef struct { - GClosure *update_complete; - } CajaXattrTagsHandle; - -+/* List of protocols that don't support xattr retriving, -+ * so we can skip it safetely -+ */ -+static gchar *protocols_blacklist[] = { -+ "mtp://", -+ "gphoto2://", -+ -+ NULL -+}; -+ - /* Stolen code: why they didn't expose it!? - * file: glocalfileinfo.c - * function: hex_unescape_string -@@ -107,8 +117,21 @@ static gchar *caja_xattr_tags_get_xdg_tags(CajaFileInfo *file) - gchar *tags = NULL, *uri; - GFile *location; - GFileInfo *info; -+ int i; - - uri = caja_file_info_get_activation_uri (file); -+ for (i = 0 ; protocols_blacklist[i] ; i++) { -+ int l = strlen(protocols_blacklist[i]); -+ -+ if (strlen(uri) < l) -+ continue; -+ if (strncasecmp(uri, protocols_blacklist[i], l)) -+ continue; -+ -+ g_free (uri); -+ return NULL; -+ } -+ - location = g_file_new_for_uri (uri); - info = g_file_query_info (location, - G_FILE_ATTRIBUTE_XATTR_XDG_TAGS, diff --git a/srcpkgs/caja-extensions/template b/srcpkgs/caja-extensions/template index bdb208810c4..2ce814578f8 100644 --- a/srcpkgs/caja-extensions/template +++ b/srcpkgs/caja-extensions/template @@ -1,12 +1,12 @@ # Template file for 'caja-extensions' pkgname=caja-extensions -version=1.26.1 -revision=3 +version=1.28.0 +revision=1 build_style=gnu-configure configure_args="--disable-gksu --disable-static" -hostmakedepends="pkg-config intltool glib-devel libxml2 - automake gettext-devel-tools libtool gtk-doc" -makedepends="libcaja-devel mate-desktop-devel dbus-glib-devel gupnp-devel" +hostmakedepends="pkg-config intltool glib-devel libxml2 gettext" +makedepends="libcaja-devel mate-desktop-devel dbus-glib-devel gupnp-devel + gst-plugins-base1-devel totem-devel gtk+3-devel dbus-devel" depends="caja" short_desc="Extensions for the MATE Caja file manager" maintainer="skmpz " @@ -14,11 +14,7 @@ license="GPL-2.0-or-later" homepage="https://mate-desktop.org" changelog="https://raw.githubusercontent.com/mate-desktop/caja-extensions/master/NEWS" distfiles="https://pub.mate-desktop.org/releases/${version%.*}/${pkgname}-${version}.tar.xz" -checksum=589c19e3fa10242d6239a5ccb9585598436a56ebe94d2eb2a50b5950cce1d520 - -pre_configure() { - autoreconf -fi -} +checksum=d2986c5e0740835fe271cfbd5823eeeaf03291af1763203f4700abb8109e3175 post_install() { rm -rf ${DESTDIR}/usr/include @@ -31,6 +27,7 @@ caja-image-converter_package() { depends="caja-extensions ImageMagick" pkg_install() { vmove usr/lib/caja/extensions-2.0/libcaja-image-converter.so + vmove usr/share/caja/extensions/libcaja-image-converter.caja-extension } } @@ -39,6 +36,7 @@ caja-open-terminal_package() { depends="caja-extensions" pkg_install() { vmove usr/lib/caja/extensions-2.0/libcaja-open-terminal.so + vmove usr/share/caja/extensions/libcaja-open-terminal.caja-extension vmove usr/share/glib-2.0/schemas/org.mate.caja-open-terminal.gschema.xml } } @@ -50,6 +48,7 @@ caja-sendto_package() { vmove usr/bin/caja-sendto vmove usr/lib/caja-sendto vmove usr/lib/caja/extensions-2.0/libcaja-sendto.so + vmove usr/share/caja/extensions/libcaja-sendto.caja-extension vmove usr/share/glib-2.0/schemas/org.mate.Caja.Sendto.gschema.xml vmove usr/share/man/man1/caja-sendto.1 } @@ -60,6 +59,7 @@ caja-share_package() { depends="caja-extensions samba" pkg_install() { vmove usr/lib/caja/extensions-2.0/libcaja-share.so + vmove usr/share/caja/extensions/libcaja-share.caja-extension vmove usr/share/caja-extensions/share-dialog.ui } } @@ -69,6 +69,7 @@ caja-wallpaper_package() { depends="caja-extensions" pkg_install() { vmove usr/lib/caja/extensions-2.0/libcaja-wallpaper.so + vmove usr/share/caja/extensions/libcaja-wallpaper.caja-extension } } @@ -77,5 +78,15 @@ caja-xattr-tags_package() { depends="caja-extensions" pkg_install() { vmove usr/lib/caja/extensions-2.0/libcaja-xattr-tags.so + vmove usr/share/caja/extensions/libcaja-xattr-tags.caja-extension + } +} + +caja-av_package() { + short_desc="Caja extension to see audio/video properties" + depends="caja-extensions" + pkg_install() { + vmove usr/lib/caja/extensions-2.0/libcaja-av.so + vmove usr/share/caja/extensions/libcaja-av.caja-extension } }