Fix missing Unicode functions with HarfBuzz 2.5.0

Khaled Hosny dr.khaled.hosny at gmail.com
Thu May 30 03:55:34 CEST 2019


On Thu, May 30, 2019 at 02:04:37AM +0200, Khaled Hosny wrote:
> Next step is to drop the ICU dependency from HarfBuzz and fix XeTeX to
> not require it as HarfBuzz’s own Unicode functions should be enough, but
> that is another patch.

Here are two patches, one that stops XeTeX from using hb-icu
(conditional at build-time on HarfBuzz 2.5.0 so that Linux distributions
can still build XeTeX against older versions of HarfBuzz that might not
have built-in Unicode functions enabled). The other patch drops ICU
dependency from HarfBuzz since it is no longer needed, this allows other
consumers of HarfBuzz (e.g. HarfTeX) to avoid ICU dependency if they are
not directly using it.


Regards,
Khaled
-------------- next part --------------
diff --git a/texk/web2c/xetexdir/XeTeXLayoutInterface.cpp b/texk/web2c/xetexdir/XeTeXLayoutInterface.cpp
index 5b2d2b539..dc24f3a93 100644
--- a/texk/web2c/xetexdir/XeTeXLayoutInterface.cpp
+++ b/texk/web2c/xetexdir/XeTeXLayoutInterface.cpp
@@ -39,8 +39,11 @@ authorization from the copyright holders.
 
 #include <graphite2/Font.h>
 #include <graphite2/Segment.h>
+#include <hb.h>
 #include <hb-graphite2.h>
+#if !HB_VERSION_ATLEAST(2,5,0)
 #include <hb-icu.h>
+#endif
 #include <hb-ot.h>
 
 #include "XeTeX_web.h"
@@ -661,6 +664,7 @@ deleteLayoutEngine(XeTeXLayoutEngine engine)
     free(engine->shaper);
 }
 
+#if !HB_VERSION_ATLEAST(2,5,0)
 static unsigned int
 _decompose_compat(hb_unicode_funcs_t* ufuncs,
                   hb_codepoint_t      u,
@@ -677,8 +681,7 @@ _get_unicode_funcs(void)
     hb_unicode_funcs_set_decompose_compatibility_func(ufuncs, _decompose_compat, NULL, NULL);
     return ufuncs;
 }
