Sophie

Sophie

distrib > Mageia > 9 > aarch64 > media > tainted-updates-src > by-pkgid > 452f339aa3317b1fe6562fb2d2cdb758 > files > 7

handbrake-1.7.3-1.mga9.tainted.src.rpm

%define upstream_name   HandBrake
%define download        %{_builddir}/%{upstream_name}-%{version}/download

%define bluray_ver	1.3.4
%define dvdnav_ver	6.1.1
%define dvdread_ver	6.1.3

%define x265_ver	20230403-12776
%define nv_ver		12.1.14.0
%define ffmpeg_ver	6.1
%define dav_ver		1.3.0

%define zimg_ver	3.0.5
%define svt_av1_ver	1.7.0
%define fdk_aac_ver	2.0.2
%define sse2neon_ver	1.6.0

%ifarch x86_64
%bcond_with vpl
%endif


Summary:        An open-source video transcoder
Name:           handbrake
Version:        1.7.3
Release:        %mkrel 1
License:        GPLv2
Group:          Video/Editors and Converters
URL:            https://handbrake.fr/
#these bundles are otherwise downloaded. They are heavily patched by
#the configure script and that prevents us to replace them by linking
#with our system libraries
Source0:        https://github.com/HandBrake/HandBrake/releases/download/%{version}/%{upstream_name}-%{version}-source.tar.bz2
Source1:        https://github.com/HandBrake/HandBrake-contribs/releases/download/contribs/libbluray-%{bluray_ver}.tar.bz2
Source2:        https://github.com/HandBrake/HandBrake-contribs/releases/download/contribs/libdvdnav-%{dvdnav_ver}.tar.bz2
Source3:        https://github.com/HandBrake/HandBrake-contribs/releases/download/contribs/libdvdread-%{dvdread_ver}.tar.bz2

Source5:        https://github.com/HandBrake/HandBrake-contribs/releases/download/contribs/x265-snapshot-%{x265_ver}.tar.gz
Source6:        https://github.com/HandBrake/HandBrake-contribs/releases/download/contribs/nv-codec-headers-%{nv_ver}.tar.gz
Source7:        https://github.com/HandBrake/HandBrake-contribs/releases/download/contribs/ffmpeg-%{ffmpeg_ver}.tar.bz2
Source8:        https://github.com/HandBrake/HandBrake-contribs/releases/download/contribs/dav1d-%{dav_ver}.tar.bz2
Source9:        https://github.com/HandBrake/HandBrake-contribs/releases/download/contribs/zimg-%{zimg_ver}.tar.gz
Source10:       https://github.com/HandBrake/HandBrake-contribs/releases/download/contribs/SVT-AV1-v%{svt_av1_ver}.tar.gz
Source11:       https://github.com/HandBrake/HandBrake-contribs/releases/download/contribs/fdk-aac-%{fdk_aac_ver}.tar.gz
Source12:       https://github.com/HandBrake/HandBrake-contribs/releases/download/contribs/sse2neon-%{sse2neon_ver}.tar.gz
#applied by the configure script
Source100:      linking-issue-on-non-x86-platform.patch

#required on ix86
Patch1:         handbrake-1.6.0-x265-max8bits.patch

BuildRequires:  meson
BuildRequires:  appstream
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  cmake
BuildRequires:  intltool
BuildRequires:  libtool
BuildRequires:  m4
BuildRequires:  yasm
BuildRequires:  nasm
BuildRequires:  python3
BuildRequires:  lame-devel
BuildRequires:  pkgconfig(bzip2)
BuildRequires:  pkgconfig(dbus-glib-1)
BuildRequires:  pkgconfig(fontconfig)
BuildRequires:  pkgconfig(fribidi)
BuildRequires:  pkgconfig(gstreamer-1.0)
BuildRequires:  pkgconfig(gstreamer-plugins-base-1.0)
BuildRequires:  pkgconfig(gtk+-3.0)
BuildRequires:  pkgconfig(gudev-1.0)
BuildRequires:  pkgconfig(jansson)
BuildRequires:  pkgconfig(libass)
%if %{with vpl}
BuildRequires:  pkgconfig(libmfx)
BuildRequires:  pkgconfig(libva)
BuildRequires:  pkgconfig(vpl)
%endif
BuildRequires:  pkgconfig(libnotify)
BuildRequires:  pkgconfig(libxml-2.0)
BuildRequires:  pkgconfig(ogg)
BuildRequires:  pkgconfig(opus)
BuildRequires:  pkgconfig(samplerate)
BuildRequires:  pkgconfig(theora)
BuildRequires:  pkgconfig(vorbis)
BuildRequires:  pkgconfig(x264)
BuildRequires:  pkgconfig(x265)
BuildRequires:  pkgconfig(zlib)
BuildRequires:  pkgconfig(speex)
BuildRequires:  pkgconfig(libvpx)
BuildRequires:  pkgconfig(SvtAv1Enc)
%ifnarch %arm
BuildRequires:  pkgconfig(numa)
%endif

