fontconfig: Branch 'master'

[email protected] (Akira TAGOH)
Newsgroups gmane.comp.fonts.fontconfig
Message-ID <[email protected]>
 configure.ac                           |   13 +++++++++++++
 test/Makefile.am                       |   12 +++++++++++-
 test/out.expected-no-long-family-names |    8 ++++++++
 test/run-test.sh                       |    2 +-
 4 files changed, 33 insertions(+), 2 deletions(-)

New commits:
commit 64895e719dd8d18c52a31d66cd189915bc8c00b8
Author: Akira TAGOH <[email protected]>
Date:   Mon Nov 20 17:20:34 2017 +0530

    Add the check of PCF_CONFIG_OPTION_LONG_FAMILY_NAMES back
    
    This isn't enabled by default in freetype so need to check it for testsuites

diff --git a/configure.ac b/configure.ac
index 7fa755f..71f32c1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -321,9 +321,22 @@ AC_SUBST(FREETYPE_LIBS)
 AC_SUBST(FREETYPE_CFLAGS)
 
 fontconfig_save_libs="$LIBS"
+fontconfig_save_cflags="$CFLAGS"
 LIBS="$LIBS $FREETYPE_LIBS"
+CFLAGS="$CFLAGS $FREETYPE_CFLAGS"
 AC_CHECK_FUNCS(FT_Get_BDF_Property FT_Get_PS_Font_Info FT_Has_PS_Glyph_Names FT_Get_X11_Font_Format)
+
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+	#include <ft2build.h>
+	#include FT_CONFIG_OPTIONS_H
+	#ifndef PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
+	#  error "No pcf long family names support"
+	#endif
+	]])], [have_pcf_long_family_names=yes], [have_pcf_long_family_names=no])
+AM_CONDITIONAL(FREETYPE_PCF_LONG_FAMILY_NAMES, test "x$have_pcf_long_family_names" = xyes)
+
 LIBS="$fontconfig_save_libs"
+CFLAGS="$fontconfig_save_cflags"
 
 #
 # Check expat configuration
diff --git a/test/Makefile.am b/test/Makefile.am
index 9f8fe65..2e7f243 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -8,11 +8,21 @@ AM_TESTS_ENVIRONMENT= \
 	EXEEXT=${EXEEXT}; export EXEEXT; \
 	$(NULL)
 
+BUILT_SOURCES = out.expected
+
 SH_LOG_COMPILER = sh
 TESTS=run-test.sh
 
 TESTDATA=4x6.pcf 8x16.pcf out.expected fonts.conf.in
 
+if FREETYPE_PCF_LONG_FAMILY_NAMES
+out.expected: $(srcdir)/out.expected-long-family-names
+	cp $(srcdir)/out.expected-long-family-names out.expected
+else
+out.expected: $(srcdir)/out.expected-no-long-family-names
+	cp $(srcdir)/out.expected-no-long-family-names out.expected
+endif
+
 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir)
 
 check_PROGRAMS =
@@ -45,7 +55,7 @@ check_PROGRAMS += test-bz96676
 test_bz96676_LDADD = $(top_builddir)/src/libfontconfig.la
 TESTS += test-bz96676
 
-EXTRA_DIST=run-test.sh $(TESTDATA)
+EXTRA_DIST=run-test.sh $(TESTDATA) out.expected-long-family-names out.expected-no-long-family-names
 
 CLEANFILES=
 
diff --git a/test/out.expected b/test/out.expected-long-family-names
similarity index 100%
rename from test/out.expected
rename to test/out.expected-long-family-names
diff --git a/test/out.expected-no-long-family-names b/test/out.expected-no-long-family-names
new file mode 100644
index 0000000..39634c5
--- /dev/null
+++ b/test/out.expected-no-long-family-names
@@ -0,0 +1,8 @@
+Fixed:pixelsize=16
+Fixed:pixelsize=6
+=
+Fixed:pixelsize=16
+Fixed:pixelsize=6
+=
+Fixed:pixelsize=16
+Fixed:pixelsize=6
diff --git a/test/run-test.sh b/test/run-test.sh
index 0697f72..e5bc32c 100644
--- a/test/run-test.sh
+++ b/test/run-test.sh
@@ -46,7 +46,7 @@ check () {
   echo "=" >> out
   $FCLIST - family pixelsize | sort >> out
   tr -d '\015' <out >out.tmp; mv out.tmp out
-  if cmp out $TESTDIR/$EXPECTED > /dev/null ; then : ; else
+  if cmp out $EXPECTED > /dev/null ; then : ; else
     echo "*** Test failed: $TEST"
     echo "*** output is in 'out', expected output in '$EXPECTED'"
     exit 1
_______________________________________________
Fontconfig mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/fontconfig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.