-
-static hb_unicode_funcs_t* hbUnicodeFuncs = NULL;
+#endif
 
 int
 layoutChars(XeTeXLayoutEngine engine, uint16_t chars[], int32_t offset, int32_t count, int32_t max,
@@ -699,11 +702,15 @@ layoutChars(XeTeXLayoutEngine engine, uint16_t chars[], int32_t offset, int32_t
 
     script = hb_ot_tag_to_script (engine->script);
 
+    hb_buffer_reset(engine->hbBuffer);
+
+#if !HB_VERSION_ATLEAST(2,5,0)
+    static hb_unicode_funcs_t* hbUnicodeFuncs = NULL;
     if (hbUnicodeFuncs == NULL)
         hbUnicodeFuncs = _get_unicode_funcs();
-
-    hb_buffer_reset(engine->hbBuffer);
     hb_buffer_set_unicode_funcs(engine->hbBuffer, hbUnicodeFuncs);
+#endif
+
     hb_buffer_add_utf16(engine->hbBuffer, chars, max, offset, count);
     hb_buffer_set_direction(engine->hbBuffer, direction);
     hb_buffer_set_script(engine->hbBuffer, script);
-------------- next part --------------
diff --git a/libs/harfbuzz/Makefile.am b/libs/harfbuzz/Makefile.am
index b038896d3..80394d67f 100644
--- a/libs/harfbuzz/Makefile.am
+++ b/libs/harfbuzz/Makefile.am
@@ -203,11 +203,6 @@ libharfbuzz_a_SOURCES += \
 	@HARFBUZZ_TREE@/src/hb-ot-shape-complex-myanmar-machine.hh \
 	@HARFBUZZ_TREE@/src/hb-ot-shape-complex-use-machine.hh
 
-## ICU library
-AM_CPPFLAGS += $(ICU_INCLUDES)
-libharfbuzz_dependencies += $(ICU_DEPEND)
-libharfbuzz_a_SOURCES += @HARFBUZZ_TREE@/src/hb-icu.cc
-
 ## Graphite library
 AM_CPPFLAGS += $(GRAPHITE2_INCLUDES)
 libharfbuzz_dependencies += $(GRAPHITE2_DEPEND)
@@ -227,12 +222,10 @@ hbtest_SOURCES = hbtest.c
 # Force Automake to use CXXLD for linking
 nodist_EXTRA_hbtest_SOURCES = dummy.cxx
 
-hbtest_CPPFLAGS = -Iinclude $(ICU_INCLUDES) $(GRAPHITE2_INCLUDES)
+hbtest_CPPFLAGS = -Iinclude $(GRAPHITE2_INCLUDES)
 
-LDADD = libharfbuzz.a $(ICU_LIBS) $(ICU_LIBS_EXTRA) $(GRAPHITE2_LIBS)
+LDADD = libharfbuzz.a $(GRAPHITE2_LIBS)
 
-## Rebuild libsicuxxx
- at ICU_RULE@
 ## Rebuild libgraphite2
 @GRAPHITE2_RULE@
 
diff --git a/libs/harfbuzz/Makefile.in b/libs/harfbuzz/Makefile.in
index 5e51044d2..345a9d0df 100644
--- a/libs/harfbuzz/Makefile.in
+++ b/libs/harfbuzz/Makefile.in
@@ -94,7 +94,6 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/../../m4/ax_cxx_compile_stdcxx.m4 \
 	$(top_srcdir)/../../m4/kpse-common.m4 \
 	$(top_srcdir)/../../m4/kpse-graphite2-flags.m4 \
-	$(top_srcdir)/../../m4/kpse-icu-flags.m4 \
 	$(top_srcdir)/../../m4/kpse-lib-version.m4 \
 	$(top_srcdir)/../../m4/kpse-visibility.m4 \
 	$(top_srcdir)/../../m4/kpse-warnings.m4 \
@@ -167,15 +166,13 @@ am_libharfbuzz_a_OBJECTS = @HARFBUZZ_TREE@/src/hb-blob.$(OBJEXT) \
 	@HARFBUZZ_TREE@/src/hb-ot-shape-normalize.$(OBJEXT) \
 	@HARFBUZZ_TREE@/src/hb-ot-shape-fallback.$(OBJEXT) \
 	@HARFBUZZ_TREE@/src/hb-ot-var.$(OBJEXT) \
-	@HARFBUZZ_TREE@/src/hb-icu.$(OBJEXT) \
 	@HARFBUZZ_TREE@/src/hb-graphite2.$(OBJEXT)
 libharfbuzz_a_OBJECTS = $(am_libharfbuzz_a_OBJECTS)
 am_hbtest_OBJECTS = hbtest-hbtest.$(OBJEXT)
 hbtest_OBJECTS = $(am_hbtest_OBJECTS)
 hbtest_LDADD = $(LDADD)
 am__DEPENDENCIES_1 =
-hbtest_DEPENDENCIES = libharfbuzz.a $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1)
+hbtest_DEPENDENCIES = libharfbuzz.a $(am__DEPENDENCIES_1)
 am__dist_check_SCRIPTS_DIST = harfbuzz.test
 AM_V_P = $(am__v_P_ at AM_V@)
 am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
@@ -204,7 +201,6 @@ am__depfiles_remade = ./$(DEPDIR)/hbtest-dummy.Po \
 	@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-fallback-shape.Po \
 	@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-font.Po \
 	@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-graphite2.Po \
-	@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-icu.Po \
 	@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-map.Po \
 	@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-cff1-table.Po \
 	@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-cff2-table.Po \
@@ -613,10 +609,6 @@ HB_VERSION = @HB_VERSION@
 HB_VERSION_MAJOR = @HB_VERSION_MAJOR@
 HB_VERSION_MICRO = @HB_VERSION_MICRO@
 HB_VERSION_MINOR = @HB_VERSION_MINOR@
-ICU_CONFIG = @ICU_CONFIG@
-ICU_DEPEND = @ICU_DEPEND@
-ICU_INCLUDES = @ICU_INCLUDES@
-ICU_LIBS = @ICU_LIBS@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -711,9 +703,8 @@ NEVER_NAMES_LT = -o -name .libs -o -name '*.lo'
 SUBDIRS = . include
 noinst_LIBRARIES = libharfbuzz.a
 AM_CPPFLAGS = -DHB_NO_MT -DHAVE_FALLBACK=1 \
-	-I$(top_srcdir)/$(HARFBUZZ_SRC) $(ICU_INCLUDES) \
-	$(GRAPHITE2_INCLUDES)
-libharfbuzz_dependencies = $(ICU_DEPEND) $(GRAPHITE2_DEPEND)
+	-I$(top_srcdir)/$(HARFBUZZ_SRC) $(GRAPHITE2_INCLUDES)
+libharfbuzz_dependencies = $(GRAPHITE2_DEPEND)
 libharfbuzz_a_SOURCES = @HARFBUZZ_TREE@/src/hb-algs.hh \
 	@HARFBUZZ_TREE@/src/hb-atomic.hh \
 	@HARFBUZZ_TREE@/src/hb-blob.hh @HARFBUZZ_TREE@/src/hb-blob.cc \
@@ -874,7 +865,6 @@ libharfbuzz_a_SOURCES = @HARFBUZZ_TREE@/src/hb-algs.hh \
 	@HARFBUZZ_TREE@/src/hb-ot-shape-complex-khmer-machine.hh \
 	@HARFBUZZ_TREE@/src/hb-ot-shape-complex-myanmar-machine.hh \
 	@HARFBUZZ_TREE@/src/hb-ot-shape-complex-use-machine.hh \
-	@HARFBUZZ_TREE@/src/hb-icu.cc \
 	@HARFBUZZ_TREE@/src/hb-graphite2.cc
 @build_TRUE at dist_check_SCRIPTS = harfbuzz.test
 @build_TRUE at TESTS = harfbuzz.test
@@ -882,8 +872,8 @@ hbtest_SOURCES = hbtest.c
 
 # Force Automake to use CXXLD for linking
 nodist_EXTRA_hbtest_SOURCES = dummy.cxx
-hbtest_CPPFLAGS = -Iinclude $(ICU_INCLUDES) $(GRAPHITE2_INCLUDES)
-LDADD = libharfbuzz.a $(ICU_LIBS) $(ICU_LIBS_EXTRA) $(GRAPHITE2_LIBS)
+hbtest_CPPFLAGS = -Iinclude $(GRAPHITE2_INCLUDES)
+LDADD = libharfbuzz.a $(GRAPHITE2_LIBS)
 
 # Reconfig
 reconfig_prereq = $(libharfbuzz_dependencies)
@@ -1102,9 +1092,6 @@ clean-noinstLIBRARIES:
 @HARFBUZZ_TREE@/src/hb-ot-var.$(OBJEXT):  \
 	@HARFBUZZ_TREE@/src/$(am__dirstamp) \
 	@HARFBUZZ_TREE@/src/$(DEPDIR)/$(am__dirstamp)
- at HARFBUZZ_TREE@/src/hb-icu.$(OBJEXT):  \
-	@HARFBUZZ_TREE@/src/$(am__dirstamp) \
-	@HARFBUZZ_TREE@/src/$(DEPDIR)/$(am__dirstamp)
 @HARFBUZZ_TREE@/src/hb-graphite2.$(OBJEXT):  \
 	@HARFBUZZ_TREE@/src/$(am__dirstamp) \
 	@HARFBUZZ_TREE@/src/$(DEPDIR)/$(am__dirstamp)
@@ -1137,7 +1124,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-fallback-shape.Po at am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-font.Po at am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-graphite2.Po at am__quote@ # am--include-marker
- at AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-icu.Po at am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-map.Po at am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-cff1-table.Po at am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-cff2-table.Po at am__quote@ # am--include-marker
@@ -1779,7 +1765,6 @@ distclean: distclean-recursive
 	-rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-fallback-shape.Po
 	-rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-font.Po
 	-rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-graphite2.Po
-	-rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-icu.Po
 	-rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-map.Po
 	-rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-cff1-table.Po
 	-rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-cff2-table.Po
@@ -1877,7 +1862,6 @@ maintainer-clean: maintainer-clean-recursive
 	-rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-fallback-shape.Po
 	-rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-font.Po
 	-rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-graphite2.Po
-	-rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-icu.Po
 	-rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-map.Po
 	-rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-cff1-table.Po
 	-rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-cff2-table.Po
@@ -1961,7 +1945,6 @@ dist-hook:
 $(libharfbuzz_a_OBJECTS): config.force
 harfbuzz.log: hbtest$(EXEEXT)
 
- at ICU_RULE@
 @GRAPHITE2_RULE@
 config.force: $(reconfig_prereq)
 	@if test -f $@; then :; else \
diff --git a/libs/harfbuzz/aclocal.m4 b/libs/harfbuzz/aclocal.m4
index 1ba2a8a63..dcdd42ded 100644
--- a/libs/harfbuzz/aclocal.m4
+++ b/libs/harfbuzz/aclocal.m4
@@ -1172,7 +1172,6 @@ AC_SUBST([am__untar])
 m4_include([../../m4/ax_cxx_compile_stdcxx.m4])
 m4_include([../../m4/kpse-common.m4])
 m4_include([../../m4/kpse-graphite2-flags.m4])
-m4_include([../../m4/kpse-icu-flags.m4])
 m4_include([../../m4/kpse-lib-version.m4])
 m4_include([../../m4/kpse-visibility.m4])
 m4_include([../../m4/kpse-warnings.m4])
diff --git a/libs/harfbuzz/config.h.in b/libs/harfbuzz/config.h.in
index 4f06c459e..cd59a8d1a 100644
--- a/libs/harfbuzz/config.h.in
+++ b/libs/harfbuzz/config.h.in
@@ -37,12 +37,6 @@
 /* Use gthread2 library */
 #undef HAVE_GTHREAD
 
-/* Use ICU library */
-#undef HAVE_ICU
-
-/* ICU support is not a seperate library */
-#undef HAVE_ICU_BUILTIN
-
 /* Use Intel __sync_* atomic primitives */
 #undef HAVE_INTEL_ATOMIC_PRIMITIVES
 
diff --git a/libs/harfbuzz/configure b/libs/harfbuzz/configure
index b74284397..4991a583f 100755
--- a/libs/harfbuzz/configure
+++ b/libs/harfbuzz/configure
@@ -635,11 +635,6 @@ HAVE_GCC_TRUE
 EGREP
 GREP
 CPP
-ICU_RULE
-ICU_DEPEND
-ICU_LIBS
-ICU_INCLUDES
-ICU_CONFIG
 GRAPHITE2_RULE
 GRAPHITE2_DEPEND
 GRAPHITE2_LIBS
@@ -763,7 +758,6 @@ enable_maintainer_mode
 enable_dependency_tracking
 enable_compiler_warnings
 with_system_graphite2
-with_system_icu
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1414,8 +1408,6 @@ Optional Packages:
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   --with-system-graphite2 use installed graphite2 headers and library
                           (requires pkg-config)
-  --with-system-icu       use installed ICU headers and libraries (requires
-                          pkg-config or icu-config)
 
 Some influential environment variables:
   CC          C compiler command
@@ -6791,225 +6783,6 @@ ${top_builddir}/../../libs/graphite2/include/graphite2/Font.h:
 	cd ${top_builddir}/../../libs/graphite2 && $(MAKE) $(AM_MAKEFLAGS) rebuild'
 fi
 
-echo 'tldbg:KPSE_ICU_FLAGS called: more-icu-libs=, icu-config-args=.' >&5
-##tldbg _KPSE_LIB_FLAGS: Setup icu (-licuxxx) flags.
-echo 'tldbg:_KPSE_LIB_FLAGS called: libdir=icu, libname=icuxxx, options=, tlincl=-DU_STATIC_IMPLEMENTATION -IBLD/libs/icu/include, tllib= BLD/libs/icu/icu-build/lib/libicuuc.a BLD/libs/icu/icu-build/lib/libicudata.a, tlextra=, rebuildsrcdeps=, rebuildblddeps=${top_builddir}/../../libs/icu/include/unicode/uversion.h.' >&5
-##tldbg _KPSE_LIB_FLAGS_TL: icu (icuxxx) .
-
-# Check whether --with-system-icu was given.
-if test "${with_system_icu+set}" = set; then :
-  withval=$with_system_icu;
-fi
-if test "x$with_system_icu" = xyes; then
-  echo 'tldbg:KPSE_ICU_SYSTEM_FLAGS called.' >&5
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}icu-config", so it can be a program name with args.
-set dummy ${ac_tool_prefix}icu-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ICU_CONFIG+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ICU_CONFIG"; then
-  ac_cv_prog_ICU_CONFIG="$ICU_CONFIG" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ICU_CONFIG="${ac_tool_prefix}icu-config"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ICU_CONFIG=$ac_cv_prog_ICU_CONFIG
-if test -n "$ICU_CONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICU_CONFIG" >&5
-$as_echo "$ICU_CONFIG" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_ICU_CONFIG"; then
-  ac_ct_ICU_CONFIG=$ICU_CONFIG
-  # Extract the first word of "icu-config", so it can be a program name with args.
-set dummy icu-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_ICU_CONFIG+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_ICU_CONFIG"; then
-  ac_cv_prog_ac_ct_ICU_CONFIG="$ac_ct_ICU_CONFIG" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_ICU_CONFIG="icu-config"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_ICU_CONFIG=$ac_cv_prog_ac_ct_ICU_CONFIG
-if test -n "$ac_ct_ICU_CONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_ICU_CONFIG" >&5
-$as_echo "$ac_ct_ICU_CONFIG" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_ICU_CONFIG" = x; then
-    ICU_CONFIG="false"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    ICU_CONFIG=$ac_ct_ICU_CONFIG
-  fi
-else
-  ICU_CONFIG="$ac_cv_prog_ICU_CONFIG"
-fi
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
-set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_PKG_CONFIG+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$PKG_CONFIG"; then
-  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
-$as_echo "$PKG_CONFIG" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_PKG_CONFIG"; then
-  ac_ct_PKG_CONFIG=$PKG_CONFIG
-  # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_PKG_CONFIG"; then
-  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
-if test -n "$ac_ct_PKG_CONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
-$as_echo "$ac_ct_PKG_CONFIG" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_PKG_CONFIG" = x; then
-    PKG_CONFIG="false"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    PKG_CONFIG=$ac_ct_PKG_CONFIG
-  fi
-else
-  PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
-fi
-if $ICU_CONFIG --version >/dev/null 2>&1; then
-  ICU_INCLUDES=`$ICU_CONFIG --cppflags`
-  ICU_LIBS=`$ICU_CONFIG --ldflags-searchpath --ldflags-libsonly --ldflags-system`
-elif $PKG_CONFIG --libs icu-uc icu-io >/dev/null 2>&1; then
-  ICU_INCLUDES=`$PKG_CONFIG --cflags icu-uc icu-io`
-  ICU_LIBS=`$PKG_CONFIG --libs icu-uc icu-io`
-elif test "x$need_icu:$with_system_icu" = xyes:yes; then
-  as_fn_error $? "did not find either pkg-config or icu-config; one is required for system icu library support" "$LINENO" 5
-fi
-else
-  ICU_INCLUDES="-DU_STATIC_IMPLEMENTATION -I$kpse_BLD/libs/icu/include"
-  ICU_LIBS=" $kpse_BLD/libs/icu/icu-build/lib/libicuuc.a $kpse_BLD/libs/icu/icu-build/lib/libicudata.a"
-  ICU_DEPEND=' ${top_builddir}/../../libs/icu/icu-build/lib/libicuuc.a ${top_builddir}/../../libs/icu/icu-build/lib/libicudata.a'
-  ICU_RULE='# Rebuild libicuxxx
-$(ICU_DEPEND): ${top_builddir}/../../libs/icu/include/unicode/uversion.h
-	cd ${top_builddir}/../../libs/icu && $(MAKE) $(AM_MAKEFLAGS) rebuild
-${top_builddir}/../../libs/icu/include/unicode/uversion.h:
-	cd ${top_builddir}/../../libs/icu && $(MAKE) $(AM_MAKEFLAGS) rebuild'
-fi
-# checking for openbsd to add -lpthread for icu.
-case $build_os in
-openbsd*)
-  eval ICUXXX_LIBS=\"$ICUXXX_LIBS -lpthread\"
-  ;;
-esac
-
 
 # Functions and headers
 for ac_func in atexit mprotect sysconf getpagesize mmap isatty newlocale strtod_l posix_memalign
