git: fa95ac5810fb - main - graphics/autotrace: Update to 0.31.10

From: Daniel Engberg <diizzy_at_FreeBSD.org>
Date: Sat, 26 Oct 2024 17:40:59 UTC
The branch main has been updated by diizzy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=fa95ac5810fbfa559ae609c800985d8ebcc65ad9

commit fa95ac5810fbfa559ae609c800985d8ebcc65ad9
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2024-10-26 17:16:48 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2024-10-26 17:16:51 +0000

    graphics/autotrace: Update to 0.31.10
    
    * Switch from PORTVERSION to DISTVERSION
    * Update WWW
    * Disable ming support permanently
    * Enable "make test"
    
    Changelog: https://github.com/autotrace/autotrace/releases/tag/0.31.10
    
    Backport upstream commits:
    eeeb813a416ff309804f6833729fab20d036e667
    f436324241f4855325e64c6de0fb5be848a300f5
    a26cfe0039f00012613edbe7cc5c58b623b3ea48
    b32c25d16dadf85e6236b13aaf10edae52d810f4
    a74b683a6bfeceeda8c4086a3eb559a98e950c95
    3b148a17199ad730995614b143cceb6a9987cf07
    bc1bcc06790b81db73c3bafab94c47f47a2ac8e8
    
    Backport upstream PRs:
    
    References:
    https://github.com/autotrace/autotrace/commit/eeeb813a416ff309804f6833729fab20d036e667
    https://github.com/autotrace/autotrace/commit/f436324241f4855325e64c6de0fb5be848a300f5
    https://github.com/autotrace/autotrace/commit/a26cfe0039f00012613edbe7cc5c58b623b3ea48
    https://github.com/autotrace/autotrace/commit/b32c25d16dadf85e6236b13aaf10edae52d810f4
    https://github.com/autotrace/autotrace/commit/a74b683a6bfeceeda8c4086a3eb559a98e950c95
    https://github.com/autotrace/autotrace/commit/3b148a17199ad730995614b143cceb6a9987cf07
    https://github.com/autotrace/autotrace/commit/bc1bcc06790b81db73c3bafab94c47f47a2ac8e8
    https://github.com/autotrace/autotrace/pull/151
    https://github.com/autotrace/autotrace/pull/156
    
    PR:             281870
    Approved by:    portmgr (maintainer timeout, 2+ weeks)
---
 graphics/autotrace/Makefile                 | 51 +++++++++-------
 graphics/autotrace/distinfo                 | 23 ++++++-
 graphics/autotrace/files/patch-input-png.c  | 95 -----------------------------
 graphics/autotrace/files/patch-output-swf.c | 11 ----
 graphics/autotrace/pkg-plist                |  6 +-
 5 files changed, 52 insertions(+), 134 deletions(-)

diff --git a/graphics/autotrace/Makefile b/graphics/autotrace/Makefile
index 74fd1891494c..d26737cd7f1e 100644
--- a/graphics/autotrace/Makefile
+++ b/graphics/autotrace/Makefile
@@ -1,50 +1,55 @@
 PORTNAME=	autotrace
-PORTVERSION=	0.31.1
-PORTREVISION=	35
+DISTVERSION=	0.31.10
 CATEGORIES=	graphics
-MASTER_SITES=	SF/${PORTNAME}/AutoTrace/${PORTVERSION}
+
+PATCH_SITES=	https://github.com/autotrace/autotrace/commit/
+PATCHFILES=	eeeb813a416ff309804f6833729fab20d036e667.patch:-p1 \
+		f436324241f4855325e64c6de0fb5be848a300f5.patch:-p1 \
+		a26cfe0039f00012613edbe7cc5c58b623b3ea48.patch:-p1 \
+		b32c25d16dadf85e6236b13aaf10edae52d810f4.patch:-p1 \
+		a74b683a6bfeceeda8c4086a3eb559a98e950c95.patch:-p1 \
+		3b148a17199ad730995614b143cceb6a9987cf07.patch:-p1 \
+		bc1bcc06790b81db73c3bafab94c47f47a2ac8e8.patch:-p1 \
+		1a1b29e4e041098d920a3a1f2fd237bca98eecda.patch:-p1 \
+		190f18251b8fe9a361cd8154f2f746855472ffed.patch:-p1
 
 MAINTAINER=	portmaster@BSDforge.com
 COMMENT=	Convert bitmap to vector graphics
