# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 # FFmpeg can be unbundled, but is currently stuck at a very old version. # libdvd{css,read,nav} are not unbundlable without patching the buildsystem. # Versions for the forked projects that are bundled # See tools/depends/target//-VERSION LIBDVDCSS_VERSION="1.4.3-Next-Nexus-Alpha2-2" LIBDVDREAD_VERSION="6.1.3-Next-Nexus-Alpha2-2" LIBDVDNAV_VERSION="6.1.1-Next-Nexus-Alpha2-2" FFMPEG_VERSION="4.4.1" CODENAME="Nexus" FFMPEG_KODI_VERSION="Alpha1" # Doesn't build with jdk-21 _JAVA_PKG_WANT_BUILD_VM=( {openjdk{,-jre},icedtea}{,-bin}-{8,11,17} ) JAVA_PKG_WANT_BUILD_VM=${_JAVA_PKG_WANT_BUILD_VM[@]} # Required to be set, but not used. JAVA_PKG_WANT_SOURCE="17" JAVA_PKG_WANT_TARGET="17" PYTHON_REQ_USE="sqlite,ssl" PYTHON_COMPAT=( python3_{10..11} ) # python3.12 support added in 21 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" inherit cmake desktop flag-o-matic java-pkg-2 linux-info optfeature pax-utils python-single-r1 xdg DESCRIPTION="A free and open source media-player and entertainment hub" HOMEPAGE="https://kodi.tv/" SRC_URI=" https://github.com/xbmc/libdvdnav/archive/${LIBDVDNAV_VERSION}.tar.gz -> libdvdnav-${LIBDVDNAV_VERSION}.tar.gz https://github.com/xbmc/libdvdread/archive/${LIBDVDREAD_VERSION}.tar.gz -> libdvdread-${LIBDVDREAD_VERSION}.tar.gz css? ( https://github.com/xbmc/libdvdcss/archive/${LIBDVDCSS_VERSION}.tar.gz -> libdvdcss-${LIBDVDCSS_VERSION}.tar.gz ) !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 ) " if [[ ${PV} == *9999 ]] ; then EGIT_REPO_URI="https://github.com/xbmc/xbmc.git" if [[ ${PV} != "9999" ]]; then EGIT_BRANCH="${CODENAME}" fi inherit git-r3 else MY_PV=${PV/_p/_r} MY_PV=${MY_PV/_alpha/a} MY_PV=${MY_PV/_beta/b} MY_PV=${MY_PV/_rc/RC} MY_PV="${MY_PV}-${CODENAME}" MY_P="${PN}-${MY_PV}" SRC_URI+=" https://github.com/xbmc/xbmc/archive/${MY_PV}.tar.gz -> ${MY_P}.tar.gz" KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86" S=${WORKDIR}/xbmc-${MY_PV} fi LICENSE="GPL-2+" SLOT="0" # use flag is called libusb so that it doesn't fool people in thinking that # it is _required_ for USB support. Otherwise they'll disable udev and # that's going to be worse. IUSE="airplay alsa bluetooth bluray caps cec +css dbus doc eventclients gbm gles lcms libusb lirc mariadb mysql nfs +optical pipewire pulseaudio raspberry-pi samba system-ffmpeg test udf udev upnp vaapi vdpau wayland webserver X +xslt zeroconf ${CPU_FLAGS}" REQUIRED_USE=" ${PYTHON_REQUIRED_USE} ^^ ( gbm wayland X ) ?? ( mariadb mysql ) bluray? ( udf ) gbm? ( udev ) udev? ( !libusb ) vdpau? ( X !gles !gbm ) zeroconf? ( dbus ) " RESTRICT="!test? ( test )" # dev-libs/libcec[-cubox] bug #818262 COMMON_DEPEND=" >=dev-libs/flatbuffers-1.12.0:= >=dev-libs/lzo-2.04:2 media-libs/giflib:= >=media-libs/libjpeg-turbo-2.0.4:= >=media-libs/libpng-1.6.26:0= wayland? ( dev-cpp/waylandpp:= ) " COMMON_TARGET_DEPEND="${PYTHON_DEPS} >=net-misc/curl-7.68.0[http2] >=sys-libs/zlib-1.2.11 dev-db/sqlite:3 dev-libs/crossguid >=dev-libs/fribidi-1.0.5 >=dev-libs/libcdio-2.1.0:=[cxx] >=dev-libs/libfmt-6.1.2:= dev-libs/libfstrcmp dev-libs/libpcre[cxx] >=dev-libs/openssl-1.1.1k:0= >=dev-libs/spdlog-1.5.0:= dev-libs/tinyxml[stl] media-fonts/roboto media-libs/libglvnd[X?] >=media-libs/freetype-2.10.1 media-libs/harfbuzz:= >=media-libs/libass-0.13.4:= media-libs/mesa[egl(+),gbm(+)?,wayland?,X?] >=media-libs/taglib-1.9.0 sci-libs/kissfft virtual/libiconv virtual/ttf-fonts x11-libs/libdrm $(python_gen_cond_dep ' dev-python/pillow[${PYTHON_USEDEP}] dev-python/pycryptodome[${PYTHON_USEDEP}] ') airplay? ( >=app-pda/libplist-2.0.0:= net-libs/shairplay ) alsa? ( >=media-libs/alsa-lib-1.1.4.1 ) bluetooth? ( net-wireless/bluez:= ) bluray? ( >=media-libs/libbluray-1.1.2:= ) caps? ( sys-libs/libcap ) cec? ( >=dev-libs/libcec-4.0[-cubox] ) dbus? ( sys-apps/dbus ) gbm? ( >=dev-libs/libinput-1.10.5:= x11-libs/libxkbcommon ) gles? ( !raspberry-pi? ( || ( >=media-libs/mesa-24.1.0_rc1[opengl] =media-libs/lcms-2.10:2 ) libusb? ( virtual/libusb:1 ) lirc? ( app-misc/lirc ) mariadb? ( dev-db/mariadb-connector-c:= ) mysql? ( dev-db/mysql-connector-c:= ) nfs? ( >=net-fs/libnfs-2.0.0:= ) pipewire? ( >=media-video/pipewire-0.3.24:= ) pulseaudio? ( media-libs/libpulse ) raspberry-pi? ( || ( media-libs/raspberrypi-userland media-libs/raspberrypi-userland-bin >=media-libs/mesa-24.1.0_rc1[opengl,video_cards_vc4] =net-fs/samba-3.4.6[smbclient(+)] ) system-ffmpeg? ( >=media-video/ffmpeg-${FFMPEG_VERSION}:=[encode,postproc,vaapi?,vdpau?,X?] =media-video/ffmpeg-4*[openssl] ) !system-ffmpeg? ( app-arch/bzip2 media-libs/dav1d:= ) udf? ( >=dev-libs/libudfread-1.0.0 ) udev? ( virtual/libudev:= ) vaapi? ( media-libs/libva:=[wayland?,X?] ) vdpau? ( || ( >=x11-libs/libvdpau-1.1 >=x11-drivers/nvidia-drivers-180.51 ) ) wayland? ( >=x11-libs/libxkbcommon-0.4.1[wayland] ) webserver? ( >=net-libs/libmicrohttpd-0.9.55:=[messages(+)] ) X? ( x11-libs/libX11 x11-libs/libXext x11-libs/libXrandr ) xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.9.4 ) zeroconf? ( net-dns/avahi[dbus] ) " RDEPEND=" ${COMMON_DEPEND} ${COMMON_TARGET_DEPEND} " DEPEND=" ${COMMON_DEPEND} ${COMMON_TARGET_DEPEND} dev-libs/rapidjson test? ( >=dev-cpp/gtest-1.10.0 ) wayland? ( >=dev-libs/wayland-protocols-1.7 ) X? ( x11-base/xorg-proto x11-libs/libXrender ) " #