diff --git a/srcpkgs/kodi-rpi/files/CMakeCache.txt.nojava b/srcpkgs/kodi-rpi/files/CMakeCache.txt.nojava new file mode 120000 index 00000000000..6d60129ddc2 --- /dev/null +++ b/srcpkgs/kodi-rpi/files/CMakeCache.txt.nojava @@ -0,0 +1 @@ +../../kodi/files/CMakeCache.txt.nojava \ No newline at end of file diff --git a/srcpkgs/kodi-rpi/files/swig.nojava-17.1 b/srcpkgs/kodi-rpi/files/swig.nojava-17.1 new file mode 120000 index 00000000000..6af34674cc2 --- /dev/null +++ b/srcpkgs/kodi-rpi/files/swig.nojava-17.1 @@ -0,0 +1 @@ +../../kodi/files/swig.nojava-17.1 \ No newline at end of file diff --git a/srcpkgs/kodi-rpi/patches b/srcpkgs/kodi-rpi/patches new file mode 120000 index 00000000000..95c1fe40f19 --- /dev/null +++ b/srcpkgs/kodi-rpi/patches @@ -0,0 +1 @@ +../kodi/patches \ No newline at end of file diff --git a/srcpkgs/kodi-rpi/patches/add-missing-includes.patch b/srcpkgs/kodi-rpi/patches/add-missing-includes.patch deleted file mode 120000 index d28799cb63f..00000000000 --- a/srcpkgs/kodi-rpi/patches/add-missing-includes.patch +++ /dev/null @@ -1 +0,0 @@ -../../kodi/patches/add-missing-includes.patch \ No newline at end of file diff --git a/srcpkgs/kodi-rpi/patches/disable-static-texturepacker-build.patch b/srcpkgs/kodi-rpi/patches/disable-static-texturepacker-build.patch deleted file mode 120000 index fa11d3a8c49..00000000000 --- a/srcpkgs/kodi-rpi/patches/disable-static-texturepacker-build.patch +++ /dev/null @@ -1 +0,0 @@ -../../kodi/patches/disable-static-texturepacker-build.patch \ No newline at end of file diff --git a/srcpkgs/kodi-rpi/patches/fix-fileemu.patch b/srcpkgs/kodi-rpi/patches/fix-fileemu.patch deleted file mode 120000 index e88377b37df..00000000000 --- a/srcpkgs/kodi-rpi/patches/fix-fileemu.patch +++ /dev/null @@ -1 +0,0 @@ -../../kodi/patches/fix-fileemu.patch \ No newline at end of file diff --git a/srcpkgs/kodi-rpi/patches/fix-musl-cross.patch b/srcpkgs/kodi-rpi/patches/fix-musl-cross.patch deleted file mode 100644 index 587ad0c2138..00000000000 --- a/srcpkgs/kodi-rpi/patches/fix-musl-cross.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/configure.ac.orig 2017-05-21 19:04:34.705518286 +0200 -+++ b/configure.ac 2017-05-21 19:05:10.431442782 +0200 -@@ -611,7 +611,7 @@ case $host in - CORE_SYSTEM_NAME=linux - ARCH="powerpc64-linux" - ;; -- arm*-*-linux-gnu*|arm*-*-linux-uclibc*) -+ arm*-*-linux-gnu*|arm*-*-linux-uclibc*|arm*-*-linux-musl*) - target_platform=target_linux - CORE_SYSTEM_NAME=linux - ARCH="arm" -@@ -621,7 +621,7 @@ case $host in - use_gl=no - USE_STATIC_FFMPEG=1 - ;; -- aarch64*-*-linux-gnu*|aarch64*-*-linux-uclibc*) -+ aarch64*-*-linux-gnu*|aarch64*-*-linux-uclibc*|aarch64*-*-linux-musl*) - target_platform=target_linux - ARCH="aarch64" - use_arch="aarch64" diff --git a/srcpkgs/kodi-rpi/patches/fix-musl.patch b/srcpkgs/kodi-rpi/patches/fix-musl.patch deleted file mode 120000 index c82751fe9cb..00000000000 --- a/srcpkgs/kodi-rpi/patches/fix-musl.patch +++ /dev/null @@ -1 +0,0 @@ -../../kodi/patches/fix-musl.patch \ No newline at end of file diff --git a/srcpkgs/kodi-rpi/patches/fortify-source-fix.patch b/srcpkgs/kodi-rpi/patches/fortify-source-fix.patch deleted file mode 120000 index c5c5222e72e..00000000000 --- a/srcpkgs/kodi-rpi/patches/fortify-source-fix.patch +++ /dev/null @@ -1 +0,0 @@ -../../kodi/patches/fortify-source-fix.patch \ No newline at end of file diff --git a/srcpkgs/kodi-rpi/patches/jsonschemabuilder-cross.patch b/srcpkgs/kodi-rpi/patches/jsonschemabuilder-cross.patch deleted file mode 100644 index 39ccfff44d3..00000000000 --- a/srcpkgs/kodi-rpi/patches/jsonschemabuilder-cross.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/tools/depends/native/JsonSchemaBuilder/Makefile.orig 2015-02-06 16:03:11.758503904 +0100 -+++ b/tools/depends/native/JsonSchemaBuilder/Makefile 2015-02-06 16:03:29.557107942 +0100 -@@ -15,7 +15,7 @@ endif - - SOURCE=$(ROOT_DIR)/src - --CONFIGURE=./configure --prefix=$(PREFIX) -+CONFIGURE=CC=cc CXX=g++ CFLAGS= CXXFLAGS= ./configure --prefix=$(PREFIX) - APP=$(SOURCE)/JsonSchemaBuilder - APPBIN=$(PREFIX)/bin/JsonSchemaBuilder - diff --git a/srcpkgs/kodi-rpi/patches/remove-filewrap.patch b/srcpkgs/kodi-rpi/patches/remove-filewrap.patch deleted file mode 120000 index b87f6a4cc95..00000000000 --- a/srcpkgs/kodi-rpi/patches/remove-filewrap.patch +++ /dev/null @@ -1 +0,0 @@ -../../kodi/patches/remove-filewrap.patch \ No newline at end of file diff --git a/srcpkgs/kodi-rpi/patches/set-default-stacksize.patch b/srcpkgs/kodi-rpi/patches/set-default-stacksize.patch deleted file mode 120000 index 2f45576916e..00000000000 --- a/srcpkgs/kodi-rpi/patches/set-default-stacksize.patch +++ /dev/null @@ -1 +0,0 @@ -../../kodi/patches/set-default-stacksize.patch \ No newline at end of file diff --git a/srcpkgs/kodi-rpi/patches/versioncheck.patch b/srcpkgs/kodi-rpi/patches/versioncheck.patch deleted file mode 120000 index 5f2d4e169d6..00000000000 --- a/srcpkgs/kodi-rpi/patches/versioncheck.patch +++ /dev/null @@ -1 +0,0 @@ -../../kodi/patches/versioncheck.patch \ No newline at end of file diff --git a/srcpkgs/kodi-rpi/template b/srcpkgs/kodi-rpi/template index 9af076fc318..6783ec49fe1 100644 --- a/srcpkgs/kodi-rpi/template +++ b/srcpkgs/kodi-rpi/template @@ -2,6 +2,7 @@ pkgname=kodi-rpi version=17.1 revision=1 +build_style=cmake patch_args="-Np1" _codename="Krypton" wrksrc="xbmc-${version}-${_codename}" @@ -11,8 +12,7 @@ homepage="http://www.kodi.tv/" license="GPL-2" distfiles="https://github.com/xbmc/xbmc/archive/${version}-${_codename}.tar.gz" checksum=303f3903cbb57ccc2961f09cf3746505542bcb129a464f0687d7ca8601cebbee - -broken="https://build.voidlinux.eu/builders/armv7l_builder/builds/2841/steps/shell_3/logs/stdio" +build_wrksrc=project/cmake nopie=yes only_for_archs="armv6l armv6l-musl armv7l armv7l-musl" @@ -20,7 +20,7 @@ only_for_archs="armv6l armv6l-musl armv7l armv7l-musl" hostmakedepends=" automake libtool pkg-config gperf cmake zip unzip nasm yasm gettext-devel libltdl-devel python-devel libmysqlclient-devel - SDL2_image-devel lzo-devel swig" + SDL2_image-devel lzo-devel" makedepends=" eudev-libudev-devel pcre-devel expat-devel libpng-devel libjpeg-turbo-devel avahi-libs-devel alsa-lib-devel samba-devel tiff-devel libmysqlclient-devel @@ -29,19 +29,34 @@ makedepends=" libmad-devel fontconfig-devel libsamplerate-devel libmms-devel libcurl-devel ffmpeg-devel enca-devel boost-devel libbluetooth-devel yajl-devel libplist-devel librtmp-devel tinyxml-devel taglib-devel libcap-devel lame-devel libnfs-devel libxslt-devel libuuid-devel giflib-devel - libcec-devel libmicrohttpd-devel libcdio-devel python-devel libssh-devel rpi-userland-devel dcadec-devel crossguid" + libcec-devel libmicrohttpd-devel libcdio-devel python-devel libssh-devel rpi-userland-devel dcadec-devel crossguid cmake" + +# gold broken with musl +case "$XBPS_MACHINE" in + *-musl) configure_args+=" -DENABLE_LDGOLD=Off";; +esac + +configure_args=" + -DCORE_SYSTEM_NAME=rbpi + -DENABLE_OPENGL=OFF + -DENABLE_OPENGLES=ON + -DENABLE_X11=OFF + -DENABLE_INTERNAL_CROSSGUID=OFF + -DENABLE_VAAPI=OFF + -DENABLE_VDPAU=OFF + -DCMAKE_PREFIX_PATH=${XBPS_CROSS_BASE}/opt/vc +" +case "$XBPS_TARGET_MACHINE" in + armv6*) configure_args+=" -DWITH_CPU=arm1176jzf-s";; + armv7*) configure_args+=" -DWITH_CPU=cortex-a7";; + aarch64*) configure_args+=" -DWITH_CPU=cortex-a53";; +esac # The following dependencies are dlopen(3)ed. depends="libmad libogg libcurl libflac libmodplug libass libmpeg2 lame librtmp libnfs>=1.9.7 libplist>=1.12 libssh" depends+=" hicolor-icon-theme desktop-file-utils" -# musl builds need generated addons (no java). -case "$XBPS_MACHINE" in - *-musl) _kodi_nojava=yes;; - *) hostmakedepends+=" openjdk-jre";; -esac - provides="kodi-${version}_${revision}" # Create xbmc system user to launch xbmc-standalone. @@ -50,65 +65,55 @@ xbmc_homedir="/var/lib/xbmc" xbmc_groups="audio,input,video" pre_configure() { + find ../.. -type f | \ + grep "configure\.ac\|Makefile\|cmake\|config\.site" | \ + xargs sed -i -e "s;-isystem;-I;g" + # Copy generated files to avoid requiring java. - if [ -n "${_kodi_nojava}" ]; then - $XBPS_FETCH_CMD http://repo.voidlinux.eu/distfiles/kodi-${version}-generated-addons.tar.xz - tar xf kodi-${version}-generated-addons.tar.xz -C ${wrksrc} - BOOTSTRAP_STANDALONE=1 make JAVA=/bin/true -f codegenerator.mk - else - . /etc/profile.d/10_openjdk.sh - BOOTSTRAP_STANDALONE=1 make -f codegenerator.mk + mkdir -p build/build/swig + + # THESE FILES MUST BE UPDATED WITH EVERY VERSION BUMP! + # (See kodi template) + cp -r $FILESDIR/swig.nojava-$version/* -t build/build/swig + cp $FILESDIR/CMakeCache.txt.nojava build/CMakeCache.txt + + echo "set(FOUND_SWIG Yes)" > modules/FindSWIG.cmake + + if [ "$CROSS_BUILD" ]; then + for i in JsonSchemaBuilder TexturePacker; do + cat > modules/Find$i.cmake <