summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/mplibdir
diff options
context:
space:
mode:
authorLuigi Scarso <luigi.scarso@gmail.com>2017-03-11 00:31:06 +0000
committerLuigi Scarso <luigi.scarso@gmail.com>2017-03-11 00:31:06 +0000
commit7fa7e2984ec7346b13ce8d3a84826552d30f00ea (patch)
treef177da03ee3839977b28ee4f149cb612666eddde /Build/source/texk/web2c/mplibdir
parentdedac2fcc2339e6d9cddef8edb046fd0e04c397e (diff)
sync with luatex r.6287 and mpost r.2125
git-svn-id: svn://tug.org/texlive/trunk@43454 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/mplibdir')
-rw-r--r--Build/source/texk/web2c/mplibdir/am/libmplib.am26
-rw-r--r--Build/source/texk/web2c/mplibdir/am/mplib.am9
-rw-r--r--Build/source/texk/web2c/mplibdir/mp.w35
-rw-r--r--Build/source/texk/web2c/mplibdir/mpmath.w2
-rw-r--r--Build/source/texk/web2c/mplibdir/mpmathdouble.w2
-rw-r--r--Build/source/texk/web2c/mplibdir/pngout.w3
-rw-r--r--Build/source/texk/web2c/mplibdir/svgout.w1
7 files changed, 57 insertions, 21 deletions
diff --git a/Build/source/texk/web2c/mplibdir/am/libmplib.am b/Build/source/texk/web2c/mplibdir/am/libmplib.am
index ca2d8e4c969..3d57231194f 100644
--- a/Build/source/texk/web2c/mplibdir/am/libmplib.am
+++ b/Build/source/texk/web2c/mplibdir/am/libmplib.am
@@ -5,14 +5,19 @@
## libmplib.a, used by MetaPost and luaTeX
##
-EXTRA_LIBRARIES += libmplib.a
+EXTRA_LIBRARIES += libmplibcore.a libmplibbackends.a
-libmplib_a_CPPFLAGS = $(MPFR_INCLUDES) $(GMP_INCLUDES) $(CAIRO_INCLUDES) $(PIXMAN_INCLUDES) \
+libmplibcore_a_CPPFLAGS = $(MPFR_INCLUDES) $(GMP_INCLUDES) $(LIBPNG_INCLUDES) $(ZLIB_INCLUDES) $(AM_CPPFLAGS) -I$(srcdir)/mplibdir
+libmplibbackends_a_CPPFLAGS = $(MPFR_INCLUDES) $(GMP_INCLUDES) $(CAIRO_INCLUDES) $(PIXMAN_INCLUDES) \
$(LIBPNG_INCLUDES) $(ZLIB_INCLUDES) $(AM_CPPFLAGS) -I$(srcdir)/mplibdir
-## libmplib C sources
-nodist_libmplib_a_SOURCES = tfmin.c $(mp_c_h) $(mpmath_c_h) $(mpmathbinary_c_h) $(mpmathdecimal_c_h) \
- $(mpmathdouble_c_h) $(mpstrings_c_h) $(pngout_c_h) $(psout_c_h) $(svgout_c_h)
+## libmplib C sources core + backends
+nodist_libmplibcore_a_SOURCES = tfmin.c $(mp_c_h) $(mpmath_c_h) $(mpmathbinary_c_h) $(mpmathdecimal_c_h) \
+ $(mpmathdouble_c_h) $(mpstrings_c_h) $(psout_c_h)
+nodist_libmplibbackends_a_SOURCES = $(pngout_c_h) $(svgout_c_h)
+
+
+
mp_c_h = mp.c mplib.h mpmp.h
mpmath_c_h = mpmath.h mpmath.c
mpmathbinary_c_h = mpmathbinary.h mpmathbinary.c
@@ -28,7 +33,7 @@ tfmin.c: ctangle$(EXEEXT) mplibdir/tfmin.w
$(mp_ctangle) tfmin.w
# Creating several files: need stamp file and two rules with identical recipes
-$(mp_c_h): mp-tangle
+$(mp_c_h): mp-tangle
@$(mp_ctangle_sh) mp
mp-tangle: ctangle$(EXEEXT) mplibdir/mp.w tangle-sh
@$(mp_ctangle_sh) mp
@@ -78,11 +83,16 @@ libmplib_web = mplibdir/mp.w mplibdir/psout.w mplibdir/svgout.w mplibdir/pngout.
libmplib_web += mplibdir/mpmath.w mplibdir/mpmathbinary.w mplibdir/mpmathdecimal.w
libmplib_web += mplibdir/mpmathdouble.w mplibdir/mpstrings.w mplibdir/tfmin.w
-$(libmplib_a_OBJECTS): $(nodist_libmplib_a_SOURCES) $(KPATHSEA_DEPEND) $(CAIRO_DEPEND) $(MPFR_DEPEND)
+## core need headers backends
+$(nodist_libmplibcore_a_SOURCES): $(svgout_c_h) $(pngout_c_h)
+
+$(libmplibcore_a_OBJECTS): $(nodist_libmplibcore_a_SOURCES) $(KPATHSEA_DEPEND) $(MPFR_DEPEND)
+$(libmplibbackends_a_OBJECTS): $(nodist_libmplibbackends_a_SOURCES) $(KPATHSEA_DEPEND) $(CAIRO_DEPEND) $(MPFR_DEPEND)
+
EXTRA_DIST += $(libmplib_web)
-DISTCLEANFILES += $(nodist_libmplib_a_SOURCES) \
+DISTCLEANFILES += $(nodist_libmplibcore_a_SOURCES) $(nodist_libmplibbackends_a_SOURCES) \
mp-tangle mpmath-tangle mpmathbinary-tangle mpmathdecimal-tangle mpmathdouble-tangle \
mpstrings-tangle psout-tangle svgout-tangle pngout-tangle
diff --git a/Build/source/texk/web2c/mplibdir/am/mplib.am b/Build/source/texk/web2c/mplibdir/am/mplib.am
index 80f574837ae..f58658de18f 100644
--- a/Build/source/texk/web2c/mplibdir/am/mplib.am
+++ b/Build/source/texk/web2c/mplibdir/am/mplib.am
@@ -18,9 +18,13 @@ endif MP
EXTRA_PROGRAMS += mpost
mpost_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_INCLUDES) $(LIBPNG_INCLUDES) -I$(srcdir)/mplibdir
-mpost_LDADD = libmplib.a $(KPATHSEA_LIBS) $(MPFR_LIBS) $(GMP_LIBS) \
+#mpost_LDADD = libmplib.a $(KPATHSEA_LIBS) $(MPFR_LIBS) $(GMP_LIBS) \
+# $(CAIRO_LIBS) $(PIXMAN_LIBS) $(LIBPNG_LIBS) $(ZLIB_LIBS) libmputil.a
+mpost_LDADD = libmplibcore.a libmplibbackends.a $(KPATHSEA_LIBS) $(MPFR_LIBS) $(GMP_LIBS) \
$(CAIRO_LIBS) $(PIXMAN_LIBS) $(LIBPNG_LIBS) $(ZLIB_LIBS) libmputil.a
+
+
call_mpost_CPPFLAGS = -DEXEPROG=\"mpost.exe\"
nodist_call_mpost_SOURCES = callexe.c
call_mpost_LDADD =
@@ -55,7 +59,8 @@ mpxout-tangle: ctangle$(EXEEXT) mplibdir/mpxout.w tangle-sh
## MetaPost CWeb sources
mpost_web = mplibdir/mpost.w mplibdir/mpxout.w
-$(mpost_OBJECTS): $(nodist_mpost_SOURCES) libmplib.a $(LIBPNG_DEPEND)
+#$(mpost_OBJECTS): $(nodist_mpost_SOURCES) libmplib.a $(LIBPNG_DEPEND)
+$(mpost_OBJECTS): $(nodist_mpost_SOURCES) libmplibcore.a libmplibbackends.a $(LIBPNG_DEPEND)
EXTRA_DIST += mplibdir/ChangeLog $(mpost_web)
diff --git a/Build/source/texk/web2c/mplibdir/mp.w b/Build/source/texk/web2c/mplibdir/mp.w
index 25b259ea094..adea5f18f17 100644
--- a/Build/source/texk/web2c/mplibdir/mp.w
+++ b/Build/source/texk/web2c/mplibdir/mp.w
@@ -1,4 +1,4 @@
-% $Id: mp.w 2117 2017-02-13 18:31:00Z luigi $
+% $Id: mp.w 2123 2017-03-08 12:49:56Z luigi $
%
% This file is part of MetaPost;
% the MetaPost program is in the public domain.
@@ -176,18 +176,18 @@ static int DEBUGENVELOPECOUNTER=0;
#include <time.h> /* for struct tm \& co */
#include <zlib.h> /* for |ZLIB_VERSION|, zlibVersion() */
#include <png.h> /* for |PNG_LIBPNG_VER_STRING|, |png_libpng_ver| */
-#include <pixman.h> /* for |PIXMAN_VERSION_STRING|, |pixman_version_string()| */
-#include <cairo.h> /* for |CAIRO_VERSION_STRING|, |cairo_version_string()| */
+/*\#include <pixman.h>*/ /* for |PIXMAN_VERSION_STRING|, |pixman_version_string()| */
+/*\#include <cairo.h>*/ /* for |CAIRO_VERSION_STRING|, |cairo_version_string()| */
#include <gmp.h> /* for |gmp_version| */
#include <mpfr.h> /* for |MPFR_VERSION_STRING|, |mpfr_get_version()| */
#include "mplib.h"
#include "mplibps.h" /* external header */
-#include "mplibsvg.h" /* external header */
-#include "mplibpng.h" /* external header */
+/*\#include "mplibsvg.h" */ /* external header */
+/*\#include "mplibpng.h" */ /* external header */
#include "mpmp.h" /* internal header */
#include "mppsout.h" /* internal header */
-#include "mpsvgout.h" /* internal header */
-#include "mppngout.h" /* internal header */
+/*\#include "mpsvgout.h"*/ /* internal header */
+/*\#include "mppngout.h"*/ /* internal header */
#include "mpmath.h" /* internal header */
#include "mpmathdouble.h" /* internal header */
#include "mpmathdecimal.h" /* internal header */
@@ -202,7 +202,24 @@ mp_number ueps_ap; /* epsilon for above approximations */
boolean is_dxdy, is_dxindyin;
/* END PATCH */
+@ We move the {\tt cairo} and {\tt pixman} libraries outside {\tt mp.w},
+to minimize dependencies.
+@c
+extern const char *COMPILED_CAIRO_VERSION_STRING;
+extern const char* cairo_version_string (void);
+extern const char *COMPILED_PIXMAN_VERSION_STRING;
+extern const char* pixman_version_string (void);
+extern void mp_png_backend_initialize (MP mp);
+extern void mp_png_backend_free (MP mp);
+extern int mp_png_gr_ship_out (void *hh, const char *options, int standalone);
+extern int mp_png_ship_out (void *hh, const char *options);
+extern void mp_svg_backend_initialize (MP mp);
+extern void mp_svg_backend_free (MP mp);
+extern int mp_svg_ship_out (mp_edge_object *hh, int prologues);
+extern int mp_svg_gr_ship_out (mp_edge_object *hh, int prologues, int standalone);
+
+@ @c
extern font_number mp_read_font_info (MP mp, char *fname); /* tfmin.w */
@h @<Declarations@>;
@<Basic printing procedures@>;
@@ -30652,8 +30669,8 @@ char *mp_metapost_version (void) {
return mp_strdup (metapost_version);
}
void mp_show_library_versions (void) {
- fprintf(stdout, "Compiled with cairo %s; using %s\n", CAIRO_VERSION_STRING, cairo_version_string());
- fprintf(stdout, "Compiled with pixman %s; using %s\n", PIXMAN_VERSION_STRING, pixman_version_string());
+ fprintf(stdout, "Compiled with cairo %s; using %s\n", COMPILED_CAIRO_VERSION_STRING, cairo_version_string());
+ fprintf(stdout, "Compiled with pixman %s; using %s\n",COMPILED_PIXMAN_VERSION_STRING, pixman_version_string());
fprintf(stdout, "Compiled with libpng %s; using %s\n", PNG_LIBPNG_VER_STRING, png_libpng_ver);
fprintf(stdout, "Compiled with zlib %s; using %s\n", ZLIB_VERSION, zlibVersion());
fprintf(stdout, "Compiled with mpfr %s; using %s\n", MPFR_VERSION_STRING, mpfr_get_version());
diff --git a/Build/source/texk/web2c/mplibdir/mpmath.w b/Build/source/texk/web2c/mplibdir/mpmath.w
index 6c0ee6d00a6..0195d608d85 100644
--- a/Build/source/texk/web2c/mplibdir/mpmath.w
+++ b/Build/source/texk/web2c/mplibdir/mpmath.w
@@ -1,4 +1,4 @@
-% $Id: mpmath.w 2118 2017-02-15 17:49:54Z luigi $
+% $Id: mpmath.w 2070 2015-10-06 10:35:23Z luigi $
%
% This file is part of MetaPost;
% the MetaPost program is in the public domain.
diff --git a/Build/source/texk/web2c/mplibdir/mpmathdouble.w b/Build/source/texk/web2c/mplibdir/mpmathdouble.w
index cb14969365f..92339309869 100644
--- a/Build/source/texk/web2c/mplibdir/mpmathdouble.w
+++ b/Build/source/texk/web2c/mplibdir/mpmathdouble.w
@@ -1,4 +1,4 @@
-% $Id: mpmathdouble.w 2118 2017-02-15 17:49:54Z luigi $
+% $Id: mpmathdouble.w 2091 2016-09-16 23:07:58Z luigi $
%
% This file is part of MetaPost;
% the MetaPost program is in the public domain.
diff --git a/Build/source/texk/web2c/mplibdir/pngout.w b/Build/source/texk/web2c/mplibdir/pngout.w
index b42bf7b3219..742522c2ff7 100644
--- a/Build/source/texk/web2c/mplibdir/pngout.w
+++ b/Build/source/texk/web2c/mplibdir/pngout.w
@@ -79,6 +79,9 @@ properly. That is |typedef struct pngout_data_struct * pngout_data|.
#ifndef MPPNGOUT_H
#define MPPNGOUT_H 1
#include "cairo.h"
+const char *COMPILED_CAIRO_VERSION_STRING = CAIRO_VERSION_STRING;
+#include "pixman.h"
+const char *COMPILED_PIXMAN_VERSION_STRING = PIXMAN_VERSION_STRING;
#define PNG_SKIP_SETJMP_CHECK 1
#include "png.h"
#include "mplib.h"
diff --git a/Build/source/texk/web2c/mplibdir/svgout.w b/Build/source/texk/web2c/mplibdir/svgout.w
index b7316f3f98b..94801da5205 100644
--- a/Build/source/texk/web2c/mplibdir/svgout.w
+++ b/Build/source/texk/web2c/mplibdir/svgout.w
@@ -1340,3 +1340,4 @@ int mp_svg_ship_out (mp_edge_object *hh, int prologues) {
else if (gr_type(p)==mp_stroked_code) { do_write_postscript(p,mp_stroked_object); }
else if (gr_type(p)==mp_text_code) { do_write_postscript(p,mp_text_object); }
}
+