[packages/vapoursynth] - updated to 82; adjusted checks to fix build for x32 with SSE2/AVX support and generic i686
qboosh
qboosh at pld-linux.org
Sat Nov 21 19:28:55 CET 2026
commit 86aecaee7908a076e0b04e7ca7924e2a48c08a44
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Nov 21 19:28:57 2026 +0100
- updated to 82; adjusted checks to fix build for x32 with SSE2/AVX support and generic i686
vapoursynth-float16.patch | 12 +++++++++
vapoursynth-x32.patch | 12 +++++++++
vapoursynth.spec | 65 +++++++++++++++++++++++++++--------------------
3 files changed, 61 insertions(+), 28 deletions(-)
---
diff --git a/vapoursynth.spec b/vapoursynth.spec
index 6e2d461..1f4156e 100644
--- a/vapoursynth.spec
+++ b/vapoursynth.spec
@@ -1,45 +1,53 @@
#
# Conditional build:
%bcond_without doc # documentation
-%bcond_without static_libs # static libraries
+%bcond_with sse2 # SSE2 instructions + runtime-detected AVX/Zen 4
#
+%ifarch %{x8664} x32 pentium4
+%define with_sse2 1
+%endif
+%ifnarch %{ix86} %{x8664} x32
+%undefine with_sse2
+%endif
Summary: A video processing framework with simplicity in mind
Summary(pl.UTF-8): Szkielet do przetwarzania obrazu stworzony z myślą o prostocie
Name: vapoursynth
-# versions >= 73 removes VSScript v3 API, used by ffmpeg 6.1.x
-# versions >= 77 (or lower) removes system-wide library, moving all to python plugin tree
-Version: 81
+Version: 82
Release: 1
License: LGPL v2.1+
Group: Libraries
#Source0Download: https://github.com/vapoursynth/vapoursynth/releases
Source0: https://github.com/vapoursynth/vapoursynth/archive/R%{version}/%{name}-R%{version}.tar.gz
-# Source0-md5: 1a60f95419daf7e6147ef5b68c688518
+# Source0-md5: cbc0392773388ba5581d765997d00c0f
Patch0: system-glslang.patch
+Patch1: %{name}-float16.patch
+Patch2: %{name}-x32.patch
URL: http://www.vapoursynth.com/
BuildRequires: Vulkan-Headers
+BuildRequires: gcc >= 6:4.7
BuildRequires: glslang-devel >= 16.4.0
-BuildRequires: libstdc++-devel >= 6:7
-%if %{with sse}
-BuildRequires: nasm
-%endif
+BuildRequires: libstdc++-devel >= 6:8
+BuildRequires: meson >= 1.3.0
BuildRequires: pkgconfig
BuildRequires: python3-Cython >= 3.3.0
-BuildRequires: python3-devel >= 1:3.2
+BuildRequires: python3-build
+BuildRequires: python3-devel >= 1:3.12
+BuildRequires: python3-installer
BuildRequires: python3-meson-python >= 0.22.1
+BuildRequires: python3-wheel
BuildRequires: rpm-build >= 4.6
-BuildRequires: rpmbuild(macros) >= 1.752
+BuildRequires: rpmbuild(macros) >= 2.044
BuildRequires: sed >= 4.0
BuildRequires: zimg-devel >= 3.0.5
%if %{with doc}
BuildRequires: python3-sphinx_rtd_theme
BuildRequires: sphinx-pdg-3
%endif
-%if %{with sse}
+%if %{with sse2}
Requires: cpuinfo(sse2)
%endif
-Requires: python3-libs >= 1:3.2
-Requires: zimg >= 3.0.5
+Requires: python3-libs%{?_isa} >= 1:3.12
+Requires: zimg%{?_isa} >= 3.0.5
Obsoletes: vapoursynth-plugin-imwri < 54-5
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -60,9 +68,9 @@ w C++ oraz moduł Pythona pozwalający na tworzenie skryptów do obrazu.
Summary: Header files for VapourSynth libraries
Summary(pl.UTF-8): Pliki nagłówkowe bibliotek VapourSynth
Group: Development/Libraries
-Requires: %{name} = %{version}-%{release}
-Requires: python3-devel >= 1:3.2
-Requires: zimg-devel >= 3.0.5
+Requires: %{name}%{?_isa} = %{version}-%{release}
+Requires: python3-devel%{?_isa} >= 1:3.2
+Requires: zimg-devel%{?_isa} >= 3.0.5
Obsoletes: vapoursynth-static < 81
%description devel
@@ -86,22 +94,23 @@ Dokumentacja do biblioteki VapourSynth.
%prep
%setup -q -n %{name}-R%{version}
%patch -P0 -p1
+%patch -P1 -p1
+%patch -P2 -p1
%build
-export LDFLAGS="%{rpmldflags}"
+%if %{with sse2}
+# needed explicitly only in x86-32 ABI, baseline x86_64 already includes SSE2
%ifarch %{ix86}
-export CFLAGS="%{rpmcflags} -msse2"
-export CXXFLAGS="%{rpmcxxflags} -msse2"
-%else
-export CFLAGS="%{rpmcflags}"
-export CXXFLAGS="%{rpmcxxflags}"
+export CFLAGS="%{rpmcflags} %{rpmcppflags} -msse2"
+export CXXFLAGS="%{rpmcxxflags} %{rpmcppflags} -msse2"
%endif
-%py3_build_pyproject \
-%ifarch %{x8664}
- -Csetup-args="-Denable_x86_asm=true" \
-%else
- -Csetup-args="-Denable_x86_asm=false" \
%endif
+# enable_x86_asm controls:
+# - obligatory SSE2 code (including hardware _Float16 storage)
+# - runtime-detected AVX and AMD Zen 4 support
+# - JITASM (64-bit only)
+%py3_build_pyproject \
+ -Csetup-args="-Denable_x86_asm=%{__true_false sse2}" \
-Ccompile-args="--verbose" \
-Ccompile-args="%{?_smp_mflags}"
diff --git a/vapoursynth-float16.patch b/vapoursynth-float16.patch
new file mode 100644
index 0000000..344d13c
--- /dev/null
+++ b/vapoursynth-float16.patch
@@ -0,0 +1,12 @@
+On ix86 gcc defines __FLT16_MANT_DIG__, but requires at least -msse2 to define _Float16.
+--- vapoursynth-R82/src/core/float16_helper.h.orig 2026-11-21 16:14:21.897936921 +0100
++++ vapoursynth-R82/src/core/float16_helper.h 2026-11-21 16:14:25.827915631 +0100
+@@ -35,7 +35,7 @@
+ // later. The one environment that still has to insist on hardware (F16C) is the MSVC
+ // runtime, where the soft builtins __truncsfhf2 / __extendhfsf2 live in compiler-rt
+ // builtins that clang-cl + lld-link never link.
+-#if (defined(__clang__) || defined(__GNUC__)) && defined(__FLT16_MANT_DIG__) && (defined(__F16C__) || !defined(_MSC_VER))
++#if (defined(__clang__) || defined(__GNUC__)) && defined(__FLT16_MANT_DIG__) && (defined(__SSE2__) || !defined(__i386__)) && (defined(__F16C__) || !defined(_MSC_VER))
+ # define VS_HAVE_NATIVE_FLOAT16 1
+ #else
+ # define VS_HAVE_NATIVE_FLOAT16 0
diff --git a/vapoursynth-x32.patch b/vapoursynth-x32.patch
new file mode 100644
index 0000000..d6fef1c
--- /dev/null
+++ b/vapoursynth-x32.patch
@@ -0,0 +1,12 @@
+No JITASM64 on x32
+--- vapoursynth-R81/src/core/expr/jitasm.h.orig 2026-10-04 22:48:11.000000000 +0200
++++ vapoursynth-R81/src/core/expr/jitasm.h 2026-11-21 18:02:07.101330411 +0100
+@@ -42,7 +42,7 @@
+ #define JITASM_WIN // Windows
+ #endif
+
+-#if (defined(_WIN64) && (defined(_M_AMD64) || defined(_M_X64))) || defined(__x86_64__)
++#if (defined(_WIN64) && (defined(_M_AMD64) || defined(_M_X64))) || defined(__x86_64__) && !defined(__ILP32__)
+ #define JITASM64
+ #endif
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/vapoursynth.git/commitdiff/86aecaee7908a076e0b04e7ca7924e2a48c08a44
More information about the pld-cvs-commit
mailing list