Skip to content

Commit

Permalink
phase 2
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiomb2 committed Nov 9, 2022
1 parent bc65bba commit 7e54139
Showing 1 changed file with 107 additions and 95 deletions.
202 changes: 107 additions & 95 deletions ffmpeg.spec
Original file line number Diff line number Diff line change
Expand Up @@ -22,36 +22,37 @@
%global cuda_arches x86_64

# Disable because of gcc issue
%global _without_lensfun 1
%ifnarch i686
%global _with_bs2b 1
%global _with_chromaprint 1
%global _with_ilbc 1
%bcond_with lensfun
%ifnarch %{ix86}
%bcond_without bs2b
%bcond_without chromaprint
%bcond_without ilbc
%if 0%{?fedora}
%global _with_rav1e 1
%bcond_without rav1e
%else
%global _without_vulkan 1
%global _without_frei0r 1
%global _without_lv2 1
%bcond_with vulkan
%bcond_with frei0r
%bcond_with lv2
%endif
%global _with_rubberband 1
%global _with_smb 1
%global _with_snappy 1
%global _with_tesseract 1
%global _with_twolame 1
%global _with_wavpack 1
%global _with_webp 1
%global _with_zmq 1
%bcond_without rubberband
%bcond_without smb
%bcond_without snappy
%bcond_without tesseract
%bcond_without twolame
%bcond_without wavpack
%bcond_without webp
%bcond_without zmq
%else
%global _without_vulkan 1
%bcond_with vulkan
%endif

%ifarch x86_64
%global _with_mfx 1
%bcond_without mfx
%if 0%{?fedora}
%global _with_svtav1 1
%bcond_without svtav1
%endif
%global _with_vapoursynth 1
%global _with_vmaf 1
%bcond_without vapoursynth
%bcond_without vmaf
%endif

# flavor nonfree
Expand All @@ -61,23 +62,23 @@
%global progs_suffix -cuda
#global build_suffix -lgpl
%ifarch %{cuda_arches}
%global _with_cuvid 1
%global _with_libnpp 1
%bcond_without cuvid
%bcond_without libnpp
%endif
%global _with_fdk_aac 1
%global _without_cdio 1
%global _without_frei0r 1
%global _without_gpl 1
%global _without_vidstab 1
%global _without_x264 1
%global _without_x265 1
%global _without_xvid 1
%undefine _with_smb
%bcond_without fdk_aac
%bcond_with cdio
%bcond_with frei0r
%bcond_with gpl
%bcond_with vidstab
%bcond_with x264
%bcond_with x265
%bcond_with xvid
%bcond_with smb
%endif

# Disable nvenc when not relevant
%ifnarch %{cuda_arches} aarch64
%global _without_nvenc 1
%bcond_with nvenc
%endif

# extras flags
Expand All @@ -97,9 +98,9 @@
%endif

%if 0%{?_with_rpi:1}
%global _with_omx 1
%global _with_omx_rpi 1
%global _with_mmal 1
%bcond_without omx
%bcond_without omx_rpi
%bcond_without mmal
ExclusiveArch: armv7hnl
%endif

