Gentoo Archives: gentoo-commits

From: Craig Andrews <candrews@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-tv/kodi/
Date: Mon, 18 Feb 2019 20:22:54
Message-Id: 1550521364.cf8a8cafd06cac803c8334cae98f89531498c214.candrews@gentoo
1 commit: cf8a8cafd06cac803c8334cae98f89531498c214
2 Author: Craig Andrews <candrews <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 18 20:16:56 2019 +0000
4 Commit: Craig Andrews <candrews <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 18 20:22:44 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cf8a8caf
7
8 media-tv/kodi: Remove < ffmpeg 3.4 restriction
9
10 Closes https://bugs.gentoo.org/678222
11
12 Package-Manager: Portage-2.3.61, Repoman-2.3.12
13 Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>
14
15 media-tv/kodi/kodi-17.6-r11.ebuild | 277 +++++++++++++++++++++++++++++++++++++
16 1 file changed, 277 insertions(+)
17
18 diff --git a/media-tv/kodi/kodi-17.6-r11.ebuild b/media-tv/kodi/kodi-17.6-r11.ebuild
19 new file mode 100644
20 index 00000000000..fb3ef921341
21 --- /dev/null
22 +++ b/media-tv/kodi/kodi-17.6-r11.ebuild
23 @@ -0,0 +1,277 @@
24 +# Copyright 1999-2019 Gentoo Authors
25 +# Distributed under the terms of the GNU General Public License v2
26 +
27 +EAPI=6
28 +
29 +# Does not work with py3 here
30 +PYTHON_COMPAT=( python2_7 )
31 +PYTHON_REQ_USE="sqlite"
32 +
33 +inherit autotools cmake-utils eutils linux-info pax-utils python-single-r1 versionator
34 +
35 +LIBDVDCSS_COMMIT="2f12236bc1c92f73c21e973363f79eb300de603f"
36 +LIBDVDREAD_COMMIT="17d99db97e7b8f23077b342369d3c22a6250affd"
37 +LIBDVDNAV_COMMIT="43b5f81f5fe30bceae3b7cecf2b0ca57fc930dac"
38 +FFMPEG_VERSION="3.1.11"
39 +FFMPEG_KODI_VERSION="17.5"
40 +CODENAME="Krypton"
41 +PATCHES=(
42 + "${FILESDIR}/${P}-nmblookup.patch"
43 + "${FILESDIR}/${P}-wrapper.patch"
44 + "${FILESDIR}/${PN}-17-adapt-to-deprecated-symbols-and-functions.patch"
45 + "${FILESDIR}/${PN}-17-fix-audio-with-latest-ffmpeg.patch"
46 +)
47 +SRC_URI="https://github.com/xbmc/libdvdcss/archive/${LIBDVDCSS_COMMIT}.tar.gz -> libdvdcss-${LIBDVDCSS_COMMIT}.tar.gz
48 + https://github.com/xbmc/libdvdread/archive/${LIBDVDREAD_COMMIT}.tar.gz -> libdvdread-${LIBDVDREAD_COMMIT}.tar.gz
49 + https://github.com/xbmc/libdvdnav/archive/${LIBDVDNAV_COMMIT}.tar.gz -> libdvdnav-${LIBDVDNAV_COMMIT}.tar.gz
50 + !system-ffmpeg? ( https://github.com/xbmc/FFmpeg/archive/${FFMPEG_VERSION}-${CODENAME}-${FFMPEG_KODI_VERSION}.tar.gz -> ffmpeg-${PN}-${FFMPEG_VERSION}-${CODENAME}-${FFMPEG_KODI_VERSION}.tar.gz )"
51 +
52 +DESCRIPTION="A free and open source media-player and entertainment hub"
53 +HOMEPAGE="https://kodi.tv/ https://kodi.wiki/"
54 +
55 +LICENSE="GPL-2"
56 +SLOT="0"
57 +# use flag is called libusb so that it doesn't fool people in thinking that
58 +# it is _required_ for USB support. Otherwise they'll disable udev and
59 +# that's going to be worse.
60 +IUSE="airplay alsa bluetooth bluray caps cec +css dbus debug dvd gles lcms libressl libusb lirc mariadb mysql nfs nonfree +opengl pulseaudio samba sftp systemd +system-ffmpeg test +udev udisks upnp upower vaapi vdpau webserver +xslt zeroconf"
61 +REQUIRED_USE="
62 + ${PYTHON_REQUIRED_USE}
63 + || ( gles opengl )
64 + ?? ( mariadb mysql )
65 + udev? ( !libusb )
66 + udisks? ( dbus )
67 + upower? ( dbus )
68 +"
69 +
70 +COMMON_DEPEND="${PYTHON_DEPS}
71 + airplay? (
72 + app-pda/libplist
73 + net-libs/shairplay
74 + )
75 + alsa? ( media-libs/alsa-lib )
76 + bluetooth? ( net-wireless/bluez )
77 + bluray? ( >=media-libs/libbluray-0.7.0 )
78 + caps? ( sys-libs/libcap )
79 + dbus? ( sys-apps/dbus )
80 + dev-db/sqlite
81 + dev-libs/expat
82 + dev-libs/fribidi
83 + cec? ( >=dev-libs/libcec-4.0 )
84 + dev-libs/libpcre[cxx]
85 + dev-libs/libxml2
86 + >=dev-libs/lzo-2.04
87 + dev-libs/tinyxml[stl]
88 + >=dev-libs/yajl-2
89 + dev-python/pillow[${PYTHON_USEDEP}]
90 + dev-libs/libcdio
91 + gles? ( media-libs/mesa[gles2] )
92 + lcms? ( media-libs/lcms:2 )
93 + libusb? ( virtual/libusb:1 )
94 + virtual/ttf-fonts
95 + media-libs/fontconfig
96 + media-libs/freetype
97 + >=media-libs/libass-0.13.4
98 + media-libs/mesa[egl]
99 + >=media-libs/taglib-1.11.1
100 + system-ffmpeg? (
101 + >=media-video/ffmpeg-${FFMPEG_VERSION}:=[encode,openssl,postproc]
102 + )
103 + mysql? ( dev-db/mysql-connector-c:= )
104 + mariadb? ( dev-db/mariadb-connector-c:=[mysqlcompat] )
105 + >=net-misc/curl-7.51.0
106 + nfs? ( net-fs/libnfs:= )
107 + opengl? ( media-libs/glu )
108 + !libressl? ( >=dev-libs/openssl-1.0.2j:0= )
109 + libressl? ( dev-libs/libressl:0= )
110 + pulseaudio? ( media-sound/pulseaudio )
111 + samba? ( >=net-fs/samba-3.4.6[smbclient(+)] )
112 + sftp? ( net-libs/libssh[sftp] )
113 + sys-libs/zlib
114 + udev? ( virtual/udev )
115 + vaapi? ( x11-libs/libva:=[opengl] )
116 + vdpau? (
117 + || ( >=x11-libs/libvdpau-1.1 >=x11-drivers/nvidia-drivers-180.51 )
118 + system-ffmpeg? ( media-video/ffmpeg[vdpau] )
119 + )
120 + webserver? ( >=net-libs/libmicrohttpd-0.9.50[messages] )
121 + xslt? ( dev-libs/libxslt )
122 + zeroconf? ( net-dns/avahi[dbus] )
123 +"
124 +RDEPEND="${COMMON_DEPEND}
125 + lirc? (
126 + || ( app-misc/lirc app-misc/inputlircd )
127 + )
128 + !media-tv/xbmc
129 + udisks? ( sys-fs/udisks:0 )
130 + upower? ( sys-power/upower )"
131 +
132 +DEPEND="${COMMON_DEPEND}
133 + app-arch/bzip2
134 + app-arch/unzip
135 + app-arch/xz-utils
136 + app-arch/zip
137 + dev-lang/swig
138 + dev-libs/crossguid
139 + dev-util/cmake
140 + dev-util/gperf
141 + media-libs/giflib
142 + >=media-libs/libjpeg-turbo-1.5.1:=
143 + >=media-libs/libpng-1.6.26:0=
144 + test? ( dev-cpp/gtest )
145 + virtual/pkgconfig
146 + x86? ( dev-lang/nasm )
147 +"
148 +case ${PV} in
149 +9999)
150 + EGIT_REPO_URI="https://github.com/xbmc/xbmc.git"
151 + inherit git-r3
152 + # Force java for latest git version to avoid having to hand maintain the
153 + # generated addons package. #488118
154 + DEPEND+="
155 + virtual/jre
156 + "
157 + ;;
158 +*)
159 + MY_PV=${PV/_p/_r}
160 + MY_PV=${MY_PV/_alpha/a}
161 + MY_PV=${MY_PV/_beta/b}
162 + MY_PV=${MY_PV/_rc/rc}
163 + MY_P="${PN}-${MY_PV}"
164 + SRC_URI+=" https://github.com/xbmc/xbmc/archive/${MY_PV}-${CODENAME}.tar.gz -> ${MY_P}.tar.gz
165 + !java? ( https://github.com/candrews/gentoo-kodi/raw/master/${MY_P}-generated-addons.tar.xz )"
166 + KEYWORDS="~amd64 ~x86"
167 + IUSE+=" java"
168 + DEPEND+="
169 + java? ( virtual/jre )
170 + "
171 +
172 + S=${WORKDIR}/xbmc-${MY_PV}-${CODENAME}
173 + ;;
174 +esac
175 +
176 +CONFIG_CHECK="~IP_MULTICAST"
177 +ERROR_IP_MULTICAST="
178 +In some cases Kodi needs to access multicast addresses.
179 +Please consider enabling IP_MULTICAST under Networking options.
180 +"
181 +
182 +CMAKE_USE_DIR=${S}/project/cmake/
183 +
184 +pkg_setup() {
185 + check_extra_config
186 + python-single-r1_pkg_setup
187 +}
188 +
189 +src_prepare() {
190 + if in_iuse java && use !java; then
191 + eapply "${FILESDIR}"/${PN}-cmake-no-java.patch
192 + fi
193 + cmake-utils_src_prepare
194 +
195 + # avoid long delays when powerkit isn't running #348580
196 + sed -i \
197 + -e '/dbus_connection_send_with_reply_and_block/s:-1:3000:' \
198 + xbmc/linux/*.cpp || die
199 +
200 + # Prepare tools and libs witch are configured with autotools during compile time
201 + AUTOTOOLS_DIRS=(
202 + "${S}"/lib/cpluff
203 + "${S}"/tools/depends/native/TexturePacker/src
204 + "${S}"/tools/depends/native/JsonSchemaBuilder/src
205 + )
206 +
207 + local d
208 + for d in "${AUTOTOOLS_DIRS[@]}" ; do
209 + pushd ${d} >/dev/null || die
210 + AT_NOELIBTOOLIZE="yes" AT_TOPLEVEL_EAUTORECONF="yes" eautoreconf
211 + popd >/dev/null || die
212 + done
213 + elibtoolize
214 +
215 + # Prevent autoreconf rerun
216 + sed -e 's/autoreconf -vif/echo "autoreconf already done in src_prepare()"/' -i \
217 + "${S}"/project/cmake/modules/FindCpluff.cmake \
218 + "${S}"/tools/depends/native/TexturePacker/src/autogen.sh \
219 + "${S}"/tools/depends/native/JsonSchemaBuilder/src/autogen.sh \
220 + || die
221 +}
222 +
223 +src_configure() {
224 + local mycmakeargs=(
225 + -Ddocdir="${EPREFIX}/usr/share/doc/${PF}"
226 + -DENABLE_LDGOLD=OFF # https://bugs.gentoo.org/show_bug.cgi?id=606124
227 + -DENABLE_ALSA=$(usex alsa)
228 + -DENABLE_AIRTUNES=$(usex airplay)
229 + -DENABLE_AVAHI=$(usex zeroconf)
230 + -DENABLE_BLUETOOTH=$(usex bluetooth)
231 + -DENABLE_BLURAY=$(usex bluray)
232 + -DENABLE_CCACHE=OFF
233 + -DENABLE_CEC=$(usex cec)
234 + -DENABLE_DBUS=$(usex dbus)
235 + -DENABLE_DVDCSS=$(usex css)
236 + -DENABLE_INTERNAL_CROSSGUID=OFF
237 + -DENABLE_INTERNAL_FFMPEG="$(usex !system-ffmpeg)"
238 + -DENABLE_CAP=$(usex caps)
239 + -DENABLE_LCMS2=$(usex lcms)
240 + -DENABLE_LIRC=$(usex lirc)
241 + -DENABLE_MICROHTTPD=$(usex webserver)
242 + -DENABLE_NFS=$(usex nfs)
243 + -DENABLE_NONFREE=$(usex nonfree)
244 + -DENABLE_OPENGLES=$(usex gles)
245 + -DENABLE_OPENGL=$(usex opengl)
246 + -DENABLE_OPENSSL=ON
247 + -DENABLE_OPTICAL=$(usex dvd)
248 + -DENABLE_PLIST=$(usex airplay)
249 + -DENABLE_PULSEAUDIO=$(usex pulseaudio)
250 + -DENABLE_SMBCLIENT=$(usex samba)
251 + -DENABLE_SSH=$(usex sftp)
252 + -DENABLE_UDEV=$(usex udev)
253 + -DENABLE_UPNP=$(usex upnp)
254 + -DENABLE_VAAPI=$(usex vaapi)
255 + -DENABLE_VDPAU=$(usex vdpau)
256 + -DENABLE_X11=ON
257 + -DENABLE_XSLT=$(usex xslt)
258 + -Dlibdvdread_URL="${DISTDIR}/libdvdread-${LIBDVDREAD_COMMIT}.tar.gz"
259 + -Dlibdvdnav_URL="${DISTDIR}/libdvdnav-${LIBDVDNAV_COMMIT}.tar.gz"
260 + -Dlibdvdcss_URL="${DISTDIR}/libdvdcss-${LIBDVDCSS_COMMIT}.tar.gz"
261 + )
262 +
263 + if use mysql || use mariadb ; then
264 + mycmakeargs+=( -DENABLE_MYSQLCLIENT="yes" )
265 + else
266 + mycmakeargs+=( -DENABLE_MYSQLCLIENT="no" )
267 + fi
268 +
269 + use libusb && mycmakeargs+=( -DENABLE_LIBUSB=$(usex libusb) )
270 +
271 + if use system-ffmpeg; then
272 + mycmakeargs+=( -DWITH_FFMPEG="yes" )
273 + else
274 + mycmakeargs+=( -DFFMPEG_URL="${DISTDIR}/ffmpeg-${PN}-${FFMPEG_VERSION}-${CODENAME}-${FFMPEG_KODI_VERSION}.tar.gz" )
275 + fi
276 +
277 + cmake-utils_src_configure
278 +}
279 +
280 +src_compile() {
281 + cmake-utils_src_compile all
282 + use test && emake -C "${BUILD_DIR}" kodi-test
283 +}
284 +
285 +src_test() {
286 + emake -C "${BUILD_DIR}" test
287 +}
288 +
289 +src_install() {
290 + cmake-utils_src_install
291 +
292 + pax-mark Em "${ED%/}"/usr/$(get_libdir)/${PN}/${PN}.bin
293 +
294 + rm "${ED%/}"/usr/share/doc/*/{LICENSE.GPL,copying.txt}* || die
295 +
296 + newicon media/icon48x48.png kodi.png
297 +
298 + python_domodule tools/EventClients/lib/python/xbmcclient.py
299 + python_newscript "tools/EventClients/Clients/Kodi Send/kodi-send.py" kodi-send
300 +}