git: e255bf2bdaa5 - main - vapoursynth-fmtconv: Update to version r30

From: Daniel Engberg <diizzy_at_FreeBSD.org>
Date: Sun, 06 Aug 2023 10:28:25 UTC
The branch main has been updated by diizzy:

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

commit e255bf2bdaa51438688cdfbf65385856086498f3
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2023-08-06 10:16:20 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2023-08-06 10:16:23 +0000

    vapoursynth-fmtconv: Update to version r30
    
    * Drop ARM 32-bit, too slow platform to be usable
    * Switch to upstream release archive
---
 graphics/vapoursynth-fmtconv/Makefile              | 25 ++++++++++------
 graphics/vapoursynth-fmtconv/distinfo              |  6 ++--
 .../files/patch-build_unix_Makefile.am             | 29 +++++++++++++++++++
 .../files/patch-build_unix_configure.ac            | 33 ++++++++++++++++++++++
 graphics/vapoursynth-fmtconv/pkg-message           |  8 ++++++
 5 files changed, 90 insertions(+), 11 deletions(-)

diff --git a/graphics/vapoursynth-fmtconv/Makefile b/graphics/vapoursynth-fmtconv/Makefile
index c4cc2688187f..0b42c54e5ad0 100644
--- a/graphics/vapoursynth-fmtconv/Makefile
+++ b/graphics/vapoursynth-fmtconv/Makefile
@@ -1,6 +1,7 @@
 PORTNAME=	fmtconv
-PORTVERSION=	r28
+DISTVERSION=	r30
 CATEGORIES=	graphics
+MASTER_SITES=	https://github.com/EleonoreMizo/${PORTNAME}/releases/download/${DISTVERSION}/
 PKGNAMEPREFIX=	vapoursynth-
 
 MAINTAINER=	ports@FreeBSD.org
@@ -8,22 +9,30 @@ COMMENT=	Format conversion tools for Vapoursynth and Avisynth+
 WWW=		https://github.com/EleonoreMizo/fmtconv
 
 LICENSE=	WTFPL
+LICENSE_FILES=	${WRKSRC}/COPYING
 
-ONLY_FOR_ARCHS=	aarch64 amd64 armv6 armv7 i386
+ONLY_FOR_ARCHS=	aarch64 amd64
 
-USE_GITHUB=	yes
-GH_ACCOUNT=	EleonoreMizo
+USES=		autoreconf compiler:c++14-lang gmake libtool zip
+
+EXTRACT_AFTER_ARGS=	-d ${WRKDIR}/${PORTNAME}-${DISTVERSION}
 
-USES=		autoreconf compiler:c++11-lib gmake libtool
 WRKSRC_SUBDIR=	build/unix
 PATCH_WRKSRC=	${WRKSRC:H:H}
+
 GNU_CONFIGURE=	yes
-CONFIGURE_ARGS=	--libdir="${DATADIR}"
 INSTALL_TARGET=	install-strip
-DATADIR=	${PREFIX}/lib/vapoursynth
+
 DOCSDIR=	${PREFIX}/share/doc/${PKGBASE}
-PORTDATA=	lib${PORTNAME}.so
 PORTDOCS=	*
+PLIST_FILES=	lib/vapoursynth/lib${PORTNAME}.so
+
+# We need at least AVX2 instructions on amd64
+.if !defined(CPUTYPE) && ${ARCH} == "amd64"
+CONFIGURE_ENV+=	EXTRA_CXXFLAGS=-march=haswell
+.endif
+
+CONFIGURE_ARGS=	--libdir="${PREFIX}/lib/vapoursynth"
 
 OPTIONS_DEFINE=	DOCS
 
