File kodi.binary-addons-noX-raspberry-pi.spec of Package kodi.binary-addons (Revision 42)
Currently displaying revision 42 , Show latest
290
1
#
2
# spec file for package kodi.binary-addons
3
#
4
# Copyright (c) 2015-2021 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
%define _lto_cflags %{nil}
20
# Please edit kodi.spec and kodi.changes only. *-noX.* files are generated from
21
# kodi.* files with the pre_checkin.sh script
22
%define kodi_version Matrix
23
%define _kodi_addons_dir %{_datadir}/kodi/addons
24
%define dev_build 1
25
# kodi can be built without X support when openGL ES is used (mainly used on ARM boards used as media center)
26
%define noX_build 1
27
%if %{noX_build}
28
# no X build needs openGL ES
29
%bcond_with enable_opengl
30
%bcond_without enable_opengles
31
%else
32
%ifarch %arm armv6l armv6hl
33
%bcond_with enable_opengl
34
%bcond_without enable_opengles
35
%else
36
%bcond_without enable_opengl
37
%bcond_with enable_opengles
38
%endif
39
%endif
40
41
%define kodi_platform raspberry-pi
42
%define kodi_player omxplayer
43
44
ExclusiveArch: %ix86 x86_64 aarch64
45
46
Name: kodi.binary-addons-noX-raspberry-pi
47
Version: 19.1
48
Release: 0
49
Summary: Binary Addons for Kodi
50
License: GPL-2.0+ and GPL-3.0+
51
Group: Productivity/Multimedia/Video/Players
52
Url: http://kodi.tv/
53
Source0: https://github.com/xbmc/xbmc/archive/%{version}-%{kodi_version}.tar.gz
54
Source1: kodi.binary-addons.spec.packages.inc
55
Source2: kodi.binary-addons.spec.files.inc
56
Source3: kodi.binary-addons.tar
57
Source4: repo-binary-addons.%{kodi_version}.tar.bz2
58
Source5: kodi-platform-e8574b8.tar.gz
59
Source20: http://mirrors.kodi.tv/build-deps/sources/rapidxml-1.13.zip
60
Source21: rapidxml.cmake
61
Patch1: cmake-binary-addons.patch
62
Patch2: addon-helpers_lib64.patch
63
# PATCH-PACKMAN kodi.binary-addons-audiodecoder.ncsf-gcc5.3.patch - fixes compiling of audiodecoder.ncsf with gcc > 4.8, suse_version >= 1320
64
#Patch3: kodi.binary-addons-audiodecoder.ncsf-gcc5.3.patch
65
# PATCH-PACKMAN kodi.binary-addons-screensavers.rsxs-upstream-stdbool_h.patch - fixes compiling of screensavers.rsxs with gcc > 4.8, suse_version >= 1320
66
#Patch4: kodi.binary-addons-screensavers.rsxs-upstream-stdbool_h.patch
67
#Patch5: lib555-missing-xlocale.patch
68
#Patch6: pvr.stalker-gcc7.patch
69
# PATCH-PACKMAN kodi.binary.addons-noreturnfromnonvoid.patch - davejplater@gmail.com - Suddenly an rpmlint no return from nonvoid has appeared after taglib was updated.
70
Patch7: kodi.binary.addons-noreturnfromnonvoid.patch
71
#Patch8: kodi.binary-addons-screensavers.rsxs-host-toolchain.patch
72
#Patch9: kodi.binary-addons-vfs.sacd.no-int-conversion.patch
73
74
BuildRequires: autoconf
75
BuildRequires: automake
76
BuildRequires: ccache
77
BuildRequires: cmake
78
BuildRequires: fdupes
79
%if 0%{?suse_version} >= 1550 && 0%{?sle_version} == 0
80
BuildRequires: gcc10
81
BuildRequires: gcc10-c++
82
%else
83
BuildRequires: gcc9
84
BuildRequires: gcc9-c++
85
%endif
86
%if %{noX_build}
87
BuildRequires: kodi-noX-devel = %{version}
88
%else
89
BuildRequires: kodi-devel = %{version}
90
%endif
91
BuildRequires: giflib-devel
92
BuildRequires: gli-devel
93
BuildRequires: cmake(glm) >= 0.9.9
94
BuildRequires: jsoncpp-devel
95
BuildRequires: nlohmann_json-devel
96
BuildRequires: tinyxml-devel
97
BuildRequires: libhdhomerun-devel
98
BuildRequires: liblz4-devel
99
BuildRequires: libmp3lame-devel
100
BuildRequires: libnfs-devel
101
BuildRequires: libraw-devel
102
BuildRequires: libsmbclient-devel
103
BuildRequires: libSOIL-devel
104
BuildRequires: libstdc++-devel
105
BuildRequires: libtiff-devel
106
BuildRequires: libtool
107
BuildRequires: libxml2-devel
108
BuildRequires: lzo-devel
109
BuildRequires: nlohmann_json-devel
110
BuildRequires: pkg-config
111
BuildRequires: pkgconfig(flac)
112
BuildRequires: pkgconfig(fluidsynth)
113
BuildRequires: pkgconfig(gtest)
114
BuildRequires: pkgconfig(libarchive) >= 3.3.2
115
BuildRequires: pkgconfig(libjpeg)
116
BuildRequires: pkgconfig(libmodplug)
117
%if 0%{?suse_version} >= 1550
118
BuildRequires: pkgconfig(libplist-2.0)
119
%else
120
BuildRequires: pkgconfig(libplist)
121
%endif
122
BuildRequires: pkgconfig(libpng)
123
BuildRequires: pkgconfig(libprojectM)
124
BuildRequires: pkgconfig(librtmp)
125
BuildRequires: pkgconfig(libssh)
126
BuildRequires: pkgconfig(libssl)
127
BuildRequires: pkgconfig(p8-platform)
128
BuildRequires: pkgconfig(pugixml)
129
BuildRequires: pkgconfig(tinyxml2)
130
BuildRequires: pkgconfig(vorbis)
131
BuildRequires: pkgconfig(wavpack)
132
BuildRequires: rapidjson-devel
133
BuildRequires: pkgconfig(libavcodec) >= 58.18.100
134
BuildRequires: pkgconfig(libavfilter) >= 6.107.100
135
BuildRequires: pkgconfig(libavformat) >= 58.12.100
136
BuildRequires: pkgconfig(libavutil) >= 56.14.100
137
BuildRequires: pkgconfig(libpostproc) >= 54.7.100
138
BuildRequires: pkgconfig(libswscale) >= 4.8.100
139
BuildRequires: pkgconfig(libswresample) >= 3.1.100
140
141
# kodi needs the same libtag version which was used to build against
142
%requires_eq libtag1
143
%if !%{noX_build}
144
BuildRequires: xorg-x11-devel
145
%endif
146
%if %{with enable_opengl}
147
BuildRequires: pkgconfig(gl)
148
BuildRequires: pkgconfig(glew)
149
BuildRequires: pkgconfig(glu)
150
BuildRequires: pkgconfig(vdpau)
151
%endif
152
153
%if %{with enable_opengles}
154
%if "%{kodi_platform}" == "none"
155
BuildRequires: Mesa-libEGL-devel
156
BuildRequires: Mesa-libGLESv2-devel
157
%else
158
%if "%{kodi_platform}" == "raspberry-pi" || "%{kodi_platform}" == "raspberry-pi2"
159
BuildRequires: raspberrypi-userland-devel
160
%endif
161
%endif
162
%endif
163
164
# glxinfo is needed to check hw accel
165
%if 0%{?suse_version} >= 1220
166
%if !%{noX_build}
167
Requires: Mesa-demo-x
168
Requires: xdpyinfo
169
%endif
170
%endif
171
172
BuildRoot: %{_tmprath}/%{name}-%{version}-build
173
ExcludeArch: ppc64
174
Requires: kodi = %{version}
175
#Requires: libjsoncpp1
176
177
%description
178
Binary Addons for Kodi Media Center
179
180
%include %{SOURCE1}
181
182
%prep
183
%setup -q -n xbmc-%{version}-%{kodi_version}
184
%patch1 -p1
185
%patch2 -p1
186
187
%build
188
189
%install
190
191
pushd cmake/addons
192
tar xvf %{SOURCE3}
193
mkdir -pv build/bootstrap/binary-addons/src
194
cp -v %{SOURCE4} build/bootstrap/binary-addons/src
195
196
# Remove deps that are already installed using BuildRequires
197
rm -rf depends/common/{p8-platform,tinyxml}
198
rm -f depends/common/kodi-platform/deps.txt
199
mkdir -p depends/common/kodi-platform
200
cp -v %{SOURCE5} depends/common/kodi-platform
201
echo "kodi-platform file://../../../../../cmake/addons/depends/common/kodi-platform/kodi-platform-e8574b8.tar.gz" > depends/common/kodi-platform/kodi-platform.txt
202
mkdir -pv depends/common/rapidxml
203
cp -v %{SOURCE20} depends/common/rapidxml
204
cp -v %{SOURCE21} depends/common/rapidxml/CMakeLists.txt
205
echo "rapidxml file://../../../../../cmake/addons/depends/common/rapidxml/rapidxml-1.13.zip" > depends/common/rapidxml/rapidxml.txt
206
echo "c3f0b886374981bb20fabcf323d755db4be6dba42064599481da64a85f5b3571" > depends/common/rapidxml/rapidxml.sha256
207
popd
208
209
sed -i~ 's/@@@_libdir@@@/%{_lib}/' cmake/scripts/common/AddonHelpers.cmake
210
diff -u cmake/scripts/common/AddonHelpers.cmake~ cmake/scripts/common/AddonHelpers.cmake && exit 0
211
212
%if 0
213
# Tumbleweed and Factory have GCC 5.x ATM (20160309), source needs patching for this
214
#%if 0%{?suse_version} > 1320
215
# patch audiodecoders.ncsf
216
#patch -p0 < %%{PATCH3}
217
# patch screensavers.rsxs
218
#patch screensavers.rsxs/lib/rsxs-1.0/lib/stdbool.in.h %{PATCH4}
219
#patch -up0 --verbose < %{PATCH5}
220
#patch -up4 --verbose < %{PATCH6}
221
#%endif
222
223
# fake buildtime in audiodecoder.qsf
224
FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%b %%e %%Y')
225
FAKE_BUILDTIME=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%H:%%M:%%S')
226
#for file in audiodecoder.qsf/lib/Highly_Quixotic/Core/qsound.c \
227
# audiodecoder.ssf/lib/Highly_Theoretical/Core/Starscream/star.c \
228
# audiodecoder.ssf/lib/Highly_Theoretical/Core/sega.c \
229
# audiodecoder.timidity/lib/timidity/timidity/speex_a.c; do
230
# sed -i -e "s/__DATE__/\"$FAKE_BUILDDATE\"/" -e "s/__TIME__/\"$FAKE_BUILDTIME\"/" $file
231
#done
232
#patch -p 0 < %{PATCH7}
233
#make VERBOSE=1 %{?_smp_mflags}
234
%endif
235
236
test -x "$(type -P gcc)" && CC="$_"
237
test -x "$(type -P g++)" && CXX="$_"
238
test -x "$(type -P gcc-9)" && CC="$_"
239
test -x "$(type -P g++-9)" && CXX="$_"
240
test -x "$(type -P gcc-10)" && CC="$_"
241
test -x "$(type -P g++-10)" && CXX="$_"
242
CC="$(readlink -f ${CC})"
243
CXX="$(readlink -f ${CXX})"
244
245
pushd tools/depends/target/binary-addons
246
mkdir -p native
247
%cmake \
248
../../../../../cmake/addons \
249
%if %{dev_build}
250
-DVERBOSE=ON \
251
%endif
252
-DCMAKE_C_COMPILER=$CC \
253
-DCMAKE_CXX_COMPILER=$CXX \
254
%ifarch %{ix86}
255
-DCMAKE_C_FLAGS=-mavx \
256
%endif
257
-DBUILD_DIR=build \
258
-DNEED_SUDO=FALSE \
259
-DAPP_LIB_DIR=%{buildroot}%{_libdir}/kodi \
260
-DCMAKE_INSTALL_LIBDIR=%{buildroot}%{_libdir}/kodi \
261
-DCMAKE_INSTALL_PREFIX=%{buildroot}%{_prefix} \
262
-DADDONS_TO_BUILD="all"
263
264
popd
265
266
# Patching addons after being unpacked
267
pushd cmake/addons
268
patch -up2 --verbose -i %{PATCH7}
269
#patch -up0 --verbose -i %{PATCH8}
270
#patch -up2 --verbose -i %{PATCH9}
271
popd
272
273
pushd tools/depends/target/binary-addons/build
274
# Workaround for cmake 3.18 issue with copy_if_different issue adding "" at the end of line
275
sed -i -e 's#""##' depends/CMakeFiles/rapidxml.dir/build.make
276
make -O %{?_smp_mflags} VERBOSE=1 CC=$CC CXX=$CXX
277
#%{?_smp_mflags}
278
279
%fdupes %{buildroot}
280
281
%files
282
%defattr(-,root,root)
283
%dir %{_libdir}/kodi
284
%dir %{_datadir}/kodi
285
%{_libdir}/kodi/PrepareEnv.cmake
286
287
%include %{SOURCE2}
288
289
%changelog
290