1
0
forked from ports/contrib

kodi-wayland: initial commit, version 19.3

This commit is contained in:
Tim Biermann 2021-11-07 13:39:18 +01:00
parent b017ca6f89
commit 71595c465e
Signed by: tb
GPG Key ID: 42F8B4E30B673606
4 changed files with 3268 additions and 0 deletions

3133
kodi-wayland/.footprint Normal file

File diff suppressed because it is too large Load Diff

11
kodi-wayland/.signature Normal file
View File

@ -0,0 +1,11 @@
untrusted comment: verify with /etc/ports/contrib.pub
RWSagIOpLGJF3x+ET6J/UA87M+B/b6bCoi/xSrUrHUHEC7cQhdBtRMtwhfa2WIVt7JBdta76v+fBM412X5tC93TOQLwtMSYJtwE=
SHA256 (Pkgfile) = d9fc631e01ade45e3776708198e24d8907f638b5aa2bb02b8d18c9fde73e3633
SHA256 (.footprint) = 84f311781ad23c586d7df222ea6788b67246ff6638648c141877c456e5037534
SHA256 (xbmc-19.3-Matrix.tar.gz) = 440f47e475dd8a48e0a6d41349e83b74890f3fbe8275d3e401d3c50f5b9ea09b
SHA256 (4.3.1-Matrix-Beta1.tar.gz) = 0b209a9b15f2335e516bf2ad1249fffc6b55425145f17c9674dc430abf6a67ad
SHA256 (fmt-5.1.0.tar.gz) = 73d4cab4fa8a3482643d8703de4d9522d7a56981c938eca42d929106ff474b44
SHA256 (crossguid-8f399e8bd4.tar.gz) = 3d77d09a5df0de510aeeb940df4cb534787ddff3bb1828779753f5dfa1229d10
SHA256 (kodi-libdvdcss-1.4.2-Leia-Beta-5.tar.gz) = 38816f8373e243bc5950449b4f3b18938c4e1c59348e3411e23f31db4072e40d
SHA256 (kodi-libdvdnav-6.0.0-Leia-Alpha-3.tar.gz) = 071e414e61b795f2ff9015b21a85fc009dde967f27780d23092643916538a57a
SHA256 (kodi-libdvdread-6.0.0-Leia-Alpha-3.tar.gz) = a30b6aa0aad0f2c505bc77948af2d5531a80b6e68112addb4c123fca24d5d3bf

101
kodi-wayland/Pkgfile Normal file
View File

