libpng: fix compilation with ccache 12729/head
authorRosen Penev <rosenp@gmail.com>
Sun, 5 Jul 2020 21:41:40 +0000 (14:41 -0700)
committerRosen Penev <rosenp@gmail.com>
Sun, 5 Jul 2020 22:38:07 +0000 (15:38 -0700)
It seems an extra CMake variable is needed for one of the scripts.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
libs/libpng/Makefile
libs/libpng/patches/200-ccache.patch [new file with mode: 0644]

index 93736985ee4899d3c067efabf16ba53214408318..7e0bea5d70391d64e82c95f435b226a735164004 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libpng
 PKG_VERSION:=1.6.37
-PKG_RELEASE:=6
+PKG_RELEASE:=7
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@SF/libpng
diff --git a/libs/libpng/patches/200-ccache.patch b/libs/libpng/patches/200-ccache.patch
new file mode 100644 (file)
index 0000000..25de329
--- /dev/null
@@ -0,0 +1,19 @@
+--- a/scripts/genout.cmake.in
++++ b/scripts/genout.cmake.in
+@@ -14,6 +14,7 @@ set(BINDIR "@CMAKE_CURRENT_BINARY_DIR@")
+ set(AWK "@AWK@")
+ set(CMAKE_C_COMPILER "@CMAKE_C_COMPILER@")
++set(CMAKE_C_COMPILER_ARG1 "@CMAKE_C_COMPILER_ARG1@")
+ set(CMAKE_C_FLAGS @CMAKE_C_FLAGS@)
+ set(INCDIR "@CMAKE_CURRENT_BINARY_DIR@")
+ set(PNG_PREFIX "@PNG_PREFIX@")
+@@ -58,7 +59,7 @@ if ("${INPUTEXT}" STREQUAL ".c" AND "${OUTPUTEXT}" STREQUAL ".out")
+     set(PNG_PREFIX_DEF "-DPNG_PREFIX=${PNG_PREFIX}")
+   endif()
+-  execute_process(COMMAND "${CMAKE_C_COMPILER}" "-E"
++  execute_process(COMMAND "${CMAKE_C_COMPILER}" ${CMAKE_C_COMPILER_ARG1} "-E"
+                           ${CMAKE_C_FLAGS}
+                           ${PLATFORM_C_FLAGS}
+                           "-I${SRCDIR}"