summaryrefslogtreecommitdiff
path: root/Build/source
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2013-09-11 08:08:07 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2013-09-11 08:08:07 +0000
commit1daa0129101f69c77a1c7047b598e223125e72a1 (patch)
treed9ce0ff50f463f3399fb03a9a35e8aa84ed64c62 /Build/source
parent2aa6f38d4ea012223970ea9cffb748410c16e76c (diff)
lcdf-typetools: W32TeX uodate (from Akira)
Prepare for SELFAUTOGRANDPARENT (for stanalone build) git-svn-id: svn://tug.org/texlive/trunk@31630 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r--Build/source/Makefile.in1
-rw-r--r--Build/source/aclocal.m41
-rwxr-xr-xBuild/source/configure8
-rw-r--r--Build/source/m4/kpse-freetype-flags.m429
-rw-r--r--Build/source/m4/kpse-pkgs.m41
-rw-r--r--Build/source/texk/lcdf-typetools/ChangeLog4
-rw-r--r--Build/source/texk/lcdf-typetools/autoconf.h.in3
-rwxr-xr-xBuild/source/texk/lcdf-typetools/configure8
-rw-r--r--Build/source/texk/lcdf-typetools/configure.ac4
-rw-r--r--Build/source/texk/lcdf-typetools/lcdf-typetools-2.99-PATCHES/ChangeLog8
-rw-r--r--Build/source/texk/lcdf-typetools/lcdf-typetools-2.99-PATCHES/patch-10-SELFAUTO36
-rw-r--r--Build/source/texk/lcdf-typetools/lcdf-typetools-2.99-PATCHES/patch-30-W32TeX304
-rw-r--r--Build/source/texk/lcdf-typetools/lcdf-typetools-2.99/configure.ac4
-rw-r--r--Build/source/texk/lcdf-typetools/lcdf-typetools-2.99/otftotfm/automatic.cc4
-rw-r--r--Build/source/texk/lcdf-typetools/lcdf-typetools-2.99/otftotfm/kpseinterface.c148
-rw-r--r--Build/source/texk/lcdf-typetools/lcdf-typetools-2.99/otftotfm/kpseinterface.h5
-rw-r--r--Build/source/texk/lcdf-typetools/lcdf-typetools-2.99/otftotfm/otftotfm.cc37
-rw-r--r--Build/source/texk/lcdf-typetools/lcdf-typetools-2.99/otftotfm/secondary.cc4
18 files changed, 135 insertions, 474 deletions
diff --git a/Build/source/Makefile.in b/Build/source/Makefile.in
index 78690f2c708..11b630a2124 100644
--- a/Build/source/Makefile.in
+++ b/Build/source/Makefile.in
@@ -95,7 +95,6 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/kpse-cairo-flags.m4 \
$(top_srcdir)/m4/kpse-common.m4 \
$(top_srcdir)/m4/kpse-cxx-hack.m4 \
- $(top_srcdir)/m4/kpse-freetype-flags.m4 \
$(top_srcdir)/m4/kpse-freetype2-flags.m4 \
$(top_srcdir)/m4/kpse-gd-flags.m4 \
$(top_srcdir)/m4/kpse-graphite2-flags.m4 \
diff --git a/Build/source/aclocal.m4 b/Build/source/aclocal.m4
index d4098148f25..48a7339ff4e 100644
--- a/Build/source/aclocal.m4
+++ b/Build/source/aclocal.m4
@@ -1186,7 +1186,6 @@ AC_SUBST([am__untar])
m4_include([m4/kpse-cairo-flags.m4])
m4_include([m4/kpse-common.m4])
m4_include([m4/kpse-cxx-hack.m4])
-m4_include([m4/kpse-freetype-flags.m4])
m4_include([m4/kpse-freetype2-flags.m4])
m4_include([m4/kpse-gd-flags.m4])
m4_include([m4/kpse-graphite2-flags.m4])
diff --git a/Build/source/configure b/Build/source/configure
index 3c178d3100a..8af05266bb4 100755
--- a/Build/source/configure
+++ b/Build/source/configure
@@ -20325,14 +20325,6 @@ elif test "x$need_libpng:$with_system_libpng" = xyes:yes; then
as_fn_error $? "did not find libpng" "$LINENO" 5
fi
-if test "x$with_freetype_includes" != x && test "x$with_freetype_includes" != xyes; then
- FREETYPE_INCLUDES="-I$with_freetype_includes"
-fi
-FREETYPE_LIBS="-lttf"
-if test "x$with_freetype_libdir" != x && test "x$with_freetype_libdir" != xyes; then
- FREETYPE_LIBS="-L$with_freetype_libdir $FREETYPE_LIBS"
-fi
-
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}freetype-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}freetype-config; ac_word=$2
diff --git a/Build/source/m4/kpse-freetype-flags.m4 b/Build/source/m4/kpse-freetype-flags.m4
deleted file mode 100644
index ed28c506d6d..00000000000
--- a/Build/source/m4/kpse-freetype-flags.m4
+++ /dev/null
@@ -1,29 +0,0 @@
-# Public macros for the TeX Live (TL) tree.
-# Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org>
-#
-# This file is free software; the copyright holder
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 0
-
-# KPSE_FREETYPE_FLAGS
-# -------------------
-# Provide the configure options '--with-system-freetype' (if in the TL tree),
-# '--with-freetype-includes', and '--with-freetype-libdir'.
-#
-# Set the make variables FREETYPE_INCLUDES and FREETYPE_LIBS to the CPPFLAGS and
-# LIBS required for the `-lttf' library in libs/freetype/ of the TL tree.
-AC_DEFUN([KPSE_FREETYPE_FLAGS],
-[_KPSE_LIB_FLAGS([freetype], [ttf], [],
- [-IBLD/libs/freetype/freetype], [BLD/libs/freetype/libttf.a], [],
- [], [${top_builddir}/../../libs/freetype/freetype/freetype.h])[]dnl
-]) # KPSE_FREETYPE_FLAGS
-
-# KPSE_FREETYPE_OPTIONS([WITH-SYSTEM])
-# ------------------------------------
-AC_DEFUN([KPSE_FREETYPE_OPTIONS], [_KPSE_LIB_OPTIONS([freetype], [$1])])
-
-# KPSE_FREETYPE_SYSTEM_FLAGS
-# --------------------------
-AC_DEFUN([KPSE_FREETYPE_SYSTEM_FLAGS], [_KPSE_LIB_FLAGS_SYSTEM([freetype], [ttf])])
diff --git a/Build/source/m4/kpse-pkgs.m4 b/Build/source/m4/kpse-pkgs.m4
index 2fb6883dfb2..c226076eaa4 100644
--- a/Build/source/m4/kpse-pkgs.m4
+++ b/Build/source/m4/kpse-pkgs.m4
@@ -54,7 +54,6 @@ AC_REQUIRE([KPSE_KPATHSEA_SYSTEM_FLAGS])[]dnl
AC_REQUIRE([KPSE_PTEXENC_SYSTEM_FLAGS])[]dnl
AC_REQUIRE([KPSE_ZLIB_SYSTEM_FLAGS])[]dnl
AC_REQUIRE([KPSE_LIBPNG_SYSTEM_FLAGS])[]dnl
-AC_REQUIRE([KPSE_FREETYPE_SYSTEM_FLAGS])[]dnl
AC_REQUIRE([KPSE_FREETYPE2_SYSTEM_FLAGS])[]dnl
AC_REQUIRE([KPSE_GD_SYSTEM_FLAGS])[]dnl
AC_REQUIRE([KPSE_POTRACE_SYSTEM_FLAGS])[]dnl
diff --git a/Build/source/texk/lcdf-typetools/ChangeLog b/Build/source/texk/lcdf-typetools/ChangeLog
index 99fb18ad5c4..aedd8b88ff2 100644
--- a/Build/source/texk/lcdf-typetools/ChangeLog
+++ b/Build/source/texk/lcdf-typetools/ChangeLog
@@ -1,3 +1,7 @@
+2013-09-11 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * configure.ac: Prepare for SELFAUTOGRANDPARENT in TL'14.
+
2013-09-10 Peter Breitenlohner <peb@mppmu.mpg.de>
Import lcdf-typetools-2.99.
diff --git a/Build/source/texk/lcdf-typetools/autoconf.h.in b/Build/source/texk/lcdf-typetools/autoconf.h.in
index 01a053e79b1..ecea24f0901 100644
--- a/Build/source/texk/lcdf-typetools/autoconf.h.in
+++ b/Build/source/texk/lcdf-typetools/autoconf.h.in
@@ -254,6 +254,9 @@
/* kpsewhich's $SELFAUTODIR variable */
#undef SELFAUTODIR
+/* kpsewhich's $SELFAUTOGRANDPARENT variable */
+#undef SELFAUTOGRANDPARENT
+
/* kpsewhich's $SELFAUTOLOC variable */
#undef SELFAUTOLOC
diff --git a/Build/source/texk/lcdf-typetools/configure b/Build/source/texk/lcdf-typetools/configure
index ec6b860b83e..c2b1ab52b03 100755
--- a/Build/source/texk/lcdf-typetools/configure
+++ b/Build/source/texk/lcdf-typetools/configure
@@ -20617,6 +20617,7 @@ if test "x$enable_selfauto_set" = xyes -a "x$kpathsea" != xno -a "x$enable_texli
SELFAUTOLOC=`$kpsewhich --expand-var='$SELFAUTOLOC' 2>/dev/null`
SELFAUTODIR=`$kpsewhich --expand-var='$SELFAUTODIR' 2>/dev/null`
SELFAUTOPARENT=`$kpsewhich --expand-var='$SELFAUTOPARENT' 2>/dev/null`
+ SELFAUTOGRANDPARENT=`$kpsewhich --expand-var='$SELFAUTOGRANDPARENT' 2>/dev/null`
if test -z "$SELFAUTODIR"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
=========================================
@@ -20650,6 +20651,13 @@ cat >>confdefs.h <<_ACEOF
#define SELFAUTOPARENT "$SELFAUTOPARENT"
_ACEOF
+ if test -n "$SELFAUTOGRANDPARENT"; then
+
+cat >>confdefs.h <<_ACEOF
+#define SELFAUTOGRANDPARENT "$SELFAUTOGRANDPARENT"
+_ACEOF
+
+ fi
fi
diff --git a/Build/source/texk/lcdf-typetools/configure.ac b/Build/source/texk/lcdf-typetools/configure.ac
index 68f03c0eb11..0a1448b39bf 100644
--- a/Build/source/texk/lcdf-typetools/configure.ac
+++ b/Build/source/texk/lcdf-typetools/configure.ac
@@ -344,6 +344,7 @@ if test "x$enable_selfauto_set" = xyes -a "x$kpathsea" != xno -a "x$enable_texli
SELFAUTOLOC=`$kpsewhich --expand-var='$SELFAUTOLOC' 2>/dev/null`
SELFAUTODIR=`$kpsewhich --expand-var='$SELFAUTODIR' 2>/dev/null`
SELFAUTOPARENT=`$kpsewhich --expand-var='$SELFAUTOPARENT' 2>/dev/null`
+ SELFAUTOGRANDPARENT=`$kpsewhich --expand-var='$SELFAUTOGRANDPARENT' 2>/dev/null`
if test -z "$SELFAUTODIR"; then
AC_MSG_WARN([
=========================================
@@ -357,6 +358,9 @@ Either supply the correct PREFIX to --with-kpathsea, or supply
AC_DEFINE_UNQUOTED([SELFAUTOLOC], "$SELFAUTOLOC", [kpsewhich's $SELFAUTOLOC variable])
AC_DEFINE_UNQUOTED([SELFAUTODIR], "$SELFAUTODIR", [kpsewhich's $SELFAUTODIR variable])
AC_DEFINE_UNQUOTED([SELFAUTOPARENT], "$SELFAUTOPARENT", [kpsewhich's $SELFAUTOPARENT variable])
+ if test -n "$SELFAUTOGRANDPARENT"; then
+ AC_DEFINE_UNQUOTED([SELFAUTOGRANDPARENT], "$SELFAUTOGRANDPARENT", [kpsewhich's $SELFAUTOGRANDPARENT variable])
+ fi
fi
diff --git a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.99-PATCHES/ChangeLog b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.99-PATCHES/ChangeLog
index 1d913f6c0aa..cc6289f933c 100644
--- a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.99-PATCHES/ChangeLog
+++ b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.99-PATCHES/ChangeLog
@@ -1,4 +1,10 @@
-2013-00-10 Peter Breitenlohner <peb@mppmu.mpg.de>
+2013-09-11 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * patch-10-SELFAUTO (new): Prepare for SELFAUTOGRANDPARENT.
+
+ * patch-30-W32TeX: Now for Visual Studio 2010 (from Akira).
+
+2013-09-10 Peter Breitenlohner <peb@mppmu.mpg.de>
Import lcdf-typetools-2.99.
diff --git a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.99-PATCHES/patch-10-SELFAUTO b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.99-PATCHES/patch-10-SELFAUTO
new file mode 100644
index 00000000000..a2e4f26b223
--- /dev/null
+++ b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.99-PATCHES/patch-10-SELFAUTO
@@ -0,0 +1,36 @@
+ Prepare for SELFAUTOGRANDPARENT to be used in TL'14.
+
+diff -ur -x Makefile.in -x aclocal.m4 -x autoconf.h.in -x configure lcdf-typetools-2.99.orig/configure.ac lcdf-typetools-2.99/configure.ac
+--- lcdf-typetools-2.99.orig/configure.ac 2013-08-13 23:31:39.000000000 +0200
++++ lcdf-typetools-2.99/configure.ac 2013-09-11 08:58:14.000000000 +0200
+@@ -423,6 +423,7 @@
+ SELFAUTOLOC=`$kpsewhich --expand-var='$SELFAUTOLOC' 2>/dev/null`
+ SELFAUTODIR=`$kpsewhich --expand-var='$SELFAUTODIR' 2>/dev/null`
+ SELFAUTOPARENT=`$kpsewhich --expand-var='$SELFAUTOPARENT' 2>/dev/null`
++ SELFAUTOGRANDPARENT=`$kpsewhich --expand-var='$SELFAUTOGRANDPARENT' 2>/dev/null`
+ if test -z "$SELFAUTODIR"; then
+ AC_MSG_WARN([
+ =========================================
+@@ -436,6 +437,9 @@
+ AC_DEFINE_UNQUOTED([SELFAUTOLOC], "$SELFAUTOLOC", [kpsewhich's $SELFAUTOLOC variable])
+ AC_DEFINE_UNQUOTED([SELFAUTODIR], "$SELFAUTODIR", [kpsewhich's $SELFAUTODIR variable])
+ AC_DEFINE_UNQUOTED([SELFAUTOPARENT], "$SELFAUTOPARENT", [kpsewhich's $SELFAUTOPARENT variable])
++ if test -n "$SELFAUTOGRANDPARENT"; then
++ AC_DEFINE_UNQUOTED([SELFAUTOGRANDPARENT], "$SELFAUTOGRANDPARENT", [kpsewhich's $SELFAUTOGRANDPARENT variable])
++ fi
+ fi
+
+
+diff -ur -x Makefile.in -x aclocal.m4 -x autoconf.h.in -x configure lcdf-typetools-2.99.orig/otftotfm/kpseinterface.c lcdf-typetools-2.99/otftotfm/kpseinterface.c
+--- lcdf-typetools-2.99.orig/otftotfm/kpseinterface.c 2013-08-13 22:18:57.000000000 +0200
++++ lcdf-typetools-2.99/otftotfm/kpseinterface.c 2013-09-11 08:54:18.000000000 +0200
+@@ -38,6 +38,9 @@
+ #ifdef SELFAUTOPARENT
+ putenv("SELFAUTOPARENT=" SELFAUTOPARENT);
+ #endif
++#ifdef SELFAUTOGRANDPARENT
++ putenv("SELFAUTOGRANDPARENT=" SELFAUTOGRANDPARENT);
++#endif
+ }
+
+ char*
diff --git a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.99-PATCHES/patch-30-W32TeX b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.99-PATCHES/patch-30-W32TeX
index bddeaacd6c3..26c6df2aca7 100644
--- a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.99-PATCHES/patch-30-W32TeX
+++ b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.99-PATCHES/patch-30-W32TeX
@@ -1,7 +1,18 @@
diff -ur -x Makefile.in -x aclocal.m4 -x autoconf.h.in -x configure lcdf-typetools-2.99.orig/otftotfm/automatic.cc lcdf-typetools-2.99/otftotfm/automatic.cc
--- lcdf-typetools-2.99.orig/otftotfm/automatic.cc 2013-09-10 11:05:27.000000000 +0200
-+++ lcdf-typetools-2.99/otftotfm/automatic.cc 2013-09-10 11:06:31.000000000 +0200
-@@ -124,7 +124,18 @@
++++ lcdf-typetools-2.99/otftotfm/automatic.cc 2013-09-10 19:13:50.000000000 +0200
+@@ -39,6 +39,10 @@
+ #include <algorithm>
+
+ #ifdef WIN32
++#ifdef _MSC_VER
++# include <io.h>
++# include <direct.h>
++#endif
+ # define mkdir(dir, access) mkdir(dir)
+ # define COPY_CMD "copy"
+ # define CMD_SEP "&"
+@@ -124,7 +128,18 @@
static void
find_writable_texdir(ErrorHandler *errh, const char *)
{
@@ -20,7 +31,7 @@ diff -ur -x Makefile.in -x aclocal.m4 -x autoconf.h.in -x configure lcdf-typetoo
if (!writable_texdir)
look_for_writable_texdir("$VARTEXMF", false);
if (!writable_texdir)
-@@ -745,6 +756,14 @@
+@@ -745,6 +760,14 @@
int slash = filename.find_right('\'');
if (slash >= 0)
filename = filename.substring(slash + 1);
@@ -36,211 +47,39 @@ diff -ur -x Makefile.in -x aclocal.m4 -x autoconf.h.in -x configure lcdf-typetoo
if (verbose)
command += " 1>&2";
diff -ur -x Makefile.in -x aclocal.m4 -x autoconf.h.in -x configure lcdf-typetools-2.99.orig/otftotfm/kpseinterface.c lcdf-typetools-2.99/otftotfm/kpseinterface.c
---- lcdf-typetools-2.99.orig/otftotfm/kpseinterface.c 2013-08-13 22:18:57.000000000 +0200
-+++ lcdf-typetools-2.99/otftotfm/kpseinterface.c 2013-09-10 11:06:31.000000000 +0200
-@@ -11,24 +11,112 @@
- * Public License for more details.
- */
-
-+/* The W32TEX version does not link to Kpathsea, but uses the DLL
-+ * built by MSVC.
-+ */
-+
-+#if !defined(W32TEX)
- #include <kpathsea/config.h>
-+#endif
- #ifdef HAVE_CONFIG_H
- # include <config.h>
- #endif
- #include <stdio.h>
- #include <stdlib.h>
-+#ifdef W32TEX
-+#define ENV_SEP ';'
-+#include <windows.h>
-+extern HINSTANCE Hinstance;
-+#else
- #include <kpathsea/progname.h>
+--- lcdf-typetools-2.99.orig/otftotfm/kpseinterface.c 2013-09-11 08:54:18.000000000 +0200
++++ lcdf-typetools-2.99/otftotfm/kpseinterface.c 2013-09-11 09:02:02.000000000 +0200
+@@ -21,6 +21,9 @@
#include <kpathsea/expand.h>
#include <kpathsea/c-pathch.h>
#include <kpathsea/tex-file.h>
++#ifdef W32TEX
++#include <kpathsea/variable.h>
+#endif
#include "kpseinterface.h"
int kpsei_env_sep_char = ENV_SEP;
-
-+#ifdef W32TEX
-+typedef enum
-+{
-+ kpse_gf_format,
-+ kpse_pk_format,
-+ kpse_any_glyph_format, /* ``any'' meaning gf or pk */
-+ kpse_tfm_format,
-+ kpse_afm_format,
-+ kpse_base_format,
-+ kpse_bib_format,
-+ kpse_bst_format,
-+ kpse_cnf_format,
-+ kpse_db_format,
-+ kpse_fmt_format,
-+ kpse_fontmap_format,
-+ kpse_mem_format,
-+ kpse_mf_format,
-+ kpse_mfpool_format,
-+ kpse_mft_format,
-+ kpse_mp_format,
-+ kpse_mppool_format,
-+ kpse_mpsupport_format,
-+ kpse_ocp_format,
-+ kpse_ofm_format,
-+ kpse_opl_format,
-+ kpse_otp_format,
-+ kpse_ovf_format,
-+ kpse_ovp_format,
-+ kpse_pict_format,
-+ kpse_tex_format,
-+ kpse_texdoc_format,
-+ kpse_texpool_format,
-+ kpse_texsource_format,
-+ kpse_tex_ps_header_format,
-+ kpse_troff_font_format,
-+ kpse_type1_format,
-+ kpse_vf_format,
-+ kpse_dvips_config_format,
-+ kpse_ist_format,
-+ kpse_truetype_format,
-+ kpse_type42_format,
-+ kpse_web2c_format,
-+ kpse_program_text_format,
-+ kpse_program_binary_format,
-+ kpse_miscfonts_format,
-+ kpse_web_format,
-+ kpse_cweb_format,
-+ kpse_enc_format,
-+ kpse_cmap_format,
-+ kpse_sfd_format,
-+ kpse_opentype_format,
-+ kpse_pdftex_config_format,
-+ kpse_lig_format,
-+ kpse_texmfscripts_format,
-+ kpse_lua_format,
-+ kpse_fea_format,
-+ kpse_cid_format,
-+ kpse_mlbib_format,
-+ kpse_mlbst_format,
-+ kpse_clua_format,
-+ kpse_ris_format,
-+ kpse_bltxml_format,
-+ kpse_last_format /* one past last index */
-+} kpse_file_format_type;
-+#endif
-+
- void
- kpsei_init(const char* argv0, const char* progname)
+@@ -86,3 +89,11 @@
{
-+#ifdef W32TEX
-+ PROC pkpse_set_program_name;
-+ pkpse_set_program_name = GetProcAddress(Hinstance, "kpse_set_program_name");
-+ if(!pkpse_set_program_name) {
-+ fprintf(stderr, "Failed to find Kpathsea function.\n");
-+ return;
-+ }
-+ (void)pkpse_set_program_name(argv0, progname);
-+#else
- kpse_set_program_name(argv0, progname);
-+#endif
- #ifdef SELFAUTODIR
- putenv("SELFAUTODIR=" SELFAUTODIR);
- #endif
-@@ -43,13 +131,35 @@
- char*
- kpsei_path_expand(const char* path)
- {
-+#ifdef W32TEX
-+ PROC pkpse_path_expand;
-+ pkpse_path_expand = GetProcAddress(Hinstance, "kpse_path_expand");
-+ if(!pkpse_path_expand) {
-+ fprintf(stderr, "Failed to find Kpathsea function.\n");
-+ return 0;
-+ }
-+ return (char *)pkpse_path_expand(path);
-+#else
- return kpse_path_expand(path);
-+#endif
- }
-
-+#ifdef W32TEX
-+#define kpse_find_file (char *)pkpse_find_file
-+#endif
-+
- char*
- kpsei_find_file(const char* name, int format)
- {
- char *result;
-+#ifdef W32TEX
-+ PROC pkpse_find_file;
-+ pkpse_find_file = GetProcAddress(Hinstance, "kpse_find_file");
-+ if(!pkpse_find_file) {
-+ fprintf(stderr, "Failed to find Kpathsea function.\n");
-+ return 0;
-+ }
-+#endif
- switch (format) {
- case KPSEI_FMT_WEB2C:
- return kpse_find_file(name, kpse_web2c_format, true);
-@@ -81,5 +191,41 @@
- void
- kpsei_set_debug_flags(unsigned flags)
- {
-+#ifdef W32TEX
-+ unsigned int *pkpathsea_debug;
-+ pkpathsea_debug = (unsigned int *)GetProcAddress(Hinstance, "kpathsea_debug");
-+ if(!pkpathsea_debug) {
-+ fprintf(stderr, "Failed to find Kpathsea variable.\n");
-+ return;
-+ }
-+ *pkpathsea_debug = flags;
-+#else
kpathsea_debug = flags;
-+#endif
-+}
-+
-+#ifdef W32TEX
-+int
-+kpsei_getlongpath(char *buff, char *input, int len)
-+{
-+ PROC pkpse_getlongpath;
-+ pkpse_getlongpath = GetProcAddress(Hinstance, "getlongpath");
-+ if(!pkpse_getlongpath) {
-+ fprintf(stderr, "Failed to find Kpathsea function.\n");
-+ return 0;
-+ }
-+ return (int)pkpse_getlongpath(buff, input, len);
}
+
-+char *
-+kpsei_var_value(const char *var)
++#ifdef W32TEX
++char*
++kpsei_var_value(const char *name)
+{
-+ PROC pkpse_var_value;
-+ pkpse_var_value = GetProcAddress(Hinstance, "kpse_var_value");
-+ if(!pkpse_var_value) {
-+ fprintf(stderr, "Failed to find Kpathsea function.\n");
-+ return NULL;
-+ }
-+ return (char *)pkpse_var_value(var);
++ return kpse_var_value(name);
+}
+#endif
diff -ur -x Makefile.in -x aclocal.m4 -x autoconf.h.in -x configure lcdf-typetools-2.99.orig/otftotfm/kpseinterface.h lcdf-typetools-2.99/otftotfm/kpseinterface.h
--- lcdf-typetools-2.99.orig/otftotfm/kpseinterface.h 2013-08-13 22:12:16.000000000 +0200
-+++ lcdf-typetools-2.99/otftotfm/kpseinterface.h 2013-09-10 11:06:31.000000000 +0200
-@@ -13,6 +13,13 @@
++++ lcdf-typetools-2.99/otftotfm/kpseinterface.h 2013-09-10 19:13:50.000000000 +0200
+@@ -13,6 +13,10 @@
char* kpsei_find_file(const char* name, int format);
void kpsei_set_debug_flags(unsigned flags);
+#ifdef W32TEX
-+int kpsei_getlongpath(char *buff, char *input, int len);
-+char *kpsei_var_value(const char *var);
-+#define true 1
-+#define false 0
++char* kpsei_var_value(const char *name);
+#endif
+
#ifdef __cplusplus
@@ -248,78 +87,29 @@ diff -ur -x Makefile.in -x aclocal.m4 -x autoconf.h.in -x configure lcdf-typetoo
#endif
diff -ur -x Makefile.in -x aclocal.m4 -x autoconf.h.in -x configure lcdf-typetools-2.99.orig/otftotfm/otftotfm.cc lcdf-typetools-2.99/otftotfm/otftotfm.cc
--- lcdf-typetools-2.99.orig/otftotfm/otftotfm.cc 2013-09-10 11:00:57.000000000 +0200
-+++ lcdf-typetools-2.99/otftotfm/otftotfm.cc 2013-09-10 11:06:31.000000000 +0200
-@@ -1739,6 +1739,11 @@
- }
- }
-
-+#ifdef W32TEX
-+#include <windows.h>
-+HINSTANCE Hinstance;
-+#endif
-+
- int
- main(int argc, char *argv[])
- {
-@@ -1750,6 +1755,15 @@
- Clp_AddType(clp, CHAR_OPTTYPE, 0, clp_parse_char, 0);
- program_name = Clp_ProgramName(clp);
- #if HAVE_KPATHSEA
-+#ifdef W32TEX
-+ Hinstance = LoadLibrary(KPSEDLLNAME);
-+ if(Hinstance == NULL)
-+ Hinstance = LoadLibrary(KPSEOLDDLLNAME);
-+ if(Hinstance == NULL) {
-+ fprintf(stderr, "I cannot load Kpathsea dynamic library.\n");
-+ return 100;
-+ }
-+#endif
- kpsei_init(argv[0], "lcdftools");
++++ lcdf-typetools-2.99/otftotfm/otftotfm.cc 2013-09-10 19:13:50.000000000 +0200
+@@ -63,6 +63,10 @@
+ #ifdef HAVE_FCNTL_H
+ # include <fcntl.h>
#endif
- #ifdef HAVE_CTIME
-@@ -2121,11 +2135,19 @@
- This is free software; see the source for copying conditions.\n\
- There is NO warranty, not even for merchantability or fitness for a\n\
- particular purpose.\n");
-+#ifdef W32TEX
-+ if(Hinstance != NULL)
-+ FreeLibrary(Hinstance);
++#ifdef _MSC_VER
++# include <io.h>
++#undef max
+#endif
- exit(0);
- break;
- case HELP_OPT:
- usage();
-+#ifdef W32TEX
-+ if(Hinstance != NULL)
-+ FreeLibrary(Hinstance);
-+#endif
- exit(0);
- break;
+ using namespace Efont;
-@@ -2181,8 +2203,13 @@
- try {
- // read font
- otf_data = read_file(input_file, errh);
-- if (errh->nerrors())
-+ if (errh->nerrors()) {
-+#ifdef W32TEX
-+ if(Hinstance != NULL)
-+ FreeLibrary(Hinstance);
+diff -ur -x Makefile.in -x aclocal.m4 -x autoconf.h.in -x configure lcdf-typetools-2.99.orig/otftotfm/secondary.cc lcdf-typetools-2.99/otftotfm/secondary.cc
+--- lcdf-typetools-2.99.orig/otftotfm/secondary.cc 2013-08-13 22:18:57.000000000 +0200
++++ lcdf-typetools-2.99/otftotfm/secondary.cc 2013-09-10 19:13:50.000000000 +0200
+@@ -31,6 +31,10 @@
+ #include <errno.h>
+ #include <limits.h>
+ #include <algorithm>
++#ifdef _MSC_VER
++#undef max
++#undef min
+#endif
- exit(1);
-+ }
- LandmarkErrorHandler cerrh(errh, printable_filename(input_file));
- BailErrorHandler bail_errh(&cerrh);
-@@ -2271,6 +2298,10 @@
- } catch (OpenType::Error e) {
- errh->error("unhandled exception %<%s%>", e.description.c_str());
- }
-+#ifdef W32TEX
-+ if(Hinstance != NULL)
-+ FreeLibrary(Hinstance);
-+#endif
-
- return (errh->nerrors() == 0 ? 0 : 1);
- }
+ enum {
+ U_EXCLAMDOWN = 0x00A1, // U+00A1 INVERTED EXCLAMATION MARK
diff --git a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.99/configure.ac b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.99/configure.ac
index 1951e6da3b8..20dd18c1e81 100644
--- a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.99/configure.ac
+++ b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.99/configure.ac
@@ -423,6 +423,7 @@ if test "x$enable_selfauto_set" = xyes -a "x$kpathsea" != xno; then
SELFAUTOLOC=`$kpsewhich --expand-var='$SELFAUTOLOC' 2>/dev/null`
SELFAUTODIR=`$kpsewhich --expand-var='$SELFAUTODIR' 2>/dev/null`
SELFAUTOPARENT=`$kpsewhich --expand-var='$SELFAUTOPARENT' 2>/dev/null`
+ SELFAUTOGRANDPARENT=`$kpsewhich --expand-var='$SELFAUTOGRANDPARENT' 2>/dev/null`
if test -z "$SELFAUTODIR"; then
AC_MSG_WARN([
=========================================
@@ -436,6 +437,9 @@ Either supply the correct PREFIX to --with-kpathsea, or supply
AC_DEFINE_UNQUOTED([SELFAUTOLOC], "$SELFAUTOLOC", [kpsewhich's $SELFAUTOLOC variable])
AC_DEFINE_UNQUOTED([SELFAUTODIR], "$SELFAUTODIR", [kpsewhich's $SELFAUTODIR variable])
AC_DEFINE_UNQUOTED([SELFAUTOPARENT], "$SELFAUTOPARENT", [kpsewhich's $SELFAUTOPARENT variable])
+ if test -n "$SELFAUTOGRANDPARENT"; then
+ AC_DEFINE_UNQUOTED([SELFAUTOGRANDPARENT], "$SELFAUTOGRANDPARENT", [kpsewhich's $SELFAUTOGRANDPARENT variable])
+ fi
fi
diff --git a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.99/otftotfm/automatic.cc b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.99/otftotfm/automatic.cc
index aae70b16b58..bf7dd84f048 100644
--- a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.99/otftotfm/automatic.cc
+++ b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.99/otftotfm/automatic.cc
@@ -39,6 +39,10 @@
#include <algorithm>
#ifdef WIN32
+#ifdef _MSC_VER
+# include <io.h>
+# include <direct.h>
+#endif
# define mkdir(dir, access) mkdir(dir)
# define COPY_CMD "copy"
# define CMD_SEP "&"
diff --git a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.99/otftotfm/kpseinterface.c b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.99/otftotfm/kpseinterface.c
index e42b81fa24a..302dfb20d4c 100644
--- a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.99/otftotfm/kpseinterface.c
+++ b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.99/otftotfm/kpseinterface.c
@@ -11,112 +11,27 @@
* Public License for more details.
*/
-/* The W32TEX version does not link to Kpathsea, but uses the DLL
- * built by MSVC.
- */
-
-#if !defined(W32TEX)
#include <kpathsea/config.h>
-#endif
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdio.h>
#include <stdlib.h>
-#ifdef W32TEX
-#define ENV_SEP ';'
-#include <windows.h>
-extern HINSTANCE Hinstance;
-#else
#include <kpathsea/progname.h>
#include <kpathsea/expand.h>
#include <kpathsea/c-pathch.h>
#include <kpathsea/tex-file.h>
+#ifdef W32TEX
+#include <kpathsea/variable.h>
#endif
#include "kpseinterface.h"
int kpsei_env_sep_char = ENV_SEP;
-#ifdef W32TEX
-typedef enum
-{
- kpse_gf_format,
- kpse_pk_format,
- kpse_any_glyph_format, /* ``any'' meaning gf or pk */
- kpse_tfm_format,
- kpse_afm_format,
- kpse_base_format,
- kpse_bib_format,
- kpse_bst_format,
- kpse_cnf_format,
- kpse_db_format,
- kpse_fmt_format,
- kpse_fontmap_format,
- kpse_mem_format,
- kpse_mf_format,
- kpse_mfpool_format,
- kpse_mft_format,
- kpse_mp_format,
- kpse_mppool_format,
- kpse_mpsupport_format,
- kpse_ocp_format,
- kpse_ofm_format,
- kpse_opl_format,
- kpse_otp_format,
- kpse_ovf_format,
- kpse_ovp_format,
- kpse_pict_format,
- kpse_tex_format,
- kpse_texdoc_format,
- kpse_texpool_format,
- kpse_texsource_format,
- kpse_tex_ps_header_format,
- kpse_troff_font_format,
- kpse_type1_format,
- kpse_vf_format,
- kpse_dvips_config_format,
- kpse_ist_format,
- kpse_truetype_format,
- kpse_type42_format,
- kpse_web2c_format,
- kpse_program_text_format,
- kpse_program_binary_format,
- kpse_miscfonts_format,
- kpse_web_format,
- kpse_cweb_format,
- kpse_enc_format,
- kpse_cmap_format,
- kpse_sfd_format,
- kpse_opentype_format,
- kpse_pdftex_config_format,
- kpse_lig_format,
- kpse_texmfscripts_format,
- kpse_lua_format,
- kpse_fea_format,
- kpse_cid_format,
- kpse_mlbib_format,
- kpse_mlbst_format,
- kpse_clua_format,
- kpse_ris_format,
- kpse_bltxml_format,
- kpse_last_format /* one past last index */
-} kpse_file_format_type;
-#endif
-
void
kpsei_init(const char* argv0, const char* progname)
{
-#ifdef W32TEX
- PROC pkpse_set_program_name;
- pkpse_set_program_name = GetProcAddress(Hinstance, "kpse_set_program_name");
- if(!pkpse_set_program_name) {
- fprintf(stderr, "Failed to find Kpathsea function.\n");
- return;
- }
- (void)pkpse_set_program_name(argv0, progname);
-#else
kpse_set_program_name(argv0, progname);
-#endif
#ifdef SELFAUTODIR
putenv("SELFAUTODIR=" SELFAUTODIR);
#endif
@@ -126,40 +41,21 @@ kpsei_init(const char* argv0, const char* progname)
#ifdef SELFAUTOPARENT
putenv("SELFAUTOPARENT=" SELFAUTOPARENT);
#endif
+#ifdef SELFAUTOGRANDPARENT
+ putenv("SELFAUTOGRANDPARENT=" SELFAUTOGRANDPARENT);
+#endif
}
char*
kpsei_path_expand(const char* path)
{
-#ifdef W32TEX
- PROC pkpse_path_expand;
- pkpse_path_expand = GetProcAddress(Hinstance, "kpse_path_expand");
- if(!pkpse_path_expand) {
- fprintf(stderr, "Failed to find Kpathsea function.\n");
- return 0;
- }
- return (char *)pkpse_path_expand(path);
-#else
return kpse_path_expand(path);
-#endif
}
-#ifdef W32TEX
-#define kpse_find_file (char *)pkpse_find_file
-#endif
-
char*
kpsei_find_file(const char* name, int format)
{
char *result;
-#ifdef W32TEX
- PROC pkpse_find_file;
- pkpse_find_file = GetProcAddress(Hinstance, "kpse_find_file");
- if(!pkpse_find_file) {
- fprintf(stderr, "Failed to find Kpathsea function.\n");
- return 0;
- }
-#endif
switch (format) {
case KPSEI_FMT_WEB2C:
return kpse_find_file(name, kpse_web2c_format, true);
@@ -191,41 +87,13 @@ kpsei_find_file(const char* name, int format)
void
kpsei_set_debug_flags(unsigned flags)
{
-#ifdef W32TEX
- unsigned int *pkpathsea_debug;
- pkpathsea_debug = (unsigned int *)GetProcAddress(Hinstance, "kpathsea_debug");
- if(!pkpathsea_debug) {
- fprintf(stderr, "Failed to find Kpathsea variable.\n");
- return;
- }
- *pkpathsea_debug = flags;
-#else
kpathsea_debug = flags;
-#endif
}
#ifdef W32TEX
-int
-kpsei_getlongpath(char *buff, char *input, int len)
-{
- PROC pkpse_getlongpath;
- pkpse_getlongpath = GetProcAddress(Hinstance, "getlongpath");
- if(!pkpse_getlongpath) {
- fprintf(stderr, "Failed to find Kpathsea function.\n");
- return 0;
- }
- return (int)pkpse_getlongpath(buff, input, len);
-}
-
-char *
-kpsei_var_value(const char *var)
+char*
+kpsei_var_value(const char *name)
{
- PROC pkpse_var_value;
- pkpse_var_value = GetProcAddress(Hinstance, "kpse_var_value");
- if(!pkpse_var_value) {
- fprintf(stderr, "Failed to find Kpathsea function.\n");
- return NULL;
- }
- return (char *)pkpse_var_value(var);
+ return kpse_var_value(name);
}
#endif
diff --git a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.99/otftotfm/kpseinterface.h b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.99/otftotfm/kpseinterface.h
index c822a24fa1e..413e06e6572 100644
--- a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.99/otftotfm/kpseinterface.h
+++ b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.99/otftotfm/kpseinterface.h
@@ -14,10 +14,7 @@ char* kpsei_find_file(const char* name, int format);
void kpsei_set_debug_flags(unsigned flags);
#ifdef W32TEX
-int kpsei_getlongpath(char *buff, char *input, int len);
-char *kpsei_var_value(const char *var);
-#define true 1
-#define false 0
+char* kpsei_var_value(const char *name);
#endif
#ifdef __cplusplus
diff --git a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.99/otftotfm/otftotfm.cc b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.99/otftotfm/otftotfm.cc
index cc45f9b6f81..ce3290dd3d8 100644
--- a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.99/otftotfm/otftotfm.cc
+++ b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.99/otftotfm/otftotfm.cc
@@ -63,6 +63,10 @@
#ifdef HAVE_FCNTL_H
# include <fcntl.h>
#endif
+#ifdef _MSC_VER
+# include <io.h>
+#undef max
+#endif
using namespace Efont;
@@ -1739,11 +1743,6 @@ parse_base_encodings(const String &filename, ErrorHandler *errh)
}
}
-#ifdef W32TEX
-#include <windows.h>
-HINSTANCE Hinstance;
-#endif
-
int
main(int argc, char *argv[])
{
@@ -1755,15 +1754,6 @@ main(int argc, char *argv[])
Clp_AddType(clp, CHAR_OPTTYPE, 0, clp_parse_char, 0);
program_name = Clp_ProgramName(clp);
#if HAVE_KPATHSEA
-#ifdef W32TEX
- Hinstance = LoadLibrary(KPSEDLLNAME);
- if(Hinstance == NULL)
- Hinstance = LoadLibrary(KPSEOLDDLLNAME);
- if(Hinstance == NULL) {
- fprintf(stderr, "I cannot load Kpathsea dynamic library.\n");
- return 100;
- }
-#endif
kpsei_init(argv[0], "lcdftools");
#endif
#ifdef HAVE_CTIME
@@ -2135,19 +2125,11 @@ main(int argc, char *argv[])
This is free software; see the source for copying conditions.\n\
There is NO warranty, not even for merchantability or fitness for a\n\
particular purpose.\n");
-#ifdef W32TEX
- if(Hinstance != NULL)
- FreeLibrary(Hinstance);
-#endif
exit(0);
break;
case HELP_OPT:
usage();
-#ifdef W32TEX
- if(Hinstance != NULL)
- FreeLibrary(Hinstance);
-#endif
exit(0);
break;
@@ -2203,13 +2185,8 @@ particular purpose.\n");
try {
// read font
otf_data = read_file(input_file, errh);
- if (errh->nerrors()) {
-#ifdef W32TEX
- if(Hinstance != NULL)
- FreeLibrary(Hinstance);
-#endif
+ if (errh->nerrors())
exit(1);
- }
LandmarkErrorHandler cerrh(errh, printable_filename(input_file));
BailErrorHandler bail_errh(&cerrh);
@@ -2298,10 +2275,6 @@ particular purpose.\n");
} catch (OpenType::Error e) {
errh->error("unhandled exception %<%s%>", e.description.c_str());
}
-#ifdef W32TEX
- if(Hinstance != NULL)
- FreeLibrary(Hinstance);
-#endif
return (errh->nerrors() == 0 ? 0 : 1);
}
diff --git a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.99/otftotfm/secondary.cc b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.99/otftotfm/secondary.cc
index a951bc7d304..3483f6704f8 100644
--- a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.99/otftotfm/secondary.cc
+++ b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.99/otftotfm/secondary.cc
@@ -31,6 +31,10 @@
#include <errno.h>
#include <limits.h>
#include <algorithm>
+#ifdef _MSC_VER
+#undef max
+#undef min
+#endif
enum {
U_EXCLAMDOWN = 0x00A1, // U+00A1 INVERTED EXCLAMATION MARK