54 lines
1.8 KiB
Plaintext
54 lines
1.8 KiB
Plaintext
# Description: A free and open source software media player and entertainment hub
|
|
# URL: https://kodi.tv/
|
|
# Maintainer: Matt Housh, jaeger at crux dot ninja
|
|
# Depends on: cmake fmt ghostscript giflib glu openjdk17-jdk libass libcdio libmicrohttpd mariadb samba swig taglib tinyxml spdlog libva libvdpau libdvdnav
|
|
|
|
name=kodi
|
|
version=19.5
|
|
release=1
|
|
source=(https://github.com/xbmc/xbmc/archive/$version-Matrix/$name-$version.tar.gz gl-headers.patch
|
|
https://crux.nu/files/kodi-ffmpeg-4.3-kodi-dav1d-1.0.tar.gz
|
|
mesa-eglchromium.patch)
|
|
|
|
unpack_source() {
|
|
cp $PKGMK_ROOT/*.patch $SRC/
|
|
bsdtar -xf $PKGMK_SOURCE_DIR/$name-$version.tar.gz -C $SRC
|
|
cp $PKGMK_SOURCE_DIR/kodi-ffmpeg* $SRC/
|
|
}
|
|
|
|
build() {
|
|
# https://github.com/xbmc/xbmc/pull/22291/commits/b81d28d5ce679da2ff5f14dca691665551d30351
|
|
patch -p1 -d xbmc-$version-Matrix -i $SRC/mesa-eglchromium.patch
|
|
|
|
export PATH="/usr/lib/java/openjdk17-jdk/bin:$PATH"
|
|
|
|
[[ -e /usr/lib/ccache ]] && PATH="$(echo ${PATH} | awk -v RS=: -v ORS=: '/ccache/ {next} {print}' | sed 's/:*$//')"
|
|
|
|
patch -d xbmc-$version-Matrix -p1 -i $SRC/gl-headers.patch
|
|
|
|
cmake -Bbuild \
|
|
-DVERBOSE=ON \
|
|
-DAPP_RENDER_SYSTEM=gl \
|
|
-DCORE_PLATFORM_NAME=x11 \
|
|
-DENABLE_DVDCSS=ON \
|
|
-DENABLE_OPTICAL=ON \
|
|
-DENABLE_PYTHON=ON \
|
|
-DENABLE_INTERNAL_FFMPEG=ON \
|
|
-DFFMPEG_URL=$SRC/kodi-ffmpeg-4.3-kodi-dav1d-1.0.tar.gz \
|
|
-DENABLE_INTERNAL_FLATBUFFERS=ON \
|
|
-DENABLE_INTERNAL_FSTRCMP=ON \
|
|
-DENABLE_INTERNAL_RapidJSON=ON \
|
|
-DENABLE_TESTING=OFF \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_INSTALL_LIBDIR=/usr/lib \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_C_FLAGS_RELEASE="$CFLAGS -DNDEBUG" \
|
|
-DCMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS -DNDEBUG" \
|
|
-Wno-dev \
|
|
xbmc-$version-Matrix
|
|
cmake --build build
|
|
DESTDIR=$PKG cmake --install build
|
|
|
|
find $PKG -name "README*" -delete
|
|
}
|