[tex-k] dvipng-1.9 -- 2 proposed patches (fwd)
Peter Breitenlohner
peb at mppmu.mpg.de
Mon Mar 31 11:48:03 CEST 2008
Hi Karl,
here a mail I just sent to Jan-AAke Larsson. I'll fix that in TL, but first
I have to digest all the recent changes. That should make for a better
dvipng.
Peter Breitenlohner <peb at mppmu.mpg.de>
---------- Forwarded message ----------
Date: Mon, 31 Mar 2008 11:44:49 +0200 (CEST)
From: Peter Breitenlohner <peb at mppmu.mpg.de>
To: Jan-AAke Larsson <dvipng at nongnu.org>
Subject: dvipng-1.9 -- 2 proposed patches
Hi Jan-AAke,
I'd like to suggest the two attached patches for dvipng-1.9.
patch-01-VPATH: allow for a VPATH build (i.e., build outside the source
tree).
patch-02-JPEG: the old code erroneously assumes that whenever libgd has
gdImageCreateTrueColor, it also has gdImageJpeg. This is not the case when
libgd is built without Jpeg support.
regards
Peter Breitenlohner <peb at mppmu.mpg.de>
-------------- next part --------------
diff -ur dvipng-1.9.orig/Makefile.in dvipng-1.9/Makefile.in
--- dvipng-1.9.orig/Makefile.in 2006-11-11 15:19:48.000000000 +0100
+++ dvipng-1.9/Makefile.in 2008-02-13 14:21:18.000000000 +0100
@@ -44,7 +44,7 @@
DESTDIR=
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
-MKINSTALLDIRS = ./mkinstalldirs
+MKINSTALLDIRS = ${srcdir}/mkinstalldirs
MAKEINFO=@MAKEINFO@ @MAKEINFO_MACROS@
INSTALL_INFO=@INSTALL_INFO@
@@ -132,7 +132,7 @@
done
-$(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) dvipng.info
-$(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man1
- $(INSTALL_DATA) dvipng.1 $(DESTDIR)$(mandir)/man1
+ $(INSTALL_DATA) `test -f dvipng.1 || echo '$(srcdir)/'`dvipng.1 $(DESTDIR)$(mandir)/man1
install-dvipng-docs: install-docs
-------------- next part --------------
diff -ur dvipng-1.9.orig/config.h.in dvipng-1.9/config.h.in
--- dvipng-1.9.orig/config.h.in 2006-02-27 13:06:34.000000000 +0100
+++ dvipng-1.9/config.h.in 2008-03-28 19:20:29.000000000 +0100
@@ -57,6 +57,9 @@
/* Define to 1 if you have the `gdImageGif' function. */
#undef HAVE_GDIMAGEGIF
+/* Define to 1 if you have the `gdImageJpeg' function. */
+#undef HAVE_GDIMAGEJPEG
+
/* Define to 1 if you have the `gdImagePngEx' function. */
#undef HAVE_GDIMAGEPNGEX
diff -ur dvipng-1.9.orig/configure dvipng-1.9/configure
--- dvipng-1.9.orig/configure 2006-11-11 15:53:09.000000000 +0100
+++ dvipng-1.9/configure 2008-03-28 19:20:32.000000000 +0100
@@ -8402,7 +8402,7 @@
-for ac_func in gdImageCreateTrueColor gdImagePngEx gdImageGif FT_Library_Version
+for ac_func in gdImageCreateTrueColor gdImagePngEx gdImageGif gdImageJpeg FT_Library_Version
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -8746,8 +8746,9 @@
The -d (debug) switch is enabled: $enable_debug
Your gd is new enough (>=2.0) to enable
the --truecolor switch, full alpha
- transparency, proper rescaling of
- included bitmaps, and jpeg inclusion: $ac_cv_func_gdImageCreateTrueColor
+ transparency, and proper rescaling of
+ included bitmaps: $ac_cv_func_gdImageCreateTrueColor
+ Your gd was built with jpeg inclusion: $ac_cv_func_gdImageJpeg
Your gd is new enough (>=2.0.12) to
enable transparent backgrounds for EPS
inclusion and the -z (compression)
diff -ur dvipng-1.9.orig/configure.ac dvipng-1.9/configure.ac
--- dvipng-1.9.orig/configure.ac 2006-11-11 15:17:13.000000000 +0100
+++ dvipng-1.9/configure.ac 2008-03-28 19:20:24.000000000 +0100
@@ -144,7 +144,7 @@
if test "$enable_timing" = "yes"; then
AC_CHECK_FUNCS([ftime gettimeofday])
fi
-AC_CHECK_FUNCS([gdImageCreateTrueColor gdImagePngEx gdImageGif FT_Library_Version])
+AC_CHECK_FUNCS([gdImageCreateTrueColor gdImagePngEx gdImageGif gdImageJpeg FT_Library_Version])
if test "$ac_cv_func_gdImageGif" = "yes"; then
INSTALL_BIN_TARGET="install-dvigif"
else
@@ -216,8 +216,9 @@
The -d (debug) switch is enabled: $enable_debug
Your gd is new enough (>=2.0) to enable
the --truecolor switch, full alpha
- transparency, proper rescaling of
- included bitmaps, and jpeg inclusion: $ac_cv_func_gdImageCreateTrueColor
+ transparency, and proper rescaling of
+ included bitmaps: $ac_cv_func_gdImageCreateTrueColor
+ Your gd was built with jpeg inclusion: $ac_cv_func_gdImageJpeg
Your gd is new enough (>=2.0.12) to
enable transparent backgrounds for EPS
inclusion and the -z (compression)
diff -ur dvipng-1.9.orig/special.c dvipng-1.9/special.c
--- dvipng-1.9.orig/special.c 2006-11-07 21:40:36.000000000 +0100
+++ dvipng-1.9/special.c 2008-03-28 19:23:03.000000000 +0100
@@ -362,7 +362,7 @@
break;
case 0xff: /* JPEG magic: 0xffd8 */
DEBUG_PRINT(DEBUG_DVI,("\n INCLUDE JPEG \t%s",psfile));
-#ifdef HAVE_GDIMAGECREATETRUECOLOR
+#ifdef HAVE_GDIMAGEJPEG
fseek(psstream,0,SEEK_SET);
psimage=gdImageCreateFromJpeg(psstream);
#else
More information about the tex-k
mailing list