#ARM architecture is officially not supported by HandBrake (see https://github.com/HandBrake/HandBrake/issues/538)
#ExcludeArch: #arm

#Heavily patched bundles
Provides: bundled(libbluray) = %{bluray_ver}
Provides: bundled(libdvdnav) = %{dvdnav_ver}
Provides: bundled(libdvdread) = %{dvdread_ver}

Provides: bundled(x265) = snapshot%{x265_ver}
Provides: bundled(nv-codec-headers) = %{nv_ver}
Provides: bundled(ffmpeg) = %{ffmpeg_ver}
Provides: bundled(libdav1d) = %{dav_ver}
Provides: bundled(libsvt-av1) = %{svt_av1_ver}
Provides: bundled(fdk-aac) = %{fdk_aac_ver}

%description
HandBrake takes videos you already have and makes new ones that work
on your mobile phone, tablet, TV media player, game console, computer,
or web browser, nearly anything that supports modern video formats.
HandBrake works with most common video files and formats, including
ones created by consumer and professional video cameras, mobile
devices such as phones and tablets, game and computer screen
recordings, and DVD and Blu-ray discs. HandBrake leverages tools such
as FFmpeg, x264, and x265 to create new MP4 or MKV video files from
these sources.

%prep
%setup -q -n %{upstream_name}-%{version}
%ifarch %ix86 %arm
%patch1 -p1 -b .x265-no-10bit-12bit
%endif

%{__mkdir} %download
%{__cp} -t %download %{SOURCE1}
%{__cp} -t %download %{SOURCE2}
%{__cp} -t %download %{SOURCE3}

%{__cp} -t %download %{SOURCE5}
%{__cp} -t %download %{SOURCE6}
%{__cp} -t %download %{SOURCE7}
%{__cp} -t %download %{SOURCE8}
%{__cp} -t %download %{SOURCE9}
#{__cp} -t %%download %%{SOURCE10} # 1.7.0 fails to build on 32bits
%{__cp} -t %download %{SOURCE11}
# needed only for aarch64
%{__cp} -t %download %{SOURCE12}

#patches
#(eatdirt) fixed and might be no-relevant if we don't build on arm/aarch64
##%%{__cp} -a %%{SOURCE100} contrib/x265/A99-linking-issue-on-non-x86-platform.patch

# Use system libraries in place of bundled ones
for module in svt-av1 %{?with_vpl:libmfx libvpl}; do
    sed -i -e "/MODULES += contrib\/$module/d" make/include/main.defs
done


%build
#that is no a autoconf configure script (see ./configure --help)
%set_build_flags

echo "GCC.args.O.speed = %{optflags} %{?with_vpl:-I%{_includedir}/vpl -lvpl}" > custom.defs
echo "GCC.args.g.none = " >> custom.defs

./configure \
        --disable-df-fetch \
        --prefix=%{_prefix} \
%ifarch aarch64
        --disable-nvenc \
%endif
%ifarch %arm
        --disable-numa \
        --disable-nvenc \
%endif
        --launch \
        --launch-jobs=0 \
        --verbose \
        --debug=std \
        %{?with_vpl:--enable-qsv} \
        --enable-fdk-aac

%make_build -C build

%install
%make_install -C build

%find_lang ghb

