File kodi.binary-addons-noX.spec of Package kodi.binary-addons (Revision 1d564527017c8c65fb3e5cb9b405bab4)

Currently displaying revision 1d564527017c8c65fb3e5cb9b405bab4 , Show latest

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