Expand Down Expand Up @@ -129,101 +130,108 @@ Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%{?_with_cuda:BuildRequires: cuda-minimal-build-%{_cuda_version_rpm} cuda-drivers-devel}
%{?_with_cuda:%{?!_with_cuda_nvcc:BuildRequires: clang}}
%{?_with_libnpp:BuildRequires: pkgconfig(nppc-%{_cuda_version})}
BuildRequires: alsa-lib-devel
BuildRequires: pkgconfig(alsa)
BuildRequires: AMF-devel
BuildRequires: bzip2-devel
BuildRequires pkgconfig(bzip2)
%{?_with_faac:BuildRequires: faac-devel}
%{?_with_fdk_aac:BuildRequires: fdk-aac-devel}
%{?_with_flite:BuildRequires: flite-devel}
BuildRequires: fontconfig-devel
BuildRequires: freetype-devel
BuildRequires: fribidi-devel
%{!?_without_frei0r:BuildRequires: frei0r-devel}
BuildRequires: pkgconfig(fontconfig)
BuildRequires: pkgconfig(freetype2)
BuildRequires: pkgconfig(fribidi)
%{!?_without_frei0r:BuildRequires: pkgconfig(frei0r)}
%{?_with_gme:BuildRequires: game-music-emu-devel}
BuildRequires: gnutls-devel
BuildRequires: pkgconfig(gnutls)
BuildRequires: gsm-devel
%{?_with_ilbc:BuildRequires: ilbc-devel}
%{?_with_ilbc:BuildRequires: pkgconfig(libilbc)}
BuildRequires: lame-devel >= 3.98.3
#"pkgconfig(jack)" = pipewire-jack-audio-connection-kit-devel
%{!?_without_jack:BuildRequires: jack-audio-connection-kit-devel}
%{!?_without_ladspa:BuildRequires: ladspa-devel}
%{!?_without_aom:BuildRequires: libaom-devel}
%{!?_without_dav1d:BuildRequires: libdav1d-devel >= 0.2.1}
%{!?_without_ass:BuildRequires: libass-devel}
%{!?_without_bluray:BuildRequires: libbluray-devel}
%{?_with_bs2b:BuildRequires: libbs2b-devel}
%{?_with_caca:BuildRequires: libcaca-devel}
%{!?_without_cdio:BuildRequires: libcdio-paranoia-devel}
%{?_with_chromaprint:BuildRequires: libchromaprint-devel}
%{!?_without_aom:BuildRequires: pkgconfig(aom)}
%{!?_without_dav1d:BuildRequires: pkgconfig(dav1d) >= 0.2.1}
%{!?_without_ass:BuildRequires: pkgconfig(libass)}
%{!?_without_bluray:BuildRequires: pkgconfig(libbluray)}
%{?_with_bs2b:BuildRequires: pkgconfig(libbs2b)}
%{?_with_caca:BuildRequires: pkgconfig(caca)}
%{!?_without_cdio:BuildRequires: pkgconfig(libcdio_paranoia)}
%{?_with_chromaprint:BuildRequires: pkgconfig(libchromaprint)}
%{?_with_crystalhd:BuildRequires: libcrystalhd-devel}
%{!?_without_lensfun:BuildRequires: lensfun-devel}
%{?_with_lensfun:BuildRequires: lensfun-devel}
%if 0%{?_with_ieee1394}
BuildRequires: libavc1394-devel
BuildRequires: libdc1394-devel
BuildRequires: libiec61883-devel
%endif
BuildRequires: libdrm-devel
BuildRequires: pkgconfig(libdrm)
BuildRequires: libgcrypt-devel
BuildRequires: libGL-devel
BuildRequires: libmodplug-devel
BuildRequires: pkgconfig(libmodplug)
BuildRequires: libmysofa-devel
BuildRequires: libopenmpt-devel
BuildRequires: librsvg2-devel
BuildRequires: pkgconfig(libopenmpt)
BuildRequires: pkgconfig(librsvg-2.0)
# Disable rtmp because of rfbz: 6441 & 2399
%{?_with_rtmp:BuildRequires: librtmp-devel}
%{?_with_smb:BuildRequires: libsmbclient-devel}
BuildRequires: libssh-devel
BuildRequires: libtheora-devel
BuildRequires: libv4l-devel
%{?!_without_vaapi:BuildRequires: libva-devel >= 0.31.0}
BuildRequires: libvdpau-devel
BuildRequires: libvorbis-devel
%{?_with_vapoursynth:BuildRequires: vapoursynth-devel}
%{?!_without_vpx:BuildRequires: libvpx-devel >= 1.4.0}
%{?_with_smb:BuildRequires: pkgconfig(smbclient)}
BuildRequires: pkgconfig(libssh)
BuildRequires: pkgconfig(theora)
BuildRequires: pkgconfig(libv4l2)
%{?!_without_vaapi:BuildRequires: pkgconfig(libva) >= 0.31.0}
BuildRequires: pkgconfig(vdpau)
BuildRequires: pkgconfig(vorbis)
%{?_with_vapoursynth:BuildRequires: pkgconfig(vapoursynth)}
%{?!_without_vpx:BuildRequires: pkgconfig(vpx) >= 1.4.0}
%{?_with_mfx:BuildRequires: pkgconfig(libmfx) >= 1.23-1}
%ifarch %{ix86} x86_64
BuildRequires: nasm
%endif
%{?_with_webp:BuildRequires: libwebp-devel}
%{?_with_netcdf:BuildRequires: netcdf-devel}
%{?_with_webp:BuildRequires: pkgconfig(libwebp)}
%{?_with_netcdf:BuildRequires: pkgconfig(netcdf)}
%{?_with_rpi:BuildRequires: raspberrypi-vc-devel}
%{!?_without_nvenc:BuildRequires: nv-codec-headers}
%{!?_without_amr:BuildRequires: opencore-amr-devel vo-amrwbenc-devel}
%{!?_without_nvenc:BuildRequires: pkgconfig(ffnvcodec)}
%if %{with amr}
BuildRequires: pkgconfig(opencore-amrnb)
BuildRequires: pkgconfig(vo-amrwbenc)
%endif
%{?_with_omx:BuildRequires: libomxil-bellagio-devel}
BuildRequires: libxcb-devel
BuildRequires: libxml2-devel
%{!?_without_lv2:BuildRequires: lilv-devel lv2-devel}
%{!?_without_openal:BuildRequires: openal-soft-devel}
BuildRequires: pkgconfig(xcb)
BuildRequires: pkgconfig(libxml-2.0)
%{!?_without_lv2:BuildRequires: pkgconfig(lilv-0) pkgconfig(lv2)}
%{!?_without_openal:BuildRequires: pkgconfig(openal)}
%if 0%{!?_without_opencl:1}
BuildRequires: opencl-headers ocl-icd-devel
BuildRequires: opencl-headers pkgconfig(ocl-icd)
%{?fedora:Recommends: opencl-icd}
%endif
%{?_with_opencv:BuildRequires: opencv-devel}
BuildRequires: openjpeg2-devel
%{!?_without_opus:BuildRequires: opus-devel >= 1.1.3}
%{!?_without_pulse:BuildRequires: pulseaudio-libs-devel}
%{?_with_opencv:BuildRequires: pkgconfig(opencv)}
BuildRequires: pkgconfig(libopenjp2)
%{!?_without_opus:BuildRequires: pkgconfig(opus) >= 1.1.3}
%{!?_without_pulse:BuildRequires: pkgconfig(libpulse)}
BuildRequires: perl(Pod::Man)
%{?_with_rav1e:BuildRequires: pkgconfig(rav1e)}
%{?_with_rubberband:BuildRequires: rubberband-devel}
%{!?_without_tools:BuildRequires: SDL2-devel}
%{?_with_snappy:BuildRequires: snappy-devel}
BuildRequires: soxr-devel
BuildRequires: speex-devel
%{?_with_rubberband:BuildRequires: pkgconfig(rubberband)}
%{!?_without_tools:BuildRequires: pkgconfig(sdl2)}
%{?_with_snappy:BuildRequires: pkgconfig(snappy)}
BuildRequires: pkgconfig(soxr)
BuildRequires: pkgconfig(speex)
BuildRequires: pkgconfig(srt)
%{?_with_svtav1:BuildRequires: svt-av1-devel >= 0.9.0}
%{?_with_tesseract:BuildRequires: tesseract-devel}
%{?_with_tesseract:BuildRequires: pkgconfig(tesseract)}
#BuildRequires: texi2html
BuildRequires: texinfo
%{?_with_twolame:BuildRequires: twolame-devel}
%{?_with_vmaf:BuildRequires: libvmaf-devel >= 1.5.2}
%{?_with_wavpack:BuildRequires: wavpack-devel}
%{!?_without_vidstab:BuildRequires: vid.stab-devel}
%{!?_without_vulkan:BuildRequires: vulkan-loader-devel pkgconfig(shaderc)}
%{!?_without_x264:BuildRequires: x264-devel >= 0.0.0-0.31}
%{!?_without_x265:BuildRequires: x265-devel}
%{?_with_twolame:BuildRequires: pkgconfig(twolame)}
%{?_with_vmaf:BuildRequires: pkgconfig(libvmaf) >= 1.5.2}
%{?_with_wavpack:BuildRequires: pkgconfig(wavpack)}
%{!?_without_vidstab:BuildRequires: pkgconfig(vidstab)}
%if %{with vulkan}
BuildRequires: vulkan-loader-devel
BuildRequires: pkgconfig(shaderc) >= 2019.1
%endif
%{!?_without_x264:BuildRequires: pkgconfig(x264) >= 0.0.0-0.31}
%{!?_without_x265:BuildRequires: pkgconfig(x265)}
%{!?_without_xvid:BuildRequires: xvidcore-devel}
%{!?_without_zimg:BuildRequires: zimg-devel >= 2.7.0}
%{!?_without_zimg:BuildRequires: pkgconfig(zimg) >= 2.7.0}
BuildRequires: zlib-devel
%{?_with_zmq:BuildRequires: zeromq-devel}
%{?_with_zmq:BuildRequires: pkgconfig(libzmq)}
%{!?_without_zvbi:BuildRequires: zvbi-devel}

%description
Expand Down Expand Up @@ -385,6 +393,10 @@ cp -pr doc/examples/{*.c,Makefile,README} _doc/examples/
%{?_with_vapoursynth:--enable-vapoursynth} \
%{!?_without_vpx:--enable-libvpx} \
%{!?_without_vulkan:--enable-vulkan --enable-libshaderc} \
%if %{with vulkan}
--enable-libshaderc \
--enable-vulkan \
%endif
%{?_with_webp:--enable-libwebp} \
%{!?_without_x264:--enable-libx264} \
%{!?_without_x265:--enable-libx265} \
Expand Down

0 comments on commit 7e54139

Please sign in to comment.