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

Currently displaying revision c82a963925b221c1c47de3df77f4a617 , Show latest

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