| 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 |
|
| 10 |
10 |
# Versions for the forked projects that are bundled
|
| 11 |
11 |
# See tools/depends/target/<project>/<project>-VERSION
|
| 12 |
|
LIBDVDCSS_VERSION="1.4.3-Next-Nexus-Alpha2-2"
|
| 13 |
|
LIBDVDREAD_VERSION="6.1.3-Next-Nexus-Alpha2-2"
|
| 14 |
|
LIBDVDNAV_VERSION="6.1.1-Next-Nexus-Alpha2-2"
|
| 15 |
|
FFMPEG_VERSION="6.0.1"
|
|
12 |
LIBDVDCSS_VERSION="1.5.0"
|
|
13 |
LIBDVDNAV_VERSION="7.0.0"
|
|
14 |
LIBDVDREAD_VERSION="7.0.1"
|
|
15 |
FFMPEG_VERSION="8.1.2"
|
| 16 |
16 |
|
| 17 |
17 |
# Java bundles from xbmc/interfaces/swig/CMakeLists.txt
|
| 18 |
|
GROOVY_VERSION="4.0.26"
|
| 19 |
|
APACHE_COMMON_LANG_VERSION="3.17.0"
|
| 20 |
|
APACHE_COMMON_TEXT_VERSION="1.13.0"
|
|
18 |
GROOVY_VERSION="4.0.30"
|
|
19 |
APACHE_COMMON_LANG_VERSION="3.20.0"
|
|
20 |
APACHE_COMMON_TEXT_VERSION="1.15.0"
|
| 21 |
21 |
|
| 22 |
|
_JAVA_PKG_WANT_BUILD_VM=( {openjdk{,-jre},icedtea}{,-bin}-{8,11,17,21} )
|
|
22 |
_JAVA_PKG_WANT_BUILD_VM=( {openjdk{,-jre},icedtea}{,-bin}-{8,11,17,21,25} )
|
| 23 |
23 |
JAVA_PKG_WANT_BUILD_VM=${_JAVA_PKG_WANT_BUILD_VM[@]}
|
| 24 |
24 |
# Required to be set, but not used.
|
| 25 |
25 |
JAVA_PKG_WANT_SOURCE="21"
|
| 26 |
26 |
JAVA_PKG_WANT_TARGET="21"
|
| 27 |
27 |
|
| 28 |
28 |
PYTHON_REQ_USE="sqlite,ssl"
|
| 29 |
|
PYTHON_COMPAT=( python3_{11..14} )
|
|
29 |
PYTHON_COMPAT=( python3_{12..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/"
|
| 39 |
39 |
|
| 40 |
40 |
SRC_URI="
|
| 41 |
|
https://github.com/xbmc/libdvdnav/archive/${LIBDVDNAV_VERSION}.tar.gz
|
| 42 |
|
-> libdvdnav-${LIBDVDNAV_VERSION}.tar.gz
|
| 43 |
|
https://github.com/xbmc/libdvdread/archive/${LIBDVDREAD_VERSION}.tar.gz
|
| 44 |
|
-> libdvdread-${LIBDVDREAD_VERSION}.tar.gz
|
| 45 |
41 |
https://mirrors.kodi.tv/build-deps/sources/apache-groovy-binary-${GROOVY_VERSION}.zip
|
| 46 |
42 |
https://mirrors.kodi.tv/build-deps/sources/commons-lang3-${APACHE_COMMON_LANG_VERSION}-bin.tar.gz
|
| 47 |
43 |
https://mirrors.kodi.tv/build-deps/sources/commons-text-${APACHE_COMMON_TEXT_VERSION}-bin.tar.gz
|
|
44 |
https://mirrors.kodi.tv/build-deps/sources/libdvdnav-${LIBDVDNAV_VERSION}.tar.bz2
|
|
45 |
https://mirrors.kodi.tv/build-deps/sources/libdvdread-${LIBDVDREAD_VERSION}.tar.bz2
|
| 48 |
46 |
css? (
|
| 49 |
|
https://github.com/xbmc/libdvdcss/archive/${LIBDVDCSS_VERSION}.tar.gz
|
| 50 |
|
-> libdvdcss-${LIBDVDCSS_VERSION}.tar.gz
|
|
47 |
https://mirrors.kodi.tv/build-deps/sources/libdvdcss-${LIBDVDCSS_VERSION}.tar.bz2
|
| 51 |
48 |
)
|
| 52 |
49 |
!system-ffmpeg? (
|
| 53 |
|
https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.gz
|
|
50 |
https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.xz
|
| 54 |
51 |
)
|
|
52 |
system-ffmpeg? ( postproc? (
|
|
53 |
https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.xz
|
|
54 |
) )
|
| 55 |
55 |
"
|
| 56 |
56 |
if [[ ${PV} == *9999 ]] ; then
|
| 57 |
57 |
EGIT_REPO_URI="https://github.com/xbmc/xbmc.git"
|
| ... | ... | |
| 67 |
67 |
MY_PV="${MY_PV}-${CODENAME}"
|
| 68 |
68 |
MY_P="${PN}-${MY_PV}"
|
| 69 |
69 |
SRC_URI+=" https://github.com/xbmc/xbmc/archive/${MY_PV}.tar.gz -> ${MY_P}.tar.gz"
|
| 70 |
|
KEYWORDS="amd64 ~arm arm64 ~riscv ~x86"
|
|
70 |
# Dont keyword
|
|
71 |
if ! [[ ${PV} =~ _alpha ]] && ! [[ ${PV} =~ _beta ]] && ! [[ ${PV} =~ _rc ]]; then
|
|
72 |
KEYWORDS="~amd64 ~arm64 ~riscv ~x86"
|
|
73 |
fi
|
| 71 |
74 |
S=${WORKDIR}/xbmc-${MY_PV}
|
| 72 |
75 |
fi
|
| 73 |
76 |
|
| ... | ... | |
| 84 |
87 |
# use flag is called libusb so that it doesn't fool people in thinking that
|
| 85 |
88 |
# it is _required_ for USB support. Otherwise they'll disable udev and
|
| 86 |
89 |
# 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}"
|
|
90 |
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 |
91 |
REQUIRED_USE="
|
| 89 |
92 |
${PYTHON_REQUIRED_USE}
|
| 90 |
93 |
|| ( gbm wayland X )
|
| ... | ... | |
| 98 |
101 |
"
|
| 99 |
102 |
RESTRICT="!test? ( test )"
|
| 100 |
103 |
|
| 101 |
|
# dev-libs/libcec[-cubox] bug #818262
|
| 102 |
104 |
COMMON_DEPEND="
|
| 103 |
105 |
>=dev-libs/flatbuffers-23.3.3:=
|
| 104 |
106 |
>=dev-libs/lzo-2.04:2
|
| ... | ... | |
| 115 |
117 |
dev-db/sqlite:3
|
| 116 |
118 |
dev-libs/crossguid
|
| 117 |
119 |
>=dev-libs/fribidi-1.0.5
|
| 118 |
|
>=dev-libs/libcdio-2.1.0:=[cxx]
|
| 119 |
120 |
>=dev-libs/libfmt-6.1.2:=
|
| 120 |
121 |
dev-libs/libfstrcmp
|
| 121 |
|
dev-libs/libpcre[cxx]
|
|
122 |
dev-libs/libpcre2:=
|
| 122 |
123 |
>=dev-libs/openssl-1.1.1k:0=
|
| 123 |
124 |
>=dev-libs/spdlog-1.5.0:=
|
| 124 |
125 |
dev-libs/tinyxml[stl]
|
| 125 |
126 |
dev-libs/tinyxml2:=
|
| 126 |
127 |
media-fonts/roboto
|
|
128 |
media-gfx/exiv2:=
|
| 127 |
129 |
media-libs/libglvnd[X?]
|
| 128 |
130 |
>=media-libs/freetype-2.10.1
|
| 129 |
131 |
media-libs/harfbuzz:=
|
| 130 |
132 |
>=media-libs/libass-0.15.0:=
|
| 131 |
133 |
media-libs/mesa[opengl,wayland?,X?]
|
| 132 |
134 |
media-libs/taglib:=
|
| 133 |
|
sci-libs/kissfft
|
| 134 |
135 |
virtual/libiconv
|
| 135 |
136 |
virtual/ttf-fonts
|
| 136 |
137 |
x11-libs/libdrm
|
| ... | ... | |
| 155 |
156 |
sys-libs/libcap
|
| 156 |
157 |
)
|
| 157 |
158 |
cec? (
|
| 158 |
|
>=dev-libs/libcec-4.0[-cubox(-)]
|
|
159 |
>=dev-libs/libcec-4.0:=
|
| 159 |
160 |
)
|
| 160 |
161 |
dbus? (
|
| 161 |
162 |
sys-apps/dbus
|
| ... | ... | |
| 184 |
185 |
dev-db/mysql-connector-c:=
|
| 185 |
186 |
)
|
| 186 |
187 |
nfs? (
|
| 187 |
|
>=net-fs/libnfs-2.0.0:=
|
|
188 |
>=net-fs/libnfs-3.0.0:=
|
|
189 |
)
|
|
190 |
optical? (
|
|
191 |
>=dev-libs/libcdio-2.1.0:=[cxx]
|
| 188 |
192 |
)
|
| 189 |
193 |
pipewire? (
|
| 190 |
194 |
>=media-video/pipewire-0.3.50:=
|
| 191 |
195 |
)
|
| 192 |
196 |
pulseaudio? (
|
| 193 |
|
media-libs/libpulse
|
|
197 |
>=media-libs/libpulse-11.0.0
|
| 194 |
198 |
)
|
| 195 |
199 |
samba? (
|
| 196 |
200 |
>=net-fs/samba-3.4.6[smbclient(+)]
|
| 197 |
201 |
)
|
| 198 |
202 |
system-ffmpeg? (
|
| 199 |
|
media-video/ffmpeg-compat:6=[encode(+),soc(-)?,postproc(-),vaapi?,vdpau?,X?]
|
|
203 |
postproc? ( =media-video/ffmpeg-$(ver_cut 1-2 ${FFMPEG_VERSION})*:=[encode(+),soc(-)?,vaapi?,vdpau?,X?] )
|
|
204 |
!postproc? ( >=media-video/ffmpeg-7:=[encode(+),soc(-)?,vaapi?,vdpau?,X?] )
|
| 200 |
205 |
)
|
| 201 |
206 |
!system-ffmpeg? (
|
| 202 |
207 |
app-arch/bzip2
|
| ... | ... | |
| 205 |
210 |
net-libs/gnutls:=
|
| 206 |
211 |
)
|
| 207 |
212 |
udf? (
|
| 208 |
|
>=dev-libs/libudfread-1.0.0
|
|
213 |
>=dev-libs/libudfread-1.0.0:=
|
| 209 |
214 |
)
|
| 210 |
215 |
udev? (
|
| 211 |
216 |
virtual/libudev:=
|
| ... | ... | |
| 245 |
250 |
DEPEND="
|
| 246 |
251 |
${COMMON_DEPEND}
|
| 247 |
252 |
${COMMON_TARGET_DEPEND}
|
| 248 |
|
>=dev-libs/rapidjson-1.0.2
|
|
253 |
>=dev-cpp/nlohmann_json-3.2.0
|
| 249 |
254 |
test? (
|
| 250 |
255 |
>=dev-cpp/gtest-1.10.0
|
| 251 |
256 |
)
|
| ... | ... | |
| 263 |
268 |
dev-build/cmake
|
| 264 |
269 |
dev-lang/swig
|
| 265 |
270 |
virtual/pkgconfig
|
| 266 |
|
<=virtual/jre-21-r9999:*
|
|
271 |
<=virtual/jre-25-r9999:*
|
| 267 |
272 |
doc? (
|
| 268 |
273 |
app-text/doxygen
|
| 269 |
274 |
)
|
| ... | ... | |
| 271 |
276 |
|
| 272 |
277 |
PATCHES=(
|
| 273 |
278 |
"${FILESDIR}"/kodi-21-optional-ffmpeg-libx11.patch
|
| 274 |
|
"${FILESDIR}"/kodi-21.1-silence-libdvdread-git.patch
|
| 275 |
|
"${FILESDIR}"/kodi-21.3-giflib-6.patch # bug #978878
|
| 276 |
279 |
)
|
| 277 |
280 |
|
| 278 |
281 |
# bug #544020
|
| ... | ... | |
| 284 |
287 |
|
| 285 |
288 |
pkg_setup() {
|
| 286 |
289 |
check_extra_config
|
| 287 |
|
java-pkg-2_pkg_setup
|
|
290 |
ROOT= java-pkg-2_pkg_setup
|
| 288 |
291 |
python-single-r1_pkg_setup
|
| 289 |
292 |
}
|
| 290 |
293 |
|
| ... | ... | |
| 298 |
301 |
unpack apache-groovy-binary-${GROOVY_VERSION}.zip
|
| 299 |
302 |
unpack commons-lang3-${APACHE_COMMON_LANG_VERSION}-bin.tar.gz
|
| 300 |
303 |
unpack commons-text-${APACHE_COMMON_TEXT_VERSION}-bin.tar.gz
|
|
304 |
|
|
305 |
if use system-ffmpeg && use postproc; then
|
|
306 |
unpack ffmpeg-${FFMPEG_VERSION}.tar.xz
|
|
307 |
fi
|
| 301 |
308 |
}
|
| 302 |
309 |
|
| 303 |
310 |
src_prepare() {
|
| ... | ... | |
| 308 |
315 |
-e '/dbus_connection_send_with_reply_and_block/s:-1:3000:' \
|
| 309 |
316 |
xbmc/platform/linux/*.cpp || die
|
| 310 |
317 |
|
| 311 |
|
# Add all possible names for kissfft libraries
|
| 312 |
|
for datatype in {float,int16,int32,simd}; do
|
| 313 |
|
sed -i \
|
| 314 |
|
-e "s/\(find_library(KISSFFT_LIBRARY NAMES .*\)/\1 kissfft-${datatype} kissfft-${datatype}-openmp/" \
|
| 315 |
|
cmake/modules/FindKissFFT.cmake || die
|
| 316 |
|
done
|
| 317 |
|
|
| 318 |
318 |
if tc-is-cross-compiler; then
|
| 319 |
319 |
# These tools are automatically built with CMake during a native build
|
| 320 |
320 |
# but need to be built in advance using Autotools for a cross build.
|
| ... | ... | |
| 331 |
331 |
done
|
| 332 |
332 |
elibtoolize
|
| 333 |
333 |
fi
|
|
334 |
|
|
335 |
if use system-ffmpeg && use postproc; then
|
|
336 |
pushd "${WORKDIR}/ffmpeg-${FFMPEG_VERSION}" >/dev/null || die
|
|
337 |
eapply "${S}"/tools/depends/target/ffmpeg/001-ffmpeg-all-libpostproc-plugin.patch
|
|
338 |
eapply "${FILESDIR}"/ffmpeg-no-static-rpath.patch
|
|
339 |
popd >/dev/null || die
|
|
340 |
fi
|
| 334 |
341 |
}
|
| 335 |
342 |
|
| 336 |
343 |
src_configure() {
|
|
344 |
# used below and by vendored libdvdread
|
|
345 |
tc-export PKG_CONFIG
|
|
346 |
|
| 337 |
347 |
local core_platform=(
|
| 338 |
348 |
$(usev gbm)
|
| 339 |
349 |
$(usev wayland)
|
| ... | ... | |
| 363 |
373 |
-DENABLE_GOLD=OFF
|
| 364 |
374 |
-DENABLE_LLD=OFF
|
| 365 |
375 |
-DENABLE_MOLD=OFF
|
| 366 |
|
-DUSE_LTO=OFF
|
|
376 |
|
|
377 |
# This isn't normally necessary with CMake, but Kodi includes its own
|
|
378 |
# FindPkgConfig module that doesn't respect PKG_CONFIG. :(
|
|
379 |
-DPKG_CONFIG_EXECUTABLE=$(type -P "${PKG_CONFIG}")
|
| 367 |
380 |
|
| 368 |
381 |
# Features
|
| 369 |
382 |
-DENABLE_AIRTUNES=$(usex airplay)
|
| ... | ... | |
| 399 |
412 |
-DENABLE_VDPAU=$(usex vdpau)
|
| 400 |
413 |
-DENABLE_XSLT=$(usex xslt)
|
| 401 |
414 |
|
| 402 |
|
-DWITH_FFMPEG=$(usex system-ffmpeg)
|
|
415 |
-DWITH_FFMPEG=OFF
|
|
416 |
-DDISABLE_FFMPEG_SOURCE_PLUGINS=$(usex !postproc)
|
| 403 |
417 |
|
| 404 |
418 |
#To bundle or not
|
|
419 |
-DENABLE_INTERNAL_ASS=OFF
|
| 405 |
420 |
-DENABLE_INTERNAL_CROSSGUID=OFF
|
| 406 |
|
-DENABLE_INTERNAL_DAV1D=OFF
|
|
421 |
-DENABLE_INTERNAL_CURL=OFF
|
|
422 |
-DENABLE_INTERNAL_EXIV2=OFF
|
| 407 |
423 |
-DENABLE_INTERNAL_FFMPEG="$(usex !system-ffmpeg)"
|
| 408 |
424 |
-DENABLE_INTERNAL_FLATBUFFERS=OFF
|
| 409 |
425 |
-DENABLE_INTERNAL_FMT=OFF
|
| 410 |
426 |
-DENABLE_INTERNAL_FSTRCMP=OFF
|
| 411 |
427 |
-DENABLE_INTERNAL_GTEST=OFF
|
| 412 |
|
-DENABLE_INTERNAL_KISSFFT=OFF
|
| 413 |
|
-DENABLE_INTERNAL_PCRE=OFF
|
| 414 |
|
-DENABLE_INTERNAL_RapidJSON=OFF
|
|
428 |
-DENABLE_INTERNAL_LCMS2=OFF
|
|
429 |
-DENABLE_INTERNAL_LZO2=OFF
|
|
430 |
-DENABLE_INTERNAL_NLOHMANNJSON=OFF
|
|
431 |
-DENABLE_INTERNAL_PCRE2=OFF
|
| 415 |
432 |
-DENABLE_INTERNAL_SPDLOG=OFF
|
| 416 |
433 |
-DENABLE_INTERNAL_TAGLIB=OFF
|
| 417 |
|
-DENABLE_INTERNAL_UDFREAD=OFF
|
| 418 |
434 |
|
| 419 |
435 |
-DTARBALL_DIR="${DISTDIR}"
|
| 420 |
|
-Dlibdvdnav_URL="${DISTDIR}/libdvdnav-${LIBDVDNAV_VERSION}.tar.gz"
|
| 421 |
|
-Dlibdvdread_URL="${DISTDIR}/libdvdread-${LIBDVDREAD_VERSION}.tar.gz"
|
| 422 |
436 |
-Dgroovy_SOURCE_DIR="${WORKDIR}/groovy-${GROOVY_VERSION}"
|
| 423 |
437 |
-Dapache-commons-lang_SOURCE_DIR="${WORKDIR}/commons-lang3-${APACHE_COMMON_LANG_VERSION}"
|
| 424 |
438 |
-Dapache-commons-text_SOURCE_DIR="${WORKDIR}/commons-text-${APACHE_COMMON_TEXT_VERSION}"
|
|
439 |
-DLIBDVDNAV_URL="${DISTDIR}/libdvdnav-${LIBDVDNAV_VERSION}.tar.bz2"
|
|
440 |
-DLIBDVDREAD_URL="${DISTDIR}/libdvdread-${LIBDVDREAD_VERSION}.tar.bz2"
|
| 425 |
441 |
)
|
| 426 |
442 |
|
| 427 |
443 |
# Separated to avoid "Manually-specified variables were not used by the project:"
|
|
444 |
use bluray && mycmakeargs+=(
|
|
445 |
-DENABLE_INTERNAL_BLURAY=OFF
|
|
446 |
-DENABLE_BLURAY_JAR=OFF # applies to internal bluray build
|
|
447 |
)
|
| 428 |
448 |
use cec && mycmakeargs+=( -DENABLE_INTERNAL_CEC=OFF )
|
| 429 |
|
use css && mycmakeargs+=( -Dlibdvdcss_URL="${DISTDIR}/libdvdcss-${LIBDVDCSS_VERSION}.tar.gz" )
|
| 430 |
|
use nfs && mycmakeargs+=( -DENABLE_INTERNAL_NFS=OFF )
|
|
449 |
use css && mycmakeargs+=( -DLIBDVDCSS_URL="${DISTDIR}/libdvdcss-${LIBDVDCSS_VERSION}.tar.bz2" )
|
|
450 |
use mariadb && mycmakeargs+=( -DENABLE_INTERNAL_MARIADBCLIENT=OFF )
|
| 431 |
451 |
use !system-ffmpeg && mycmakeargs+=(
|
| 432 |
|
-DFFMPEG_URL="${DISTDIR}/ffmpeg-${FFMPEG_VERSION}.tar.gz"
|
|
452 |
# Additional find_package on top of core_optional_deps for whatever reason
|
|
453 |
$(cmake_use_find_package vaapi VAAPI)
|
|
454 |
$(cmake_use_find_package vdpau VDPAU)
|
|
455 |
-DENABLE_INTERNAL_DAV1D=OFF
|
|
456 |
-DFFMPEG_URL="${DISTDIR}/ffmpeg-${FFMPEG_VERSION}.tar.xz"
|
| 433 |
457 |
)
|
|
458 |
use nfs && mycmakeargs+=( -DENABLE_INTERNAL_NFS=OFF )
|
| 434 |
459 |
use !udev && mycmakeargs+=( -DENABLE_LIBUSB=$(usex libusb) )
|
|
460 |
use udf && mycmakeargs+=( -DENABLE_INTERNAL_UDFREAD=OFF )
|
|
461 |
use webserver && mycmakeargs+=( -DENABLE_INTERNAL_LIBMICROHTTPD=OFF )
|
| 435 |
462 |
use X && use !gles && mycmakeargs+=( -DENABLE_GLX=ON )
|
|
463 |
use xslt && mycmakeargs+=( -DENABLE_INTERNAL_XSLT=OFF )
|
| 436 |
464 |
|
| 437 |
465 |
for flag in ${CPU_FLAGS[@]} ; do
|
| 438 |
466 |
local name=${flag#cpu_flags_*_}
|
| 439 |
467 |
mycmakeargs+=( -DENABLE_${name^^}=$(usex ${flag}) )
|
| 440 |
468 |
done
|
| 441 |
469 |
|
| 442 |
|
if use system-ffmpeg; then
|
| 443 |
|
# TODO: drop compat and allow using >=media-video/ffmpeg-7
|
| 444 |
|
ffmpeg_compat_setup 6
|
| 445 |
|
ffmpeg_compat_add_flags
|
| 446 |
|
mycmakeargs+=( -DFFMPEG_INCLUDE_DIRS="${SYSROOT}$(ffmpeg_compat_get_prefix 6)" )
|
| 447 |
|
fi
|
| 448 |
|
|
| 449 |
470 |
if ! is-flag -DNDEBUG && ! is-flag -D_DEBUG ; then
|
| 450 |
471 |
# Kodi requires one of the 'NDEBUG' or '_DEBUG' defines
|
| 451 |
472 |
append-cflags -DNDEBUG
|
| 452 |
473 |
append-cxxflags -DNDEBUG
|
| 453 |
474 |
fi
|
| 454 |
475 |
|
| 455 |
|
# Violates ODR (bug #860984) and USE_LTO does spooky stuff
|
| 456 |
|
# https://github.com/xbmc/xbmc/commit/cb72a22d54a91845b1092c295f84eeb48328921e
|
| 457 |
|
filter-lto
|
|
476 |
if tc-is-lto ; then
|
|
477 |
mycmakeargs+=( -DUSE_LTO=ON )
|
|
478 |
else
|
|
479 |
mycmakeargs+=( -DUSE_LTO=OFF )
|
|
480 |
fi
|
| 458 |
481 |
|
| 459 |
482 |
# bug #926076
|
| 460 |
483 |
append-flags -fPIC
|
| 461 |
484 |
|
| 462 |
|
# used by vendored libdvdread
|
| 463 |
|
tc-export PKG_CONFIG
|
|
485 |
if use system-ffmpeg && use postproc; then
|
|
486 |
pushd "${WORKDIR}/ffmpeg-${FFMPEG_VERSION}" >/dev/null || die
|
|
487 |
local ffconf=(
|
|
488 |
--disable-all
|
|
489 |
--enable-postproc
|
|
490 |
--enable-gpl
|
|
491 |
)
|
|
492 |
if tc-is-cross-compiler; then
|
|
493 |
ffconf+=(
|
|
494 |
--enable-cross-compile
|
|
495 |
--arch="$(tc-arch-kernel)"
|
|
496 |
--cross-prefix="${CHOST}-"
|
|
497 |
--host-cc="$(tc-getBUILD_CC)"
|
|
498 |
--target-os=linux
|
|
499 |
)
|
|
500 |
elif use arm; then
|
|
501 |
ffconf+=( --arch=arm )
|
|
502 |
fi
|
|
503 |
./configure "${ffconf[@]}" || die
|
|
504 |
touch libpostproc/libpostproc.a || die # Actually build later.
|
|
505 |
emake libpostproc/libpostproc.pc V=1
|
|
506 |
export PKG_CONFIG_PATH="${PWD}/doc/examples/pc-uninstalled"
|
|
507 |
# Work around CMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY in eclass. It's a
|
|
508 |
# weird thing to do, but probably safer than setting that to BOTH.
|
|
509 |
[[ ${SYSROOT:-/} != / ]] && mycmakeargs+=( -DCMAKE_FIND_ROOT_PATH="${PWD}" )
|
|
510 |
popd >/dev/null || die
|
|
511 |
fi
|
| 464 |
512 |
|
| 465 |
513 |
if tc-is-cross-compiler; then
|
| 466 |
514 |
for t in "${NATIVE_TOOLS[@]}" ; do
|
| ... | ... | |
| 476 |
524 |
}
|
| 477 |
525 |
|
| 478 |
526 |
src_compile() {
|
|
527 |
if use system-ffmpeg && use postproc; then
|
|
528 |
pushd "${WORKDIR}/ffmpeg-${FFMPEG_VERSION}" >/dev/null || die
|
|
529 |
emake libpostproc/libpostproc.a V=1
|
|
530 |
rm -r libav* libsw* || die
|
|
531 |
popd >/dev/null || die
|
|
532 |
fi
|
|
533 |
|
| 479 |
534 |
if tc-is-cross-compiler; then
|
| 480 |
535 |
for t in "${NATIVE_TOOLS[@]}" ; do
|
| 481 |
536 |
emake -C "${S}/tools/depends/native/$t/src"
|
| ... | ... | |
| 492 |
547 |
# Known failing, unreliable test
|
| 493 |
548 |
# bug #743938
|
| 494 |
549 |
TestCPUInfo.GetCPUFrequency
|
| 495 |
|
# Test failure stemming from sci-libs/kissfft
|
| 496 |
|
# The difference between output[2i] and (i==freq1?1.0:0.0) is inf, which exceeds 1e-7, where output[2i]
|
| 497 |
|
# evaluates to inf,(i==freq1?1.0:0.0) evaluates to 0, and 1e-7 evaluates to 9.9999999999999995e-08.
|
| 498 |
|
TestRFFT.SimpleSignal
|
| 499 |
550 |
# Tries to ping localhost, naturally breaking network-sandbox
|
| 500 |
551 |
TestNetwork.PingHost
|
| 501 |
552 |
)
|
| 502 |
553 |
|
|
554 |
# Tests assumes bluray support is enabled
|
|
555 |
if use !bluray; then
|
|
556 |
CMAKE_SKIP_TESTS+=(
|
|
557 |
TestStacks.TestMovieFilesStackFolderFilesDiscPart
|
|
558 |
TestURIUtils.GetBasePath
|
|
559 |
)
|
|
560 |
fi
|
|
561 |
|
| 503 |
562 |
if use arm || use x86; then
|
| 504 |
563 |
# bug #779184
|
| 505 |
564 |
# https://github.com/xbmc/xbmc/issues/18594
|