diff --git a/cmake/lua.cmake b/cmake/lua.cmake index d2c5f87..f675701 100644 --- a/cmake/lua.cmake +++ b/cmake/lua.cmake @@ -3,10 +3,15 @@ set(URL_LUA https://www.lua.org/ftp/lua-5.4.7.tar.gz) set(URL_MD5_LUA fc3f3291353bbe6ee6dec85ee61331e8) set(DEST_LUA ${DESTINATION_PATH}/lua) +if(${ARCH} STREQUAL "armeabi-v7a") + set(32BITS_LUA_PATCH_COMMAND patch -p1 < ${CMAKE_SOURCE_DIR}/patches/lua_liolib.patch) +endif() + ExternalProject_Add(project_${TARGET_LUA} URL ${URL_LUA} URL_MD5 ${URL_MD5_LUA} PATCH_COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/patches/CMakeLists_lua.txt ${EP_BASE}/Source/project_${TARGET_LUA}/CMakeLists.txt + COMMAND ${32BITS_LUA_PATCH_COMMAND} CMAKE_ARGS ${CMAKE_TOOLCHAIN_ARGS} BUILD_COMMAND ${CMAKE_COMMAND} --build . --parallel BUILD_IN_SOURCE 0 diff --git a/cmake/webp.cmake b/cmake/webp.cmake index 001df15..b56f6da 100644 --- a/cmake/webp.cmake +++ b/cmake/webp.cmake @@ -1,7 +1,7 @@ set(TARGET_WEBP webp) set(TARGET_WEBP_STATIC webp_static) -set(URL_WEBP http://downloads.webmproject.org/releases/webp/libwebp-1.4.0.tar.gz) -set(URL_MD5_WEBP 07daaa13bef03b7be07f11977b159cb8) +set(URL_WEBP http://downloads.webmproject.org/releases/webp/libwebp-1.5.0.tar.gz) +set(URL_MD5_WEBP 8f659e426eaa2aeec4b36bc9ea43b3f3) set(DEST_WEBP ${DESTINATION_PATH}/webp) set(WEBP_CMAKE_ARGS diff --git a/patches/lua_liolib.patch b/patches/lua_liolib.patch new file mode 100644 index 0000000..75ebc5a --- /dev/null +++ b/patches/lua_liolib.patch @@ -0,0 +1,16 @@ +diff -urN lua-5.4.7.orig/src/liolib.c lua-5.4.7/src/liolib.c +--- lua-5.4.7.orig/src/liolib.c 2024-06-14 00:15:09.000000000 +0200 ++++ lua-5.4.7/src/liolib.c 2024-12-29 20:29:29.979013962 +0100 +@@ -119,9 +119,9 @@ + + #include + +-#define l_fseek(f,o,w) fseeko(f,o,w) +-#define l_ftell(f) ftello(f) +-#define l_seeknum off_t ++#define l_fseek(f,o,w) fseek(f,o,w) ++#define l_ftell(f) ftell(f) ++#define l_seeknum long + + #elif defined(LUA_USE_WINDOWS) && !defined(_CRTIMP_TYPEINFO) \ + && defined(_MSC_VER) && (_MSC_VER >= 1400) /* }{ */