]> granicus.if.org Git - graphviz/commitdiff
remove Ming plugin
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 5 Dec 2021 01:44:24 +0000 (17:44 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 11 Dec 2021 04:33:04 +0000 (20:33 -0800)
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

12 files changed:
CHANGELOG.md
configure.ac
lib/gvc/gvcjob.h
m4/ming.m4 [deleted file]
plugin/Makefile.am
plugin/ming/Bitstream_Vera_Sans.fdb [deleted file]
plugin/ming/Bitstream_Vera_Serif.fdb [deleted file]
plugin/ming/Makefile.am [deleted file]
plugin/ming/gvplugin_ming.c [deleted file]
plugin/ming/gvrender_ming.c [deleted file]
redhat/graphviz.spec.fedora.in
windows/include/config.h

index 7f24d31347db70779cf8fe7da823f931074a9f10..0c3235f7896ce48f166f60e3e32eaf2ceb2e3299 100644 (file)
@@ -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
index 26b1323be2dd1dc39ddd8f0cd3b2e93844123949..be6dd96422fabd2621fa655c51fd3e6e31e4702a 100644 (file)
@@ -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"
index c9b3690ac78816de19f51f6ca6ad079456b88733..72b9baa3b5ab683ff9403e1c43ccf4477bd5eb02 100644 (file)
@@ -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 (file)
index e423054..0000000
+++ /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=[<ming-config>]], [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)
-])
-
index 3637a1f42d06a4bdda14273d4f3fb9a3acb3bc54..d63ab8880ecd5f75b6aae0831ba5e75c480f35f3 100644 (file)
@@ -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 (file)
index 7dff1d9..0000000
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 (file)
index 28b7c1d..0000000
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 (file)
index 316c1f8..0000000
+++ /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 (file)
index 8d2a563..0000000
+++ /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 <gvc/gvplugin.h>
-
-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 (file)
index 81c40d1..0000000
+++ /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 <stdlib.h>
-#include <string.h>
-#include <gvc/gvplugin_render.h>
-
-/* 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 <ming.h>
-
-#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}
-};
index 3b69401080c52b4d20d0fc0233c3a1657ba9da22..6cec6b69883f284551c01475476da5c1c4ad9749 100644 (file)
@@ -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
index 40a505a6be7b03accd2cf9cf203ea0ffb0c7e2b2..e645f94c7cf06ea0f574d699cb5b4e969f4c4f1c 100644 (file)
 /* 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