-WWW=		https://AutoTrace.sourceforge.net/
+WWW=		https://github.com/autotrace/autotrace
 
 LICENSE=	GPLv2 LGPL21
 LICENSE_COMB=	multi
 
 LIB_DEPENDS=	libpng.so:graphics/png
 
-USES=		cpe pathfix pkgconfig libtool
+USES=		autoreconf:2.69 cpe gettext-tools gettext-runtime gmake gnome libtool pathfix pkgconfig
 CPE_VENDOR=	autotrace_project
-GNU_CONFIGURE=	yes
-GNU_CONFIGURE_MANPREFIX=${PREFIX}/share
+USE_GNOME=	glib20 intltool
 USE_LDCONFIG=	yes
-CPPFLAGS+=	$$(libpng-config --I_opts)
-LDFLAGS+=	$$(libpng-config --L_opts)
+
+USE_GITHUB=	yes
+
+GNU_CONFIGURE=	yes
+
 INSTALL_TARGET=	install-strip
+TEST_TARGET=	check
+
+CONFIGURE_ENV=	ac_cv_header_ming_h=no
+CONFIGURE_ARGS=	--disable-nls \
+		--disable-static
 
-OPTIONS_DEFINE=	IMAGEMAGICK MING PSTOEDIT
+OPTIONS_DEFINE=	IMAGEMAGICK PSTOEDIT
 OPTIONS_DEFAULT=IMAGEMAGICK
-MING_DESC=	Enable swf interface
+
 PSTOEDIT_DESC=	Convert postscript to other formats
 
 IMAGEMAGICK_USES=		magick:7
 IMAGEMAGICK_CONFIGURE_OFF=	--without-magick
 
-MING_LIB_DEPENDS=	libming.so:graphics/ming
-MING_CPPFLAGS=		-I${LOCALBASE}/include -I${LOCALBASE}/include/ming
-MING_CONFIGURE_OFF=	ac_cv_header_ming_h=no
-
 PSTOEDIT_LIB_DEPENDS=	libpstoedit.so:graphics/pstoedit
 PSTOEDIT_CONFIGURE_OFF=	--without-pstoedit
 
-post-patch:
-	@${REINPLACE_CMD} -e \
-		's|Magick-config|MagickWand-config|g ; \
-		/$$PSTOEDIT_CONFIG/s|--version|--modversion| ; \
-		s|$$PSTOEDIT_CONFIG $$pstoedit_args|pkg-config pstoedit| ; \
-		/^PSTOEDIT_CONFIG=/s|=.*$$|=pkg-config|' ${WRKSRC}/configure
-
 post-install:
-	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libautotrace.so
+	${RM} -r ${STAGEDIR}${PREFIX}/share/locale
 
 .include <bsd.port.mk>
