kodi: cleanup template, fix cross

This commit is contained in:
John 2024-09-10 22:52:49 +02:00 committed by John Zimmermann
parent 171c43ef79
commit 05adb308ff
2 changed files with 34 additions and 17 deletions

View File

@ -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()

View File

@ -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
}