1 ################################################################################
5 ################################################################################
7 KODI_VERSION
= 16.1-Jarvis
8 KODI_SITE
= $(call github
,xbmc
,xbmc
,$(KODI_VERSION
))
10 KODI_LICENSE_FILES
= LICENSE.GPL
11 # needed for binary addons
12 KODI_INSTALL_STAGING
= YES
63 PYTHON_VERSION
="$(PYTHON_VERSION_MAJOR)" \
64 PYTHON_LDFLAGS
="-lpython$(PYTHON_VERSION_MAJOR) -lpthread -ldl -lutil -lm" \
65 PYTHON_CPPFLAGS
="-I$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR)" \
66 PYTHON_SITE_PKG
="$(STAGING_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages" \
67 PYTHON_NOVERSIONCHECK
="no-check" \
68 use_texturepacker_native
=yes \
69 USE_TEXTUREPACKER_NATIVE_ROOT
="$(HOST_DIR)/usr" \
70 TEXTUREPACKER_NATIVE_ROOT
="$(HOST_DIR)/usr"
73 --with-ffmpeg
=shared \
77 --disable-vtbdecoder \
78 --enable-optimizations
80 ifeq ($(BR2_PACKAGE_KODI_MYSQL
),y
)
81 KODI_CONF_OPTS
+= --enable-mysql
82 KODI_CONF_ENV
+= ac_cv_path_MYSQL_CONFIG
="$(STAGING_DIR)/usr/bin/mysql_config"
83 KODI_DEPENDENCIES
+= mysql
85 KODI_CONF_OPTS
+= --disable-mysql
88 ifeq ($(BR2_PACKAGE_KODI_NONFREE
),y
)
89 KODI_CONF_OPTS
+= --enable-non-free
90 KODI_LICENSE
:= $(KODI_LICENSE
), unrar
91 KODI_LICENSE_FILES
+= lib
/UnrarXLib
/license.txt
93 KODI_CONF_OPTS
+= --disable-non-free
96 ifeq ($(BR2_PACKAGE_RPI_USERLAND
),y
)
97 KODI_DEPENDENCIES
+= rpi-userland
98 KODI_CONF_OPTS
+= --with-platform
=raspberry-pi
--enable-player
=omxplayer
100 -I
$(STAGING_DIR
)/usr
/include/interface
/vcos
/pthreads \
101 -I
$(STAGING_DIR
)/usr
/include/interface
/vmcs_host
/linux
102 KODI_LIBS
= -lvcos
-lvchostif
105 ifeq ($(BR2_PACKAGE_HAS_UDEV
),y
)
106 KODI_DEPENDENCIES
+= udev
107 KODI_CONF_OPTS
+= --enable-udev
109 KODI_CONF_OPTS
+= --disable-udev
112 ifeq ($(BR2_PACKAGE_IMX_VPUWRAP
),y
)
113 KODI_DEPENDENCIES
+= imx-vpuwrap
114 KODI_CONF_OPTS
+= --enable-codec
=imxvpu
117 ifeq ($(BR2_PACKAGE_LIBAMCODEC
),y
)
118 KODI_DEPENDENCIES
+= libamcodec
119 KODI_CONF_OPTS
+= --enable-codec
=amcodec
120 KODI_INCLUDES
+= -I
$(STAGING_DIR
)/usr
/include/amcodec
124 INCLUDES
="$(KODI_INCLUDES)" \
127 ifeq ($(BR2_PACKAGE_LIBCAP
),y
)
128 KODI_CONF_OPTS
+= --enable-libcap
129 KODI_DEPENDENCIES
+= libcap
131 KODI_CONF_OPTS
+= --disable-libcap
134 ifeq ($(BR2_PACKAGE_KODI_DBUS
),y
)
135 KODI_DEPENDENCIES
+= dbus
136 KODI_CONF_OPTS
+= --enable-dbus
138 KODI_CONF_OPTS
+= --disable-dbus
141 ifeq ($(BR2_PACKAGE_KODI_ALSA_LIB
),y
)
142 KODI_DEPENDENCIES
+= alsa-lib
143 KODI_CONF_OPTS
+= --enable-alsa
145 KODI_CONF_OPTS
+= --disable-alsa
148 # quote from kodi/configure.in: "GLES overwrites GL if both set to yes."
149 # we choose the opposite because opengl offers more features, like libva support
150 # GL means X11, and under X11, Kodi needs libdrm; libdrm is forcefully selected
151 # by a modular Xorg server, which Kodi already depends on.
152 ifeq ($(BR2_PACKAGE_KODI_GL
),y
)
153 KODI_DEPENDENCIES
+= libglew libglu libgl xlib_libX11 xlib_libXext \
154 xlib_libXmu xlib_libXrandr xlib_libXt libdrm
155 KODI_CONF_OPTS
+= --enable-gl
--enable-x11
--disable-gles
157 KODI_CONF_OPTS
+= --disable-gl
--disable-x11
158 ifeq ($(BR2_PACKAGE_KODI_EGL_GLES
),y
)
159 KODI_DEPENDENCIES
+= libegl libgles
160 KODI_CONF_ENV
+= CXXFLAGS
="$(TARGET_CXXFLAGS) `$(PKG_CONFIG_HOST_BINARY) --cflags --libs egl`"
161 KODI_CONF_ENV
+= CFLAGS
="$(TARGET_CFLAGS) `$(PKG_CONFIG_HOST_BINARY) --cflags --libs egl`"
162 KODI_CONF_OPTS
+= --enable-gles
164 KODI_CONF_OPTS
+= --disable-gles
168 ifeq ($(BR2_PACKAGE_KODI_LIBUSB
),y
)
169 KODI_DEPENDENCIES
+= libusb-compat
170 KODI_CONF_OPTS
+= --enable-libusb
172 KODI_CONF_OPTS
+= --disable-libusb
175 ifeq ($(BR2_PACKAGE_KODI_LIBMICROHTTPD
),y
)
176 KODI_DEPENDENCIES
+= libmicrohttpd
177 KODI_CONF_OPTS
+= --enable-webserver
179 KODI_CONF_OPTS
+= --disable-webserver
182 ifeq ($(BR2_PACKAGE_KODI_LIBSMBCLIENT
),y
)
183 KODI_DEPENDENCIES
+= samba4
184 KODI_CONF_OPTS
+= --enable-samba
186 KODI_CONF_OPTS
+= --disable-samba
189 ifeq ($(BR2_PACKAGE_KODI_LIBNFS
),y
)
190 KODI_DEPENDENCIES
+= libnfs
191 KODI_CONF_OPTS
+= --enable-nfs
193 KODI_CONF_OPTS
+= --disable-nfs
196 ifeq ($(BR2_PACKAGE_KODI_RTMPDUMP
),y
)
197 KODI_DEPENDENCIES
+= rtmpdump
198 KODI_CONF_OPTS
+= --enable-rtmp
200 KODI_CONF_OPTS
+= --disable-rtmp
203 ifeq ($(BR2_PACKAGE_KODI_LIBBLURAY
),y
)
204 KODI_DEPENDENCIES
+= libbluray
205 KODI_CONF_OPTS
+= --enable-libbluray
207 KODI_CONF_OPTS
+= --disable-libbluray
210 ifeq ($(BR2_PACKAGE_KODI_LIBSHAIRPLAY
),y
)
211 KODI_DEPENDENCIES
+= libshairplay
212 KODI_CONF_OPTS
+= --enable-airplay
214 KODI_CONF_OPTS
+= --disable-airplay
217 ifeq ($(BR2_PACKAGE_KODI_LIBSSH
),y
)
218 KODI_DEPENDENCIES
+= libssh
219 KODI_CONF_OPTS
+= --enable-ssh
221 KODI_CONF_OPTS
+= --disable-ssh
224 ifeq ($(BR2_PACKAGE_KODI_AVAHI
),y
)
225 KODI_DEPENDENCIES
+= avahi
226 KODI_CONF_OPTS
+= --enable-avahi
228 KODI_CONF_OPTS
+= --disable-avahi
231 ifeq ($(BR2_PACKAGE_KODI_LIBCEC
),y
)
232 KODI_DEPENDENCIES
+= libcec
233 KODI_CONF_OPTS
+= --enable-libcec
235 KODI_CONF_OPTS
+= --disable-libcec
238 ifeq ($(BR2_PACKAGE_KODI_LIRC
),y
)
239 KODI_CONF_OPTS
+= --enable-lirc
241 KODI_CONF_OPTS
+= --disable-lirc
244 ifeq ($(BR2_PACKAGE_KODI_LIBTHEORA
),y
)
245 KODI_DEPENDENCIES
+= libtheora
248 # kodi needs libva & libva-glx
249 ifeq ($(BR2_PACKAGE_KODI_LIBVA
)$(BR2_PACKAGE_MESA3D_DRI_DRIVER
),yy
)
250 KODI_DEPENDENCIES
+= mesa3d libva
251 KODI_CONF_OPTS
+= --enable-vaapi
253 KODI_CONF_OPTS
+= --disable-vaapi
256 ifeq ($(BR2_PACKAGE_KODI_LIBVDPAU
),y
)
257 KODI_DEPENDENCIES
+= libvdpau
258 KODI_CONF_OPTS
+= --enable-vdpau
260 KODI_CONF_OPTS
+= --disable-vdpau
263 ifeq ($(BR2_PACKAGE_KODI_UPNP
),y
)
264 KODI_CONF_OPTS
+= --enable-upnp
266 KODI_CONF_OPTS
+= --disable-upnp
269 ifeq ($(BR2_PACKAGE_KODI_OPTICALDRIVE
),y
)
270 KODI_CONF_OPTS
+= --enable-optical-drive
--enable-dvdcss
272 KODI_CONF_OPTS
+= --disable-optical-drive
--disable-dvdcss
275 # Add HOST_DIR to PATH for codegenerator.mk to find swig
276 define KODI_BOOTSTRAP
277 $(HOST_CONFIGURE_OPTS
) $(MAKE
) -C
$(@D
)/tools
/depends
/native
/JsonSchemaBuilder
278 $(HOST_CONFIGURE_OPTS
) $(MAKE
) -C
$(@D
)/tools
/depends
/native
/TexturePacker
279 cd
$(@D
) && PATH
=$(BR_PATH
) .
/bootstrap
281 KODI_PRE_CONFIGURE_HOOKS
+= KODI_BOOTSTRAP
283 define KODI_CLEAN_UNUSED_ADDONS
284 rm -Rf
$(TARGET_DIR
)/usr
/share
/kodi
/addons
/visualization.milkdrop
285 rm -Rf
$(TARGET_DIR
)/usr
/share
/kodi
/addons
/visualization.projectm
286 rm -Rf
$(TARGET_DIR
)/usr
/share
/kodi
/addons
/visualization.itunes
288 KODI_POST_INSTALL_TARGET_HOOKS
+= KODI_CLEAN_UNUSED_ADDONS
290 define KODI_CLEAN_CONFLUENCE_SKIN
291 find
$(TARGET_DIR
)/usr
/share
/kodi
/addons
/skin.confluence
/media
-name
*.png
-delete
292 find
$(TARGET_DIR
)/usr
/share
/kodi
/addons
/skin.confluence
/media
-name
*.jpg
-delete
294 KODI_POST_INSTALL_TARGET_HOOKS
+= KODI_CLEAN_CONFLUENCE_SKIN
296 define KODI_INSTALL_BR_WRAPPER
297 $(INSTALL
) -D
-m
0755 package
/kodi
/br-kodi \
298 $(TARGET_DIR
)/usr
/bin
/br-kodi
300 KODI_POST_INSTALL_TARGET_HOOKS
+= KODI_INSTALL_BR_WRAPPER
302 # When run from a startup script, Kodi has no $HOME where to store its
303 # configuration, so ends up storing it in /.kodi (yes, at the root of
304 # the rootfs). This is a problem for read-only filesystems. But we can't
305 # easily change that, so create /.kodi as a symlink where we want the
306 # config to eventually be. Add synlinks for the legacy XBMC name as well
307 define KODI_INSTALL_CONFIG_DIR
308 $(INSTALL
) -d
-m
0755 $(TARGET_DIR
)/var
/kodi
309 ln
-sf
/var
/kodi
$(TARGET_DIR
)/.kodi
310 ln
-sf
/var
/kodi
$(TARGET_DIR
)/var
/xbmc
311 ln
-sf
/var
/kodi
$(TARGET_DIR
)/.xbmc
313 KODI_POST_INSTALL_TARGET_HOOKS
+= KODI_INSTALL_CONFIG_DIR
315 define KODI_INSTALL_INIT_SYSV
316 $(INSTALL
) -D
-m
755 package
/kodi
/S50kodi \
317 $(TARGET_DIR
)/etc
/init.d
/S50kodi
320 define KODI_INSTALL_INIT_SYSTEMD
321 $(INSTALL
) -D
-m
644 package
/kodi
/kodi.service \
322 $(TARGET_DIR
)/usr
/lib
/systemd
/system
/kodi.service
324 mkdir
-p
$(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
326 ln
-fs ..
/..
/..
/..
/usr
/lib
/systemd
/system
/kodi.service \
327 $(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
/kodi.service
330 $(eval
$(autotools-package
))