summaryrefslogtreecommitdiff
path: root/Build/source/texk/lcdf-typetools/lcdf-typetools-2.94-PATCHES/patch-02-WIN32
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/lcdf-typetools/lcdf-typetools-2.94-PATCHES/patch-02-WIN32')
-rw-r--r--Build/source/texk/lcdf-typetools/lcdf-typetools-2.94-PATCHES/patch-02-WIN32132
1 files changed, 0 insertions, 132 deletions
diff --git a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.94-PATCHES/patch-02-WIN32 b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.94-PATCHES/patch-02-WIN32
deleted file mode 100644
index 26f2036a494..00000000000
--- a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.94-PATCHES/patch-02-WIN32
+++ /dev/null
@@ -1,132 +0,0 @@
-diff -ur -x Makefile.in -x aclocal.m4 -x autoconf.h.in -x configure lcdf-typetools-2.94.orig/otftotfm/automatic.cc lcdf-typetools-2.94/otftotfm/automatic.cc
---- lcdf-typetools-2.94.orig/otftotfm/automatic.cc 2011-11-03 17:51:58.000000000 +0100
-+++ lcdf-typetools-2.94/otftotfm/automatic.cc 2012-08-11 17:49:05.000000000 +0200
-@@ -40,6 +40,20 @@
-
- #ifdef WIN32
- # define mkdir(dir, access) mkdir(dir)
-+# define COPY_CMD "copy"
-+# define CMD_SEP "&"
-+#else
-+# define COPY_CMD "cp"
-+# define CMD_SEP ";"
-+#endif
-+
-+/* kpathsea may already have defined this */
-+#ifndef DEV_NULL
-+# ifdef WIN32
-+# define DEV_NULL "NUL"
-+# else
-+# define DEV_NULL "/dev/null"
-+# endif
- #endif
-
- #if HAVE_AUTO_T1DOTLESSJ
-@@ -307,7 +321,11 @@
- if (!success && writable_texdir.find_left('\'') < 0 && directory.find_left('\'') < 0 && file.find_left('\'') < 0) {
- // look for mktexupd script
- if (!mktexupd_tried) {
-+#ifdef WIN32
-+ mktexupd = strdup("mktexupd");
-+#else
- mktexupd = kpsei_string(kpsei_find_file("mktexupd", KPSEI_FMT_WEB2C));
-+#endif
- mktexupd_tried = true;
- }
-
-@@ -482,7 +498,7 @@
-
- int retval;
- if (!same_filename(ttf_filename, installed_ttf_filename)) {
-- String command = "cp " + shell_quote(ttf_filename) + " " + shell_quote(installed_ttf_filename);
-+ String command = COPY_CMD " " + shell_quote(ttf_filename) + " " + shell_quote(installed_ttf_filename);
- retval = mysystem(command.c_str(), errh);
- if (retval == 127)
- errh->error("could not run %<%s%>", command.c_str());
-@@ -727,11 +741,11 @@
- int slash = filename.find_right('\'');
- if (slash >= 0)
- filename = filename.substring(slash + 1);
-- String command = "updmap --nomkmap --enable Map " + shell_quote(filename) + "; updmap";
-+ String command = "updmap --nomkmap --enable Map " + shell_quote(filename) + CMD_SEP " updmap";
- if (verbose)
- command += " 1>&2";
- else
-- command += " >/dev/null 2>&1";
-+ command += " >" DEV_NULL " 2>&1";
- int retval = mysystem(command.c_str(), errh);
- if (retval == 127)
- errh->warning("could not run %<%s%>", command.c_str());
-diff -ur -x Makefile.in -x aclocal.m4 -x autoconf.h.in -x configure lcdf-typetools-2.94.orig/otftotfm/otftotfm.cc lcdf-typetools-2.94/otftotfm/otftotfm.cc
---- lcdf-typetools-2.94.orig/otftotfm/otftotfm.cc 2011-11-03 17:51:58.000000000 +0100
-+++ lcdf-typetools-2.94/otftotfm/otftotfm.cc 2012-08-11 17:14:49.000000000 +0200
-@@ -50,6 +50,10 @@
- #include <signal.h>
- #include <algorithm>
- #include <math.h>
-+/* apparently M_PI isn't defined by <math.h> under VC++ */
-+#ifndef M_PI
-+#define M_PI 3.14159265358979323846
-+#endif
- #ifdef HAVE_CTIME
- # include <time.h>
- #endif
-diff -ur -x Makefile.in -x aclocal.m4 -x autoconf.h.in -x configure lcdf-typetools-2.94.orig/otftotfm/util.cc lcdf-typetools-2.94/otftotfm/util.cc
---- lcdf-typetools-2.94.orig/otftotfm/util.cc 2011-11-03 17:51:58.000000000 +0100
-+++ lcdf-typetools-2.94/otftotfm/util.cc 2012-08-11 17:42:50.000000000 +0200
-@@ -103,15 +103,34 @@ same_filename(const String &a, const String &b)
- String
- shell_quote(const String &str)
- {
--#if defined(_MSDOS) || defined(_WIN32)
-- return str; // XXX
--#else
- if (!str)
-- return String::make_stable("''");
-+ return String::make_stable("\"\"");
-
- const char *begin = str.begin();
- const char *end = str.end();
- StringAccum sa;
-+
-+#if defined(_MSDOS) || defined(_WIN32)
-+ sa.append('\"');
-+
-+ for (const char *s = begin; s < end; ++s)
-+ if (isalnum((unsigned char) *s) || *s == '_' || *s == '-' || *s == '+' || *s == '\\' || *s == ':' || *s == '.')
-+ /* do nothing */;
-+ else if (*s == '\"') {
-+ sa.append(begin, s);
-+ sa.append("\"\"\"", 3);
-+ begin = s + 1;
-+ } else {
-+ sa.append(begin, s + 1);
-+ begin = s + 1;
-+ }
-+
-+ if (sa.length() > 1) {
-+ sa.append(begin, end);
-+ sa.append('\"');
-+ return sa.take_string();
-+ }
-+#else
- for (const char *s = begin; s < end; s++)
- if (isalnum((unsigned char) *s) || *s == '_' || *s == '-' || *s == '+' || *s == '/' || *s == ':' || *s == '.')
- /* do nothing */;
-@@ -121,13 +140,13 @@ shell_quote(const String &str)
- begin = s;
- }
-
-- if (!sa)
-- return str;
-- else {
-+ if (sa.length()) {
- sa.append(begin, end);
- return sa.take_string();
- }
- #endif
-+
-+ return str;
- }
-
- int