diff --git a/graphics/vapoursynth-fmtconv/distinfo b/graphics/vapoursynth-fmtconv/distinfo
index 1bc0e6227b9f..3aa839bcd989 100644
--- a/graphics/vapoursynth-fmtconv/distinfo
+++ b/graphics/vapoursynth-fmtconv/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1637359758
-SHA256 (EleonoreMizo-fmtconv-r28_GH0.tar.gz) = b68cce5d01b5f809953f79203a1948334185485acc7eb824dd21272f2b34c910
-SIZE (EleonoreMizo-fmtconv-r28_GH0.tar.gz) = 2645704
+TIMESTAMP = 1691311545
+SHA256 (fmtconv-r30.zip) = f35dba222f2a4d998cd5f777e14382d21337f86fec8ba38832d577ad5795f2e6
+SIZE (fmtconv-r30.zip) = 7457629
diff --git a/graphics/vapoursynth-fmtconv/files/patch-build_unix_Makefile.am b/graphics/vapoursynth-fmtconv/files/patch-build_unix_Makefile.am
new file mode 100644
index 000000000000..a873dce563b8
--- /dev/null
+++ b/graphics/vapoursynth-fmtconv/files/patch-build_unix_Makefile.am
@@ -0,0 +1,29 @@
+--- build/unix/Makefile.am.orig	2023-08-06 08:51:47 UTC
++++ build/unix/Makefile.am
+@@ -369,7 +369,7 @@ libsse2_la_SOURCES = \
+         ../../src/fstb/ToolsSse2.h \
+         ../../src/fstb/ToolsSse2.hpp
+ 
+-libsse2_la_CXXFLAGS = $(AM_CXXFLAGS) -msse2
++libsse2_la_CXXFLAGS = $(AM_CXXFLAGS)
+ libfmtconv_la_LIBADD += libsse2.la
+ fmtcltest_LDADD += libsse2.la
+ noinst_LTLIBRARIES += libsse2.la
+@@ -379,7 +379,7 @@ commonsrcavx = \
+ 
+ libavx_la_SOURCES = $(commonsrcavx)
+ 
+-libavx_la_CXXFLAGS = $(AM_CXXFLAGS) -mavx
++libavx_la_CXXFLAGS = $(AM_CXXFLAGS)
+ libfmtconv_la_LIBADD += libavx.la
+ fmtcltest_LDADD += libavx.la
+ noinst_LTLIBRARIES += libavx.la
+@@ -397,7 +397,7 @@ libavx2_la_SOURCES = $(commonsrcavx2) \
+         ../../src/fstb/ToolsAvx2.h \
+         ../../src/fstb/ToolsAvx2.hpp
+ 
+-libavx2_la_CXXFLAGS = $(AM_CXXFLAGS) -mavx2
++libavx2_la_CXXFLAGS = $(AM_CXXFLAGS)
+ libfmtconv_la_LIBADD += libavx2.la
+ fmtcltest_LDADD += libavx2.la
+ noinst_LTLIBRARIES += libavx2.la
diff --git a/graphics/vapoursynth-fmtconv/files/patch-build_unix_configure.ac b/graphics/vapoursynth-fmtconv/files/patch-build_unix_configure.ac
new file mode 100644
index 000000000000..6a0cedc4c185
--- /dev/null
+++ b/graphics/vapoursynth-fmtconv/files/patch-build_unix_configure.ac
@@ -0,0 +1,33 @@
+--- build/unix/configure.ac.orig	2023-08-06 08:54:07 UTC
++++ build/unix/configure.ac
+@@ -48,7 +48,7 @@ AS_IF(
+         DEBUGCFLAGS="-O0 -g3 -ggdb"
+         AC_MSG_NOTICE([Debug mode enabled.])
+     ],
+-    [DEBUGCFLAGS="-O3 -g3 -DNDEBUG"]
++#    [DEBUGCFLAGS="-O3 -g3 -DNDEBUG"]
+ )
+ 
+ AS_IF(
+@@ -88,10 +88,10 @@ AS_IF(
+ AS_IF(
+     [test "x$X86" = "xtrue"],
+     [
+-        MFLAGS="$MFLAGS -mfpmath=sse -msse2"
++#        MFLAGS="$MFLAGS -mfpmath=sse -msse2"
+         COMPWARNFLAGS="$COMPWARNFLAGS -Wno-ignored-attributes"
+         # We need this to use CMPXCHG16B for 2x64-bit CAS (compare and swap)
+-        AS_IF([test "x$BITS" = "x64"], [MFLAGS="$MFLAGS -mcx16"])
++#        AS_IF([test "x$BITS" = "x64"], [MFLAGS="$MFLAGS -mcx16"])
+     ]
+ )
+ 
+@@ -100,7 +100,7 @@ AS_IF(
+     [
+         MFLAGS="-ftree-vectorize"
+ 
+-        AX_CHECK_COMPILE_FLAG([-mfpu=neon], [MFLAGS="$MFLAGS -mfpu=neon"])
++#       AX_CHECK_COMPILE_FLAG([-mfpu=neon], [MFLAGS="$MFLAGS -mfpu=neon"])
+ 
+         # GCC 7 emits some warnings about ABI changes when using std::vector
+         AX_CHECK_COMPILE_FLAG([-Wpsabi], [COMPWARNFLAGS="$COMPWARNFLAGS -Wno-psabi"], , [-Werror])
diff --git a/graphics/vapoursynth-fmtconv/pkg-message b/graphics/vapoursynth-fmtconv/pkg-message
new file mode 100644
index 000000000000..7dffe3aaa345
--- /dev/null
+++ b/graphics/vapoursynth-fmtconv/pkg-message
@@ -0,0 +1,8 @@
+[
+{ type: install
+  message: <<EOM
+Vapoursynth-fmtconv requires AVX2 instruction set on amd64 and should be recompiled with CPUTYPE defined for best performance.
+If it fails to run (SIGILL, Illegal instruction) ensure your CPU supports AVX2 instructions.
+EOM
+}
+]