Skip to content

Commit

Permalink
Update libwebp to 1.5.0
Browse files Browse the repository at this point in the history
- Add a patch to fix Lua compilation on armeabi-v7a
  • Loading branch information
encelo committed Dec 29, 2024
1 parent c71d61f commit da55806
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
5 changes: 5 additions & 0 deletions cmake/lua.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions cmake/webp.cmake
Original file line number Diff line number Diff line change
@@ -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
Expand Down
16 changes: 16 additions & 0 deletions patches/lua_liolib.patch
Original file line number Diff line number Diff line change
@@ -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 <sys/types.h>

-#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) /* }{ */

0 comments on commit da55806

Please sign in to comment.