summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvisvgm/TLpatches
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-10-29 22:11:07 +0000
committerKarl Berry <karl@freefriends.org>2018-10-29 22:11:07 +0000
commit7148d81927a73e19c3ee870806a90f6505852325 (patch)
tree4ac6f5863462a94fda7f5155f2e073de993c4182 /Build/source/texk/dvisvgm/TLpatches
parenta4549586c1367aed58a4fe6ad910439aa9107f15 (diff)
dvisvgm 2.6.1
git-svn-id: svn://tug.org/texlive/trunk@49020 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvisvgm/TLpatches')
-rw-r--r--Build/source/texk/dvisvgm/TLpatches/TL-Changes1
-rw-r--r--Build/source/texk/dvisvgm/TLpatches/patch-04-configure-tl46
-rw-r--r--Build/source/texk/dvisvgm/TLpatches/patch-04-configure-upstream406
-rw-r--r--Build/source/texk/dvisvgm/TLpatches/patch-08-makefiles221
4 files changed, 545 insertions, 129 deletions
diff --git a/Build/source/texk/dvisvgm/TLpatches/TL-Changes b/Build/source/texk/dvisvgm/TLpatches/TL-Changes
index 33b35572502..f0aab1706d0 100644
--- a/Build/source/texk/dvisvgm/TLpatches/TL-Changes
+++ b/Build/source/texk/dvisvgm/TLpatches/TL-Changes
@@ -28,6 +28,7 @@ svn status | sed -n 's/^\!//p' # rerun, should be empty now
cd ..
Update our ./configure.ac from upstream dvisvgm-src/configure.ac.
+(See patch-04-configure-* for reference, but they won't apply as-is.)
# patch to integrate into TL build. Will probably need adjusting;
# any top_srcdir in dvisvgm-src/src/Makefile.am needs to become dvisvgm_srcdir.
diff --git a/Build/source/texk/dvisvgm/TLpatches/patch-04-configure-tl b/Build/source/texk/dvisvgm/TLpatches/patch-04-configure-tl
new file mode 100644
index 00000000000..6fd92ffbdc9
--- /dev/null
+++ b/Build/source/texk/dvisvgm/TLpatches/patch-04-configure-tl
@@ -0,0 +1,46 @@
+ These are the changes from the previous TL dvisvgm/configure.ac
+ to the current one. For reference only, won't apply to a
+ new version as is. See also patch-04-configure-upstream.
+
+--- configure.ac (revision 49009)
++++ configure.ac (working copy)
+@@ -15,7 +15,7 @@
+ AC_PREREQ([2.65])
+ m4_include([version.ac])[] dnl define dvisvgm_version
+ AC_INIT([dvisvgm (TeX Live)], dvisvgm_version, [tex-k@tug.org])
+-DATE="September 2018"
++DATE="October 2018"
+ AC_CONFIG_SRCDIR([dvisvgm-src/src/dvisvgm.cpp])
+ AC_CONFIG_HEADERS([config.h])
+ AC_CONFIG_MACRO_DIRS([../../m4])dnl not just _DIR
+@@ -29,8 +29,7 @@
+ KPSE_COMMON([dvisvgm])
+
+ AH_TEMPLATE([TARGET_SYSTEM], [The machine triplet of the target system])
+-AC_DEFINE_UNQUOTED([TARGET_SYSTEM], ["$host"],
+- [The machine triplet of the target system.])
++AC_DEFINE_UNQUOTED([TARGET_SYSTEM], ["$target"])
+
+ AC_PROG_CC
+ AC_PROG_CC_C99
+@@ -162,7 +161,6 @@
+ # Check for library functions.
+ AC_FUNC_STAT
+ AC_CHECK_FUNCS_ONCE([ftime gettimeofday sigaction umask uselocale])
+-# TL? memset strcasecmp strtol
+
+ AC_ARG_ENABLE([woff],
+ [AS_HELP_STRING([--disable-woff], [Disable WOFF support @<:@default=no@:>@])],
+@@ -190,6 +188,12 @@
+ # TL: use bundled md5 too
+ AM_CONDITIONAL([USE_BUNDLED_MD5], true)
+
++# TL: these conditionals for system libraries are in the Makefile.am's.
++AM_CONDITIONAL(HAVE_POTRACE, false)
++AM_CONDITIONAL(HAVE_BROTLI, false)
++AM_CONDITIONAL(HAVE_WOFF2, false)
++AM_CONDITIONAL(HAVE_XXHASH, false)
++
+ # TL: not going to build_manpage (which is the default).
+ # TL: not going to attempt code coverage; need to subst it away.
+ AM_CONDITIONAL([CODE_COVERAGE_ENABLED], false)
diff --git a/Build/source/texk/dvisvgm/TLpatches/patch-04-configure-upstream b/Build/source/texk/dvisvgm/TLpatches/patch-04-configure-upstream
new file mode 100644
index 00000000000..28e2c5ad816
--- /dev/null
+++ b/Build/source/texk/dvisvgm/TLpatches/patch-04-configure-upstream
@@ -0,0 +1,406 @@
+ These are the (extensive) changes from the previous upstream
+ dvisvgm configure.ac to the current one in TL. For reference
+ only, won't apply to a new version as is. See also
+ patch-04-configure-tl.
+
+ The general idea is that upstream needs to find and link against
+ various system libraries (kpathsea, freetype, zlib). For native
+ TL builds, we want to use the versions of those which are in the
+ TL source tree.
+
+--- dvisvgm-2.6.1/configure.ac 2018-10-11 05:25:40.000000000 -0700
++++ configure.ac 2018-10-29 11:17:00.956683648 -0700
+@@ -1,28 +1,42 @@
+-# This file is part of dvisvgm
+-# Copyright (C) 2005-2018 Martin Gieseking <martin.gieseking@uos.de>
+-#
+-# Process this file with autoconf to produce a configure script.
+-
+-AC_PREREQ(2.59)
+-AC_INIT([dvisvgm],[2.6.1],[martin.gieseking@uos.de])
++# $Id: configure.ac 48654 2018-09-13 17:10:25Z karl $
++dnl Process this file with autoconf to produce a configure script
++dnl for dvisvgm in TeX Live.
++dnl
++dnl Copyright 2015-2018 Karl Berry <tex-live@tug.org>
++dnl Copyright 2009-2014 Peter Breitenlohner <tex-live@tug.org>
++dnl
++dnl This file is free software; the copyright holder
++dnl gives unlimited permission to copy and/or distribute it,
++dnl with or without modifications, as long as this notice is preserved.
++dnl
++dnl Adapted for TeX Live from original dvisvgm configure.ac
++dnl Copyright 2005-2018 Martin Gieseking
++dnl
++AC_PREREQ([2.65])
++m4_include([version.ac])[] dnl define dvisvgm_version
++AC_INIT([dvisvgm (TeX Live)], dvisvgm_version, [tex-k@tug.org])
+ DATE="October 2018"
+-AC_CONFIG_SRCDIR(src)
++AC_CONFIG_SRCDIR([dvisvgm-src/src/dvisvgm.cpp])
+ AC_CONFIG_HEADERS([config.h])
+-AC_CONFIG_MACRO_DIR([m4])
+-AC_CANONICAL_HOST
+-AC_CANONICAL_TARGET
+-AM_INIT_AUTOMAKE([subdir-objects])
++AC_CONFIG_MACRO_DIRS([../../m4])dnl not just _DIR
++AC_CONFIG_AUX_DIR([../../build-aux])
++
++AM_CONDITIONAL([TEXLIVE_BUILD], [test "x$enable_texlive_build" = xyes])
++
++# Common code for all programs using libkpathsea.
++# PROG_AR must be run before KPSE_COMMON, since the latter calls LT_INIT.
++AM_PROG_AR
++KPSE_COMMON([dvisvgm])
+
+ AH_TEMPLATE([TARGET_SYSTEM], [The machine triplet of the target system])
+ AC_DEFINE_UNQUOTED([TARGET_SYSTEM], ["$target"])
+
+-# Checks for programs.
+ AC_PROG_CC
+ AC_PROG_CC_C99
+ AC_PROG_CXX
+ AX_CXX_COMPILE_STDCXX([11])
+-AM_PROG_AR
+ LT_INIT
++KPSE_CXX_HACK
+
+ AC_PROG_RANLIB
+ AC_LANG(C)
+@@ -30,48 +44,20 @@
+ AC_CHECK_HEADERS([sys/time.h sys/timeb.h xlocale.h])
+ AC_HEADER_TIOCGWINSZ
+
+-CPPFLAGS_SAVE="$CPPFLAGS"
+-CFLAGS_SAVE="$CFLAGS"
+-LDFLAGS_SAVE="$LDFLAGS"
+-
+-# Check availability and usability of the kpathsea library
+-AC_ARG_VAR(KPSE_CFLAGS, [C/C++ compiler flags for the kpathsea library])
+-AC_ARG_VAR(KPSE_LIBS, [linker flags for the kpathsea library])
+-AC_ARG_VAR(KPSE_LIBS, [])
+-AC_ARG_WITH([kpathsea],
+- [AS_HELP_STRING([--with-kpathsea=prefix], [set location of kpathsea library])],
+- [with_kpathsea="$withval"],
+- [with_kpathsea=yes])
+-
+-AS_IF([test "x$with_kpathsea" != "xyes"],
+- [KPSE_CFLAGS="-I$with_kpathsea/include" KPSE_LIBS="-L$with_kpathsea/lib"]
+- [CPPFLAGS="$CPPFLAGS $KPSE_CFLAGS" CFLAGS="$CFLAGS $KPSE_CFLAGS" LDFLAGS="$LDFLAGS $KPSE_LIBS"])
+-
+-AC_CHECK_HEADER([kpathsea/kpathsea.h],,
+- [AC_MSG_ERROR([please install the kpathsea development package])])
+-AC_CHECK_LIB([kpathsea], [kpse_find_file],,
+- [AC_MSG_ERROR([libkpathsea not found, please install the corresponding package first])])
+-
+-AC_MSG_CHECKING([kpathsea version])
+-AC_RUN_IFELSE([AC_LANG_SOURCE([#include <stdio.h>
+- #include <kpathsea/kpathsea.h>
+- int main() {
+- FILE *f;
+- f = fopen("kpseversion", "w");
+- if(!f) exit(1);
+- fprintf(f, "%s\n", KPSEVERSION);
+- fclose(f);
+- exit(0);
+- }])],
+- [kpseversion=`cat kpseversion|sed 's/kpathsea version //'`], [kpseversion=], [kpseversion=unknown])
+-AC_MSG_RESULT("$kpseversion")
+-rm -f kpseversion
+-AS_IF([test -z "$kpseversion"],
+- [AC_MSG_ERROR([Could not compile a simple kpathsea program -- check your installation])])
+-AC_SUBST(KPSE_CFLAGS)
+-AC_SUBST(KPSE_LIBS)
+-
+-# Check how to link Ghostscript
++KPSE_COND_WIN32
++KPSE_KPATHSEA_FLAGS
++KPSE_FREETYPE2_FLAGS
++KPSE_ZLIB_FLAGS
++
++KPSE_SAVE_FLAGS
++
++# emacs-page Ghostscript complexities.
++LIBGS_INCLUDES=
++LIBGS_LIBS=
++if test "x$enable_native_texlive_build" = xyes; then
++ # TL: always dlload libgs, must avoid shared lib ref in binary.
++ HAVE_LIBGS=0
++else
+ have_libgs=yes
+ AC_CHECK_HEADER([ghostscript/iapi.h],
+ [AC_CHECK_LIB(gs, gsapi_revision,, [have_libgs=no])],
+@@ -81,68 +67,87 @@
+ [AC_CHECK_LIB(dl, dlopen,,
+ [AC_DEFINE(DISABLE_GS, 1, [Set to 1 if PostScript support should be disabled])]
+ [AC_MSG_WARN(PostScript support disabled)])])
++fi
+
+-# Check for pkg-config
+-PKG_PROG_PKG_CONFIG
+-
+-# Check for libraries.
+-PKG_CHECK_MODULES([FREETYPE], [freetype2])
++if test -z "$HAVE_LIBGS" || test "$HAVE_LIBGS" -eq 0; then
++ AC_MSG_NOTICE([not linking to libgs, trying to arrange for dynamic loading])
++ # Windows (native or MinGW32) has neither <dlfcn.h> nor dlopen().
++ if test "x$kpse_cv_have_win32" = xno; then
++ # FreeBSD neither has nor requires libdl.
++ AC_SEARCH_LIBS([dlopen], [dl])
++ AS_CASE([$ac_cv_search_dlopen],
++ [no | "none required"], [],
++ [LIBGS_LIBS=$ac_cv_search_dlopen])
++ AC_CHECK_HEADER([dlfcn.h])
++ AC_CHECK_FUNC([dlopen])
++ if test "x$ac_cv_header_dlfcn_h:$ac_cv_func_dlopen" != xyes:yes; then
++ AC_DEFINE(DISABLE_GS, 1,
++ [Set to 1 if PostScript support is to be disabled])
++ LIBGS_LIBS=
++ fi
++ fi
++else
++ # query Ghostscript version
++ AC_MSG_CHECKING([Ghostscript version])
++ AC_RUN_IFELSE([AC_LANG_SOURCE([#include <stdio.h>
++ #include <ghostscript/iapi.h>
++ int main () {
++ gsapi_revision_t r;
++ if (gsapi_revision(&r, sizeof(gsapi_revision_t)) == 0) {
++ FILE *f;
++ f = fopen("gsversion", "w");
++ if (!f) exit(1);
++ fprintf(f, "%ld\n", r.revision);
++ fclose(f);
++ exit(0);
++ }
++ }])],
++ [gsversion=`cat gsversion`], [gsversion=], [gsversion=unknown])
++ AC_MSG_RESULT("$gsversion")
++ rm -f gsversion
++ if test -z "$gsversion" || test "$gsversion" -lt 831; then
++ # current Ghostscript API was introduced in version 8.31
++ # older versions are not supported
++ AC_DEFINE(DISABLE_GS, 1, [Set to 1 if PostScript support should be disabled])
++ AC_MSG_WARN([Ghostscript version < 8.31 found; PostScript support disabled])
++ else
++ LIBGS_LIBS=-lgs
++ fi
++fi
++AC_SUBST([LIBGS_INCLUDES])
++AC_SUBST([LIBGS_LIBS])
++
++if test "x$enable_build" != xno || test -f config.force; then
++
++# Checks for more libraries.
++KPSE_ADD_FLAGS([zlib])
++AC_CHECK_FUNC([gzopen], [],
++ [AC_MSG_ERROR([cannot find/use zlib])])
++
++KPSE_ADD_FLAGS([freetype2])
++AC_CHECK_FUNC([FT_Init_FreeType], [],
++ [AC_MSG_ERROR([cannot find/use libfreetype])])
++
++KPSE_ADD_FLAGS([kpathsea])
++AC_CHECK_FUNC([kpse_set_program_name], [],
++ [AC_MSG_ERROR([cannot find/use libkpathsea])])
+
+-AC_ARG_ENABLE([woff],
+- [AS_HELP_STRING([--disable-woff], [Disable WOFF support @<:@default=no@:>@])],
+- [],
+- [enable_woff=yes])
+-AM_CONDITIONAL([ENABLE_WOFF], [test "x$enable_woff" = "xyes"])
+-
+-AC_ARG_WITH([ttfautohint],
+- [AS_HELP_STRING([--with-ttfautohint@<:@=prefix@:>@], [enable ttfautohint support (disabled by default)])],
+- [with_ttfautohint="$withval"],
+- [with_ttfautohint=no])
+-
+-# Add option to enable linking of bundled libraries (brotli, potrace, woff2, xxhash).
+-AC_ARG_ENABLE([bundled-libs],
+- [AS_HELP_STRING([--enable-bundled-libs], [use bundled libraries instead of the system ones @<:@default=no@:>@])])
+-AM_CONDITIONAL([USE_BUNDLED_LIBS], [test "x$enable_bundled_libs" = "xyes"])
++# Check if the kpathsea headers are C++ safe.
++AC_LANG_PUSH([C++])
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <kpathsea/kpathsea.h>]],
++ [[printf("%s\n", concat("one", "two"))]])],
++ [],
++ [AC_MSG_ERROR([Sorry, your kpathsea headers are too old])
++ AC_DEFINE([KPSE_CXX_UNSAFE], 1,
++ [Define to 1 if the kpathsea headers are not C++ safe.])])
++AC_LANG_POP([C++])
+
+-# If option --enable-bundled-libs is not given, look for system libraries of brotli, potrace, woff2, and xxhash.
+-AS_IF([test "x$enable_bundled_libs" != "xyes"],
+- [AC_CHECK_HEADER(potracelib.h,
+- [AC_SEARCH_LIBS(potrace_trace, [potrace], [have_potrace=yes])])]
+- [AC_CHECK_HEADER([xxhash.h],
+- [AC_SEARCH_LIBS(XXH32, [xxhash], [have_xxhash=yes])])]
+- [AS_IF([test "x$enable_woff" = "xyes"],
+- [PKG_CHECK_MODULES(BROTLI, [libbrotlienc], [have_brotli=yes])]
+- [PKG_CHECK_MODULES(WOFF2, [libwoff2enc], [have_woff2=yes])])])
+-AM_CONDITIONAL(HAVE_POTRACE, [test "x$have_potrace" = "xyes"])
+-AM_CONDITIONAL(HAVE_BROTLI, [test "x$have_brotli" = "xyes"])
+-AM_CONDITIONAL(HAVE_WOFF2, [test "x$have_woff2" = "xyes"])
+-AM_CONDITIONAL(HAVE_XXHASH, [test "x$have_xxhash" = "xyes"])
+-
+-AS_IF([test "x$enable_woff" != "xyes"],
+- [AC_DEFINE([DISABLE_WOFF], 1, [Define if WOFF support is disabled])],
+- [AS_IF([test "x$with_ttfautohint" != "xno"],
+- [AS_IF([test "x$with_ttfautohint" = "xyes"],
+- # --with-ttfautohint without path => check via pkg-config
+- [PKG_CHECK_MODULES([TTFAUTOHINT], [ttfautohint],,
+- [AC_MSG_ERROR([can't locate ttfautohint, use "--with-ttfautohint=path" to specify its location])])],
+- # --with-ttfautohint=/path/ttfautohint given
+- [TTFAUTOHINT_CFLAGS="-I$with_ttfautohint/include"]
+- [TTFAUTOHINT_LIBS="-L$with_ttfautohint/lib"])]
+- [CPPFLAGS="$CPPFLAGS $TTFAUTOHINT_CFLAGS" CFLAGS="$CFLAGS $TTFAUTOHINT_CFLAGS" LDFLAGS="$LDFLAGS $TTFAUTOHINT_LIBS"]
+- [AC_CHECK_HEADERS([ttfautohint.h],, [AC_MSG_WARN([ttfautohint.h not found])])]
+- [AC_CHECK_LIB([ttfautohint], [TTF_autohint],,
+- [AC_MSG_WARN([no working ttfautohint library found])]
+- [AC_CHECK_LIB(dl, dlopen,
+- [AC_MSG_NOTICE([enabled dynamic loading of ttfautohint])],
+- [AC_MSG_WARN([disabled ttfautohint support])])])]
+- [AC_SUBST(TTFAUTOHINT_CFLAGS) AC_SUBST(TTFAUTOHINT_LIBS)])])
+-
+-AC_CHECK_HEADERS([openssl/md5.h])
+-PKG_CHECK_MODULES([LIBCRYPTO], [libcrypto], [HAVE_LIBCRYPTO=1], [HAVE_LIBCRYPTO=0])
+-AM_CONDITIONAL([USE_BUNDLED_MD5], [test "$HAVE_LIBCRYPTO" -eq 0])
++echo timestamp >config.force
++fi
+
+-AC_CHECK_LIB(z, gzopen)
++KPSE_RESTORE_FLAGS
+
++# emacs-page
+ # Check for header files.
+ AC_HEADER_DIRENT
+ AC_HEADER_STDC
+@@ -157,78 +162,61 @@
+ AC_FUNC_STAT
+ AC_CHECK_FUNCS_ONCE([ftime gettimeofday sigaction umask uselocale])
+
+-# add options for selection of "optional" library locations
+-# currently these libraries are mandatory; the --with-foo options
+-# are used to specify the locations explicitely
+-
+-AC_ARG_WITH(zlib,
+- [AS_HELP_STRING([--with-zlib=DIR], [set location of the zlib library])],
+- [AS_IF([test "x$withval" != "xno"],
+- [AS_IF([test "x$withval" != "xyes"], [ZLIB_DIR=$withval])]
+- [AS_IF([test -n "$ZLIB_DIR"],
+- [ZLIB_CFLAGS="-I$ZLIB_DIR -I$ZLIB_DIR/include"]
+- [ZLIB_LIBS="-L$ZLIB_DIR/lib" -lz])])])
++AC_ARG_ENABLE([woff],
++ [AS_HELP_STRING([--disable-woff], [Disable WOFF support @<:@default=no@:>@])],
++ [],
++ [enable_woff=yes])
++AM_CONDITIONAL([ENABLE_WOFF], [test "x$enable_woff" = "xyes"])
+
+-AC_SUBST([ZLIB_CFLAGS])
+-AC_SUBST([ZLIB_LIBS])
++AC_DEFINE([HAVE_LIBKPATHSEA], 1, [Define to 1 if you have the `kpathsea' library (-lkpathsea).])
++AC_DEFINE([HAVE_LIBFREETYPE], 1, [Define to 1 if you have the `freetype2' library (-lfreetype).])
++AC_DEFINE([HAVE_LIBZ], 1, [Define to 1 if you have the `z' library (-lz).])
++if false; then
++ AC_DEFINE([KPSE_CXX_UNSAFE], 1, [Define to 1 if the kpathsea headers are not C++ safe.])
++fi
+
+-# Check if the kpathsea headers are C++ safe
+-AC_MSG_CHECKING([if the kpathsea headers are C++ safe])
+-AC_LANG_PUSH([C++])
+-AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <kpathsea/kpathsea.h>]],
+- [[printf("%s\n", concat("one", "two"))]])],
+- [AC_MSG_RESULT([yes])],
+- [AC_MSG_RESULT([no])
+- AC_DEFINE([KPSE_CXX_UNSAFE], 1,
+- [Define to 1 if the kpathsea headers are not C++ safe.])])
+-AC_LANG_POP([C++])
++# TL: skip ttfautohint?
+
+-CPPFLAGS="$CPPFLAGS_SAVE"
+-CFLAGS="$CFLAGS_SAVE"
+-LDFLAGS="$LDFLAGS_SAVE"
+-
+-AC_ARG_ENABLE([manpage],
+- [AS_HELP_STRING([--disable-manpage], [disable generation of manual page @<:@default=no@:>@])])
+-AS_IF([test "x$enable_manpage" != "xno"],[
+- enable_manpage="no"
+- # Check for utilities required to build the manpage
+- AC_CHECK_PROG(ASCIIDOC, asciidoc, yes)
+- AS_IF([test "x$ASCIIDOC" = "xyes"], [
+- AC_CHECK_PROG(XMLTO, xmlto, yes)
+- AS_IF([test "x$XMLTO" = "xyes"], [
+- AC_CHECK_PROG(XSLTPROC, xsltproc, yes)
+- AS_IF([test "x$XSLTPROC" = "xyes"],[enable_manpage="yes"])])])])
+-AS_IF([test "x$enable_manpage" != "xyes"],
+- AC_MSG_NOTICE([generation of manual page has been disabled]))
+-AM_CONDITIONAL([BUILD_MANPAGE], [test "x$enable_manpage" = "xyes"])
+-
+-AX_CODE_COVERAGE
+-AS_IF([ test "$enable_code_coverage" = "yes" ], [
+- # disable optimization
+- changequote({,})
+- CFLAGS=`echo $CFLAGS | sed 's/-O[1-9s]//g'`
+- CXXFLAGS=`echo $CXXFLAGS | sed 's/-O[1-9s]//g'`
+- changequote([,])
+-])
++# Add option to enable linking of bundled libraries (brotli, potrace, woff2, xxhash).
++AC_ARG_ENABLE([bundled-libs],
++ [AS_HELP_STRING([--enable-bundled-libs], [use bundled libraries instead of the system ones @<:@default=no@:>@])],
++ [use_bundled_libs=yes])
++AM_CONDITIONAL([USE_BUNDLED_LIBS], [test "x$use_bundled_libs" = "xyes" dnl
++ || test "x$enable_native_texlive_build" = xyes])
++# that is, force using bundled libs for native TL build.
++
++# TL: use bundled md5 too
++AM_CONDITIONAL([USE_BUNDLED_MD5], true)
++
++# TL: these conditionals for system libraries are in the Makefile.am's.
++AM_CONDITIONAL(HAVE_POTRACE, false)
++AM_CONDITIONAL(HAVE_BROTLI, false)
++AM_CONDITIONAL(HAVE_WOFF2, false)
++AM_CONDITIONAL(HAVE_XXHASH, false)
++
++# TL: not going to build_manpage (which is the default).
++# TL: not going to attempt code coverage; need to subst it away.
++AM_CONDITIONAL([CODE_COVERAGE_ENABLED], false)
++CODE_COVERAGE_RULES=
++AC_SUBST([CODE_COVERAGE_RULES])
++
++AC_SUBST([DVISVGM_TREE], [dvisvgm-src])
+
+ AC_SUBST(DATE)
+ AC_SUBST(AM_CPPFLAGS)
+ AC_SUBST(AM_LDFLAGS)
+-AC_CONFIG_FILES([
+- Makefile
+- libs/Makefile
+- libs/brotli/Makefile
+- libs/clipper/Makefile
+- libs/ff-woff/Makefile
+- libs/md5/Makefile
+- libs/potrace/Makefile
+- libs/variant/Makefile
+- libs/woff2/Makefile
+- libs/xxHash/Makefile
+- src/Makefile
+- src/version.hpp
+- tests/Makefile
+- tests/data/Makefile
+- doc/Makefile])
++AC_CONFIG_FILES([Makefile
++ dvisvgm-src/Makefile
++ dvisvgm-src/libs/Makefile
++ dvisvgm-src/libs/brotli/Makefile
++ dvisvgm-src/libs/clipper/Makefile
++ dvisvgm-src/libs/ff-woff/Makefile
++ dvisvgm-src/libs/md5/Makefile
++ dvisvgm-src/libs/potrace/Makefile
++ dvisvgm-src/libs/variant/Makefile
++ dvisvgm-src/libs/woff2/Makefile
++ dvisvgm-src/libs/xxHash/Makefile
++ dvisvgm-src/src/Makefile
++ dvisvgm-src/src/version.hpp
++])dnl TL: skipping tests/* and doc/*
+ AC_OUTPUT
+-
diff --git a/Build/source/texk/dvisvgm/TLpatches/patch-08-makefiles b/Build/source/texk/dvisvgm/TLpatches/patch-08-makefiles
index 8c5b5325d40..f6f2423e19d 100644
--- a/Build/source/texk/dvisvgm/TLpatches/patch-08-makefiles
+++ b/Build/source/texk/dvisvgm/TLpatches/patch-08-makefiles
@@ -1,87 +1,74 @@
See ./TL-Changes.
-Index: configure.ac
-===================================================================
---- configure.ac (revision 48652)
-+++ configure.ac (working copy)
-@@ -15,7 +15,7 @@
- AC_PREREQ([2.65])
- m4_include([version.ac])[] dnl define dvisvgm_version
- AC_INIT([dvisvgm (TeX Live)], dvisvgm_version, [tex-k@tug.org])
--DATE="August 2018"
-+DATE="September 2018"
- AC_CONFIG_SRCDIR([dvisvgm-src/src/dvisvgm.cpp])
- AC_CONFIG_HEADERS([config.h])
- AC_CONFIG_MACRO_DIRS([../../m4])dnl not just _DIR
-@@ -152,19 +152,13 @@
- # Check for header files.
- AC_HEADER_DIRENT
- AC_HEADER_STDC
--AC_CHECK_HEADERS([libintl.h stdlib.h string.h strings.h unistd.h])
-+AC_CHECK_HEADERS_ONCE([libintl.h stdlib.h string.h strings.h unistd.h])
-
- # Check for typedefs, structures, and compiler characteristics.
- AC_HEADER_STDBOOL
- AC_TYPE_SIZE_T
- AC_STRUCT_TM
--# TL? AC_C_CONST
--# TL? AC_C_INLINE
-
--# TL? AC_FUNC_CLOSEDIR_VOID
--# TL? AC_FUNC_ERROR_AT_LINE
--# TL? AC_FUNC_MALLOC
--# TL? AC_FUNC_VPRINTF
- # Check for library functions.
- AC_FUNC_STAT
- AC_CHECK_FUNCS_ONCE([ftime gettimeofday sigaction umask uselocale])
-@@ -185,14 +179,17 @@
-
- # TL: skip ttfautohint?
-
--# Add option to enable linking of bundled libraries (brotli, woff2, xxhash).
-+# Add option to enable linking of bundled libraries (brotli, potrace, woff2, xxhash).
- AC_ARG_ENABLE([bundled-libs],
- [AS_HELP_STRING([--enable-bundled-libs], [use bundled libraries instead of the system ones @<:@default=no@:>@])],
- [use_bundled_libs=yes])
- AM_CONDITIONAL([USE_BUNDLED_LIBS], [test "x$use_bundled_libs" = "xyes" dnl
- || test "x$enable_native_texlive_build" = xyes])
--# that is, use bundled libs for native TL build.
-+# that is, force using bundled libs for native TL build.
-
-+# TL: use bundled md5 too
-+AM_CONDITIONAL([USE_BUNDLED_MD5], true)
-+
- # TL: not going to build_manpage (which is the default).
- # TL: not going to attempt code coverage; need to subst it away.
- AM_CONDITIONAL([CODE_COVERAGE_ENABLED], false)
-@@ -210,6 +207,7 @@
- dvisvgm-src/libs/brotli/Makefile
- dvisvgm-src/libs/clipper/Makefile
- dvisvgm-src/libs/ff-woff/Makefile
-+ dvisvgm-src/libs/md5/Makefile
- dvisvgm-src/libs/potrace/Makefile
- dvisvgm-src/libs/variant/Makefile
- dvisvgm-src/libs/woff2/Makefile
-diff -u1r dvisvgm-2.6/Makefile.am dvisvgm-src/Makefile.am
---- dvisvgm-2.6/Makefile.am 2018-07-31 07:51:05.000000000 -0700
-+++ dvisvgm-src/Makefile.am 2018-09-11 08:17:11.309982883 -0700
-@@ -7,3 +7,3 @@
+diff -ur dvisvgm-2.6.1/Makefile.am dvisvgm-src/Makefile.am
+--- dvisvgm-2.6.1/Makefile.am 2018-09-20 04:39:12.000000000 -0700
++++ dvisvgm-src/Makefile.am 2018-10-28 11:05:34.960588136 -0700
+@@ -5,7 +5,7 @@
+
+ AUTOMAKE_OPTIONS = foreign
EXTRA_DIST = COPYING
-SUBDIRS = libs src tests doc
+SUBDIRS = libs src #not for TL: tests doc
ACLOCAL_AMFLAGS = -I m4
-diff -u1r dvisvgm-2.6/src/Makefile.am dvisvgm-src/src/Makefile.am
---- dvisvgm-2.6/src/Makefile.am 2018-09-08 00:57:37.000000000 -0700
-+++ dvisvgm-src/src/Makefile.am 2018-09-13 10:00:48.798891259 -0700
-@@ -14,6 +14,3 @@
+
+ if USE_BUNDLED_LIBS
+diff -ur dvisvgm-2.6.1/libs/defs.am dvisvgm-src/libs/defs.am
+--- dvisvgm-2.6.1/libs/defs.am 2018-10-10 02:02:17.000000000 -0700
++++ dvisvgm-src/libs/defs.am 2018-10-29 11:19:34.259446467 -0700
+@@ -1,23 +1,23 @@
+ if HAVE_BROTLI
+ else
+-BROTLI_CFLAGS += -I$(top_srcdir)/libs/brotli/include
+-BROTLI_LIBS += ../libs/brotli/libbrotli.a
++BROTLI_CFLAGS = -I$(dvisvgm_srcdir)/libs/brotli/include
++BROTLI_LIBS = ../libs/brotli/libbrotli.a
+ endif
+
+ if HAVE_POTRACE
+ else
+-POTRACE_CFLAGS = -I$(top_srcdir)/libs/potrace
++POTRACE_CFLAGS = -I$(dvisvgm_srcdir)/libs/potrace
+ POTRACE_LIBS = ../libs/potrace/libpotrace.a
+ endif
+
+ if HAVE_WOFF2
+ else
+-WOFF2_CFLAGS += -I$(top_srcdir)/libs/woff2/include
+-WOFF2_LIBS += ../libs/woff2/libwoff2.a
++WOFF2_CFLAGS = -I$(dvisvgm_srcdir)/libs/woff2/include
++WOFF2_LIBS = ../libs/woff2/libwoff2.a
+ endif
+
+ if HAVE_XXHASH
+ else
+-XXHASH_CFLAGS = -I$(top_srcdir)/libs/xxHash
++XXHASH_CFLAGS = -I$(dvisvgm_srcdir)/libs/xxHash
+ XXHASH_LIBS = ../libs/xxHash/libxxhash.a
+ endif
+diff -ur dvisvgm-2.6.1/src/Makefile.am dvisvgm-src/src/Makefile.am
+--- dvisvgm-2.6.1/src/Makefile.am 2018-10-10 02:02:17.000000000 -0700
++++ dvisvgm-src/src/Makefile.am 2018-10-29 14:31:28.299115543 -0700
+@@ -12,14 +12,13 @@
+
+ include ../libs/defs.am
+
++dvisvgm_srcdir = $(top_srcdir)/dvisvgm-src
++
+ dvisvgm_LDADD = \
$(noinst_LIBRARIES) \
-- ../libs/clipper/libclipper.a \
+ ../libs/clipper/libclipper.a \
- $(FREETYPE_LIBS) \
- $(FONTFORGE_LIBS) \
+ $(POTRACE_LIBS) \
+- $(XXHASH_LIBS) \
- $(ZLIB_LIBS)
-+ ../libs/clipper/libclipper.a
++ $(XXHASH_LIBS)
-@@ -49,3 +46,11 @@
+ if ENABLE_WOFF
+ dvisvgm_LDADD += \
+@@ -34,7 +33,15 @@
+ dvisvgm_LDADD += $(LIBCRYPTO_LIBS)
+ endif
+dvisvgm_LDADD += \
+ $(KPATHSEA_LIBS) \
@@ -93,12 +80,17 @@ diff -u1r dvisvgm-2.6/src/Makefile.am dvisvgm-src/src/Makefile.am
dvisvgm_DEPENDENCIES = $(noinst_LIBRARIES)
+dvisvgm_DEPENDENCIES += $(KPATHSEA_DEPEND) $(ZLIB_DEPEND) $(FREETYPE2_DEPEND)
-@@ -273,18 +278,16 @@
+ libdvisvgm_a_SOURCES = \
+ AGLTable.hpp \
+@@ -258,17 +265,13 @@
+
+ EXTRA_DIST = options.xml options.dtd iapi.h ierrors.h MiKTeXCom.hpp MiKTeXCom.cpp
-AM_CFLAGS = -Wall \
- $(ZLIB_CFLAGS) \
-- $(CODE_COVERAGE_CFLAGS)
-+dvisvgm_srcdir = $(top_srcdir)/dvisvgm-src
++AM_CFLAGS = $(WARNING_CFLAGS) \
++ $(ZLIB_INCLUDES) \
+ $(CODE_COVERAGE_CFLAGS)
-AM_CXXFLAGS = -Wall -Wnon-virtual-dtor -Wno-mismatched-tags \
- -I$(top_srcdir)/libs/clipper \
@@ -106,41 +98,36 @@ diff -u1r dvisvgm-2.6/src/Makefile.am dvisvgm-src/src/Makefile.am
- $(KPSE_CFLAGS) \
- $(FREETYPE_CFLAGS) \
- $(ZLIB_CFLAGS) \
-+AM_CFLAGS = $(WARNING_CFLAGS) \
-+ $(ZLIB_INCLUDES) \
- $(CODE_COVERAGE_CFLAGS)
-
+- $(CODE_COVERAGE_CFLAGS)
+AM_CXXFLAGS = $(WARNING_CFLAGS) -Wnon-virtual-dtor -Wno-mismatched-tags \
+ -I$(dvisvgm_srcdir)/libs/clipper \
+ -I$(dvisvgm_srcdir)/libs/variant/include
-+
- if USE_BUNDLED_LIBS
- AM_CXXFLAGS += \
-- -I$(top_srcdir)/libs/potrace \
-- -I$(top_srcdir)/libs/xxHash
-+ -I$(dvisvgm_srcdir)/libs/potrace \
-+ -I$(dvisvgm_srcdir)/libs/xxHash
- else
-@@ -301,4 +304,4 @@
+
+ AM_CXXFLAGS += \
+ $(POTRACE_CFLAGS) \
+@@ -280,8 +283,8 @@
+
+ if ENABLE_WOFF
AM_CFLAGS += \
- -I$(top_srcdir)/libs/ff-woff/fontforge \
- -I$(top_srcdir)/libs/ff-woff/inc
+ -I$(dvisvgm_srcdir)/libs/ff-woff/fontforge \
+ -I$(dvisvgm_srcdir)/libs/ff-woff/inc
-@@ -308,4 +311,4 @@
- AM_CXXFLAGS += \
-- -I$(top_srcdir)/libs/brotli/include \
-- -I$(top_srcdir)/libs/woff2/include
-+ -I$(dvisvgm_srcdir)/libs/brotli/include \
-+ -I$(dvisvgm_srcdir)/libs/woff2/include
- else
-@@ -317,3 +320,3 @@
+ AM_CXXFLAGS += $(TTFAUTOHINT_CFLAGS)
+
+@@ -290,7 +293,7 @@
+ $(WOFF2_CFLAGS)
+
if USE_BUNDLED_MD5
-AM_CXXFLAGS += -I$(top_srcdir)/libs/md5
+AM_CXXFLAGS += -I$(dvisvgm_srcdir)/libs/md5
else
-@@ -326,3 +329,16 @@
+ AM_CXXFLAGS += $(LIBCRYPTO_CFLAGS)
+ endif
+@@ -298,7 +301,20 @@
+ AM_LDFLAGS += $(TTFAUTOHINT_LIBS)
+ endif
+AM_CXXFLAGS += \
+ $(KPATHSEA_INCLUDES) \
@@ -157,11 +144,16 @@ diff -u1r dvisvgm-2.6/src/Makefile.am dvisvgm-src/src/Makefile.am
+if ! TEXLIVE_BUILD
+# TL: do not try to rebuild these source files.
# the command-line parser class is generated from options.xml by opt2cpp
-@@ -339,2 +355,3 @@
+ $(srcdir)/CommandLine.hpp: options.xml
+ rm -f $@
+@@ -311,7 +327,15 @@
+ fi
+
psdefs.ps: ;
+endif ! TEXLIVE_BUILD
-@@ -343 +360,8 @@
+ @CODE_COVERAGE_RULES@
+
CLEANFILES = *.gcda *.gcno
+
+## Rebuild libkpathsea
@@ -170,32 +162,3 @@ diff -u1r dvisvgm-2.6/src/Makefile.am dvisvgm-src/src/Makefile.am
+@FREETYPE2_RULE@
+## Rebuild libz
+@ZLIB_RULE@
-diff -u1r dvisvgm-2.6/src/XXHashFunction.hpp dvisvgm-src/src/XXHashFunction.hpp
---- dvisvgm-2.6/src/XXHashFunction.hpp 2018-09-08 00:57:37.000000000 -0700
-+++ dvisvgm-src/src/XXHashFunction.hpp 2018-09-13 09:16:09.902914484 -0700
-@@ -34,7 +34,7 @@
- using State = XXH32_state_t;
-- static constexpr auto createState = XXH32_createState;
-- static constexpr auto freeState = XXH32_freeState;
-- static constexpr auto reset = XXH32_reset;
-- static constexpr auto update = XXH32_update;
-- static constexpr auto digest = XXH32_digest;
-+ static constexpr auto createState = &XXH32_createState;
-+ static constexpr auto freeState = &XXH32_freeState;
-+ static constexpr auto reset = &XXH32_reset;
-+ static constexpr auto update = &XXH32_update;
-+ static constexpr auto digest = &XXH32_digest;
- };
-@@ -44,7 +44,7 @@
- using State = XXH64_state_t;
-- static constexpr auto createState = XXH64_createState;
-- static constexpr auto freeState = XXH64_freeState;
-- static constexpr auto reset = XXH64_reset;
-- static constexpr auto update = XXH64_update;
-- static constexpr auto digest = XXH64_digest;
-+ static constexpr auto createState = &XXH64_createState;
-+ static constexpr auto freeState = &XXH64_freeState;
-+ static constexpr auto reset = &XXH64_reset;
-+ static constexpr auto update = &XXH64_update;
-+ static constexpr auto digest = &XXH64_digest;
- };