aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonald <3665590+playgithub@users.noreply.github.com>2020-12-27 14:39:06 +0800
committerGitHub <noreply@github.com>2020-12-26 22:39:06 -0800
commitc09b59c897fa9915028b3782df76ccef1148a290 (patch)
tree5b0ef56c965c257e20d014bd22436b45b2470d71
parent57b4c4c73a7965c301624fbe2a5fa273742469ae (diff)
downloadvcpkg-c09b59c897fa9915028b3782df76ccef1148a290.tar.gz
vcpkg-c09b59c897fa9915028b3782df76ccef1148a290.zip
[libjpeg-turbo] fix incompatibility for c11 and c17 (#15234)
-rw-r--r--ports/libjpeg-turbo/CONTROL2
-rw-r--r--ports/libjpeg-turbo/fix-incompatibility-for-c11-c17.patch13
-rw-r--r--ports/libjpeg-turbo/portfile.cmake10
3 files changed, 17 insertions, 8 deletions
diff --git a/ports/libjpeg-turbo/CONTROL b/ports/libjpeg-turbo/CONTROL
index f8a66e50c..8dd51db8a 100644
--- a/ports/libjpeg-turbo/CONTROL
+++ b/ports/libjpeg-turbo/CONTROL
@@ -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.
diff --git a/ports/libjpeg-turbo/fix-incompatibility-for-c11-c17.patch b/ports/libjpeg-turbo/fix-incompatibility-for-c11-c17.patch
new file mode 100644
index 000000000..c0aaf585b
--- /dev/null
+++ b/ports/libjpeg-turbo/fix-incompatibility-for-c11-c17.patch
@@ -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
diff --git a/ports/libjpeg-turbo/portfile.cmake b/ports/libjpeg-turbo/portfile.cmake
index f4a55e078..b135c5aea 100644
--- a/ports/libjpeg-turbo/portfile.cmake
+++ b/ports/libjpeg-turbo/portfile.cmake
@@ -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()