Сравнение kodi-21.3 с kodi-9999

/usr/portage/media-tv/kodi/kodi-9999.ebuild 2026-04-24 12:17:42.930090423 +0300
3 3

  
4 4
EAPI=8
5 5

  
6
CODENAME="Omega"
6
CODENAME="Piers"
7 7

  
8 8
# libdvd{css,read,nav} are not unbundlable without patching the buildsystem.
9 9

  
......
12 12
LIBDVDCSS_VERSION="1.4.3-Next-Nexus-Alpha2-2"
13 13
LIBDVDREAD_VERSION="6.1.3-Next-Nexus-Alpha2-2"
14 14
LIBDVDNAV_VERSION="6.1.1-Next-Nexus-Alpha2-2"
15
FFMPEG_VERSION="6.0.1"
15
FFMPEG_VERSION="8.1"
16 16

  
17 17
# Java bundles from xbmc/interfaces/swig/CMakeLists.txt
18 18
GROOVY_VERSION="4.0.26"
......
26 26
JAVA_PKG_WANT_TARGET="21"
27 27

  
28 28
PYTHON_REQ_USE="sqlite,ssl"
29
PYTHON_COMPAT=( python3_{11..13} )
29
PYTHON_COMPAT=( python3_{11..14} )
30 30

  
31 31
# See cmake/scripts/common/ArchSetup.cmake for available options
32 32
CPU_FLAGS="cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3 cpu_flags_x86_sse4_1 cpu_flags_x86_sse4_2 cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_arm_neon"
33 33

  
34
inherit autotools cmake desktop ffmpeg-compat flag-o-matic java-pkg-2 libtool
35
inherit linux-info optfeature pax-utils python-single-r1 toolchain-funcs xdg
34
inherit autotools cmake desktop flag-o-matic java-pkg-2 libtool linux-info optfeature pax-utils python-single-r1 \
35
	toolchain-funcs xdg
36 36

  
37 37
DESCRIPTION="A free and open source media-player and entertainment hub"
38 38
HOMEPAGE="https://kodi.tv/"
......
50 50
			-> libdvdcss-${LIBDVDCSS_VERSION}.tar.gz
51 51
	)
52 52
	!system-ffmpeg? (
53
		https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.gz
53
		https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.xz
54 54
	)
55
	system-ffmpeg? ( postproc? (
56
		https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.xz
57
	) )
55 58
"
56 59
if [[ ${PV} == *9999 ]] ; then
57 60
	EGIT_REPO_URI="https://github.com/xbmc/xbmc.git"
......
67 70
	MY_PV="${MY_PV}-${CODENAME}"
68 71
	MY_P="${PN}-${MY_PV}"
69 72
	SRC_URI+=" https://github.com/xbmc/xbmc/archive/${MY_PV}.tar.gz -> ${MY_P}.tar.gz"
70
	KEYWORDS="amd64 ~arm arm64 ~riscv ~x86"
73
	# Dont keyword
74
	if ! [[ ${PV} =~ _alpha ]] && ! [[ ${PV} =~ _beta ]] && ! [[ ${PV} =~ _rc ]]; then
75
		KEYWORDS="~amd64 ~arm64 ~riscv ~x86"
76
	fi
71 77
	S=${WORKDIR}/xbmc-${MY_PV}
72 78
fi
73 79

  
......
84 90
# use flag is called libusb so that it doesn't fool people in thinking that
85 91
# it is _required_ for USB support. Otherwise they'll disable udev and
86 92
# that's going to be worse.
87
IUSE="airplay alsa bluetooth bluray caps cec +css dbus doc eventclients gbm gles lcms libusb lirc mariadb mysql nfs +optical pipewire pulseaudio samba soc +system-ffmpeg test udf udev upnp vaapi vdpau wayland webserver X +xslt zeroconf ${CPU_FLAGS}"
93
IUSE="airplay alsa bluetooth bluray caps cec +css dbus doc eventclients gbm gles lcms libusb lirc mariadb mysql nfs +optical pipewire +postproc pulseaudio samba soc +system-ffmpeg test udf udev upnp vaapi vdpau wayland webserver X +xslt zeroconf ${CPU_FLAGS}"
88 94
REQUIRED_USE="
89 95
	${PYTHON_REQUIRED_USE}
90 96
	|| ( gbm wayland X )
......
115 121
	dev-db/sqlite:3
116 122
	dev-libs/crossguid
117 123
	>=dev-libs/fribidi-1.0.5
118
	>=dev-libs/libcdio-2.1.0:=[cxx]
