From 05adb308ffdeb0b7606df737b7181eaea8356d1d Mon Sep 17 00:00:00 2001 From: John Date: Tue, 10 Sep 2024 22:52:49 +0200 Subject: [PATCH] kodi: cleanup template, fix cross --- srcpkgs/kodi/patches/cross-udfread.patch | 31 ++++++++++++++++++++++++ srcpkgs/kodi/template | 20 +++------------ 2 files changed, 34 insertions(+), 17 deletions(-) create mode 100644 srcpkgs/kodi/patches/cross-udfread.patch diff --git a/srcpkgs/kodi/patches/cross-udfread.patch b/srcpkgs/kodi/patches/cross-udfread.patch new file mode 100644 index 00000000000..cdbd05547ca --- /dev/null +++ b/srcpkgs/kodi/patches/cross-udfread.patch @@ -0,0 +1,31 @@ +--- a/cmake/modules/FindUdfread.cmake 2024-09-10 23:21:34.944300987 +0200 ++++ - 2024-09-10 23:24:16.204142312 +0200 +@@ -43,12 +43,22 @@ + + set(UDFREAD_VERSION ${${MODULE}_VER}) + set(BUILD_NAME udfread_build) +- +- set(CONFIGURE_COMMAND autoreconf -vif && +- ./configure +- --enable-static +- --disable-shared +- --prefix=${DEPENDS_PATH}) ++ if(CMAKE_CROSSCOMPILING) ++ set(CONFIGURE_COMMAND autoreconf -vif && ++ ./configure ++ --enable-static ++ --disable-shared ++ --prefix=${DEPENDS_PATH} ++ --host=${XBPS_TRIPLET} ++ --build=${XBPS_CROSS_TRIPLET} ++ --target=${XBPS_CROSS_TRIPLET}) ++ else() ++ set(CONFIGURE_COMMAND autoreconf -vif && ++ ./configure ++ --enable-static ++ --disable-shared ++ --prefix=${DEPENDS_PATH}) ++ endif() + set(BUILD_IN_SOURCE 1) + + BUILD_DEP_TARGET() diff --git a/srcpkgs/kodi/template b/srcpkgs/kodi/template index 94f8fa33c3c..6e94577ff2c 100644 --- a/srcpkgs/kodi/template +++ b/srcpkgs/kodi/template @@ -120,7 +120,7 @@ pre_configure() { --prefix=/usr --with-toolchain=/usr --host=${XBPS_TRIPLET} \ --build=${XBPS_TRIPLET} --target=${XBPS_TRIPLET} --with-rendersystem=gl cd ../.. - for i in JsonSchemaBuilder TexturePacker; do + for i in JsonSchemaBuilder; do msg_normal "Building native tool $i" cd tools/depends/native/$i/src ./autogen.sh @@ -133,22 +133,8 @@ pre_configure() { cp -r tools/depends/native/$i/src/$i tools/$i make -C tools/depends/native/$i distclean done - configure_args+=" - -DWITH_JSONSCHEMABUILDER:PATH=$wrksrc/tools/JsonSchemaBuilder - -DWITH_TEXTUREPACKER:PATH=$wrksrc/tools/TexturePacker" - # host = what we are on - # build = what tool to build with - # target = what this should run on and what repo it's in (same as build for cross) - configure_args=${configure_args/--host=${XBPS_CROSS_TRIPLET}/--host${XBPS_TRIPLET}}" - configure_args=${configure_args/--build=${XBPS_TRIPLET}/--build${XBPS_CROSS_TRIPLET}}" - configure_args+="--target=${XBPS_CROSS_TRIPLET}" - fi -} - -post_configure() { - if [ "$CROSS_BUILD" ]; then - vsed -e "s|^ COMMAND.*udfread.*\./configure|& --host=${XBPS_TRIPLET} --build=${XBPS_CROSS_TRIPLET} --target=${XBPS_CROSS_TRIPLET}|" \ - -i build/build.ninja + configure_args+=" -DWITH_JSONSCHEMABUILDER:PATH=$wrksrc/tools/JsonSchemaBuilder" + configure_args+=" -DXBPS_TRIPLET=${XBPS_TRIPLET} -DXBPS_CROSS_TRIPLET=${XBPS_CROSS_TRIPLET}" fi }