File kodi.binary-addons-noX-raspberry-pi.spec of Package kodi.binary-addons (Revision c30abdfc0fd015199c49c77e1f343d61)

Currently displaying revision c30abdfc0fd015199c49c77e1f343d61 , Show latest

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