]> git.pld-linux.org Git - packages/vlc.git/blame - vlc-fribidi-1.0.patch
add upstream patch to fix build with fribidi >= 1.0; rel 2
[packages/vlc.git] / vlc-fribidi-1.0.patch
CommitLineData
cbb01bb1
JP
1From 26e2d3906658c30f2f88f4b1bc9630ec43bf5525 Mon Sep 17 00:00:00 2001
2From: Shaleen Jain <shaleen@jain.sh>
3Date: Sun, 25 Feb 2018 18:42:27 +0530
4Subject: [PATCH] fribidi: update for version 1.0
5
6Update functions deprecated in version 1.0 when building with release 1.0 and
7above.
8
9Signed-off-by: Thomas Guillem <thomas@gllm.fr>
10---
11 modules/text_renderer/freetype/text_layout.c | 24 ++++++++++++++++++++++++
12 1 file changed, 24 insertions(+)
13
14diff --git a/modules/text_renderer/freetype/text_layout.c b/modules/text_renderer/freetype/text_layout.c
15index 13efd567b46..1a28786d097 100644
16--- a/modules/text_renderer/freetype/text_layout.c
17+++ b/modules/text_renderer/freetype/text_layout.c
18@@ -153,6 +153,9 @@ typedef struct paragraph_t
19
20 #ifdef HAVE_FRIBIDI
21 FriBidiCharType *p_types;
22+#if FRIBIDI_MAJOR_VERSION >= 1
23+ FriBidiBracketType *p_btypes;
24+#endif
25 FriBidiLevel *p_levels;
26 FriBidiStrIndex *pi_reordered_indices;
27 FriBidiParType paragraph_type;
28@@ -361,6 +364,9 @@ static paragraph_t *NewParagraph( filter_t *p_filter,
29 #ifdef HAVE_FRIBIDI
30 p_paragraph->p_levels = vlc_alloc( i_size, sizeof( *p_paragraph->p_levels ) );
31 p_paragraph->p_types = vlc_alloc( i_size, sizeof( *p_paragraph->p_types ) );
32+#if FRIBIDI_MAJOR_VERSION >= 1
33+ p_paragraph->p_btypes = vlc_alloc( i_size, sizeof( *p_paragraph->p_btypes ) );
34+#endif
35 p_paragraph->pi_reordered_indices =
36 vlc_alloc( i_size, sizeof( *p_paragraph->pi_reordered_indices ) );
37
38@@ -398,6 +404,9 @@ static paragraph_t *NewParagraph( filter_t *p_filter,
39 #ifdef HAVE_FRIBIDI
40 if( p_paragraph->p_levels ) free( p_paragraph->p_levels );
41 if( p_paragraph->p_types ) free( p_paragraph->p_types );
42+#if FRIBIDI_MAJOR_VERSION >= 1
43+ if( p_paragraph->p_btypes ) free( p_paragraph->p_btypes );
44+#endif
45 if( p_paragraph->pi_reordered_indices )
46 free( p_paragraph->pi_reordered_indices );
47 #endif
48@@ -424,6 +433,9 @@ static void FreeParagraph( paragraph_t *p_paragraph )
49 #ifdef HAVE_FRIBIDI
50 free( p_paragraph->pi_reordered_indices );
51 free( p_paragraph->p_types );
52+#if FRIBIDI_MAJOR_VERSION >= 1
53+ free( p_paragraph->p_btypes );
54+#endif
55 free( p_paragraph->p_levels );
56 #endif
57
58@@ -436,10 +448,22 @@ static int AnalyzeParagraph( paragraph_t *p_paragraph )
59 fribidi_get_bidi_types( p_paragraph->p_code_points,
60 p_paragraph->i_size,
61 p_paragraph->p_types );
62+#if FRIBIDI_MAJOR_VERSION >= 1
63+ fribidi_get_bracket_types( p_paragraph->p_code_points,
64+ p_paragraph->i_size,
65+ p_paragraph->p_types,
66+ p_paragraph->p_btypes );
67+ fribidi_get_par_embedding_levels_ex( p_paragraph->p_types,
68+ p_paragraph->p_btypes,
69+ p_paragraph->i_size,
70+ &p_paragraph->paragraph_type,
71+ p_paragraph->p_levels );
72+#else
73 fribidi_get_par_embedding_levels( p_paragraph->p_types,
74 p_paragraph->i_size,
75 &p_paragraph->paragraph_type,
76 p_paragraph->p_levels );
77+#endif
78
79 #ifdef HAVE_HARFBUZZ
80 hb_unicode_funcs_t *p_funcs = hb_unicode_funcs_get_default();
This page took 0.066703 seconds and 4 git commands to generate.