Gentoo Archives: gentoo-commits

From: Mart Raudsepp <leio@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] dev/leio:master commit in: media-tv/kodi/, media-tv/kodi/files/
Date: Thu, 26 Feb 2015 16:43:37
Message-Id: 1424968917.c06b7ccc2af06d17500ae8aa81d60447d74818d0.leio@gentoo
1 commit: c06b7ccc2af06d17500ae8aa81d60447d74818d0
2 Author: Mart Raudsepp <leio <AT> gentoo <DOT> org>
3 AuthorDate: Thu Feb 26 16:41:57 2015 +0000
4 Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org>
5 CommitDate: Thu Feb 26 16:41:57 2015 +0000
6 URL: http://sources.gentoo.org/gitweb/?p=dev/leio.git;a=commit;h=c06b7ccc
7
8 Add a very rough kodi ebuild for RPi for testing by interested parties
9
10 ---
11 media-tv/kodi/Manifest | 2 +
12 media-tv/kodi/files/generate.sh | 34 +++
13 .../kodi/files/kodi-14.0-dvddemux-ffmpeg.patch | 16 ++
14 media-tv/kodi/files/kodi-9999-no-arm-flags.patch | 16 ++
15 media-tv/kodi/files/kodi-9999-nomythtv.patch | 67 +++++
16 media-tv/kodi/kodi-14.1.ebuild | 271 +++++++++++++++++++++
17 media-tv/kodi/metadata.xml | 26 ++
18 7 files changed, 432 insertions(+)
19
20 diff --git a/media-tv/kodi/Manifest b/media-tv/kodi/Manifest
21 new file mode 100644
22 index 0000000..4ef5ffd
23 --- /dev/null
24 +++ b/media-tv/kodi/Manifest
25 @@ -0,0 +1,2 @@
26 +DIST kodi-14.1-generated-addons.tar.xz 71072 SHA256 0666eae88a3214f7577544975524b95a9f55b107cde5124d5d299351427c5d39 SHA512 a26889ba8af33316ac61bbf5a55ec6cd72cb867eac9b6d7c626ff890f3287de8704cf8372a5e2b72d6075ab8c31ba3d8465d1da0c9437065fe6e0171a560142f WHIRLPOOL 34a7067964febd71d5e07333a1ef90c14ad3d7d09e82aa4a3245b8174b068a1b2b31d0d6e5d20a449d11d34701b59611b725c8f37ce61702489c84bda16f227a
27 +DIST kodi-14.1.tar.gz 70832109 SHA256 a38059e292cf8523918834e49fcc2d688525ceb7951ddf7f5ee535f4147255d6 SHA512 05dccad279073fc804faf2f179ba370f612d53c823dd333fdd151e05de37eb8202cc981ba48afff695d475bafde9c8f05f562fe09883593a70299a2f098a9849 WHIRLPOOL 464ff2673c9e65466dff73d3c91b8754ee68d64b4a18ebb0b0c6e8efa2da1cc32ab22686530a8469a105bf7a089d8928db64c5c61d272462c13485006875b506
28
29 diff --git a/media-tv/kodi/files/generate.sh b/media-tv/kodi/files/generate.sh
30 new file mode 100755
31 index 0000000..2e5b67f
32 --- /dev/null
33 +++ b/media-tv/kodi/files/generate.sh
34 @@ -0,0 +1,34 @@
35 +#!/bin/bash
36 +# Generate the various interface files that normally requires java.
37 +# This makes building the release versions much nicer.
38 +
39 +set -eux
40 +
41 +PV=$1
42 +PN=kodi
43 +P="${PN}-${PV}"
44 +DISTDIR="/usr/portage/distfiles"
45 +GITDIR="/usr/local/src/kodi/git"
46 +
47 +if [[ ${PV} != "9999" ]] ; then
48 + rm -rf xbmc-*/
49 + tar xf ${DISTDIR}/${P}.tar.gz
50 + d=$(echo xbmc-*/)
51 +else
52 + stamp=$(date --date="$(git log -n1 --pretty=format:%ci master)" -u +%Y%m%d)
53 + P+="-${stamp}"
54 + cd ${GITDIR}
55 + d=.
56 +fi
57 +#cd ${d} && git init . && git add . && git commit -qmm && cd ..
58 +make -C ${d} -j -f codegenerator.mk
59 +tar="${DISTDIR}/${P}-generated-addons.tar.xz"
60 +tar cf - \
61 + ${d}/xbmc/interfaces/python/generated/*.cpp \
62 + ${d}/xbmc/interfaces/json-rpc/ServiceDescription.h \
63 + | xz > "${tar}"
64 +if [[ ${PV} != "9999" ]] ; then
65 + rm -rf xbmc-*/
66 +fi
67 +
68 +du -b "${tar}"
69
70 diff --git a/media-tv/kodi/files/kodi-14.0-dvddemux-ffmpeg.patch b/media-tv/kodi/files/kodi-14.0-dvddemux-ffmpeg.patch
71 new file mode 100644
72 index 0000000..94b8666
73 --- /dev/null
74 +++ b/media-tv/kodi/files/kodi-14.0-dvddemux-ffmpeg.patch
75 @@ -0,0 +1,16 @@
76 +sniped from:
77 +http://cvs.rpmfusion.org/viewvc/rpms/kodi/devel/kodi-14.0-dvddemux-ffmpeg.patch?root=free&view=markup
78 +
79 +--- xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
80 ++++ xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
81 +@@ -519,10 +519,6 @@
82 +
83 + void CDVDDemuxFFmpeg::Flush()
84 + {
85 +- // naughty usage of an internal ffmpeg function
86 +- if (m_pFormatContext)
87 +- av_read_frame_flush(m_pFormatContext);
88 +-
89 + m_currentPts = DVD_NOPTS_VALUE;
90 +
91 + m_pkt.result = -1;
92
93 diff --git a/media-tv/kodi/files/kodi-9999-no-arm-flags.patch b/media-tv/kodi/files/kodi-9999-no-arm-flags.patch
94 new file mode 100644
95 index 0000000..82a7383
96 --- /dev/null
97 +++ b/media-tv/kodi/files/kodi-9999-no-arm-flags.patch
98 @@ -0,0 +1,16 @@
99 +http://bugs.gentoo.org/400617
100 +
101 +do not force any particular ABI or FPU or SIMD compiler flags for arm
102 +targets. let the toolchain and user CFLAGS control that.
103 +
104 +--- a/configure.in
105 ++++ b/configure.in
106 +@@ -571,7 +571,7 @@
107 + elif test "$target_platform" = "target_raspberry_pi"; then
108 + ARCH="arm"
109 + use_arch="arm"
110 +-elif test "$use_arch" = "arm"; then
111 ++elif false; then
112 + CFLAGS="$CFLAGS -mno-apcs-stack-check"
113 + CXXFLAGS="$CXXFLAGS -mno-apcs-stack-check"
114 + FFMPEG_EXTRACFLAGS=""
115
116 diff --git a/media-tv/kodi/files/kodi-9999-nomythtv.patch b/media-tv/kodi/files/kodi-9999-nomythtv.patch
117 new file mode 100644
118 index 0000000..40ab23b
119 --- /dev/null
120 +++ b/media-tv/kodi/files/kodi-9999-nomythtv.patch
121 @@ -0,0 +1,67 @@
122 +http://trac.xbmc.org/ticket/11775
123 +
124 +make mythtv support optional
125 +
126 +diff --git a/Makefile.in b/Makefile.in
127 +index 9ffae7e..17cc525 100755
128 +--- a/Makefile.in
129 ++++ b/Makefile.in
130 +@@ -209,7 +209,7 @@ LIB_DIRS=\
131 + lib/cpluff \
132 + lib/xbmc-dll-symbols
133 +
134 +-ifeq (@USE_MYSQL@,1)
135 ++ifeq (@USE_MYTHTV@,1)
136 + LIB_DIRS += lib/cmyth
137 + CMYTH=cmyth
138 + endif
139 +diff --git a/configure.in b/configure.in
140 +index d44825f..629d7b4 100755
141 +--- a/configure.in
142 ++++ b/configure.in
143 +@@ -479,6 +479,12 @@ AC_ARG_ENABLE([mysql],
144 + [AS_HELP_STRING([--disable-mysql],
145 + [disable mysql])],
146 +
147 ++AC_ARG_ENABLE([mythtv],
148 ++ [AS_HELP_STRING([--disable-mythtv],
149 ++ [disable mythtv])],
150 ++ [use_mythtv=$enableval],
151 ++ [use_mythtv=yes])
152 ++
153 + AC_ARG_ENABLE([webserver],
154 + [AS_HELP_STRING([--disable-webserver],
155 + [disable webserver])],
156 +@@ -1080,6 +1086,9 @@ if test "$use_mysql" = "yes"; then
157 + else
158 + AC_MSG_ERROR($missing_program)
159 + fi
160 ++ if test "$use_mythtv" = "yes"; then
161 ++ AC_DEFINE([HAVE_MYTHTV],[1],["Define to 1 if you want mythtv support"])
162 ++ fi
163 + fi
164 + AC_CHECK_HEADER([ass/ass.h],, AC_MSG_ERROR($missing_library))
165 + AC_CHECK_HEADER([mpeg2dec/mpeg2.h],, AC_MSG_ERROR($missing_library))
166 +@@ -2372,6 +2381,15 @@ else
167 + final_message="$final_message\n MySQL:\tNo"
168 + USE_MYSQL=0
169 + fi
170 ++
171 ++if test "$use_mythtv" = "yes"; then
172 ++ final_message="$final_message\n MythTV:\tYes"
173 ++ USE_MYTHTV=1
174 ++else
175 ++ final_message="$final_message\n MythTV:\tNo"
176 ++ USE_MYTHTV=0
177 ++fi
178 ++
179 + if test "$use_webserver" = "yes"; then
180 + final_message="$final_message\n Webserver:\tYes"
181 + USE_WEB_SERVER=1
182 +@@ -2675,6 +2693,7 @@ AC_SUBST(USE_LIBUDEV)
183 + AC_SUBST(USE_LIBUSB)
184 + AC_SUBST(USE_LIBCEC)
185 + AC_SUBST(USE_MYSQL)
186 ++AC_SUBST(USE_MYTHTV)
187 + AC_SUBST(USE_WAYLAND)
188 +
189
190 diff --git a/media-tv/kodi/kodi-14.1.ebuild b/media-tv/kodi/kodi-14.1.ebuild
191 new file mode 100644
192 index 0000000..3022b8b
193 --- /dev/null
194 +++ b/media-tv/kodi/kodi-14.1.ebuild
195 @@ -0,0 +1,271 @@
196 +# Copyright 1999-2015 Gentoo Foundation
197 +# Distributed under the terms of the GNU General Public License v2
198 +# $Header: /var/cvsroot/gentoo-x86/media-tv/kodi/kodi-14.1.ebuild,v 1.2 2015/02/17 00:05:03 vapier Exp $
199 +
200 +EAPI="5"
201 +
202 +# Does not work with py3 here
203 +# It might work with py:2.5 but I didn't test that
204 +PYTHON_COMPAT=( python{2_6,2_7} )
205 +PYTHON_REQ_USE="sqlite"
206 +
207 +inherit eutils python-single-r1 multiprocessing autotools
208 +
209 +CODENAME="Helix"
210 +case ${PV} in
211 +9999)
212 + EGIT_REPO_URI="git://github.com/xbmc/xbmc.git"
213 + inherit git-2
214 + ;;
215 +*|*_p*)
216 + MY_PV=${PV/_p/_r}
217 + MY_P="${PN}-${MY_PV}"
218 + SRC_URI="http://mirrors.kodi.tv/releases/source/${MY_PV}-${CODENAME}.tar.gz -> ${P}.tar.gz
219 + http://mirrors.kodi.tv/releases/source/${MY_P}-generated-addons.tar.xz"
220 + KEYWORDS="~amd64 ~arm ~x86"
221 +
222 + S=${WORKDIR}/xbmc-${PV}-${CODENAME}
223 + ;;
224 +esac
225 +
226 +DESCRIPTION="Kodi is a free and open source media-player and entertainment hub"
227 +HOMEPAGE="http://kodi.tv/ http://kodi.wiki/"
228 +
229 +LICENSE="GPL-2"
230 +SLOT="0"
231 +IUSE="airplay avahi bluetooth bluray caps cec css debug +fishbmc gles goom java joystick midi mysql nfs +opengl profile +projectm pulseaudio pvr rpi +rsxs rtmp +samba sftp test udisks upnp upower +usb vaapi vdpau webserver +X +xrandr"
232 +REQUIRED_USE="
233 + pvr? ( mysql )
234 + rsxs? ( X )
235 + xrandr? ( X )
236 +"
237 +
238 +COMMON_DEPEND="${PYTHON_DEPS}
239 + app-arch/bzip2
240 + app-arch/unzip
241 + app-arch/zip
242 + app-i18n/enca
243 + airplay? ( app-pda/libplist )
244 + dev-libs/boost
245 + dev-libs/fribidi
246 + dev-libs/libcdio[-minimal]
247 + cec? ( >=dev-libs/libcec-2.1 )
248 + dev-libs/libpcre[cxx]
249 + >=dev-libs/lzo-2.04
250 + dev-libs/tinyxml[stl]
251 + dev-libs/yajl
252 + dev-python/simplejson[${PYTHON_USEDEP}]
253 + media-fonts/corefonts
254 + media-fonts/roboto
255 + media-libs/alsa-lib
256 + media-libs/flac
257 + media-libs/fontconfig
258 + media-libs/freetype
259 + >=media-libs/glew-1.5.6
260 + media-libs/jasper
261 + media-libs/jbigkit
262 + >=media-libs/libass-0.9.7
263 + bluray? ( media-libs/libbluray )
264 + css? ( media-libs/libdvdcss )
265 + media-libs/libmad
266 + media-libs/libmodplug
267 + media-libs/libmpeg2
268 + media-libs/libogg
269 + media-libs/libpng
270 + projectm? ( media-libs/libprojectm )
271 + media-libs/libsamplerate
272 + joystick? ( media-libs/libsdl2 )
273 + >=media-libs/taglib-1.8
274 + media-libs/libvorbis
275 + media-libs/tiff
276 + pulseaudio? ( media-sound/pulseaudio )
277 + media-sound/wavpack
278 + >=media-video/ffmpeg-2.4:=[encode]
279 + rtmp? ( media-video/rtmpdump )
280 + avahi? ( net-dns/avahi )
281 + nfs? ( net-fs/libnfs )
282 + webserver? ( net-libs/libmicrohttpd[messages] )
283 + sftp? ( net-libs/libssh[sftp] )
284 + net-misc/curl
285 + samba? ( >=net-fs/samba-3.4.6[smbclient(+)] )
286 + bluetooth? ( net-wireless/bluez )
287 + sys-apps/dbus
288 + caps? ( sys-libs/libcap )
289 + sys-libs/zlib
290 + virtual/jpeg
291 + usb? ( virtual/libusb )
292 + mysql? ( virtual/mysql )
293 + opengl? (
294 + virtual/glu
295 + virtual/opengl
296 + )
297 + gles? (
298 + !rpi? ( virtual/opengl media-libs/mesa[gles2] )
299 + rpi? ( media-libs/raspberrypi-userland )
300 + )
301 + vaapi? ( x11-libs/libva[opengl] )
302 + vdpau? (
303 + || ( x11-libs/libvdpau >=x11-drivers/nvidia-drivers-180.51 )
304 + media-video/ffmpeg[vdpau]
305 + )
306 + X? (
307 + x11-apps/xdpyinfo
308 + x11-apps/mesa-progs
309 + x11-libs/libXinerama
310 + xrandr? ( x11-libs/libXrandr )
311 + x11-libs/libXrender
312 + )"
313 +RDEPEND="${COMMON_DEPEND}
314 + !media-tv/xbmc
315 + udisks? ( sys-fs/udisks:0 )
316 + upower? ( || ( sys-power/upower sys-power/upower-pm-utils ) )"
317 +DEPEND="${COMMON_DEPEND}
318 + app-arch/xz-utils
319 + dev-lang/swig
320 + dev-util/gperf
321 + X? ( x11-proto/xineramaproto )
322 + dev-util/cmake
323 + x86? ( dev-lang/nasm )
324 + java? ( virtual/jre )
325 + test? ( dev-cpp/gtest )"
326 +# Force java for latest git version to avoid having to hand maintain the
327 +# generated addons package. #488118
328 +[[ ${PV} == "9999" ]] && DEPEND+=" virtual/jre"
329 +
330 +pkg_setup() {
331 + python-single-r1_pkg_setup
332 +}
333 +
334 +src_unpack() {
335 + [[ ${PV} == "9999" ]] && git-2_src_unpack || default
336 +}
337 +
338 +src_prepare() {
339 + epatch "${FILESDIR}"/${PN}-9999-nomythtv.patch
340 + epatch "${FILESDIR}"/${PN}-9999-no-arm-flags.patch #400617
341 + epatch "${FILESDIR}"/${PN}-14.0-dvddemux-ffmpeg.patch #526992#36
342 + # The mythtv patch touches configure.ac, so force a regen
343 + rm -f configure
344 +
345 + # some dirs ship generated autotools, some dont
346 + multijob_init
347 + local d
348 + for d in $(printf 'f:\n\t@echo $(BOOTSTRAP_TARGETS)\ninclude bootstrap.mk\n' | emake -f - f) ; do
349 + [[ -e ${d} ]] && continue
350 + pushd ${d/%configure/.} >/dev/null || die
351 + AT_NOELIBTOOLIZE="yes" AT_TOPLEVEL_EAUTORECONF="yes" \
352 + multijob_child_init eautoreconf
353 + popd >/dev/null
354 + done
355 + multijob_finish
356 + elibtoolize
357 +
358 + [[ ${PV} == "9999" ]] && emake -f codegenerator.mk
359 +
360 + # Disable internal func checks as our USE/DEPEND
361 + # stuff handles this just fine already #408395
362 + export ac_cv_lib_avcodec_ff_vdpau_vc1_decode_picture=yes
363 +
364 + # Fix the final version string showing as "exported"
365 + # instead of the SVN revision number.
366 + export HAVE_GIT=no GIT_REV=${EGIT_VERSION:-exported}
367 +
368 + # avoid long delays when powerkit isn't running #348580
369 + sed -i \
370 + -e '/dbus_connection_send_with_reply_and_block/s:-1:3000:' \
371 + xbmc/linux/*.cpp || die
372 +
373 + epatch_user #293109
374 +
375 + # Tweak autotool timestamps to avoid regeneration
376 + find . -type f -exec touch -r configure {} +
377 +}
378 +
379 +src_configure() {
380 + # Disable documentation generation
381 + export ac_cv_path_LATEX=no
382 + # Avoid help2man
383 + export HELP2MAN=$(type -P help2man || echo true)
384 + # No configure flage for this #403561
385 + export ac_cv_lib_bluetooth_hci_devid=$(usex bluetooth)
386 + # Requiring java is asine #434662
387 + [[ ${PV} != "9999" ]] && export ac_cv_path_JAVA_EXE=$(which $(usex java java true))
388 +
389 + local myconf
390 + use rpi && myconf='--with-platform=raspberry-pi'
391 +
392 + econf \
393 + --docdir=/usr/share/doc/${PF} \
394 + --disable-ccache \
395 + --disable-optimizations \
396 + --with-ffmpeg=shared \
397 + $(use_enable airplay) \
398 + $(use_enable avahi) \
399 + $(use_enable bluray libbluray) \
400 + $(use_enable caps libcap) \
401 + $(use_enable cec libcec) \
402 + $(use_enable css dvdcss) \
403 + $(use_enable debug) \
404 + $(use_enable fishbmc) \
405 + $(use_enable gles) \
406 + $(use_enable goom) \
407 + $(use_enable joystick) \
408 + $(use_enable midi mid) \
409 + $(use_enable mysql) \
410 + $(use_enable nfs) \
411 + $(use_enable opengl gl) \
412 + $(use_enable profile profiling) \
413 + $(use_enable projectm) \
414 + $(use_enable pulseaudio pulse) \
415 + $(use_enable pvr mythtv) \
416 + $(use_enable rsxs) \
417 + $(use_enable rtmp) \
418 + $(use_enable samba) \
419 + $(use_enable sftp ssh) \
420 + $(use_enable usb libusb) \
421 + $(use_enable test gtest) \
422 + $(use_enable upnp) \
423 + $(use_enable vaapi) \
424 + $(use_enable vdpau) \
425 + $(use_enable webserver) \
426 + $(use_enable X x11) \
427 + $(use_enable xrandr) \
428 + ${myconf}
429 +}
430 +
431 +src_install() {
432 + default
433 + rm "${ED}"/usr/share/doc/*/{LICENSE.GPL,copying.txt}*
434 +
435 + domenu tools/Linux/kodi.desktop
436 + newicon media/icon48x48.png kodi.png
437 +
438 + # Remove optional addons (platform specific and disabled by USE flag).
439 + local disabled_addons=(
440 + repository.pvr-{android,ios,osx{32,64},win32}.xbmc.org
441 + visualization.dxspectrum
442 + )
443 + use fishbmc || disabled_addons+=( visualization.fishbmc )
444 + use projectm || disabled_addons+=( visualization.{milkdrop,projectm} )
445 + use rsxs || disabled_addons+=( screensaver.rsxs.{euphoria,plasma,solarwinds} )
446 + rm -rf "${disabled_addons[@]/#/${ED}/usr/share/kodi/addons/}"
447 +
448 + # Remove fonconfig settings that are used only on MacOSX.
449 + # Can't be patched upstream because they just find all files and install
450 + # them into same structure like they have in git.
451 + rm -rf "${ED}"/usr/share/kodi/system/players/dvdplayer/etc
452 +
453 + # Replace bundled fonts with system ones
454 + # teletext.ttf: unknown
455 + # bold-caps.ttf: unknown
456 + # roboto: roboto-bold, roboto-regular
457 + # arial.ttf: font mashed from droid/roboto, not removed wrt bug#460514
458 + rm -rf "${ED}"/usr/share/kodi/addons/skin.confluence/fonts/Roboto-*
459 + dosym /usr/share/fonts/roboto/Roboto-Regular.ttf \
460 + /usr/share/kodi/addons/skin.confluence/fonts/Roboto-Regular.ttf
461 + dosym /usr/share/fonts/roboto/Roboto-Bold.ttf \
462 + /usr/share/kodi/addons/skin.confluence/fonts/Roboto-Bold.ttf
463 +
464 + python_domodule tools/EventClients/lib/python/xbmcclient.py
465 + python_newscript "tools/EventClients/Clients/Kodi Send/kodi-send.py" kodi-send
466 +}
467
468 diff --git a/media-tv/kodi/metadata.xml b/media-tv/kodi/metadata.xml
469 new file mode 100644
470 index 0000000..af5099e
471 --- /dev/null
472 +++ b/media-tv/kodi/metadata.xml
473 @@ -0,0 +1,26 @@
474 +<?xml version="1.0" encoding="UTF-8"?>
475 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
476 +<pkgmetadata>
477 +<herd>xbox</herd>
478 +<use>
479 + <flag name='airplay'>enable AirPlay support</flag>
480 + <flag name='bluray'>Enable playback of Blu-ray filesystems</flag>
481 + <flag name='cec'>Enable support for HDMI-CEC devices via libcec</flag>
482 + <flag name='fishbmc'>Enable fishBMC visualization plugin</flag>
483 + <flag name='gles'>Enable support for GLES</flag>
484 + <flag name='goom'>Enable GOOM visualization plugin</flag>
485 + <flag name='midi'>Support MIDI files</flag>
486 + <flag name='nfs'>Enable NFS client support</flag>
487 + <flag name='projectm'>Enable projectM visualization plugin</flag>
488 + <flag name='pvr'>Enable MythTV support</flag>
489 + <flag name='rtmp'>Enable Real Time Messaging Protocol using librtmp</flag>
490 + <flag name='rsxs'>Enable really slick X screensavers</flag>
491 + <flag name='sftp'>Support browsing files over SFTP</flag>
492 + <flag name='webserver'>Enable internal webserver</flag>
493 + <flag name='xrandr'>Support X randr extension</flag>
494 +</use>
495 +<upstream>
496 + <bugs-to>http://trac.kodi.tv/</bugs-to>
497 + <remote-id type="github">xbmc/xbmc</remote-id>
498 +</upstream>
499 +</pkgmetadata>