summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2011-08-03 11:48:02 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2011-08-03 11:48:02 +0000
commit851a4b03b67b2ad9f0748e56c92604c0807237cf (patch)
treedaa36bd95fbada5fe0f10ab0dd4a4d24e75ae9f2 /Build
parentf48f4e04f6b1c29a0f9ef9979c082cb2de160d16 (diff)
More changes to reduce diffs with W32TeX
git-svn-id: svn://tug.org/texlive/trunk@23367 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14-PATCHES/ChangeLog7
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14-PATCHES/patch-06-WIN3214
-rw-r--r--Build/source/texk/dvipng/dvipng-1.14/dvipng.c4
-rw-r--r--Build/source/texk/gsftopk/ChangeLog1
-rw-r--r--Build/source/texk/gsftopk/gsftopk.c4
-rw-r--r--Build/source/texk/kpathsea/ChangeLog1
-rw-r--r--Build/source/texk/kpathsea/mingw32.c54
-rw-r--r--Build/source/texk/kpathsea/mingw32.h1
8 files changed, 82 insertions, 4 deletions
diff --git a/Build/source/texk/dvipng/dvipng-1.14-PATCHES/ChangeLog b/Build/source/texk/dvipng/dvipng-1.14-PATCHES/ChangeLog
index 85281936097..10c373636db 100644
--- a/Build/source/texk/dvipng/dvipng-1.14-PATCHES/ChangeLog
+++ b/Build/source/texk/dvipng/dvipng-1.14-PATCHES/ChangeLog
@@ -1,4 +1,9 @@
-2011--02-07 Peter Breitenlohner <peb@mppmu.mpg.de>
+2011-08-03 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * patch-06-WIN32 (new): Call texlive_gs_init() for MINGW32,
+ as for native WIN32, from Akira.
+
+2011-02-07 Peter Breitenlohner <peb@mppmu.mpg.de>
* patch-05-sys_wait (new): #include <sys/wait.h>, not <wait.h>.
Reported by Nikola Lecic <nikola.lecic@anthesphoria.net>.
diff --git a/Build/source/texk/dvipng/dvipng-1.14-PATCHES/patch-06-WIN32 b/Build/source/texk/dvipng/dvipng-1.14-PATCHES/patch-06-WIN32
new file mode 100644
index 00000000000..d9c5b9410e3
--- /dev/null
+++ b/Build/source/texk/dvipng/dvipng-1.14-PATCHES/patch-06-WIN32
@@ -0,0 +1,14 @@
+diff -ur dvipng-1.14.orig/dvipng.c dvipng-1.14/dvipng.c
+--- dvipng-1.14.orig/dvipng.c 2008-02-08 14:45:25.000000000 +0100
++++ dvipng-1.14/dvipng.c 2011-08-03 13:34:43.000000000 +0200
+@@ -79,6 +79,10 @@
+ kpse_set_program_enabled (kpse_pk_format, makeTexPK, kpse_src_compile);
+ #endif
+
++#ifdef WIN32
++ texlive_gs_init ();
++#endif
++
+ initcolor();
+ parsestdin = DecodeArgs(argc, argv);
+
diff --git a/Build/source/texk/dvipng/dvipng-1.14/dvipng.c b/Build/source/texk/dvipng/dvipng-1.14/dvipng.c
index 78b07c1a81f..2c9179ba7a3 100644
--- a/Build/source/texk/dvipng/dvipng-1.14/dvipng.c
+++ b/Build/source/texk/dvipng/dvipng-1.14/dvipng.c
@@ -79,6 +79,10 @@ int main(int argc, char ** argv)
kpse_set_program_enabled (kpse_pk_format, makeTexPK, kpse_src_compile);
#endif
+#ifdef WIN32
+ texlive_gs_init ();
+#endif
+
initcolor();
parsestdin = DecodeArgs(argc, argv);
diff --git a/Build/source/texk/gsftopk/ChangeLog b/Build/source/texk/gsftopk/ChangeLog
index 631c3449674..0a1b414e7a7 100644
--- a/Build/source/texk/gsftopk/ChangeLog
+++ b/Build/source/texk/gsftopk/ChangeLog
@@ -1,6 +1,7 @@
2011-08-03 Peter Breitenlohner <peb@mppmu.mpg.de>
* gsftopk.c [MINGW32]: Drop superfluous dostounix_filename().
+ Call texlive_gs_init() for MINGW32, as for native WIN32.
2010-09-23 Peter Breitenlohner <peb@mppmu.mpg.de>
diff --git a/Build/source/texk/gsftopk/gsftopk.c b/Build/source/texk/gsftopk/gsftopk.c
index 97b094a2f19..a626d4778c7 100644
--- a/Build/source/texk/gsftopk/gsftopk.c
+++ b/Build/source/texk/gsftopk/gsftopk.c
@@ -2256,10 +2256,10 @@ Author of gsftopk: Paul Vojta.");
if (!test)
xputenv_int("KPATHSEA_DPI", (int) (dpi + 0.5));
-#if defined(WIN32) && !defined(__MINGW32__)
+#if defined(WIN32)
/* TeXLive uses its own Ghostscript */
texlive_gs_init();
-#endif /* WIN32 && !__MINGW32__ */
+#endif
#endif
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog
index 6ef2402eb14..012d0c4ce73 100644
--- a/Build/source/texk/kpathsea/ChangeLog
+++ b/Build/source/texk/kpathsea/ChangeLog
@@ -5,6 +5,7 @@
2011-08-03 Peter Breitenlohner <peb@mppmu.mpg.de>
* mingw32.[ch] (dostounix_filename): Remove unused function.
+ (texlive_gs_init): New function copied from win32lib.[ch].
2011-08-03 Peter Breitenlohner <peb@mppmu.mpg.de>
diff --git a/Build/source/texk/kpathsea/mingw32.c b/Build/source/texk/kpathsea/mingw32.c
index f6912365422..c0d037b41ca 100644
--- a/Build/source/texk/kpathsea/mingw32.c
+++ b/Build/source/texk/kpathsea/mingw32.c
@@ -1,6 +1,6 @@
/* mingw32.c: bits and pieces for mingw32
- Copyright 2009, 2010 Taco Hoekwater <taco@luatex.org>.
+ Copyright 2009-2011 Taco Hoekwater <taco@luatex.org>.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -31,6 +31,7 @@
#include <kpathsea/mingw32.h>
#include <kpathsea/lib.h>
#include <kpathsea/concatn.h>
+#include <kpathsea/variable.h>
#include <shlobj.h>
#include <errno.h>
@@ -485,4 +486,55 @@ look_for_cmd(const char *cmd, char **app)
}
+/* special TeXLive Ghostscript */
+
+static int is_dir (char *buff)
+{
+ HANDLE h;
+ WIN32_FIND_DATA w32fd;
+
+ if (((h = FindFirstFile (buff, &w32fd))
+ != INVALID_HANDLE_VALUE) &&
+ (w32fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) {
+ FindClose (h);
+ return (1);
+ } else {
+ FindClose (h);
+ return (0);
+ }
+}
+
+/*
+ TeXlive uses its own gs in
+ $SELFAUTOPARENT/tlpkg/tlgs
+*/
+void texlive_gs_init(void)
+{
+ char *nptr, *path;
+ char tlgsbindir[512];
+ char tlgslibdir[512];
+ nptr = kpse_var_value("SELFAUTOPARENT");
+ if (nptr) {
+ strcpy(tlgsbindir, nptr);
+ strcat(tlgsbindir,"/tlpkg/tlgs");
+ if(is_dir(tlgsbindir)) {
+ strcpy(tlgslibdir, tlgsbindir);
+ strcat(tlgslibdir, "/lib;");
+ strcat(tlgslibdir, tlgsbindir);
+ strcat(tlgslibdir, "/fonts");
+ strcat(tlgsbindir, "/bin;");
+ free(nptr);
+ for(nptr = tlgsbindir; *nptr; nptr++) {
+ if(*nptr == '/') *nptr = '\\';
+ }
+ nptr = getenv("PATH");
+ path = (char *)malloc(strlen(nptr) + strlen(tlgsbindir) + 6);
+ strcpy(path, tlgsbindir);
+ strcat(path, nptr);
+ xputenv("PATH", path);
+ xputenv("GS_LIB", tlgslibdir);
+ }
+ }
+}
+
#endif /* __MINGW32__ */
diff --git a/Build/source/texk/kpathsea/mingw32.h b/Build/source/texk/kpathsea/mingw32.h
index d7e28cda207..4c1da11085b 100644
--- a/Build/source/texk/kpathsea/mingw32.h
+++ b/Build/source/texk/kpathsea/mingw32.h
@@ -41,5 +41,6 @@ extern char *quote_args(char **);
#endif /* MAKE_KPSE_DLL */
extern KPSEDLL BOOL win32_get_long_filename (char *, char *, int);
+extern KPSEDLL void texlive_gs_init(void);
#endif