diff --git a/multimedia/vapoursynth/Makefile b/multimedia/vapoursynth/Makefile index 1487516079e9..9f67ffc7b9e3 100644 --- a/multimedia/vapoursynth/Makefile +++ b/multimedia/vapoursynth/Makefile @@ -1,63 +1,68 @@ PORTNAME= vapoursynth -DISTVERSION= R63 +DISTVERSION= R64 CATEGORIES= multimedia +PATCH_SITES= https://github.com/${PORTNAME}/${PORTNAME}/commit/ +PATCHFILES= 8c68f4d42349aa3ba87ec3700a12e7fb38867748.patch:-p1 \ + 31979d78dbe49c081b7da3ca1f7949433d83ca24.patch:-p1 \ + ad8bee27e37789ab01b82538e26db72d4128208d.patch:-p1 + MAINTAINER= ports@FreeBSD.org COMMENT= Video processing framework with simplicity in mind WWW= https://www.vapoursynth.com/ LICENSE= LGPL21+ LICENSE_FILE= ${WRKSRC}/COPYING.LESSER BUILD_DEPENDS= ${BUILD_DEPENDS_${ARCH}} BUILD_DEPENDS_amd64= nasm:devel/nasm LIB_DEPENDS= libzimg.so:graphics/sekrit-twc-zimg USES= autoreconf compiler:c++17-lang gmake libtool localbase pathfix python pkgconfig USE_PYTHON= cython USE_GITHUB= yes USE_LDCONFIG= yes BINARY_ALIAS= cython=cython-${PYTHON_VER} INSTALL_TARGET= install-strip GNU_CONFIGURE= yes DATADIR= ${PREFIX}/lib/vapoursynth CONFIGURE_ARGS= --disable-static OPTIONS_DEFINE= DEBUG DOCS FRAME_GUARD OPTIONS_SUB= yes DEBUG_CONFIGURE_ENABLE= debug DOCS_BUILD_DEPENDS= sphinx-build:textproc/py-sphinx \ ${PYTHON_PKGNAMEPREFIX}sphinx_rtd_theme>0:textproc/py-sphinx_rtd_theme@${PY_FLAVOR} DOCS_PORTDOCS= * FRAME_GUARD_DESC= Check integrity after each filter FRAME_GUARD_CONFIGURE_ENABLE= guard-pattern .include .if ${ARCH} == amd64 && defined(MACHINE_CPU) && ${MACHINE_CPU:Mavx2} CONFIGURE_ARGS+= --enable-x86-asm .else CONFIGURE_ARGS+= --disable-x86-asm .endif post-patch: @${REINPLACE_CMD} -e 's/x86_64/&|amd64/' \ -e '/AC_SEARCH.*libiconv/d' \ -e '/test/s/[^ ]*libiconv.*-a //' \ ${WRKSRC}/configure.ac post-build-DOCS-on: @${LOCALBASE}/bin/sphinx-build-${PYTHON_VER} -d ${WRKDIR} ${WRKSRC}/doc ${WRKSRC}/doc/_build/html post-install-DOCS-on: (cd ${WRKSRC}/doc/_build/html && ${COPYTREE_SHARE} \ "${PORTDOCS}" ${STAGEDIR}${DOCSDIR}) .include diff --git a/multimedia/vapoursynth/distinfo b/multimedia/vapoursynth/distinfo index 4bdd08f95429..0d8b64c52cb0 100644 --- a/multimedia/vapoursynth/distinfo +++ b/multimedia/vapoursynth/distinfo @@ -1,3 +1,9 @@ -TIMESTAMP = 1690671648 -SHA256 (vapoursynth-vapoursynth-R63_GH0.tar.gz) = ed909b3c58e79bcbb056d07c5d301222ba8001222b4b40d5c1123be35fea9ae2 -SIZE (vapoursynth-vapoursynth-R63_GH0.tar.gz) = 1869415 +TIMESTAMP = 1696172369 +SHA256 (vapoursynth-vapoursynth-R64_GH0.tar.gz) = 29e7972eace52bb83365cf9a14a5552df444090391f032de23b589ed8ff64213 +SIZE (vapoursynth-vapoursynth-R64_GH0.tar.gz) = 1870065 +SHA256 (8c68f4d42349aa3ba87ec3700a12e7fb38867748.patch) = 8cd28e01cc513a7a9ce00de62db61f757a6dbe3e4e521c58b28ae8f3f1d58ce9 +SIZE (8c68f4d42349aa3ba87ec3700a12e7fb38867748.patch) = 1519 +SHA256 (31979d78dbe49c081b7da3ca1f7949433d83ca24.patch) = 7f04580eb487be443b6b8f03ffe09f267d7ece843fe1b048024b425dadbdd31c +SIZE (31979d78dbe49c081b7da3ca1f7949433d83ca24.patch) = 1505 +SHA256 (ad8bee27e37789ab01b82538e26db72d4128208d.patch) = 93a2cc53db57f9bd03a536d6c76757ed5a4217f0caafead2bfefca20a654846d +SIZE (ad8bee27e37789ab01b82538e26db72d4128208d.patch) = 1994 diff --git a/multimedia/vapoursynth/files/patch-src_core_expr_expr.cpp b/multimedia/vapoursynth/files/patch-src_core_expr_expr.cpp deleted file mode 100644 index d59277f96e8c..000000000000 --- a/multimedia/vapoursynth/files/patch-src_core_expr_expr.cpp +++ /dev/null @@ -1,122 +0,0 @@ ---- src/core/expr/expr.cpp.orig 2023-06-06 12:15:18 UTC -+++ src/core/expr/expr.cpp -@@ -20,15 +20,15 @@ - - #include - #include --#include - #include -+#include -+#include - #include - #include - #include - #include - #include - #include --#include - #include - #include - #include -@@ -136,9 +136,9 @@ bool equalSubTree(const ExpressionTreeNode *lhs, const - return true; - } - --std::vector tokenize(const std::string &expr) -+std::vector tokenize(const std::string &expr) - { -- std::vector tokens; -+ std::vector tokens; - auto it = expr.begin(); - auto prev = expr.begin(); - -@@ -147,20 +147,20 @@ std::vector tokenize(const std::stri - - if (std::isspace(c)) { - if (it != prev) -- tokens.push_back({ expr.c_str() + (prev - expr.begin()), static_cast(it - prev) }); -+ tokens.push_back(expr.substr(prev - expr.begin(), it - prev)); - prev = it + 1; - } - ++it; - } - if (prev != expr.end()) -- tokens.push_back({ expr.c_str() + (prev - expr.begin()), static_cast(expr.end() - prev) }); -+ tokens.push_back(expr.substr(prev - expr.begin(), expr.end() - prev)); - - return tokens; - } - --ExprOp decodeToken(std::string_view token) -+ExprOp decodeToken(const std::string &token) - { -- static const std::unordered_map simple{ -+ static const std::unordered_map simple{ - { "+", { ExprOpType::ADD } }, - { "-", { ExprOpType::SUB } }, - { "*", { ExprOpType::MUL } }, -@@ -195,26 +195,34 @@ ExprOp decodeToken(std::string_view token) - return{ ExprOpType::MEM_LOAD_U8, token[0] >= 'x' ? token[0] - 'x' : token[0] - 'a' + 3 }; - } else if (token.substr(0, 3) == "dup" || token.substr(0, 4) == "swap") { - size_t prefix = token[0] == 'd' ? 3 : 4; -+ size_t count = 0; - int idx = -1; - -- auto result = std::from_chars(token.data() + prefix, token.data() + token.size(), idx); -- if (idx < 0 || result.ptr != token.data() + token.size()) -- throw std::runtime_error("illegal token: " + std::string{ token }); -+ try { -+ idx = std::stoi(token.substr(prefix), &count); -+ } catch (...) { -+ // ... -+ } -+ -+ if (idx < 0 || prefix + count != token.size()) -+ throw std::runtime_error("illegal token: " + token); - return{ token[0] == 'd' ? ExprOpType::DUP : ExprOpType::SWAP, idx }; - } else { - float f; -- auto result = std::from_chars(token.data(), token.data() + token.size(), f); -- if (result.ec == std::errc::invalid_argument) -- throw std::runtime_error("failed to convert '" + std::string{ token } + "' to float"); -- if (result.ptr != token.data() + token.size()) -- throw std::runtime_error("failed to convert '" + std::string{ token } + "' to float, not the whole token could be converted"); -+ std::string s; -+ std::istringstream numStream(token); -+ numStream.imbue(std::locale::classic()); -+ if (!(numStream >> f)) -+ throw std::runtime_error("failed to convert '" + token + "' to float"); -+ if (numStream >> s) -+ throw std::runtime_error("failed to convert '" + token + "' to float, not the whole token could be converted"); - return{ ExprOpType::CONSTANT, f }; - } - } - - ExpressionTree parseExpr(const std::string &expr, const VSVideoInfo * const srcFormats[], int numInputs) - { -- static constexpr unsigned char numOperands[] = { -+ constexpr unsigned char numOperands[] = { - 0, // MEM_LOAD_U8 - 0, // MEM_LOAD_U16 - 0, // MEM_LOAD_F16 -@@ -256,16 +264,16 @@ ExpressionTree parseExpr(const std::string &expr, cons - ExpressionTree tree; - std::vector stack; - -- for (std::string_view tok : tokens) { -+ for (const std::string &tok : tokens) { - ExprOp op = decodeToken(tok); - - // Check validity. - if (op.type == ExprOpType::MEM_LOAD_U8 && op.imm.i >= numInputs) -- throw std::runtime_error("reference to undefined clip: " + std::string{ tok }); -+ throw std::runtime_error("reference to undefined clip: " + tok); - if ((op.type == ExprOpType::DUP || op.type == ExprOpType::SWAP) && op.imm.u >= stack.size()) -- throw std::runtime_error("insufficient values on stack: " + std::string{ tok }); -+ throw std::runtime_error("insufficient values on stack: " + tok); - if (stack.size() < numOperands[static_cast(op.type)]) -- throw std::runtime_error("insufficient values on stack: " + std::string{ tok }); -+ throw std::runtime_error("insufficient values on stack: " + tok); - - // Rename load operations with the correct data type. - if (op.type == ExprOpType::MEM_LOAD_U8) {