From: Matthew Fernandez Date: Sun, 5 Dec 2021 01:44:24 +0000 (-0800) Subject: remove Ming plugin X-Git-Tag: 3.0.0~139^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ab6d5208852be0a2165d28b6d146560aaae2ad1e;p=graphviz remove Ming plugin The format this plugin produces, Adobe Shockwave, was officially EOLed by Adobe in April 2019.¹ Legacy support for SWF files was available through Adobe Flash Player. Flash Player was subsequently EOLed in December 2020 with Adobe considering it such a security risk they flipped a kill switch in January 2021 making it no longer possible to run Flash Player anywhere.² Closes #2160 ¹ https://helpx.adobe.com/shockwave/shockwave-end-of-life-faq.html ² https://www.adobe.com/au/products/flashplayer/end-of-life.html --- diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f24d3134..0c3235f78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased (2.50.1)] +### Changed + +- The Ming plugin that produced Shockwave files has been removed. This format + was EOLed by Adobe in April 2019. #2160 + ### Fixed - fix detection of unavailable output format diff --git a/configure.ac b/configure.ac index 26b1323be..be6dd9642 100644 --- a/configure.ac +++ b/configure.ac @@ -2112,28 +2112,6 @@ else fi AM_CONDITIONAL(WITH_GLADE, [test "x$use_glade" = "xYes"]) -dnl ----------------------------------- -dnl INCLUDES and LIBS for MING (SWF renderer) - -AC_ARG_WITH(ming, - [AS_HELP_STRING([--with-ming=no],[ming library (plugin for -Tswf)])], - [], [with_ming=no]) - -if test "x$with_ming" != "xyes"; then - use_ming="No (disabled by default - incomplete)" -else - PKG_CHECK_MODULES(MING, [libming >= 0.4],[ - use_ming="Yes" - AC_DEFINE_UNQUOTED(HAVE_MING,1, - [Define if you have the ming library for SWF support]) - AC_SUBST([MING_CFLAGS]) - AC_SUBST([MING_LIBS]) - ],[ - use_ming="No (ming library not available)" - ]) -fi -AM_CONDITIONAL(WITH_MING, [test "x$use_ming" = "xYes"]) - dnl ----------------------------------- dnl INCLUDES and LIBS for QT @@ -2713,7 +2691,6 @@ AC_CONFIG_FILES(Makefile plugin/gs/Makefile plugin/gtk/Makefile plugin/lasi/Makefile - plugin/ming/Makefile plugin/pango/Makefile plugin/poppler/Makefile plugin/quartz/Makefile @@ -2860,7 +2837,6 @@ echo " ghostscript: $use_ghostscript" echo " glitz: $use_glitz" echo " gtk: $use_gtk" echo " lasi: $use_lasi" -echo " ming: $use_ming" echo " pangocairo: $use_pangocairo" echo " poppler: $use_poppler" echo " quartz: $use_quartz" diff --git a/lib/gvc/gvcjob.h b/lib/gvc/gvcjob.h index c9b3690ac..72b9baa3b 100644 --- a/lib/gvc/gvcjob.h +++ b/lib/gvc/gvcjob.h @@ -53,7 +53,7 @@ extern "C" { GVDEVICE_DOES_TRUECOLOR supports alpha channel -Tpng, -Tgtk, -Txlib GVDEVICE_BINARY_FORMAT Suppresses \r\n substitution for linends GVDEVICE_COMPRESSED_FORMAT controls libz compression - GVDEVICE_NO_WRITER used when gvdevice is not used because device uses its own writer, -Tming, devil outputs (FIXME seems to overlap OUTPUT_NOT_REQUIRED) + GVDEVICE_NO_WRITER used when gvdevice is not used because device uses its own writer, devil outputs (FIXME seems to overlap OUTPUT_NOT_REQUIRED) GVRENDER_Y_GOES_DOWN device origin top left, y goes down, otherwise device origin lower left, y goes up diff --git a/m4/ming.m4 b/m4/ming.m4 deleted file mode 100644 index e42305419..000000000 --- a/m4/ming.m4 +++ /dev/null @@ -1,51 +0,0 @@ -# Adapted for graphviz by John Ellson, Oct/24/2006 - -# Configure paths for Ming -# Sandro Santilli 2006-01-24 -# -# This macro uses ming-config, which was -# not available as for Ming 0.3beta1 - -# Use: -# GV_PATH_MING -# -# Provides: -# MING_CFLAGS -# MING_LIBS -# MAKESWF - -AC_DEFUN([GV_PATH_MING], -[ - MING_CFLAGS="" - MING_LIBS="" - WITH_MING=yes - - AC_ARG_WITH(ming, AC_HELP_STRING([--with-ming=[]], [Use ming to build tests]), - [ - case "${withval}" in - yes) WITH_MING=yes - ;; - no) WITH_MING=no - ;; - *) WITH_MING=yes - MING_CONFIG=${withval} - ;; - esac - ], MING_CONFIG="") - - if test x"$MING_CONFIG" = "x"; then - AC_PATH_PROG(MING_CONFIG, ming-config) - fi - - if test x"$MING_CONFIG" != "x" -a "$WITH_MING" = "yes"; then - MING_CFLAGS=`$MING_CONFIG --cflags` - MING_LIBS=`$MING_CONFIG --libs` - MING_PATH=`$MING_CONFIG --bindir` - AC_PATH_PROG([MAKESWF], [makeswf], , [$PATH:$MING_PATH]) - fi - - AC_SUBST(MING_CFLAGS) - AC_SUBST(MING_LIBS) - AC_SUBST(MAKESWF) -]) - diff --git a/plugin/Makefile.am b/plugin/Makefile.am index 3637a1f42..d63ab8880 100644 --- a/plugin/Makefile.am +++ b/plugin/Makefile.am @@ -1,3 +1,3 @@ ## Process this file with automake to produce Makefile.in -SUBDIRS = core devil gd gdk gdiplus glitz gs gtk lasi ming pango quartz rsvg visio xlib dot_layout neato_layout webp poppler +SUBDIRS = core devil gd gdk gdiplus glitz gs gtk lasi pango quartz rsvg visio xlib dot_layout neato_layout webp poppler diff --git a/plugin/ming/Bitstream_Vera_Sans.fdb b/plugin/ming/Bitstream_Vera_Sans.fdb deleted file mode 100644 index 7dff1d938..000000000 Binary files a/plugin/ming/Bitstream_Vera_Sans.fdb and /dev/null differ diff --git a/plugin/ming/Bitstream_Vera_Serif.fdb b/plugin/ming/Bitstream_Vera_Serif.fdb deleted file mode 100644 index 28b7c1daa..000000000 Binary files a/plugin/ming/Bitstream_Vera_Serif.fdb and /dev/null differ diff --git a/plugin/ming/Makefile.am b/plugin/ming/Makefile.am deleted file mode 100644 index 316c1f85d..000000000 --- a/plugin/ming/Makefile.am +++ /dev/null @@ -1,40 +0,0 @@ -## Process this file with automake to produce Makefile.in - -pkgfontdir = ${pkgdatadir}/font - -AM_CPPFLAGS = \ - -I$(top_srcdir)/lib \ - -I$(top_srcdir)/lib/common \ - -I$(top_srcdir)/lib/pathplan \ - -I$(top_srcdir)/lib/gvc \ - -I$(top_srcdir)/lib/cgraph \ - -I$(top_srcdir)/lib/cdt \ - $(MING_CFLAGS) - -if WITH_MING -noinst_LTLIBRARIES = libgvplugin_ming_C.la -if WITH_WIN32 -lib_LTLIBRARIES = libgvplugin_ming.la -else -pkglib_LTLIBRARIES = libgvplugin_ming.la -endif -pkgfont_DATA = Bitstream_Vera_Sans.fdb Bitstream_Vera_Serif.fdb -endif - -libgvplugin_ming_C_la_SOURCES = \ - gvplugin_ming.c \ - gvrender_ming.c - -libgvplugin_ming_la_LDFLAGS = -version-info @GVPLUGIN_VERSION_INFO@ -libgvplugin_ming_la_SOURCES = $(libgvplugin_ming_C_la_SOURCES) -libgvplugin_ming_la_LIBADD = @MING_LIBS@ @MATH_LIBS@ - -if WITH_WIN32 -libgvplugin_ming_la_LDFLAGS += -no-undefined -endif - -if WITH_DARWIN9 -libgvplugin_ming_la_LDFLAGS += -Wl,-exported_symbol,_gvplugin_ming_LTX_library -endif - -EXTRA_DIST = Bitstream_Vera_Sans.fdb Bitstream_Vera_Serif.fdb diff --git a/plugin/ming/gvplugin_ming.c b/plugin/ming/gvplugin_ming.c deleted file mode 100644 index 8d2a563af..000000000 --- a/plugin/ming/gvplugin_ming.c +++ /dev/null @@ -1,22 +0,0 @@ -/************************************************************************* - * Copyright (c) 2011 AT&T Intellectual Property - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: Details at https://graphviz.org - *************************************************************************/ - -#include - -extern gvplugin_installed_t gvrender_ming_types[]; -extern gvplugin_installed_t gvdevice_ming_types[]; - -static gvplugin_api_t apis[] = { - {API_device, gvdevice_ming_types}, - {API_render, gvrender_ming_types}, - {(api_t)0, 0}, -}; - -gvplugin_library_t gvplugin_ming_LTX_library = { "ming", apis }; diff --git a/plugin/ming/gvrender_ming.c b/plugin/ming/gvrender_ming.c deleted file mode 100644 index 81c40d131..000000000 --- a/plugin/ming/gvrender_ming.c +++ /dev/null @@ -1,292 +0,0 @@ -/************************************************************************* - * Copyright (c) 2011 AT&T Intellectual Property - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: Details at https://graphviz.org - *************************************************************************/ - -#include "config.h" - -#include -#include -#include - -/* from config.h - would conflict with ming.h definitions */ -#undef PACKAGE -#undef PACKAGE_NAME -#undef PACKAGE_STRING -#undef PACKAGE_TARNAME -#undef PACKAGE_VERSION -#undef VERSION - -#include - -#define SWFVERSION 6 -#define SWFCOMPRESSION 9 -#define SWFFRAMERATE .5 - -typedef enum { FORMAT_SWF } format_type; - -static void ming_begin_job(GVJ_t * job) -{ - SWFMovie movie; - SWFAction action; - - Ming_init(); - Ming_useSWFVersion(SWFVERSION); - Ming_setSWFCompression(SWFCOMPRESSION); - movie = newSWFMovie(); - SWFMovie_setRate(movie, SWFFRAMERATE); - SWFMovie_setDimension(movie, job->width, job->height); - - job->context = (void*) movie; -} - -static void ming_end_job(GVJ_t * job) -{ - SWFMovie movie = (SWFMovie)(job->context); - - SWFMovie_output_to_stream(movie, job->output_file); - destroySWFMovie(movie); - job->context = NULL; -} - -static void ming_begin_page(GVJ_t * job) -{ -} - -static void ming_end_page(GVJ_t * job) -{ - SWFMovie movie = (SWFMovie)(job->context); - - SWFMovie_nextFrame(movie); -} - -extern char* gvconfig_libdir(void); -#define FONT "Bitstream_Vera_Serif.fdb" - -static void ming_textspan(GVJ_t * job, pointf p, textspan_t * span) -{ - SWFMovie movie = (SWFMovie)(job->context); - SWFTextField textfield; - SWFDisplayItem item; - obj_state_t *obj = job->obj; - gvcolor_t pencolor = obj->pencolor; - pointf offset; - char *font_file_name; - char *libdir; - static SWFFont font; - -/* FIXME - hardcoded to a Times-like font */ - if (font == NULL) { - libdir=gvconfig_libdir(); - font_file_name = malloc(strlen(libdir)+strlen(FONT)+2); - strcpy(font_file_name, libdir); - strcat(font_file_name, "/"); - strcat(font_file_name, FONT); - font = newSWFFont_fromFile(font_file_name); - free(font_file_name); - } - - textfield = newSWFTextField(); - SWFTextField_setFont(textfield, (SWFBlock)font); - SWFTextField_addChars(textfield, span->str); - SWFTextField_addUTF8String(textfield, span->str); - SWFTextField_setColor(textfield, - pencolor.u.rgba[0], - pencolor.u.rgba[1], - pencolor.u.rgba[2], - pencolor.u.rgba[3]); - SWFTextField_setHeight(textfield, span->font->size); - - switch (span->just) { - case 'r': - offset.x = 0.; - break; - case 'l': - offset.x = -span->size.x; - break; - case 'n': - default: - offset.x = -span->size.x/2.; - break; - } - /* offset to baseline */ - offset.y = -span->size.y + span->font->size*.4; /* empirically determined */ - - item = SWFMovie_add(movie, (SWFBlock)textfield); - SWFDisplayItem_moveTo(item, p.x + offset.x, p.y + offset.y); -} - -static void ming_ellipse(GVJ_t * job, pointf * A, int filled) -{ - SWFMovie movie = (SWFMovie)(job->context); - SWFShape shape; - SWFFill fill; - SWFDisplayItem item; - obj_state_t *obj = job->obj; - gvcolor_t pencolor = obj->pencolor; - gvcolor_t fillcolor = obj->fillcolor; - double rx, ry; - - shape = newSWFShape(); - SWFShape_setLine(shape, obj->penwidth, - pencolor.u.rgba[0], - pencolor.u.rgba[1], - pencolor.u.rgba[2], - pencolor.u.rgba[3]); - if (filled) { - fill = SWFShape_addSolidFill(shape, - fillcolor.u.rgba[0], - fillcolor.u.rgba[1], - fillcolor.u.rgba[2], - fillcolor.u.rgba[3]); - SWFShape_setRightFill(shape, fill); - } - SWFShape_movePenTo(shape, 0, 0); - rx = A[1].x - A[0].x; - ry = A[1].y - A[0].y; - SWFShape_drawCircle(shape, rx); - item = SWFMovie_add(movie, (SWFBlock)shape); - SWFDisplayItem_scale(item, 1., ry/rx); - SWFDisplayItem_moveTo(item, A[0].x, A[0].y); -} - -static void -ming_polygon(GVJ_t * job, pointf * A, int n, int filled) -{ - SWFMovie movie = (SWFMovie)(job->context); - SWFShape shape; - SWFFill fill; - obj_state_t *obj = job->obj; - gvcolor_t pencolor = obj->pencolor; - gvcolor_t fillcolor = obj->fillcolor; - int i; - - shape = newSWFShape(); - SWFShape_setLine(shape, obj->penwidth, - pencolor.u.rgba[0], - pencolor.u.rgba[1], - pencolor.u.rgba[2], - pencolor.u.rgba[3]); - if (filled) { - fill = SWFShape_addSolidFill(shape, - fillcolor.u.rgba[0], - fillcolor.u.rgba[1], - fillcolor.u.rgba[2], - fillcolor.u.rgba[3]); - SWFShape_setRightFill(shape, fill); - } - SWFShape_movePenTo(shape, A[0].x, A[0].y); - for (i = 1; i < n; i++) - SWFShape_drawLineTo(shape, A[i].x, A[i].y); - SWFShape_drawLineTo(shape, A[0].x, A[0].y); - SWFMovie_add(movie, (SWFBlock)shape); -} - -static void -ming_bezier(GVJ_t * job, pointf * A, int n, int arrow_at_start, - int arrow_at_end, int filled) -{ - SWFMovie movie = (SWFMovie)(job->context); - SWFShape shape; - obj_state_t *obj = job->obj; - gvcolor_t pencolor = obj->pencolor; - int i; - - shape = newSWFShape(); - SWFShape_setLine(shape, obj->penwidth, - pencolor.u.rgba[0], - pencolor.u.rgba[1], - pencolor.u.rgba[2], - pencolor.u.rgba[3]); - SWFShape_movePenTo(shape, A[0].x, A[0].y); - for (i = 1; i < n; i+=3) - SWFShape_drawCubicTo(shape, - A[i].x, A[i].y, A[i+1].x, A[i+1].y, A[i+2].x, A[i+2].y); - SWFMovie_add(movie, (SWFBlock)shape); -} - -static void -ming_polyline(GVJ_t * job, pointf * A, int n) -{ - SWFMovie movie = (SWFMovie)(job->context); - SWFShape shape; - obj_state_t *obj = job->obj; - gvcolor_t pencolor = obj->pencolor; - int i; - - shape = newSWFShape(); - SWFShape_setLine(shape, obj->penwidth, - pencolor.u.rgba[0], - pencolor.u.rgba[1], - pencolor.u.rgba[2], - pencolor.u.rgba[3]); - SWFShape_movePenTo(shape, A[0].x, A[0].y); - for (i = 1; i < n; i++) - SWFShape_drawLineTo(shape, A[i].x, A[i].y); - SWFMovie_add(movie, (SWFBlock)shape); -} - -static gvrender_engine_t ming_engine = { - ming_begin_job, - ming_end_job, - 0, /* ming_begin_graph */ - 0, /* ming_end_graph */ - 0, /* ming_begin_layer */ - 0, /* ming_end_layer */ - ming_begin_page, - ming_end_page, - 0, /* ming_begin_cluster */ - 0, /* ming_end_cluster */ - 0, /* ming_begin_nodes */ - 0, /* ming_end_nodes */ - 0, /* ming_begin_edges */ - 0, /* ming_end_edges */ - 0, /* ming_begin_node */ - 0, /* ming_end_node */ - 0, /* ming_begin_edge */ - 0, /* ming_end_edge */ - 0, /* ming_begin_anchor */ - 0, /* ming_end_anchor */ - 0, /* ming_begin_label */ - 0, /* ming_end_label */ - ming_textspan, - 0, /* ming_resolve_color */ - ming_ellipse, - ming_polygon, - ming_bezier, - ming_polyline, - 0, /* ming_comment */ - 0, /* ming_library_shape */ -}; - -static gvrender_features_t render_features_ming = { - GVRENDER_Y_GOES_DOWN, /* flags */ - 4., /* default pad - graph units */ - 0, /* knowncolors */ - 0, /* sizeof knowncolors */ - RGBA_BYTE, /* color_type */ -}; - -static gvdevice_features_t device_features_ming = { - GVDEVICE_DOES_PAGES - | GVDEVICE_NO_WRITER - | GVDEVICE_DOES_TRUECOLOR, /* flags */ - {0.,0.}, /* default margin - points */ - {0.,0.}, /* default page width, height - points */ - {96.,96.}, /* default dpi */ -}; - -gvplugin_installed_t gvrender_ming_types[] = { - {FORMAT_SWF, "ming", 10, &ming_engine, &render_features_ming}, - {0, NULL, 0, NULL, NULL} -}; - -gvplugin_installed_t gvdevice_ming_types[] = { - {FORMAT_SWF, "swf:ming", 10, NULL, &device_features_ming}, - {0, NULL, 0, NULL, NULL} -}; diff --git a/redhat/graphviz.spec.fedora.in b/redhat/graphviz.spec.fedora.in index 3b6940108..6cec6b698 100644 --- a/redhat/graphviz.spec.fedora.in +++ b/redhat/graphviz.spec.fedora.in @@ -34,8 +34,6 @@ Source0: https://gitlab.com/graphviz/graphviz/-/archive/@VERSION@/graphviz-@VERS %global WEBP 1 %global PYTHON3 1 %global QT5 1 -# Not yet. -%global MING 0 # Overrides for RHEL %if 0%{?rhel} @@ -493,30 +491,6 @@ LD_LIBRARY_PATH=%{_libdir} %{_bindir}/dot -c %{_libdir}/graphviz/libgvplugin_devil.so.* %endif -#-- graphviz-plugins-ming rpm -------------------------------------------------- -%if %{MING} -%package plugins-ming -Group: Applications/Multimedia -Summary: Graphviz plugin for flash renderer based on ming -Requires: %{name}-x = %{version}-%{release} -Obsoletes: %{name}-ming <= 2.41 -Provides: %{name}-ming = %{version}-%{release} - -%description plugins-ming -Graphviz plugin for -Tswf (flash) renderer based on ming. - -# run "dot -c" to generate plugin config in {_libdir}/graphviz/config6 -%post plugins-ming -LD_LIBRARY_PATH=%{_libdir} %{_bindir}/dot -c - -%postun plugins-ming -[ -x %{_bindir}/dot ] && LD_LIBRARY_PATH=%{_libdir} %{_bindir}/dot -c || : - -%files plugins-ming -%{_libdir}/graphviz/libgvplugin_ming.so.* -%{_libdir}/graphviz/*fdb -%endif - #-- graphviz-qt rpm -------------------------------------------------- %package qt Group: Applications/Multimedia @@ -961,9 +935,6 @@ CFLAGS="$RPM_OPT_FLAGS" \ %if ! %{OCAML} --disable-ocaml \ %endif -%if ! %{MING} - --without-ming \ -%endif %if ! %{ARRRR} --disable-r \ %endif diff --git a/windows/include/config.h b/windows/include/config.h index 40a505a6b..e645f94c7 100644 --- a/windows/include/config.h +++ b/windows/include/config.h @@ -144,9 +144,6 @@ /* Define to 1 if you have the `lrand48' function. */ /* #undef HAVE_LRAND48 */ -/* Define if you have the ming library for SWF support */ -/* #undef HAVE_MING */ - /* Define if you have the pangocairo library */ #define HAVE_PANGOCAIRO 1