@ -0,0 +1,101 @@
# Description: A free and open source software media player and entertainment hub, running natively on wayland
# URL: http://kodi.tv/
# Maintainer: Tim Biermann, tbier at posteo dot de
# Depends on: dbus flatbuffers fstrcmp glu libass libcdio libxkbcommon openjdk17-jdk python rapidjson rtmpdump spdlog swig taglib tinyxml waylandpp
# Optional: alsa-lib avahi bluez dav1d libmicrohttpd libnfs libva libva-vdpau-driver libxslt mariadb mysql pulseaudio
name=kodi-wayland
version=19.3
release=1
# version variables {{{
_codename=Matrix
_ffmpeg_version="4.3.1-$_codename-Beta1"
_crossguid_version="8f399e8bd4"
_fmt_version="5.1.0"
_libdvdcss_version="1.4.2-Leia-Beta-5"
_libdvdnav_version="6.0.0-Leia-Alpha-3"
_libdvdread_version="6.0.0-Leia-Alpha-3"
# }}}
# source {{{
source=(https://github.com/xbmc/xbmc/archive/$version-$_codename/xbmc-$version-$_codename.tar.gz
https://github.com/xbmc/FFmpeg/archive/$_ffmpeg_version.tar.gz
http://mirrors.kodi.tv/build-deps/sources/fmt-$_fmt_version.tar.gz
http://mirrors.kodi.tv/build-deps/sources/crossguid-$_crossguid_version.tar.gz
https://github.com/xbmc/libdvdcss/archive/$_libdvdcss_version/${name/-wayland/}-libdvdcss-$_libdvdcss_version.tar.gz
https://github.com/xbmc/libdvdnav/archive/$_libdvdnav_version/${name/-wayland/}-libdvdnav-$_libdvdnav_version.tar.gz
https://github.com/xbmc/libdvdread/archive/$_libdvdread_version/${name/-wayland}-libdvdread-$_libdvdread_version.tar.gz)
# }}}
# unpack_source() {{{
unpack_source() {
for file in ${source[@]}; do
case ${file##*/} in
xbmc-$version-$_codename.tar.gz)
bsdtar -p -o -C $SRC -xf $(get_filename $file) ;;
*)
cp $(get_filename $file) $SRC ;;
esac
done
}
# }}}
build() {
# clang? {{{
[[ -e /usr/bin/clang && -e /usr/bin/clang++ && -e /usr/bin/lld ]] && export CC=clang CXX=clang++ AR=llvm-ar NM=llvm-nm RANLIB=llvm-ranlib LDFLAGS+=' -fuse-ld=lld' && KODI_EXTRA+=' -D CMAKE_CXX_COMPILER_AR=/usr/bin/llvm-ar -D CMAKE_CXX_COMPILER_RANLIB=/usr/bin/llvm-ranlib -D CMAKE_NM=/usr/bin/llvm-nm -D ENABLE_LLD=ON -D USE_LTO=8'
# }}}
unset PATH
export PATH="/usr/lib/java/openjdk17-jdk/bin:/usr/bin:/bin:/usr/sbin:/sbin"
# optionals {{{
prt-get isinst alsa-lib && KODI_EXTRA+=' -D ENABLE_ALSA=ON' || KODI_EXTRA+=' -D ENABLE_ALSA=OFF'
prt-get isinst avahi && KODI_EXTRA+=' -D ENABLE_AVAHI=ON' || KODI_EXTRA+=' -D ENABLE_AVAHI=OFF'
prt-get isinst bluez sbc && KODI_EXTRA+=' -D ENABLE_BLUETOOTH=ON' || KODI_EXTRA+=' -D ENABLE_BLUETOOTH=OFF'
prt-get isinst dav1d && KODI_EXTRA+=' -D ENABLE_INTERNAL_DAV1D=OFF' || KODI_EXTRA+=' -D ENABLE_INTERNAL_DAV1D=ON'
prt-get isinst libmicrohttpd && KODI_EXTRA+=' -D ENABLE_MICROHTTPD=ON' || KODI_EXTRA+=' -D ENABLE_MICROHTTPD=OFF'
prt-get isinst libnfs && KODI_EXTRA+=' -D ENABLE_NFS=ON' || KODI_EXTRA+=' -D ENABLE_NFS=OFF'
prt-get isinst libva && KODI_EXTRA+=' -D ENABLE_VAAPI=ON' || KODI_EXTRA+=' -D ENABLE_VAAPI=OFF'
prt-get isinst libva-vdpau-driver && KODI_EXTRA+=' -D ENABLE_VDPAU=ON' || KODI_EXTRA+=' -D ENABLE_VDPAU=OFF'
prt-get isinst libxslt && KODI_EXTRA+=' -D ENABLE_XSLT=ON' || KODI_EXTRA+=' -D ENABLE_XSLT=OFF'
prt-get isinst mysql && KODI_EXTRA+=' -D ENABLE_MYSQLCLIENT=OFF'
prt-get isinst mariadb && KODI_EXTRA+=' -D ENABLE_MARIADBCLIENT=OFF'
prt-get isinst pulseaudio && KODI_EXTRA+=' -D ENABLE_PULSEAUDIO=ON' || KODI_EXTRA+=' -D ENABLE_PULSEAUDIO=OFF'
prt-get isinst ccache && PATH="$(echo ${PATH} | awk -v RS=: -v ORS=: '/ccache/ {next} {print}' | sed 's/:*$//')"
# }}}
cmake -S xbmc-$version-$_codename -B build -G Ninja $KODI_EXTRA \
-D CMAKE_INSTALL_PREFIX=/usr \
-D CMAKE_INSTALL_LIBDIR=lib \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
-D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
-D CORE_PLATFORM_NAME=wayland \
-D APP_RENDER_SYSTEM=gl \
-D ENABLE_DBUS=ON \
-D ENABLE_EVENTCLIENTS=ON \
-D ENABLE_OPTICAL=OFF \
-D ENABLE_UDEV=ON \
-D ENABLE_PYTHON=ON \
-D VERBOSE=OFF \
-D ENABLE_DVDCSS=OFF \
-D ENABLE_LDGOLD=OFF \
-D ENABLE_TESTING=OFF \
-D ENABLE_ISO9660PP=OFF \
-D ENABLE_INTERNAL_FFMPEG=ON \
-D FFMPEG_URL="$SRC/$_ffmpeg_version.tar.gz" \
-D ENABLE_INTERNAL_CROSSGUID=ON \
-D CROSSGUID_URL="$SRC/crossguid-$_crossguid_version.tar.gz" \
-D LIBDVDCSS_URL="$SRC/${name/-wayland/}-libdvdcss-$_libdvdcss_version.tar.gz" \
-D LIBDVDNAV_URL="$SRC/${name/-wayland/}-libdvdnav-$_libdvdnav_version.tar.gz" \
-D LIBDVDREAD_URL="$SRC/${name/-wayland/}-libdvdread-$_libdvdread_version.tar.gz" \
-D ENABLE_INTERNAL_FMT=OFF \
-D ENABLE_INTERNAL_FSTRCMP=OFF \
-D ENABLE_INTERNAL_FLATBUFFERS=OFF \
-D ENABLE_INTERNAL_GTEST=OFF \
-D ENABLE_INTERNAL_RapidJSON=OFF \
-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --build build --target install
}
# vim: foldmethod=marker foldlevelstart=1

23
kodi-wayland/README.md Normal file
View File

@ -0,0 +1,23 @@
contrib/kodi-wayland README.md
==============================
## General
This is a stand-alone port that will use kodis native wayland backend, which
will not work from an X11 session.
You can't have `contrib/kodi{,-gbm}` and `contrib/kodi-wayland` installed at
the same time. You need to choose between one of them!
## Allow shutdown/suspend/hibernate
In order to allow Kodi to shutdown/suspend/hibernate the machine,
install dbus, polkit, consolekit, and upower.
Launch kodi like so:
```sh
ck-launch-session kodi
```
If using a window manager or desktop environment that uses polkit and
consolekit already, this is usually unnecessary.