9978e00086
git grep -l '^patch_args=.*p1' 'srcpkgs/*/template' | xargs -r sed -i '/^patch_args=/d'
158 lines
6.3 KiB
Bash
158 lines
6.3 KiB
Bash
# Template file for 'kodi'
|
|
pkgname=kodi
|
|
version=19.0
|
|
revision=2
|
|
_codename="Matrix"
|
|
wrksrc="xbmc-${version}-${_codename}"
|
|
build_style=cmake
|
|
configure_args="-DWITH_FFMPEG=/usr -DENABLE_LDGOLD=OFF
|
|
-DAPP_RENDER_SYSTEM=gl -DENABLE_INTERNAL_CROSSGUID=ON
|
|
-DCROSSGUID_URL=${XBPS_SRCDISTDIR}/${pkgname}-${version}/crossguid-8f399e8bd4.tar.gz
|
|
-Dlibdvdcss_URL=${XBPS_SRCDISTDIR}/${pkgname}-${version}/libdvdcss-1.4.2-Leia-Beta-5.tar.gz
|
|
-Dlibdvdread_URL=${XBPS_SRCDISTDIR}/${pkgname}-${version}/libdvdread-6.0.0-Leia-Alpha-3.tar.gz
|
|
-Dlibdvdnav_URL=${XBPS_SRCDISTDIR}/${pkgname}-${version}/libdvdnav-6.0.0-Leia-Alpha-3.tar.gz"
|
|
make_build_target="all"
|
|
short_desc="Software media player and entertainment hub for digital media"
|
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
|
license="GPL-2.0-or-later"
|
|
homepage="http://www.kodi.tv"
|
|
distfiles="https://github.com/xbmc/xbmc/archive/${version}-${_codename}.tar.gz"
|
|
checksum=f7ef8a6f45862ae3b7ebfce4950d74f534be3cb4a0e67ce640963746b3f668f2
|
|
# Add CrossGUID dependency
|
|
distfiles+=" http://mirrors.kodi.tv/build-deps/sources/crossguid-8f399e8bd4.tar.gz"
|
|
checksum+=" 3d77d09a5df0de510aeeb940df4cb534787ddff3bb1828779753f5dfa1229d10"
|
|
# Add libdvdcss dependency
|
|
distfiles+=" https://github.com/xbmc/libdvdcss/archive/1.4.2-Leia-Beta-5.tar.gz>libdvdcss-1.4.2-Leia-Beta-5.tar.gz"
|
|
checksum+=" 38816f8373e243bc5950449b4f3b18938c4e1c59348e3411e23f31db4072e40d"
|
|
# Add libdvdread dependency
|
|
distfiles+=" https://github.com/xbmc/libdvdread/archive/6.0.0-Leia-Alpha-3.tar.gz>libdvdread-6.0.0-Leia-Alpha-3.tar.gz"
|
|
checksum+=" a30b6aa0aad0f2c505bc77948af2d5531a80b6e68112addb4c123fca24d5d3bf"
|
|
# Add libdvdnav dependency
|
|
distfiles+=" https://github.com/xbmc/libdvdnav/archive/6.0.0-Leia-Alpha-3.tar.gz>libdvdnav-6.0.0-Leia-Alpha-3.tar.gz"
|
|
checksum+=" 071e414e61b795f2ff9015b21a85fc009dde967f27780d23092643916538a57a"
|
|
skip_extraction="crossguid-8f399e8bd4.tar.gz libdvdcss-1.4.2-Leia-Beta-5.tar.gz
|
|
libdvdread-6.0.0-Leia-Alpha-3.tar.gz libdvdnav-6.0.0-Leia-Alpha-3.tar.gz"
|
|
python_version=3
|
|
LDFLAGS="-Wl,-z,stack-size=1048576"
|
|
|
|
if [ "$XBPS_WORDSIZE" = 32 ]; then
|
|
LDFLAGS+=" -Wl,--no-keep-memory"
|
|
fi
|
|
|
|
lib32disabled=yes
|
|
archs="i686* x86_64* aarch64*
|
|
ppc64* armv6l* armv7l*"
|
|
|
|
hostmakedepends="
|
|
automake libtool pkg-config gperf cmake gettext zip unzip nasm yasm python3-devel
|
|
gettext-devel libltdl-devel curl flatbuffers swig openjdk11 which wayland-scanner++"
|
|
makedepends="
|
|
eudev-libudev-devel pcre-devel expat-devel libpng-devel libjpeg-turbo-devel
|
|
libXrandr-devel avahi-libs-devel pulseaudio-devel samba-devel tiff-devel
|
|
libmariadbclient-devel libmpeg2-devel wavpack-devel zlib-devel lzo-devel
|
|
libXmu-devel glew-devel fribidi-devel sqlite-devel libcdio-devel freetype-devel
|
|
jasper-devel faac-devel SDL2_image-devel faad2-devel libmodplug-devel openssl-devel
|
|
libmad-devel fontconfig-devel libXinerama-devel libsamplerate-devel libmms-devel
|
|
enca-devel boost-devel libcurl-devel libva-devel libvdpau-devel libass-devel
|
|
libbluetooth-devel yajl-devel libplist-devel librtmp-devel tinyxml-devel
|
|
taglib-devel libcap-devel lame-devel libbluray-devel libnfs-devel ffmpeg-devel
|
|
giflib-devel libxslt-devel gnutls-devel libssh-devel libmicrohttpd-devel
|
|
libcec-devel dcadec-devel flatbuffers-devel fmt-devel lcms2-devel
|
|
libfstrcmp-devel rapidjson libcdio-paranoia spdlog libwaylandpp-devel
|
|
libinput-devel libdav1d-devel gtest-devel python3-devel"
|
|
|
|
# The following dependencies are dlopen(3)ed.
|
|
depends="libbluray libmad libvorbis libcurl libflac libmodplug libass libmpeg2
|
|
lame librtmp libnfs>=1.9.7 libplist>=1.12"
|
|
depends+=" glxinfo hicolor-icon-theme desktop-file-utils xdpyinfo"
|
|
|
|
# Disable this test on all architectures
|
|
# https://github.com/void-linux/void-packages/commit/3c0332ab330e30a2c280de2258ed9bf60a9c2e09/checks/2101961295/logs
|
|
_gtest_filter="-TestCPUInfo.GetCPUFrequency"
|
|
_gtest_filter+=":TestWebServer.CanGetCachedFileWithOlderIfModifiedSince"
|
|
_gtest_filter+=":TestWebServer.CanGetCachedFileWithNewerIfModifiedSinceForcingNoCache"
|
|
_gtest_filter+=":TestWebServer.CanGetCachedFileWithExactIfUnmodifiedSince"
|
|
_gtest_filter+=":TestWebServer.CanGetCachedFileWithNewerIfUnmodifiedSince"
|
|
_gtest_filter+=":TestWebServer.CanGetRangedFileRange0_First"
|
|
_gtest_filter+=":TestWebServer.CanGetRangedFileRangeFirst_Second"
|
|
_gtest_filter+=":TestWebServer.CanGetRangedFileRange_Last"
|
|
_gtest_filter+=":TestWebServer.CanGetRangedFileRangeFirstSecond"
|
|
_gtest_filter+=":TestWebServer.CanGetRangedFileRangeFirstSecondLast"
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
i686)
|
|
# Additionaly disable these tests on i686 architecutre
|
|
# https://github.com/void-linux/void-packages/commit/3c0332ab330e30a2c280de2258ed9bf60a9c2e09/checks/2101961301/logs
|
|
_gtest_filter+=":TestDateTime.SetFromDBTime"
|
|
_gtest_filter+=":TestDateTime.SetDateTime"
|
|
_gtest_filter+=":TestDateTime.Reset"
|
|
;;
|
|
esac
|
|
|
|
if [ -z "$CROSS_BUILD" ]; then
|
|
make_build_target+=" kodi-test"
|
|
else
|
|
hostmakedepends+=" libmariadbclient-devel SDL2_image-devel lzo-devel
|
|
libwaylandpp-devel"
|
|
fi
|
|
|
|
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
|
|
makedepends+=" libatomic-devel"
|
|
configure_args+=" -DCMAKE_EXE_LINKER_FLAGS=-latomic"
|
|
LDFLAGS+=" -latomic"
|
|
fi
|
|
|
|
pre_configure() {
|
|
if [ "$CROSS_BUILD" ]; then
|
|
find -type f | \
|
|
grep "configure\.ac\|Makefile\|cmake\|config\.site" | \
|
|
xargs sed -i -e "s;-isystem;-I;g"
|
|
fi
|
|
|
|
. /etc/profile.d/10_openjdk11.sh
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
for i in JsonSchemaBuilder TexturePacker; do
|
|
cat > cmake/modules/Find$i.cmake <<EOF
|
|
add_executable($i::$i IMPORTED GLOBAL)
|
|
set_target_properties($i::$i PROPERTIES
|
|
IMPORTED_LOCATION "\${CORE_SOURCE_DIR}/tools/depends/native/$i/bin/$i")
|
|
set_target_properties($i::$i PROPERTIES FOLDER Tools)
|
|
EOF
|
|
done
|
|
fi
|
|
}
|
|
|
|
pre_build() {
|
|
if [ "$CROSS_BUILD" ]; then
|
|
for i in JsonSchemaBuilder TexturePacker; do
|
|
CC= LD= CXX= LDFLAGS= CFLAGS= CXXFLAGS= \
|
|
make -C tools/depends/native/$i
|
|
done
|
|
fi
|
|
}
|
|
|
|
post_build() {
|
|
# Rebuild for target
|
|
if [ "$CROSS_BUILD" ]; then
|
|
for i in JsonSchemaBuilder TexturePacker; do
|
|
make -C tools/depends/native/$i clean all \
|
|
CC="$CC" CXX="$CXX" LD="$LD" AR="$AR" RANLIB="$RANLIB" \
|
|
CPP="$CPP" AS="$AS" OBJDUMP="$OBJDUMP" \
|
|
CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS"
|
|
done
|
|
fi
|
|
}
|
|
|
|
do_check() {
|
|
./build/kodi-test --gtest_filter="${_gtest_filter}"
|
|
}
|
|
|
|
kodi-devel_package() {
|
|
short_desc+=" - development files"
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove usr/share/kodi/cmake
|
|
}
|
|
}
|