File kodi.binary-addons-noX-raspberry-pi2.spec of Package kodi.binary-addons (Revision 12890ef61f1d6d85cc2ea0e178c052b3)

Currently displaying revision 12890ef61f1d6d85cc2ea0e178c052b3 , Show latest

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