From 7a01a09fe70dec20ea439ed3639e327a03e54d68 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sun, 5 Jul 2020 14:41:40 -0700 Subject: [PATCH] libpng: fix compilation with ccache It seems an extra CMake variable is needed for one of the scripts. Signed-off-by: Rosen Penev --- libs/libpng/Makefile | 2 +- libs/libpng/patches/200-ccache.patch | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 libs/libpng/patches/200-ccache.patch diff --git a/libs/libpng/Makefile b/libs/libpng/Makefile index 93736985e..7e0bea5d7 100644 --- a/libs/libpng/Makefile +++ b/libs/libpng/Makefile @@ -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 index 000000000..25de32947 --- /dev/null +++ b/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}"