119 124
	>=dev-libs/libfmt-6.1.2:=
120 125
	dev-libs/libfstrcmp
121
	dev-libs/libpcre[cxx]
126
	dev-libs/libpcre2:=
122 127
	>=dev-libs/openssl-1.1.1k:0=
123 128
	>=dev-libs/spdlog-1.5.0:=
124 129
	dev-libs/tinyxml[stl]
125 130
	dev-libs/tinyxml2:=
126 131
	media-fonts/roboto
132
	media-gfx/exiv2:=
127 133
	media-libs/libglvnd[X?]
128 134
	>=media-libs/freetype-2.10.1
129 135
	media-libs/harfbuzz:=
130 136
	>=media-libs/libass-0.15.0:=
131 137
	media-libs/mesa[opengl,wayland?,X?]
132 138
	media-libs/taglib:=
133
	sci-libs/kissfft
134 139
	virtual/libiconv
135 140
	virtual/ttf-fonts
136 141
	x11-libs/libdrm
......
184 189
		dev-db/mysql-connector-c:=
185 190
	)
186 191
	nfs? (
187
		>=net-fs/libnfs-2.0.0:=
192
		>=net-fs/libnfs-3.0.0:=
193
	)
194
	optical? (
195
		>=dev-libs/libcdio-2.1.0:=[cxx]
188 196
	)
189 197
	pipewire? (
190 198
		>=media-video/pipewire-0.3.50:=
191 199
	)
192 200
	pulseaudio? (
193
		media-libs/libpulse
201
		>=media-libs/libpulse-11.0.0
194 202
	)
195 203
	samba? (
196 204
		>=net-fs/samba-3.4.6[smbclient(+)]
197 205
	)
198 206
	system-ffmpeg? (
199
		media-video/ffmpeg-compat:6=[encode(+),soc(-)?,postproc(-),vaapi?,vdpau?,X?]
207
		postproc? ( =media-video/ffmpeg-$(ver_cut 1-2 ${FFMPEG_VERSION})*:=[encode(+),soc(-)?,vaapi?,vdpau?,X?] )
208
		!postproc? ( >=media-video/ffmpeg-7:=[encode(+),soc(-)?,vaapi?,vdpau?,X?] )
200 209
	)
