Skip to content

Commit

Permalink
libpng: fix compilation with ccache
Browse files Browse the repository at this point in the history
It seems an extra CMake variable is needed for one of the scripts.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
  • Loading branch information
neheb committed Jul 5, 2020
1 parent da5f866 commit 7a01a09
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion libs/libpng/Makefile
Expand Up @@ -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
Expand Down
19 changes: 19 additions & 0 deletions libs/libpng/patches/200-ccache.patch
@@ -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}"

0 comments on commit 7a01a09

Please sign in to comment.