@@ -7554,12 +7327,6 @@ if :; then
 $as_echo "#define HAVE_OT 1" >>confdefs.h
 
 
-$as_echo "#define HAVE_ICU 1" >>confdefs.h
-
-
-$as_echo "#define HAVE_ICU_BUILTIN 1" >>confdefs.h
-
-
 $as_echo "#define HAVE_GRAPHITE2 1" >>confdefs.h
 
 else
diff --git a/libs/harfbuzz/configure.ac b/libs/harfbuzz/configure.ac
index 936bbebf3..30c4a28a5 100644
--- a/libs/harfbuzz/configure.ac
+++ b/libs/harfbuzz/configure.ac
@@ -34,7 +34,6 @@ AX_CXX_COMPILE_STDCXX([11],,[optional])
 KPSE_COMPILER_VISIBILITY
 
 KPSE_GRAPHITE2_FLAGS
-KPSE_ICU_FLAGS
 
 # Functions and headers
 AC_CHECK_FUNCS(atexit mprotect sysconf getpagesize mmap isatty newlocale strtod_l posix_memalign)
@@ -84,8 +83,6 @@ fi
 
 if :; then
   AC_DEFINE([HAVE_OT], 1, [Use native OpenType Layout backend])
-  AC_DEFINE([HAVE_ICU], 1, [Use ICU library])
-  AC_DEFINE([HAVE_ICU_BUILTIN], 1, [ICU support is not a seperate library])
   AC_DEFINE([HAVE_GRAPHITE2], 1, [Use Graphite library])
 else
 dnl add all these to config.h.in but do not define them in config.h