201 210
	!system-ffmpeg? (
202 211
		app-arch/bzip2
......
245 254
DEPEND="
246 255
	${COMMON_DEPEND}
247 256
	${COMMON_TARGET_DEPEND}
248
	>=dev-libs/rapidjson-1.0.2
257
	>=dev-cpp/nlohmann_json-3.2.0
249 258
	test? (
250 259
		>=dev-cpp/gtest-1.10.0
251 260
	)
......
271 280

  
272 281
PATCHES=(
273 282
	"${FILESDIR}"/kodi-21-optional-ffmpeg-libx11.patch
274
	"${FILESDIR}"/kodi-21.1-silence-libdvdread-git.patch
283
	"${FILESDIR}"/kodi-22-silence-libdvdread-git.patch
275 284
)
276 285

  
277 286
# bug #544020
......
283 292

  
284 293
pkg_setup() {
285 294
	check_extra_config
286
	java-pkg-2_pkg_setup
295
	ROOT= java-pkg-2_pkg_setup
287 296
	python-single-r1_pkg_setup
288 297
}
289 298

  
......
297 306
	unpack apache-groovy-binary-${GROOVY_VERSION}.zip
298 307
	unpack commons-lang3-${APACHE_COMMON_LANG_VERSION}-bin.tar.gz
299 308
	unpack commons-text-${APACHE_COMMON_TEXT_VERSION}-bin.tar.gz
309

  
310
	if use system-ffmpeg && use postproc; then
311
		unpack ffmpeg-${FFMPEG_VERSION}.tar.xz
312
	fi
300 313
}
301 314

  
302 315
src_prepare() {
......
307 320
		-e '/dbus_connection_send_with_reply_and_block/s:-1:3000:' \
308 321
		xbmc/platform/linux/*.cpp || die
309 322

  
310
	# Add all possible names for kissfft libraries
311
	for datatype in {float,int16,int32,simd}; do
312
		sed -i \
313
			-e "s/\(find_library(KISSFFT_LIBRARY NAMES .*\)/\1 kissfft-${datatype} kissfft-${datatype}-openmp/" \
314
			cmake/modules/FindKissFFT.cmake || die
315
	done
316

  
317 323
	if tc-is-cross-compiler; then
318 324
		# These tools are automatically built with CMake during a native build
319 325
		# but need to be built in advance using Autotools for a cross build.
......
330 336
		done
331 337
		elibtoolize
332 338
	fi
339

  
340
	if use system-ffmpeg && use postproc; then
341
		pushd "${WORKDIR}/ffmpeg-${FFMPEG_VERSION}" >/dev/null || die
342
		eapply "${S}"/tools/depends/target/ffmpeg/001-ffmpeg-all-libpostproc-plugin.patch
343
		eapply "${FILESDIR}"/ffmpeg-no-static-rpath.patch
344
		popd >/dev/null || die
345
	fi
333 346
}
334 347

  
335 348
src_configure() {
349
	# used below and by vendored libdvdread
350
	tc-export PKG_CONFIG
351

  
336 352
	local core_platform=(
337 353
		$(usev gbm)
338 354
		$(usev wayland)
......
362 378
		-DENABLE_GOLD=OFF
363 379
		-DENABLE_LLD=OFF
364 380
		-DENABLE_MOLD=OFF
365
		-DUSE_LTO=OFF
381

  
382
		# This isn't normally necessary with CMake, but Kodi includes its own
383
		# FindPkgConfig module that doesn't respect PKG_CONFIG. :(
384
		-DPKG_CONFIG_EXECUTABLE=$(type -P "${PKG_CONFIG}")
366 385

  
367 386
		# Features
368 387
		-DENABLE_AIRTUNES=$(usex airplay)
......
398 417
		-DENABLE_VDPAU=$(usex vdpau)
399 418
		-DENABLE_XSLT=$(usex xslt)
400 419

  
401
		-DWITH_FFMPEG=$(usex system-ffmpeg)
420
		-DWITH_FFMPEG=OFF
421
		-DDISABLE_FFMPEG_SOURCE_PLUGINS=$(usex !postproc)
402 422

  
403 423
		#To bundle or not
424
		-DENABLE_INTERNAL_ASS=OFF
425
		-DENABLE_INTERNAL_CURL=OFF
404 426
		-DENABLE_INTERNAL_CROSSGUID=OFF
405 427
		-DENABLE_INTERNAL_DAV1D=OFF
428
		-DENABLE_INTERNAL_EXIV2=OFF
406 429
		-DENABLE_INTERNAL_FFMPEG="$(usex !system-ffmpeg)"
407 430
		-DENABLE_INTERNAL_FLATBUFFERS=OFF
408 431
		-DENABLE_INTERNAL_FMT=OFF
409 432
		-DENABLE_INTERNAL_FSTRCMP=OFF
410 433
		-DENABLE_INTERNAL_GTEST=OFF
411
		-DENABLE_INTERNAL_KISSFFT=OFF
412
		-DENABLE_INTERNAL_PCRE=OFF
413
		-DENABLE_INTERNAL_RapidJSON=OFF
434
		-DENABLE_INTERNAL_PCRE2=OFF
435
		-DENABLE_INTERNAL_NLOHMANNJSON=OFF
414 436
		-DENABLE_INTERNAL_SPDLOG=OFF
415 437
		-DENABLE_INTERNAL_TAGLIB=OFF
416
		-DENABLE_INTERNAL_UDFREAD=OFF
417 438

  
418 439
		-DTARBALL_DIR="${DISTDIR}"
419 440
		-Dlibdvdnav_URL="${DISTDIR}/libdvdnav-${LIBDVDNAV_VERSION}.tar.gz"
......
426 447
	# Separated to avoid "Manually-specified variables were not used by the project:"
427 448
	use cec && mycmakeargs+=( -DENABLE_INTERNAL_CEC=OFF )
428 449
	use css && mycmakeargs+=( -Dlibdvdcss_URL="${DISTDIR}/libdvdcss-${LIBDVDCSS_VERSION}.tar.gz" )
429
	use nfs && mycmakeargs+=( -DENABLE_INTERNAL_NFS=OFF )
430 450
	use !system-ffmpeg && mycmakeargs+=(
431
		-DFFMPEG_URL="${DISTDIR}/ffmpeg-${FFMPEG_VERSION}.tar.gz"
451
		-DFFMPEG_URL="${DISTDIR}/ffmpeg-${FFMPEG_VERSION}.tar.xz"
432 452
	)
453
	use nfs && mycmakeargs+=( -DENABLE_INTERNAL_NFS=OFF )
433 454
	use !udev && mycmakeargs+=( -DENABLE_LIBUSB=$(usex libusb) )
434 455
	use X && use !gles && mycmakeargs+=( -DENABLE_GLX=ON )
435 456

  
......
438 459
		mycmakeargs+=( -DENABLE_${name^^}=$(usex ${flag}) )
439 460
	done
440 461

  
441
	if use system-ffmpeg; then
442
		# TODO: drop compat and allow using >=media-video/ffmpeg-7
443
		ffmpeg_compat_setup 6
444
		ffmpeg_compat_add_flags
445
		mycmakeargs+=( -DFFMPEG_INCLUDE_DIRS="${SYSROOT}$(ffmpeg_compat_get_prefix 6)" )
446
	fi
447

  
448 462
	if ! is-flag -DNDEBUG && ! is-flag -D_DEBUG ; then
449 463
		# Kodi requires one of the 'NDEBUG' or '_DEBUG' defines
450 464
		append-cflags -DNDEBUG
451 465
		append-cxxflags -DNDEBUG
452 466
	fi
453 467

  
454
	# Violates ODR (bug #860984) and USE_LTO does spooky stuff
455
	# https://github.com/xbmc/xbmc/commit/cb72a22d54a91845b1092c295f84eeb48328921e
456
	filter-lto
468
	if tc-is-lto ; then
469
		mycmakeargs+=( -DUSE_LTO=ON )
470
	else
471
		mycmakeargs+=( -DUSE_LTO=OFF )
472
	fi
457 473

  
458 474
	# bug #926076
459 475
	append-flags -fPIC
460 476

  
461
	# used by vendored libdvdread
462
	tc-export PKG_CONFIG
477
	if use system-ffmpeg && use postproc; then
478
		pushd "${WORKDIR}/ffmpeg-${FFMPEG_VERSION}" >/dev/null || die
479
		local ffconf=(
480
			--disable-all
481
			--enable-postproc
482
			--enable-gpl
483
		)
484
		if tc-is-cross-compiler; then
485
			ffconf+=(
486
				--enable-cross-compile
487
				--arch="$(tc-arch-kernel)"
488
				--cross-prefix="${CHOST}-"
489
				--host-cc="$(tc-getBUILD_CC)"
490
				--target-os=linux
491
			)
492
		elif use arm; then
493
			ffconf+=( --arch=arm )
494
		fi
495
		./configure "${ffconf[@]}" || die
496
		touch libpostproc/libpostproc.a || die # Actually build later.
497
		emake libpostproc/libpostproc.pc V=1
498
		export PKG_CONFIG_PATH="${PWD}/doc/examples/pc-uninstalled"
499
		# Work around CMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY in eclass. It's a
500
		# weird thing to do, but probably safer than setting that to BOTH.
501
		[[ ${SYSROOT:-/} != / ]] && mycmakeargs+=( -DCMAKE_FIND_ROOT_PATH="${PWD}" )
502
		popd >/dev/null || die
503
	fi
463 504

  
464 505
	if tc-is-cross-compiler; then
465 506
		for t in "${NATIVE_TOOLS[@]}" ; do
......
475 516
}
476 517

  
477 518
src_compile() {
519
	if use system-ffmpeg && use postproc; then
520
		pushd "${WORKDIR}/ffmpeg-${FFMPEG_VERSION}" >/dev/null || die
521
		emake libpostproc/libpostproc.a V=1
522
		rm -r libav* libsw* || die
523
		popd >/dev/null || die
524
	fi
525

  
478 526
	if tc-is-cross-compiler; then
479 527
		for t in "${NATIVE_TOOLS[@]}" ; do
480 528
			emake -C "${S}/tools/depends/native/$t/src"
......
491 539
		# Known failing, unreliable test
492 540
		# bug #743938
493 541
		TestCPUInfo.GetCPUFrequency
494
		# Test failure stemming from sci-libs/kissfft
495
		# The difference between output[2i] and (i==freq1?1.0:0.0) is inf, which exceeds 1e-7, where output[2i]
496
		# evaluates to inf,(i==freq1?1.0:0.0) evaluates to 0, and 1e-7 evaluates to 9.9999999999999995e-08.
497
		TestRFFT.SimpleSignal
498 542
		# Tries to ping localhost, naturally breaking network-sandbox
499 543
		TestNetwork.PingHost
500 544
	)
501 545

  
546
	# Tests assumes bluray support is enabled
547
	use !bluray && CMAKE_SKIP_TESTS+=( TestURIUtils.GetBasePath )
548

  
502 549
	if use arm || use x86; then
503 550
		# bug #779184
504 551
		# https://github.com/xbmc/xbmc/issues/18594
Спасибо!