[vlc-devel] commit: Fix build without fontconfig nor optimizations. (Alexis Ballier )

git version control git at videolan.org
Fri Oct 16 00:48:48 CEST 2009


vlc | branch: 1.0-bugfix | Alexis Ballier <aballier at gentoo.org> | Thu Sep 24 21:58:36 2009 +0200| [a2364872d840f39d0b545d1a6a7c1446ded3b20c] | committer: Christophe Mutricy 

Fix build without fontconfig nor optimizations.

Configuring vlc with --disable-fontconfig and --disable-optimizations makes it fail to build the freetype plugin.
At higher optimizations levels, gcc performs dead code elimitation which does not happen at -O0, then the linker is looking for functions that are defined only when fontconfig is enabled.

References: https://bugs.gentoo.org/show_bug.cgi?id=281963

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>
(cherry picked from commit 184f04c939a361c9c9f2eb549fcc2e3d1dac2227)

Signed-off-by: Christophe Mutricy <xtophe at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a2364872d840f39d0b545d1a6a7c1446ded3b20c
---

 modules/misc/freetype.c |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/modules/misc/freetype.c b/modules/misc/freetype.c
index 901497f..9a8e74e 100644
--- a/modules/misc/freetype.c
+++ b/modules/misc/freetype.c
@@ -2416,6 +2416,33 @@ static char* FontConfig_Select( FcConfig* priv, const char* family,
     FcPatternDestroy( p_pat );
     return strdup( (const char*)val_s );
 }
+#else
+
+static void SetupLine( filter_t *p_filter, const char *psz_text_in,
+                       uint32_t **psz_text_out, uint32_t *pi_runs,
+                       uint32_t **ppi_run_lengths, ft_style_t ***ppp_styles,
+                       ft_style_t *p_style )
+{
+        VLC_UNUSED(p_filter);
+        VLC_UNUSED(psz_text_in);
+        VLC_UNUSED(psz_text_out);
+        VLC_UNUSED(pi_runs);
+        VLC_UNUSED(ppi_run_lengths);
+        VLC_UNUSED(ppp_styles);
+        VLC_UNUSED(p_style);
+}
+
+static ft_style_t *GetStyleFromFontStack( filter_sys_t *p_sys,
+        font_stack_t **p_fonts, bool b_bold, bool b_italic,
+        bool b_uline )
+{
+        VLC_UNUSED(p_sys);
+        VLC_UNUSED(p_fonts);
+        VLC_UNUSED(b_bold);
+        VLC_UNUSED(b_italic);
+        VLC_UNUSED(b_uline);
+        return NULL;
+}
 #endif
 
 static void FreeLine( line_desc_t *p_line )




More information about the vlc-devel mailing list