diff --git a/ports/json-c/fix-clang-cl.patch b/ports/json-c/fix-clang-cl.patch new file mode 100644 index 00000000000000..85641a7d54e298 --- /dev/null +++ b/ports/json-c/fix-clang-cl.patch @@ -0,0 +1,22 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9741b45f9..11b397024 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -281,7 +281,7 @@ message(STATUS "Wrote ${PROJECT_BINARY_DIR}/config.h") + configure_file(${PROJECT_SOURCE_DIR}/cmake/json_config.h.in ${PROJECT_BINARY_DIR}/json_config.h) + message(STATUS "Wrote ${PROJECT_BINARY_DIR}/json_config.h") + +-if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") ++if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" AND NOT MSVC) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffunction-sections -fdata-sections") + if ("${DISABLE_WERROR}" STREQUAL "OFF") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") +@@ -297,7 +297,7 @@ if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL + endif() + + add_definitions(-D_GNU_SOURCE) +-elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC") ++elseif (MSVC) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /DEBUG") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4100") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4996") diff --git a/ports/json-c/portfile.cmake b/ports/json-c/portfile.cmake index 85367d692eb63b..917d457a4f9300 100644 --- a/ports/json-c/portfile.cmake +++ b/ports/json-c/portfile.cmake @@ -5,6 +5,7 @@ vcpkg_from_github( SHA512 30063c8e32eb82e170647363055119f2f7eab19e1c3152673b966f41ed07e0349c3d6141b215b9912f9e84c2e06677b3d7ac949f720c7ebc2c95d692dc3881fe HEAD_REF master PATCHES pkgconfig.patch + fix-clang-cl.patch ) vcpkg_cmake_configure( diff --git a/ports/json-c/vcpkg.json b/ports/json-c/vcpkg.json index e4b60295abd6e2..2ef772d401be07 100644 --- a/ports/json-c/vcpkg.json +++ b/ports/json-c/vcpkg.json @@ -1,6 +1,7 @@ { "name": "json-c", "version-date": "2022-06-26", + "port-version": 1, "description": "A JSON implementation in C", "homepage": "https://github.com/json-c/json-c", "license": "MIT", diff --git a/versions/baseline.json b/versions/baseline.json index 6a1d9448e7f1b0..b000f5e690c4ae 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3118,7 +3118,7 @@ }, "json-c": { "baseline": "2022-06-26", - "port-version": 0 + "port-version": 1 }, "json-dto": { "baseline": "0.3.1", diff --git a/versions/j-/json-c.json b/versions/j-/json-c.json index 4dfac56a305ec9..799614a437f2f9 100644 --- a/versions/j-/json-c.json +++ b/versions/j-/json-c.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "c24e9a9cbc53b10a7235087cc58e89924415b281", + "version-date": "2022-06-26", + "port-version": 1 + }, { "git-tree": "84aaadc268ad278e102cdd7e9526e5c5929c1cd6", "version-date": "2022-06-26",