From 29fdf16ed5fef772755bb199d4964b4a1b081e1a Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Wed, 15 Feb 2023 00:11:19 +1000 Subject: [PATCH] Epiphany: fix #7729 --- www-client/epiphany/epiphany-43.0.recipe | 2 +- .../epiphany/patches/epiphany-43.0.patchset | 129 ++++++++++++++++-- 2 files changed, 120 insertions(+), 11 deletions(-) diff --git a/www-client/epiphany/epiphany-43.0.recipe b/www-client/epiphany/epiphany-43.0.recipe index d145ede98..a7350886f 100644 --- a/www-client/epiphany/epiphany-43.0.recipe +++ b/www-client/epiphany/epiphany-43.0.recipe @@ -8,7 +8,7 @@ Its code name is Epiphany." HOMEPAGE="https://wiki.gnome.org/Apps/Web" COPYRIGHT="2005-2022 The GNOME Project" LICENSE="GNU GPL v3" -REVISION="5" +REVISION="6" SOURCE_URI="https://gitlab.gnome.org/GNOME/epiphany/-/archive/$portVersion/epiphany-$portVersion.tar.bz2" CHECKSUM_SHA256="867117c09a532c06e2db0f283c153f310bfec0e28c4ef06955dfa1f3ec6167c7" PATCHES="epiphany-$portVersion.patchset" diff --git a/www-client/epiphany/patches/epiphany-43.0.patchset b/www-client/epiphany/patches/epiphany-43.0.patchset index 979c2ee15..6f2759923 100644 --- a/www-client/epiphany/patches/epiphany-43.0.patchset +++ b/www-client/epiphany/patches/epiphany-43.0.patchset @@ -1,4 +1,4 @@ -From eb8f121ffe0483ae952725261cf4c76882556a48 Mon Sep 17 00:00:00 2001 +From 2db52d40b000c4e89947cf3ec92ea9aaa24d633f Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Tue, 6 Dec 2022 19:51:55 +1000 Subject: Fix build for Haiku @@ -26,7 +26,7 @@ index 8dd7a93..3d95be6 100644 2.37.3 -From 5df5a840b9d3cb0dc6363b8272ea856d16ad8883 Mon Sep 17 00:00:00 2001 +From 6f6b5fefaac8fa5f0a6f5e88bbe5fc54925496d0 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Tue, 6 Dec 2022 19:52:45 +1000 Subject: Use /dev/random for ephy_sync_utils_generate_random_bytes @@ -64,7 +64,7 @@ index 75c08fc..156a730 100644 2.37.3 -From c41d7db16f4a199560e0bb5f80451d3ed6084fdf Mon Sep 17 00:00:00 2001 +From 7e8e0511b23effbf3dd56da9a9bce5d5d602d8fd Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Tue, 6 Dec 2022 19:53:26 +1000 Subject: Disable settings for set default browser @@ -93,7 +93,7 @@ index f557397..758aa7e 100644 2.37.3 -From 13bcf0ae7b33d8dd46b8e4c9845cdaf5e1e62a93 Mon Sep 17 00:00:00 2001 +From a26f992f3c665e20e9d3687035ef048fb575ec1e Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Tue, 6 Dec 2022 19:53:41 +1000 Subject: Add open handler for Haiku @@ -152,7 +152,7 @@ index 18017f7..6f4d58d 100644 2.37.3 -From 587f9115e0cd06799300dffd7cf5bd8c5a879b50 Mon Sep 17 00:00:00 2001 +From 91e0d90dc44683a1682363316ce046c30bca3f79 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Tue, 6 Dec 2022 19:54:11 +1000 Subject: Set XDG variables @@ -205,7 +205,7 @@ index be9b6db..68d9922 100644 2.37.3 -From ee2fb64c75c59f764d6859e73d05c876805e54c5 Mon Sep 17 00:00:00 2001 +From 0a4e2219e85d41e8d5e2959faac9e7b47fced552 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Sun, 11 Dec 2022 12:06:20 +1000 Subject: Disable translate languages, fix #7524 @@ -323,7 +323,7 @@ index 75ba956..4570215 100644 2.37.3 -From eff5416783e781012f6e187b5564348b177c00c8 Mon Sep 17 00:00:00 2001 +From 18b48b05c7d65efa2c2f9d60f46866d01244a277 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Sun, 11 Dec 2022 12:06:53 +1000 Subject: Use system locale folder for liblocaledir @@ -355,7 +355,7 @@ index 3d95be6..01f696d 100644 2.37.3 -From f38837a4729b11c1eda6a5bdb9ccb86cb7d08c44 Mon Sep 17 00:00:00 2001 +From 2ded1fafa678657f2aeaec0d8cf08fb7b1556751 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Sun, 11 Dec 2022 12:07:29 +1000 Subject: Remove icon transparency for about page @@ -418,7 +418,7 @@ index e3138b9..85507b5 100644 2.37.3 -From 8e2d17725d3561eaaf8b5927997e3e0efc810dff Mon Sep 17 00:00:00 2001 +From 9b6ff4db9765cc9dea4c4d27ce91402a7c4754f6 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Sun, 11 Dec 2022 13:44:46 +1000 Subject: With 128px for about icons @@ -440,7 +440,7 @@ index 85507b5..c7eb69e 100644 2.37.3 -From 008e6f5ad74d90b1f79a7a395b8b20eabe9eb3f9 Mon Sep 17 00:00:00 2001 +From b8dcb20f168d6bc4eb2480f7cc6c396086963695 Mon Sep 17 00:00:00 2001 From: Michael Catanzaro Date: Thu, 1 Dec 2022 16:13:23 -0600 Subject: overview.js: fix thumbnails when loading from session state @@ -476,3 +476,112 @@ index a15f698..3770844 100644 -- 2.37.3 + +From 76653f4d72a9f922c4cfc8f8ee00c3c4835aed0f Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Wed, 15 Feb 2023 00:05:34 +1000 +Subject: Fix folder opening + + +diff --git a/lib/ephy-file-helpers.c b/lib/ephy-file-helpers.c +index 6f4d58d..2953217 100644 +--- a/lib/ephy-file-helpers.c ++++ b/lib/ephy-file-helpers.c +@@ -43,6 +43,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -636,6 +637,17 @@ ephy_file_launch_handler (GFile *file) + g_autoptr (GList) list = NULL; + g_autoptr (GError) error = NULL; + ++#ifdef __HAIKU__ ++ g_autofree char *path = NULL; ++ g_autofree char *command = NULL; ++ ++ g_assert (file != NULL); ++ ++ path = g_file_get_path (file); ++ command = g_strdup_printf ("open '%s'", path); ++ g_spawn_command_line_async (command, &error); ++ ret = error ? FALSE : TRUE; ++#else + g_assert (file != NULL); + + /* Launch via URI handler only under sandbox, because this way loses +@@ -654,41 +666,38 @@ ephy_file_launch_handler (GFile *file) + + list = g_list_append (list, file); + ret = launch_application (app, list); +- ++#endif + return ret; + } + +-#ifdef __HAIKU__ + static gboolean + open_in_default_handler (const char *uri, + const char *mime_type, + GdkScreen *screen) + { +- char *command; +- GError *error = NULL; ++ g_autoptr (GdkAppLaunchContext) context = NULL; ++ g_autoptr (GAppInfo) appinfo = NULL; ++ g_autoptr (GError) error = NULL; ++ GList uris; ++#ifdef __HAIKU__ ++ g_autofree char *command = NULL; + +- command = g_strdup_printf ("open %s ", uri); ++ if (strcmp(mime_type, "inode/directory")==0) { ++ g_autofree char *filename = NULL; ++ filename = g_filename_from_uri (uri, NULL, NULL); ++ command = g_strdup_printf ("open '%s'", dirname(filename)); ++ } else { ++ command = g_strdup_printf ("open '%s'", uri); ++ } + + g_spawn_command_line_async (command, &error); + + if (error) { + g_warning ("Couldn't open uri: %s", error->message); + g_error_free (error); ++ return FALSE; + } +- +- g_free (command); +-} + #else +-static gboolean +-open_in_default_handler (const char *uri, +- const char *mime_type, +- GdkScreen *screen) +-{ +- g_autoptr (GdkAppLaunchContext) context = NULL; +- g_autoptr (GAppInfo) appinfo = NULL; +- g_autoptr (GError) error = NULL; +- GList uris; +- + context = gdk_display_get_app_launch_context (screen ? gdk_screen_get_display (screen) : gdk_display_get_default ()); + gdk_app_launch_context_set_screen (context, screen); + +@@ -705,10 +714,9 @@ open_in_default_handler (const char *uri, + g_warning ("Failed to launch %s: %s", uri, error->message); + return FALSE; + } +- ++#endif + return TRUE; + } +-#endif + + gboolean + ephy_file_open_uri_in_default_browser (const char *uri, +-- +2.37.3 +