diff --git a/ports/civetweb/disable_warnings.patch b/ports/civetweb/disable_warnings.patch new file mode 100644 index 0000000000..8b10a435d0 --- /dev/null +++ b/ports/civetweb/disable_warnings.patch @@ -0,0 +1,37 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1eb391f2c..2665fa73e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -360,6 +360,7 @@ if (CIVETWEB_ENABLE_CXX) + else() + add_cxx_compiler_flag(-std=${CIVETWEB_CXX_STANDARD}) + endif() ++ if(0) + add_cxx_compiler_flag(-Wall) + add_cxx_compiler_flag(-Wextra) + add_cxx_compiler_flag(-Wshadow) +@@ -377,6 +378,7 @@ if (CIVETWEB_ENABLE_CXX) + add_cxx_compiler_flag(-Werror) + add_cxx_compiler_flag(/WX) + endif() ++ endif() + add_cxx_compiler_flag(-pedantic-errors) + add_cxx_compiler_flag(-fvisibility=hidden) + add_cxx_compiler_flag(-fstack-protector-strong RELEASE) +@@ -403,6 +405,7 @@ endif() + + if (NOT ZEPHYR) + #Warnings: enable everything ++ if(0) + add_c_compiler_flag(-Wall) + add_c_compiler_flag(-Wextra) + add_c_compiler_flag(-Wshadow) +@@ -422,7 +425,7 @@ if (NOT ZEPHYR) + add_c_compiler_flag(-Wno-format-nonliteral) # printf(myFormatStringVar, ...) + add_c_compiler_flag(-Wno-cast-qual) # const cast + add_c_compiler_flag(/Wd4820) # padding +- ++ endif() + add_c_compiler_flag(-pedantic-errors) + add_c_compiler_flag(-fvisibility=hidden) + add_c_compiler_flag(-fstack-protector-strong RELEASE) diff --git a/ports/civetweb/portfile.cmake b/ports/civetweb/portfile.cmake index 1797bf0835..e568049d0d 100644 --- a/ports/civetweb/portfile.cmake +++ b/ports/civetweb/portfile.cmake @@ -6,6 +6,8 @@ vcpkg_from_github( REF eefb26f82b233268fc98577d265352720d477ba4 # v1.15 SHA512 5ce962e31b3c07b7110cbc645458dba9c0e26e693fbe3b4a7ffe8a28563827049a22fc5596a911fbcea4d88a9adbef3f82000ff61027ff4387f40e4a4045c26d HEAD_REF master + PATCHES + disable_warnings.patch # cl will simply ignore the other invalid options. ) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS @@ -13,9 +15,8 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS ssl CIVETWEB_ENABLE_SSL ) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - # PREFER_NINJA - See https://github.com/civetweb/civetweb/issues/1024 +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS -DCIVETWEB_BUILD_TESTING=OFF -DCIVETWEB_ENABLE_DEBUG_TOOLS=OFF @@ -25,17 +26,18 @@ vcpkg_configure_cmake( -DCIVETWEB_ENABLE_SERVER_EXECUTABLE=OFF -DCIVETWEB_ENABLE_SSL_DYNAMIC_LOADING=OFF -DCIVETWEB_ENABLE_WEBSOCKETS=ON + -DCIVETWEB_ALLOW_WARNINGS=ON ${FEATURE_OPTIONS} ) -vcpkg_install_cmake() +vcpkg_cmake_install() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/civetweb) +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/civetweb) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) vcpkg_copy_pdbs() diff --git a/ports/civetweb/vcpkg.json b/ports/civetweb/vcpkg.json index e804454c36..98ce11d223 100644 --- a/ports/civetweb/vcpkg.json +++ b/ports/civetweb/vcpkg.json @@ -1,10 +1,20 @@ { "name": "civetweb", "version": "1.15", - "port-version": 1, + "port-version": 2, "description": "Easy to use, powerful, C/C++ embeddable web server.", "homepage": "https://github.com/civetweb/civetweb", "supports": "!uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], "features": { "ssl": { "description": "Enable SSL support", diff --git a/versions/baseline.json b/versions/baseline.json index bc523e02f0..622bd184cc 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1402,7 +1402,7 @@ }, "civetweb": { "baseline": "1.15", - "port-version": 1 + "port-version": 2 }, "cjson": { "baseline": "1.7.15", diff --git a/versions/c-/civetweb.json b/versions/c-/civetweb.json index d3c1248555..07285a0c43 100644 --- a/versions/c-/civetweb.json +++ b/versions/c-/civetweb.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "f5c4ed510288187d465737a301891b1101d6c373", + "version": "1.15", + "port-version": 2 + }, { "git-tree": "0e09fcaf964728e71394be1fc43d018fcde2e355", "version": "1.15",