[libjpeg-turbo] fix incompatibility for c11 and c17 (#15234)

This commit is contained in:
Ronald 2020-12-27 14:39:06 +08:00 committed by GitHub
parent 57b4c4c73a
commit c09b59c897
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 8 deletions

View File

@ -1,6 +1,6 @@
Source: libjpeg-turbo
Version: 2.0.5
Port-Version: 1
Port-Version: 2
Homepage: https://github.com/libjpeg-turbo/libjpeg-turbo
Description: libjpeg-turbo is a JPEG image codec that uses SIMD instructions (MMX, SSE2, NEON, AltiVec) to accelerate baseline JPEG compression and decompression on x86, x86-64, ARM, and PowerPC systems.

View File

@ -0,0 +1,13 @@
diff --git a/tjutil.h b/tjutil.h
index f72840c..a3ae19f 100644
--- a/tjutil.h
+++ b/tjutil.h
@@ -30,7 +30,7 @@
#ifndef __MINGW32__
#include <stdio.h>
#define snprintf(str, n, format, ...) \
- _snprintf_s(str, n, _TRUNCATE, format, __VA_ARGS__)
+ _snprintf_s(str, n, _TRUNCATE, format, ## __VA_ARGS__)
#endif
#define strcasecmp stricmp
#define strncasecmp strnicmp

View File

@ -6,9 +6,9 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
add-options-for-exes-docs-headers.patch
#workaround for vcpkg bug see #5697 on github for more information
workaround_cmake_system_processor.patch
fix-incompatibility-for-c11-c17.patch
)
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR (VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore"))
@ -68,11 +68,6 @@ else(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
endif()
endif()
file(INSTALL
${SOURCE_PATH}/LICENSE.md
DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright
)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/man)
@ -80,5 +75,6 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/man)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/jpeg)
vcpkg_copy_pdbs()
file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
vcpkg_copy_pdbs()