Changes of Revision 9

HandBrake.changes Changed
x
 
1
@@ -1,4 +1,13 @@
2
 -------------------------------------------------------------------
3
+Tue Nov  8 11:59:52 UTC 2022 - Hans-Peter Jansen <hpj@urpla.net>
4
+
5
+- Improve build
6
+- Consistent CFLAGS and specifically _FORTIFY_SOURCE across project
7
+- qsv build conditional
8
+- Apply qsv build fix: HandBrake-end-of-non-void-function.patch
9
+- Add librsvg-2.0 build dependency
10
+
11
+-------------------------------------------------------------------
12
 Sun Nov  6 18:16:53 UTC 2022 - Hans-Peter Jansen <hpj@urpla.net>
13
 
14
 - Add libjpeg as explicit build dependency
15
HandBrake.spec Changed
138
 
1
@@ -3,7 +3,7 @@
2
 #
3
 # Copyright (c) 2012 Pascal Bleser <pascal.bleser@opensuse.org>
4
 # Copyright (c) 2014 B1 Systems GmbH, Vobhurg, Germany
5
-# Copyright (c) 2019-2020 LISA GmbH, Bingen, Germany
6
+# Copyright (c) 2019-2022 LISA GmbH, Bingen, Germany
7
 #
8
 # All modifications and additions to the file contributed by third parties
9
 # remain the property of their copyright owners, unless otherwise agreed
10
@@ -17,6 +17,9 @@
11
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
12
 #
13
 
14
+%ifarch x86_64
15
+%bcond_without  qsv
16
+%endif
17
 
18
 Name:           HandBrake
19
 Summary:        Multithreaded Video Transcoder
20
@@ -27,6 +30,7 @@
21
 Source1:        download.tar.xz
22
 Source2:        pre_checkin.sh
23
 Source3:        version.txt
24
+Patch0:         HandBrake-end-of-non-void-function.patch
25
 License:        GPL-2.0+
26
 Group:          Productivity/Multimedia/Video/Editors and Convertors
27
 BuildRequires:  autoconf
28
@@ -45,10 +49,8 @@
29
 BuildRequires:  subversion
30
 BuildRequires:  update-desktop-files
31
 BuildRequires:  wget
32
-BuildRequires:  yasm
33
 BuildRequires:  glibc-devel
34
 BuildRequires:  libmp3lame-devel
35
-BuildRequires:  libnuma-devel
36
 BuildRequires:  pkgconfig(bzip2)
37
 BuildRequires:  pkgconfig(dbus-glib-1)
38
 BuildRequires:  pkgconfig(dvdnav)
39
@@ -64,11 +66,8 @@
40
 BuildRequires:  pkgconfig(libdrm)
41
 BuildRequires:  pkgconfig(libjpeg)
42
 BuildRequires:  pkgconfig(liblzma)
43
-%ifarch x86_64
44
-BuildRequires:  pkgconfig(libmfx)
45
-%endif
46
 BuildRequires:  pkgconfig(libnotify)
47
-BuildRequires:  pkgconfig(libva)
48
+BuildRequires:  pkgconfig(librsvg-2.0)
49
 BuildRequires:  pkgconfig(libxml-2.0)
50
 BuildRequires:  pkgconfig(ogg)
51
 BuildRequires:  pkgconfig(opus)
52
@@ -76,15 +75,20 @@
53
 BuildRequires:  pkgconfig(speex)
54
 BuildRequires:  pkgconfig(theora)
55
 BuildRequires:  pkgconfig(vorbis)
56
-BuildRequires:  pkgconfig(vpl)
57
 BuildRequires:  pkgconfig(vpx) >= 1.4
58
 BuildRequires:  pkgconfig(webkit2gtk-4.0)
59
 BuildRequires:  pkgconfig(x264)
60
-%ifarch armv6l || armv6hl
61
+%if %{with qsv}
62
+BuildRequires:  pkgconfig(libmfx)
63
+BuildRequires:  pkgconfig(libva)
64
+BuildRequires:  pkgconfig(vpl)
65
+%endif
66
+%ifnarch %{arm}
67
+BuildRequires:  libnuma-devel
68
+%else
69
 BuildRequires:  Mesa-libEGL1
