File chromium-ffmpeg-extra.spec of Package chromium-ffmpeg-extra (Revision 93de8f5e85618d0f70a23b7fb2c40df0)
Currently displaying revision 93de8f5e85618d0f70a23b7fb2c40df0 , Show latest
129
1
#
2
# spec file for package chromium-ffmpeg-extra
3
#
4
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
5
#
6
# All modifications and additions to the file contributed by third parties
7
# remain the property of their copyright owners, unless otherwise agreed
8
# upon. The license for this file, and modifications and additions to the
9
# file, is the same license as for the pristine package itself (unless the
10
# license for the pristine package is not an Open Source License, in which
11
# case the license is the MIT License). An "Open Source License" is a
12
# license that conforms to the Open Source Definition (Version 1.9)
13
# published by the Open Source Initiative.
14
15
# Please submit bugfixes or comments via http://bugs.opensuse.org/
16
#
17
18
19
Name: chromium-ffmpeg-extra
20
Version: 64.0.3282.134
21
Release: 0
22
Summary: Extra ffmpeg codecs for browsers based on Chromium
23
License: BSD-3-Clause AND LGPL-2.1+
24
Group: Productivity/Networking/Web/Browsers
25
URL: http://code.google.com/p/chromium/
26
Source0: http://commondatastorage.googleapis.com/chromium-browser-official/chromium-%{version}.tar.xz
27
Source1: BUILD.gn
28
Patch0: chromium-last-commit-position-r0.patch
29
Patch1: chromium-dma-buf.patch
30
Patch2: chromium-angle.patch
31
Patch3: chromium-memcpy.patch
32
BuildRequires: ninja
33
BuildRequires: pkgconfig
34
BuildRequires: python-xml
35
BuildRequires: pkgconfig(dri)
36
BuildRequires: pkgconfig(gtk+-2.0)
37
BuildRequires: pkgconfig(gtk+-3.0)
38
BuildRequires: pkgconfig(libexif)
39
BuildRequires: pkgconfig(libffi)
40
BuildRequires: pkgconfig(libpci)
41
BuildRequires: pkgconfig(libpulse)
42
BuildRequires: pkgconfig(nss)
43
BuildRequires: pkgconfig(python)
44
BuildRequires: pkgconfig(xscrnsaver)
45
BuildRequires: pkgconfig(xtst)
46
ExclusiveArch: %{ix86} x86_64
47
%if %{?suse_version} >= 1330
48
BuildRequires: gcc >= 6.0
49
BuildRequires: gcc-c++ >= 6.0
50
%else
51
BuildRequires: gcc7
52
BuildRequires: gcc7-c++
53
%endif
54
55
%description
56
This package contains proprietary codecs needed for the HTML5
57
(audio and video tags).
58
59
%prep
60
%setup -q -n chromium-%{version}
61
%patch0 -p1
62
%patch1 -p1
63
%patch2 -p1
64
%patch3 -p1
65
66
mkdir toolchain
67
cp %{SOURCE1} toolchain/BUILD.gn
68
69
if [ ! -f chrome/test/data/webui/i18n_process_css_test.html ]; then
70
touch chrome/test/data/webui/i18n_process_css_test.html
71
fi
72
73
%build
74
ARCH_FLAGS="`echo %{optflags} | sed -e 's/^-g / /g' -e 's/ -g / /g' -e 's/ -g$//g'`"
75
export CFLAGS="${ARCH_FLAGS} -std=gnu11 -fpermissive"
76
export CXXFLAGS="${ARCH_FLAGS} -fpermissive"
77
%if 0%{?suse_version} < 1330
78
export CC=gcc-7
79
export CXX=g++-7
80
# some still call gcc/g++
81
mkdir -p "$HOME/bin/"
82
ln -sfn %{_bindir}/$CC $HOME/bin/gcc
83
ln -sfn %{_bindir}/$CXX $HOME/bin/g++
84
export PATH="$HOME/bin/:$PATH"
85
%else
86
export CC=gcc
87
export CXX=g++
88
%endif
89
90
ninjaproc="%{?jobs:%{jobs}}"
91
92
myconf_gn=""
93
myconf_gn+=" custom_toolchain=\"./toolchain:default\""
94
myconf_gn+=" ffmpeg_branding=\"Chrome\""
95
myconf_gn+=" proprietary_codecs=true"
96
myconf_gn+=" enable_swiftshader=false"
97
myconf_gn+=" enable_hevc_demuxing=true"
98
myconf_gn+=" use_custom_libcxx=false"
99
myconf_gn+=" use_gconf=false"
100
myconf_gn+=" use_gio=false"
101
myconf_gn+=" use_gnome_keyring=false"
102
myconf_gn+=" use_kerberos=false"
103
myconf_gn+=" use_cups=false"
104
myconf_gn+=" use_sysroot=false"
105
myconf_gn+=" use_gold=false"
106
myconf_gn+=" linux_use_bundled_binutils=false"
107
myconf_gn+=" fatal_linker_warnings=false"
108
myconf_gn+=" treat_warnings_as_errors=false"
109
myconf_gn+=" is_clang=false"
110
myconf_gn+=" is_component_build=true"
111
myconf_gn+=" is_debug=false"
112
myconf_gn+=" symbol_level=0"
113
myconf_gn+=" enable_vulkan=false" # fails to compile now
114
115
tools/gn/bootstrap/bootstrap.py --gn-gen-args "${myconf_gn}"
116
out/Release/gn gen --args="${myconf_gn}" out/Release
117
out/Release/gn args --list out/Release/
118
ninja -j $ninjaproc -C out/Release media/ffmpeg
119
120
%install
121
install -Dm0644 out/Release/libffmpeg.so %{buildroot}%{_libdir}/%{name}/libffmpeg.so
122
123
%files
124
%doc AUTHORS LICENSE
125
%dir %{_libdir}/%{name}
126
%{_libdir}/%{name}/libffmpeg.so
127
128
%changelog
129