Skip to content

Commit

Permalink
vapoursynth-fmtconv: Update to version r30
Browse files Browse the repository at this point in the history
* Drop ARM 32-bit, too slow platform to be usable
* Switch to upstream release archive
  • Loading branch information
Daniel Engberg authored and Daniel Engberg committed Aug 6, 2023
1 parent 6a824f5 commit e255bf2
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 11 deletions.
25 changes: 17 additions & 8 deletions graphics/vapoursynth-fmtconv/Makefile
@@ -1,29 +1,38 @@
PORTNAME= fmtconv
PORTVERSION= r28
DISTVERSION= r30
CATEGORIES= graphics
MASTER_SITES= https://github.com/EleonoreMizo/${PORTNAME}/releases/download/${DISTVERSION}/
PKGNAMEPREFIX= vapoursynth-

MAINTAINER= ports@FreeBSD.org
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

Expand Down
6 changes: 3 additions & 3 deletions 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
29 changes: 29 additions & 0 deletions 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
33 changes: 33 additions & 0 deletions 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])
8 changes: 8 additions & 0 deletions 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
}
]

0 comments on commit e255bf2

Please sign in to comment.