[librsvg] (#578): Link the C tests to harfbuzz so they can call hb_version_string()



commit 77c4aad97a64fdd9deb098ce2ba65390f509819c
Author: Federico Mena Quintero <federico gnome org>
Date:   Mon Mar 30 18:37:30 2020 -0600

    (#578): Link the C tests to harfbuzz so they can call hb_version_string()
    
    Fixes https://gitlab.gnome.org/GNOME/librsvg/-/issues/578

 configure.ac       | 2 ++
 tests/test-utils.c | 4 ++++
 2 files changed, 6 insertions(+)
---
diff --git a/configure.ac b/configure.ac
index 2a12031e..a4ff93ce 100644
--- a/configure.ac
+++ b/configure.ac
@@ -74,6 +74,7 @@ FREETYPE2_REQUIRED=20.0.14
 GDK_PIXBUF_REQUIRED=2.20
 GIO_REQUIRED=2.24.0
 GLIB_REQUIRED=2.48.0
+HARFBUZZ_REQUIRED=2.0.0
 LIBXML_REQUIRED=2.9.0
 PANGO_REQUIRED=1.38.0
 
@@ -165,6 +166,7 @@ PKG_CHECK_MODULES(LIBRSVG,                     \
        gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED \
        gio-2.0 >= $GIO_REQUIRED               \
        glib-2.0 >= $GLIB_REQUIRED             \
+       harfbuzz >= $HARFBUZZ_REQUIRED         \
        libxml-2.0 >= $LIBXML_REQUIRED         \
        pangocairo >= $PANGO_REQUIRED          \
        pangoft2 >= $PANGO_REQUIRED            \
diff --git a/tests/test-utils.c b/tests/test-utils.c
index 21710f13..7715f096 100644
--- a/tests/test-utils.c
+++ b/tests/test-utils.c
@@ -373,5 +373,9 @@ test_utils_print_dependency_versions (void)
     g_test_message ("Cairo version:    %s", cairo_version_string ());
     g_test_message ("Pango version:    %s", pango_version_string ());
     g_test_message ("Freetype version: %d.%d.%d", ft_major, ft_minor, ft_patch);
+#if PANGO_VERSION_CHECK (1, 44, 0)
     g_test_message ("Harfbuzz version: %s", hb_version_string ());
+#else
+    g_test_message ("Not printing Harfbuzz version since Pango is older than 1.44");
+#endif
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]