desktop-file-install --vendor="" \
  --remove-category="Application" \
  --remove-key="Encoding" \
  --add-category="AudioVideo;Video;AudioVideoEditing;" \
  --add-category="X-Mageia-CrossDesktop" \
  --dir %{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/*

%files -f ghb.lang
%doc AUTHORS* NEWS* README* THANKS*
%license COPYING
%{_bindir}/ghb
%{_bindir}/HandBrakeCLI
%{_datadir}/applications/fr.handbrake.ghb.desktop
%{_iconsdir}/hicolor/scalable/apps/fr.handbrake.ghb.svg
%{_metainfodir}/fr.handbrake.ghb.metainfo.xml


%changelog
* Sun Feb 25 2024 daviddavid <daviddavid> 1.7.3-1.mga9
+ Revision: 2044311
- new version: 1.7.3 (mga#32867)
- enable fdk-aac support

* Wed Jan 18 2023 eatdirt <eatdirt> 1.6.0-1.mga9.tainted
+ Revision: 1934365
- Upgrade to version 1.6.0

* Tue Oct 11 2022 ghibo <ghibo> 1.5.1-2.mga9.tainted
+ Revision: 1896289
- Rebuild against libvpx 1.12.0 (changed major from 6 to 7)

* Thu Aug 25 2022 eatdirt <eatdirt> 1.5.1-1.mga9.tainted
+ Revision: 1880254
- Fix bundle package versions
- Upgrade to version 1.5.1

* Sun Apr 24 2022 wally <wally> 1.4.1-3.mga9.tainted
+ Revision: 1853028
- rebuild for x264 0.164

* Thu Apr 14 2022 umeabot <umeabot> 1.4.1-2.mga9.tainted
+ Revision: 1849666
- Mageia 9 Mass Rebuild

* Fri Aug 27 2021 eatdirt <eatdirt> 1.4.1-1.mga9.tainted
+ Revision: 1742750
- Fix x265 8 bits only patch for ix86
- Upgrade to version 1.4.1

* Tue Nov 03 2020 eatdirt <eatdirt> 1.3.3-5.mga8.tainted
+ Revision: 1642354
+ rebuild (emptylog)

* Tue Nov 03 2020 eatdirt <eatdirt> 1.3.3-4.mga8.tainted
+ Revision: 1642346
- Disable building x265 with numa on arm

* Tue Nov 03 2020 eatdirt <eatdirt> 1.3.3-3.mga8.tainted
+ Revision: 1642330
- Remove dep to numa on arm

* Tue Nov 03 2020 eatdirt <eatdirt> 1.3.3-2.mga8.tainted
+ Revision: 1642319
- Test build on aarch64

* Tue Nov 03 2020 eatdirt <eatdirt> 1.3.3-1.mga8.tainted
+ Revision: 1642285
- Try building against system libvpx
- Upgrade to version 1.3.3
+ wally <wally>
- replace deprecated %%setup_compile_flags
- add provides for bundled libs and tools
  * libbluray
  * libdvdnav
  * libdvdread
  * libvpx
  * x265
  * nv-codec-headers
  * ffmpeg
+ umeabot <umeabot>
- Mageia 8 Mass Rebuild

* Thu Feb 28 2019 wally <wally> 1.2.2-1.mga7.tainted
+ Revision: 1370494
- new version 1.2.2
- disable 10/12-bit support in x265 on i586
- add upstream patch to bundled x265 to fix build on i586
- build without webkit
+ daviddavid <daviddavid>
- reenable arch i586

* Wed Jan 02 2019 augier <augier> 1.2.0-1.mga7.tainted
+ Revision: 1348655
- bump Handbrake to 1.2.0

* Thu Sep 20 2018 umeabot <umeabot> 1.1.2-3.mga7.tainted
+ Revision: 1278651
- Mageia 7 Mass Rebuild

* Mon Sep 10 2018 augier <augier> 1.1.2-2.mga7.tainted
+ Revision: 1258241
+ rebuild (emptylog)

* Wed May 30 2018 tv <tv> 1.1.0-2.mga7.tainted
+ Revision: 1233166
- make it ExclusiveArch x86_64 so that it passes BS
- new release

* Sat Apr 22 2017 augier <augier> 1.0.7-1.mga6.tainted
+ Revision: 1097051
- Bump HandBrake to 1.0.7

* Sun Feb 26 2017 augier <augier> 1.0.3-2.mga6.tainted
+ Revision: 1087952
- Exclude ARMv5 from supported platforms since ARM platform is officially not supported by HandBrake

* Sun Feb 26 2017 augier <augier> 1.0.3-1.mga6.tainted
+ Revision: 1087923
- bump HandBrake to 1.0.3

* Wed Jan 11 2017 daviddavid <daviddavid> 1.0.1-2.mga6.tainted
+ Revision: 1081125
- submit to tainted/release

* Wed Jan 11 2017 daviddavid <daviddavid> 1.0.1-1.mga6.tainted
+ Revision: 1081112
- new version: 1.0.1
- switch to gstreamer 1.0
- update bundled libav, libbluray, libdvdnav, libvpx and x265
- add BRs pkgconfig(opus) and pkgconfig(jansson)
- switch BRs to pkgconfig()
+ tv <tv>
- new release

* Sun Nov 27 2016 wally <wally> 0.10.5-3.mga6.tainted
+ Revision: 1070393
- drop unneeded freetype BR

* Sun Oct 16 2016 pterjan <pterjan> 0.10.5-2.mga6.tainted
+ Revision: 1061100
- Fix typo, I should copy/paste
- Fix typo
- Use same target for embedded libvpx that we use in libvpx package, it may fix arm build

* Sun Feb 14 2016 augier <augier> 0.10.5-1.mga6.tainted
+ Revision: 960194
- Bump HandBrake to 0.10.5
- Bump x265 sources to 1.9
- Removed --disable-fdk-aac compilation option as support for FDK-AAC is disabled by default in 0.10.5

* Mon Feb 08 2016 zezinho <zezinho> 0.10.3-1.mga6
+ Revision: 948058
- new version
- bundled x265 version is now 1.8

* Mon Jan 18 2016 luigiwalser <luigiwalser> 0.10.0-2.mga6.tainted
+ Revision: 925620
- rebuild for x264

* Wed Jan 14 2015 augier <augier> 0.10.0-1.mga5.tainted
+ Revision: 810593
+ rebuild (emptylog)

* Wed Oct 15 2014 umeabot <umeabot> 0.10-0.r6383.3.mga5.tainted
+ Revision: 750618
- Second Mageia 5 Mass Rebuild

* Tue Sep 16 2014 umeabot <umeabot> 0.10-0.r6383.2.mga5.tainted
+ Revision: 680077
- Mageia 5 Mass Rebuild

* Sat Aug 30 2014 augier <augier> 0.10-0.r6383.1.mga5.tainted
+ Revision: 669464
- Updated sources to revision 6383
- Removed fdk-aac tarball from sources
- Updated licenses

* Fri Aug 29 2014 augier <augier> 0.10b1-0.r6348.mga5.tainted
+ Revision: 669212
- Update to version 0.10 rc1 (revision 6348)
- Reintroduce handbrake due to dropped faac, this makes all code GPLv2+

* Sun Sep 18 2011 fwang <fwang> 0.9.5-5.mga2.tainted
+ Revision: 145023
- rebuild for new libpng

* Mon Sep 05 2011 doktor5000 <doktor5000> 0.9.5-4.mga2.tainted
+ Revision: 138893
- add BuildRequires on desktop-file-utils
- adapt license information due to building with bundled faac
- really disable automatic contrib libraries download
- removed useless %%clean and %%defattr
- removed obsolete categories from desktop filename, added proper ones
- removed icon filename extension in desktop file
- added gcc hack to properly apply Mageia %%optflags
- fixed all -Wformat-security issues in faac frontend, mp4v2 and libhb
- make symlink names for CLI and GTK binary more consistent
- escape macros in comments to make rpmlint happy
- disable GUI update checks

* Mon Jul 04 2011 fwang <fwang> 0.9.5-3.mga2
+ Revision: 117908
- rebuild for new webkit

* Mon Jun 20 2011 obgr_seneca <obgr_seneca> 0.9.5-2.mga2
+ Revision: 110397
- fixed typo in file list

* Thu Jun 09 2011 obgr_seneca <obgr_seneca> 0.9.5-1.mga2
+ Revision: 102461
- added patches for libnotify and dbus-glib-1
- imported package handbrake


* Sun Jan 30 2011 Doktor5000 <rpm@mandrivauser.de> 0.9.5-2mud2010.2
- new version 0.9.5
- enabled MPEG2 encoding via ffmpeg
- rebuild for Mandrivalinux 2010.2

* Wed Jul 14 2010 Doktor5000 <rpm@mandrivauser.de> 0.9.4-1mud2010.1
- rebuild for Mandrivalinux 2010.1

* Sun Dec 13 2009 Doktor5000 <rpm@mandrivauser.de> 0.9.4-1mud2010.0
- rebuild for Mandrivalinux 2010.0
- new version 0.9.4
- disable autodownload of external dependencies
- provide tarballs for dependencies