70
 BuildRequires:  Mesa-libEGL-devel
71
 %endif
72
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
73
 
74
 %description
75
 HandBrake is an open-source, GPL-licensed, multiplatform, multithreaded video
76
@@ -116,11 +120,10 @@
77
 This package contains a GTK+ graphical user interface for Handbrake.
78
 
79
 %lang_package -n %{name}-gtk
80
-Provides:       handbrake-gtk-lang = %{version}
81
-Obsoletes:      handbrake-gtk-lang < %{version}
82
 
83
 %prep
84
 %setup -q -n %{name}-%{version} -a 1
85
+%patch0 -p0
86
 cp -vp %{SOURCE3} .
87
 
88
 # disable contrib parts, that we provide externally
89
@@ -137,16 +140,27 @@
90
 %build
91
 # the contrib libraries doesn't like LTO bindings
92
 %define _lto_cflags %{nil}
93
-echo "CFLAGS=$CFLAGS"
94
+export CFLAGS="%{optflags} -fno-strict-aliasing -Wno-unused"
95
 export CXXFLAGS="$CFLAGS -Wno-reorder"
96
-echo "CXXFLAGS=$CXXFLAGS"
97
 export PATH="%{_builddir}/%{name}-%{version}/build/contrib/bin:$PATH"
98
 
99
-%ifarch x86_64
100
-./configure --prefix=/usr --enable-x265 --enable-numa --enable-nvenc --enable-qsv --launch-jobs=$(nproc)
101
-%else
102
-./configure --prefix=/usr --enable-x265 --enable-numa --enable-nvenc --disable-qsv --launch-jobs=$(nproc)
103
+./configure \
104
+    --prefix=%{_prefix} \
105
+    --optimize=speed \
106
+    --enable-fdk-aac \
107
+    --enable-x265 \
108
+    --enable-nvenc \
109
+%if %{with qsv}
110
+    --enable-qsv \
111
 %endif
112
+%ifarch %{arm}
113
+    --enable-numa \
114
+%endif
115
+    --debug=max \
116
+    --launch-jobs=$(nproc)
117
+
118
+# don't redefine _FORTIFY_SOURCE; we define _FORTIFY_SOURCE=3 via CFLAGS already
119
+sed -i 's: -D_FORTIFY_SOURCE=2::g' make/include/gcc.defs
120
 pushd build
121
 make -j$(nproc)
122
 popd
123
@@ -154,12 +168,12 @@
124
 %install
125
 %makeinstall -C build
126
 
127
-%__ln_s ghb %{buildroot}%{_bindir}/HandBrakeGUI
128
+ln -sfvb ghb %{buildroot}%{_bindir}/HandBrakeGUI
129
 
130
 %suse_update_desktop_file -r fr.handbrake.ghb AudioVideo AudioVideoEditing
131
 
132
 # -f because it might not be there if built without gtk...
133
-%__rm -f "%{buildroot}%{_datadir}/icons"/*/*.cache
134
+rm -vf "%{buildroot}%{_datadir}/icons"/*/*.cache
135
 
136
 %find_lang ghb
137
 
138
HandBrake-end-of-non-void-function.patch Added
12
 
1
@@ -0,0 +1,10 @@
2
+--- libhb/qsv_common.c.orig    2021-07-19 09:51:29.420769173 +0200
3
++++ libhb/qsv_common.c 2021-07-19 09:51:29.436768899 +0200
4
+@@ -4358,6 +4358,7 @@
5
+ 
6
+ int hb_qsv_get_mid_by_surface_from_pool(HBQSVFramesContext* hb_enc_qsv_frames_ctx, mfxFrameSurface1 *surface, QSVMid **out_mid)
7
+ {
8
++    return 0;
9
+ }
10
+ 
11
+ int hb_qsv_release_surface_from_pool_by_surface_pointer(HBQSVFramesContext* hb_enc_qsv_frames_ctx, const mfxFrameSurface1 *surface)
12
download.tar.xz/fdk-aac-2.0.1.tar.gz Added