diff --git a/libs/harfbuzz/hbtest.c b/libs/harfbuzz/hbtest.c
index 09f4d33e5..cd323c0ac 100644
--- a/libs/harfbuzz/hbtest.c
+++ b/libs/harfbuzz/hbtest.c
@@ -9,21 +9,14 @@
 #endif
 #include <hb.h>
 #include <stdio.h>
-#include <unicode/ucnv.h>
 #include <graphite2/Font.h>
 
 int main (int argc, char **argv)
 {
-  UVersionInfo icuVersion;
-  char icu_version[U_MAX_VERSION_STRING_LENGTH] = "";
   int nMajor, nMinor, nBugFix;
 
   printf ("%s: Compiled with HarfBuzz version %s; using %s\n",
           argv[0], HB_VERSION_STRING, hb_version_string ());
-  u_getVersion(icuVersion);
-  u_versionToString(icuVersion, icu_version);
-  printf ("%s: Compiled with ICU version %s; using %s\n",
-          argv[0], U_ICU_VERSION, icu_version);
   gr_engine_version(&nMajor, &nMinor, &nBugFix);
   printf ("%s: Compiled with Graphite2 version %d.%d.%d; using %d.%d.%d\n",
           argv[0], GR2_VERSION_MAJOR, GR2_VERSION_MINOR, GR2_VERSION_BUGFIX,
diff --git a/libs/harfbuzz/include/Makefile.am b/libs/harfbuzz/include/Makefile.am
index 3cff7bec5..8f1c5744e 100644
--- a/libs/harfbuzz/include/Makefile.am
+++ b/libs/harfbuzz/include/Makefile.am
@@ -41,9 +41,6 @@ hdr_links += \
 	$(HARFBUZZ_SRC)/hb-ot-shape.h \
 	$(HARFBUZZ_SRC)/hb-ot-var.h
 
-## ICU library
-hdr_links += $(HARFBUZZ_SRC)/hb-icu.h
-
 ## Graphite library
 hdr_links += $(HARFBUZZ_SRC)/hb-graphite2.h
 
diff --git a/libs/harfbuzz/include/Makefile.in b/libs/harfbuzz/include/Makefile.in
index 427e2ee84..16f546866 100644
--- a/libs/harfbuzz/include/Makefile.in
+++ b/libs/harfbuzz/include/Makefile.in
@@ -92,7 +92,6 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/../../m4/ax_cxx_compile_stdcxx.m4 \
 	$(top_srcdir)/../../m4/kpse-common.m4 \
 	$(top_srcdir)/../../m4/kpse-graphite2-flags.m4 \
-	$(top_srcdir)/../../m4/kpse-icu-flags.m4 \
 	$(top_srcdir)/../../m4/kpse-lib-version.m4 \
 	$(top_srcdir)/../../m4/kpse-visibility.m4 \
 	$(top_srcdir)/../../m4/kpse-warnings.m4 \
@@ -161,10 +160,6 @@ HB_VERSION = @HB_VERSION@
 HB_VERSION_MAJOR = @HB_VERSION_MAJOR@
 HB_VERSION_MICRO = @HB_VERSION_MICRO@
 HB_VERSION_MINOR = @HB_VERSION_MINOR@
-ICU_CONFIG = @ICU_CONFIG@
-ICU_DEPEND = @ICU_DEPEND@
-ICU_INCLUDES = @ICU_INCLUDES@
-ICU_LIBS = @ICU_LIBS@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -262,7 +257,7 @@ hdr_links = $(HARFBUZZ_SRC)/hb.h $(HARFBUZZ_SRC)/hb-aat-layout.h \
 	$(HARFBUZZ_SRC)/hb-ot-font.h $(HARFBUZZ_SRC)/hb-ot-layout.h \
 	$(HARFBUZZ_SRC)/hb-ot-math.h $(HARFBUZZ_SRC)/hb-ot-name.h \
 	$(HARFBUZZ_SRC)/hb-ot-shape.h $(HARFBUZZ_SRC)/hb-ot-var.h \
-	$(HARFBUZZ_SRC)/hb-icu.h $(HARFBUZZ_SRC)/hb-graphite2.h
+	$(HARFBUZZ_SRC)/hb-graphite2.h
 all: all-am
 
 .SUFFIXES:


More information about the tex-live mailing list