diff --git a/graphics/autotrace/distinfo b/graphics/autotrace/distinfo
index 7065afb09e55..a6e0ddac9fb3 100644
--- a/graphics/autotrace/distinfo
+++ b/graphics/autotrace/distinfo
@@ -1,2 +1,21 @@
-SHA256 (autotrace-0.31.1.tar.gz) = 5a1a923c3335dfd7cbcccb2bbd4cc3d68cafe7713686a2f46a1591ed8a92aff6
-SIZE (autotrace-0.31.1.tar.gz) = 362718
+TIMESTAMP = 1728127384
+SHA256 (autotrace-autotrace-0.31.10_GH0.tar.gz) = 14627f93bb02fe14eeda0163434a7cb9b1f316c0f1727f0bdf6323a831ffe80d
+SIZE (autotrace-autotrace-0.31.10_GH0.tar.gz) = 924682
+SHA256 (eeeb813a416ff309804f6833729fab20d036e667.patch) = 08d0aeb9b806117e40fdb83608f4f76f9c78f324c1a682b61a8bd9b7dcf4b9e6
+SIZE (eeeb813a416ff309804f6833729fab20d036e667.patch) = 1020
+SHA256 (f436324241f4855325e64c6de0fb5be848a300f5.patch) = ae47631ee0fad42f4ea99a458296a95e98abbc61057f65ecad9a9665ffe32e99
+SIZE (f436324241f4855325e64c6de0fb5be848a300f5.patch) = 3026
+SHA256 (a26cfe0039f00012613edbe7cc5c58b623b3ea48.patch) = a3c82a5071d1d3fa22d43a13d61415b2ff95e3e5e50801a026eb22263cac5a7d
+SIZE (a26cfe0039f00012613edbe7cc5c58b623b3ea48.patch) = 5902
+SHA256 (b32c25d16dadf85e6236b13aaf10edae52d810f4.patch) = 39032ce90b72dd96714d092d15aef82d0628d216cb12d5bea8377a66e72d5148
+SIZE (b32c25d16dadf85e6236b13aaf10edae52d810f4.patch) = 851
+SHA256 (a74b683a6bfeceeda8c4086a3eb559a98e950c95.patch) = f8ad4e8ed0e6d337e1cfcbfcc301bddaba730ffd8114d284caa0966433be014d
+SIZE (a74b683a6bfeceeda8c4086a3eb559a98e950c95.patch) = 740
+SHA256 (3b148a17199ad730995614b143cceb6a9987cf07.patch) = 6fd5527cc75e3a779460a10621984f61d05349ef4bd449b6a98f48ada71994fe
+SIZE (3b148a17199ad730995614b143cceb6a9987cf07.patch) = 1510
+SHA256 (bc1bcc06790b81db73c3bafab94c47f47a2ac8e8.patch) = a41ba437488525ae475a8daeebc724d329f7f646758fcd46ceb8dbcd53ee8323
+SIZE (bc1bcc06790b81db73c3bafab94c47f47a2ac8e8.patch) = 590
+SHA256 (1a1b29e4e041098d920a3a1f2fd237bca98eecda.patch) = 02c36ee497fbac6de58938f05a216544bb189849c5926d0af303633e7e3f5616
+SIZE (1a1b29e4e041098d920a3a1f2fd237bca98eecda.patch) = 601
+SHA256 (190f18251b8fe9a361cd8154f2f746855472ffed.patch) = 74d54150c729504498d92ec06351fbaf38820649cc3055fc77801d4ee754ea43
+SIZE (190f18251b8fe9a361cd8154f2f746855472ffed.patch) = 971
diff --git a/graphics/autotrace/files/patch-input-png.c b/graphics/autotrace/files/patch-input-png.c
deleted file mode 100644
index b2a3a5950868..000000000000
--- a/graphics/autotrace/files/patch-input-png.c
+++ /dev/null
@@ -1,95 +0,0 @@
-$NetBSD: patch-input-png.c,v 1.1 2011/02/07 00:37:54 wiz Exp $
-
-Fix build with png-1.5.
-
---- input-png.c.orig	2002-10-10 20:44:14.000000000 +0000
-+++ input-png.c
-@@ -42,17 +42,17 @@ static png_bytep * read_png(png_structp 
- 
- static void handle_warning(png_structp png, const at_string message) {
-         LOG1("PNG warning: %s", message);
--	at_exception_warning((at_exception_type *)png->error_ptr,
-+	at_exception_warning((at_exception_type *)png_get_error_ptr(png),
- 			     message);
--	/* at_exception_fatal((at_exception_type *)at_png->error_ptr,
-+	/* at_exception_fatal((at_exception_type *)png_get_error_ptr(at_png),
- 	   "PNG warning"); */
- }
- 
- static void handle_error(png_structp png, const at_string message) {
- 	LOG1("PNG error: %s", message);
--	at_exception_fatal((at_exception_type *)png->error_ptr,
-+	at_exception_fatal((at_exception_type *)png_get_error_ptr(png),
- 			   message);
--	/* at_exception_fatal((at_exception_type *)at_png->error_ptr,
-+	/* at_exception_fatal((at_exception_type *)png_get_error_ptr(at_png),
- 	   "PNG error"); */
- 	
- }
-@@ -106,7 +106,8 @@ static int load_image(at_bitmap_type *im
- 	png_init_io(png, stream);
- 	CHECK_ERROR();
- 	
--	rows = read_png(png, info, opts);
-+	png_read_png(png, info, PNG_TRANSFORM_STRIP_16 | PNG_TRANSFORM_PACKING | PNG_TRANSFORM_EXPAND, 0);
-+	rows = png_get_rows(png, info);
- 
- 	width = (unsigned short)png_get_image_width(png, info);
- 	height = (unsigned short)png_get_image_height(png, info);
-@@ -145,56 +146,3 @@ at_bitmap_type input_png_reader(at_strin
- 
- 	return image;
- }
--
--static png_bytep *
--read_png(png_structp png_ptr, png_infop info_ptr, at_input_opts_type * opts)
--{
--	int row;
--	png_color_16p original_bg;
--	png_color_16  my_bg;
--
--	png_read_info(png_ptr, info_ptr);
--
--	png_set_strip_16(png_ptr);
--	png_set_packing(png_ptr);
--	if ((png_ptr->bit_depth < 8) ||
--	    (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) ||
--	    (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)))
--		png_set_expand(png_ptr);
--
--	if (png_get_bKGD(png_ptr, info_ptr, &original_bg)) {
--		/* Fill transparent region with ... */
--		my_bg.index = 0;
--
--		if (opts && opts->background_color) {
--			my_bg.red   = 256 * opts->background_color->r;
--			my_bg.green = 256 * opts->background_color->g;
--			my_bg.blue  = 256 * opts->background_color->b;
--			my_bg.gray  = 256* ((opts->background_color->r
--					     + opts->background_color->g
--					     + opts->background_color->b) / 3);
--		} else
--			  /* else, use white */
--			  my_bg.red = my_bg.green = my_bg.blue = my_bg.gray = 0xFFFF;
--		
--		png_set_background(png_ptr, &my_bg,
--				   PNG_BACKGROUND_GAMMA_FILE, 1, 1.0);
--	} else
--		png_set_strip_alpha(png_ptr);
--	png_read_update_info(png_ptr, info_ptr);
--
--
--	info_ptr->row_pointers = (png_bytepp)png_malloc(png_ptr,
--							info_ptr->height * sizeof(png_bytep));
--#ifdef PNG_FREE_ME_SUPPORTED
--	info_ptr->free_me |= PNG_FREE_ROWS;
--#endif
--	for (row = 0; row < (int)info_ptr->height; row++)
--		info_ptr->row_pointers[row] = (png_bytep)png_malloc(png_ptr,
--								    png_get_rowbytes(png_ptr, info_ptr));
--	
--	png_read_image(png_ptr, info_ptr->row_pointers);
--	info_ptr->valid |= PNG_INFO_IDAT;
--	png_read_end(png_ptr, info_ptr);
--	return png_get_rows(png_ptr, info_ptr);
--}
diff --git a/graphics/autotrace/files/patch-output-swf.c b/graphics/autotrace/files/patch-output-swf.c
deleted file mode 100644
index ae43cb7f13e7..000000000000
--- a/graphics/autotrace/files/patch-output-swf.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- output-swf.c.orig	Sun Dec 23 22:10:59 2001
-+++ output-swf.c	Thu Dec 27 14:45:31 2001
-@@ -2,7 +2,7 @@
- 
- #include "spline.h"
- #include "output-swf.h"
--#include <ming.h>
-+#include <ming/libming.h>
- 
- #define FPS 24.0
- #define IMGID 1
diff --git a/graphics/autotrace/pkg-plist b/graphics/autotrace/pkg-plist
index 9377878f6339..9a9b3fb6de4f 100644
--- a/graphics/autotrace/pkg-plist
+++ b/graphics/autotrace/pkg-plist
@@ -1,14 +1,14 @@
 bin/autotrace
-bin/autotrace-config
 include/autotrace/autotrace.h
+include/autotrace/color.h
 include/autotrace/exception.h
 include/autotrace/input.h
 include/autotrace/output.h
+include/autotrace/spline.h
 include/autotrace/types.h
-lib/libautotrace.a
 lib/libautotrace.so
 lib/libautotrace.so.3
 lib/libautotrace.so.3.0.0
 libdata/pkgconfig/autotrace.pc
 share/man/man1/autotrace.1.gz
-share/aclocal/autotrace.m4
+