1From 298b189f536e0bf8d7c32d141ef5caefaf086e5c Mon Sep 17 00:00:00 2001
2From: hovercats <hovercatswithlasereyes@protonmail.com>
3Date: Thu, 2 May 2024 18:13:50 +0200
4Subject: [PATCH 1/2] remove fribidi dependency
5
6---
7 gdk/gdk.c | 12 ------------
8 gdk/meson.build | 1 -
9 gtk/gtkpango.c | 12 ------------
10 gtk/meson.build | 1 -
11 meson.build | 8 ++------
12 5 files changed, 2 insertions(+), 32 deletions(-)
13
14diff --git a/gdk/gdk.c b/gdk/gdk.c
15index 83672d8..2536b53 100644
16--- a/gdk/gdk.c
17+++ b/gdk/gdk.c
18@@ -44,7 +44,6 @@
19 #include <string.h>
20 #include <stdlib.h>
21
22-#include <fribidi.h>
23
24
25 /**
26@@ -1118,17 +1117,6 @@ gdk_disable_multidevice (void)
27 PangoDirection
28 gdk_unichar_direction (gunichar ch)
29 {
30- FriBidiCharType fribidi_ch_type;
31-
32- G_STATIC_ASSERT (sizeof (FriBidiChar) == sizeof (gunichar));
33-
34- fribidi_ch_type = fribidi_get_bidi_type (ch);
35-
36- if (!FRIBIDI_IS_STRONG (fribidi_ch_type))
37- return PANGO_DIRECTION_NEUTRAL;
38- else if (FRIBIDI_IS_RTL (fribidi_ch_type))
39- return PANGO_DIRECTION_RTL;
40- else
41 return PANGO_DIRECTION_LTR;
42 }
43
44diff --git a/gdk/meson.build b/gdk/meson.build
45index 4bb1bf2..9270c97 100644
46--- a/gdk/meson.build
47+++ b/gdk/meson.build
48@@ -202,7 +202,6 @@ gdk_deps = [
49 pixbuf_dep,
50 cairo_dep,
51 pango_dep,
52- fribidi_dep,
53 cairogobj_dep,
54 glib_dep,
55 epoxy_dep,
56diff --git a/gtk/gtkpango.c b/gtk/gtkpango.c
57index aaac4cc..a76ad57 100644
58--- a/gtk/gtkpango.c
59+++ b/gtk/gtkpango.c
60@@ -25,7 +25,6 @@
61 #include "config.h"
62 #include "gtkpango.h"
63 #include <pango/pangocairo.h>
64-#include <fribidi.h>
65 #include "gtkintl.h"
66
67 #define GTK_TYPE_FILL_LAYOUT_RENDERER (_gtk_fill_layout_renderer_get_type())
68@@ -1326,17 +1325,6 @@ _gtk_pango_attr_list_merge (PangoAttrList *into,
69 PangoDirection
70 _gtk_pango_unichar_direction (gunichar ch)
71 {
72- FriBidiCharType fribidi_ch_type;
73-
74- G_STATIC_ASSERT (sizeof (FriBidiChar) == sizeof (gunichar));
75-
76- fribidi_ch_type = fribidi_get_bidi_type (ch);
77-
78- if (!FRIBIDI_IS_STRONG (fribidi_ch_type))
79- return PANGO_DIRECTION_NEUTRAL;
80- else if (FRIBIDI_IS_RTL (fribidi_ch_type))
81- return PANGO_DIRECTION_RTL;
82- else
83 return PANGO_DIRECTION_LTR;
84 }
85
86diff --git a/gtk/meson.build b/gtk/meson.build
87index ea866d8..033c6ab 100644
88--- a/gtk/meson.build
89+++ b/gtk/meson.build
90@@ -840,7 +840,6 @@ gtk_deps = [
91 pango_dep,
92 pangoft_dep,
93 harfbuzz_dep,
94- fribidi_dep,
95 cairogobj_dep,
96 cairo_dep,
97 fontconfig_dep,
98diff --git a/meson.build b/meson.build
99index 7bf5ea4..33bcb28 100644
100--- a/meson.build
101+++ b/meson.build
102@@ -26,7 +26,6 @@ endif
103
104 glib_req = '>= @0@.@1@.@2@'.format(glib_major_req, glib_minor_req, glib_micro_req)
105 pango_req = '>= 1.41.0'
106-fribidi_req = '>= 0.19.7'
107 atk_req = '>= 2.35.1'
108 at_spi2_atk_req = '>= 2.15.1'
109 cairo_req = '>= 1.14.0'
110@@ -400,8 +399,6 @@ endif
111
112 pango_dep = dependency('pango', version: pango_req,
113 fallback : ['pango', 'libpango_dep'])
114-fribidi_dep = dependency('fribidi', version: fribidi_req,
115- fallback : ['fribidi', 'libfribidi_dep'])
116
117 # Require PangoFT2 if on X11 or wayland
118 require_pangoft2 = wayland_enabled or x11_enabled
119@@ -913,8 +910,7 @@ endif
120
121 pkgconf.set('GDK_PRIVATE_PACKAGES',
122 ' '.join(gio_packages + x11_pkgs + wayland_pkgs + cairo_backends +
123- ['epoxy', epoxy_req] + cloudproviders_packages +
124- ['fribidi', fribidi_req]))
125+ ['epoxy', epoxy_req] + cloudproviders_packages))
126
127 gtk_packages = ' '.join([
128 atk_dep.name(), atk_req,
129@@ -927,7 +923,7 @@ pkgconf.set('GTK_PACKAGES', gtk_packages)
130 # Requires.private
131 pc_gdk_extra_libs += cairo_libs
132
133-gtk_private_packages = atk_pkgs + wayland_pkgs + ['epoxy', epoxy_req, 'fribidi', fribidi_req]
134+gtk_private_packages = atk_pkgs + wayland_pkgs + ['epoxy', epoxy_req]
135 if wayland_enabled or x11_enabled
136 gtk_private_packages += ['pangoft2']
137 endif
138--
1392.44.0
140