Ticket #21907: 0001-Bug-21907-fix-runtime-error-on-CentOS-6.patch

File 0001-Bug-21907-fix-runtime-error-on-CentOS-6.patch, 1.7 KB (added by boklm, 15 months ago)
  • gfx/harfbuzz/src/hb-glib.cc

    From 04846661531fa13d5a85b34792372a897de9868d Mon Sep 17 00:00:00 2001
    From: Nicolas Vigier <boklm@torproject.org>
    Date: Mon, 10 Apr 2017 16:07:23 +0200
    Subject: [PATCH] Bug 21907: fix runtime error on CentOS 6
    
    In Mozilla bug 1324780, support for building with glib 2.28 (the version
    available in CentOS 6) was added. However we are building on Debian
    Wheezy which has glib 2.32. We fix that by backing out the
    hb_glib_blob_create function even when the glib version available at build
    time is recent.
    ---
     gfx/harfbuzz/src/hb-glib.cc | 19 -------------------
     gfx/harfbuzz/src/hb-glib.h  |  5 -----
     2 files changed, 24 deletions(-)
    
    diff --git a/gfx/harfbuzz/src/hb-glib.cc b/gfx/harfbuzz/src/hb-glib.cc
    index 2b91b5b..9ed02cf 100644
    a b hb_glib_get_unicode_funcs (void) 
    381381
    382382  return const_cast<hb_unicode_funcs_t *> (&_hb_glib_unicode_funcs);
    383383}
    384 
    385 #if GLIB_CHECK_VERSION(2,31,10)
    386 /**
    387  * hb_glib_blob_create:
    388  *
    389  * Since: 0.9.38
    390  **/
    391 hb_blob_t *
    392 hb_glib_blob_create (GBytes *gbytes)
    393 {
    394   gsize size = 0;
    395   gconstpointer data = g_bytes_get_data (gbytes, &size);
    396   return hb_blob_create ((const char *) data,
    397                          size,
    398                          HB_MEMORY_MODE_READONLY,
    399                          g_bytes_ref (gbytes),
    400                          (hb_destroy_func_t) g_bytes_unref);
    401 }
    402 #endif
  • gfx/harfbuzz/src/hb-glib.h

    diff --git a/gfx/harfbuzz/src/hb-glib.h b/gfx/harfbuzz/src/hb-glib.h
    index 5f04183..4adbd7c 100644
    a b hb_glib_script_from_script (hb_script_t script); 
    4646HB_EXTERN hb_unicode_funcs_t *
    4747hb_glib_get_unicode_funcs (void);
    4848
    49 #if GLIB_CHECK_VERSION(2,31,10)
    50 HB_EXTERN hb_blob_t *
    51 hb_glib_blob_create (GBytes *gbytes);
    52 #endif
    53 
    5449HB_END_DECLS
    5550
    5651#endif /* HB_GLIB_H */