aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathis <mathisloge@gmail.com>2021-09-03 01:05:01 +0200
committerGitHub <noreply@github.com>2021-09-02 16:05:01 -0700
commit76b6e770a85de59f5dd5e6121dade7b054aa0e1d (patch)
tree6bd323fac226167c7830a09f08416305efe017ea
parent59df536514a126a136de701982af5d4ff9770416 (diff)
downloadvcpkg-76b6e770a85de59f5dd5e6121dade7b054aa0e1d.tar.gz
vcpkg-76b6e770a85de59f5dd5e6121dade7b054aa0e1d.zip
[nlohmann-json] update to 3.10.2 (#19690)
* update to 3.10.0 * version * install pkg-config * version * fix package naming * version * apply @NancyLi1013 suggestions * version * update to new minor * version * update to 3.10.2 * version
-rw-r--r--ports/nlohmann-json/CONTROL4
-rw-r--r--ports/nlohmann-json/portfile.cmake73
-rw-r--r--ports/nlohmann-json/vcpkg.json16
-rw-r--r--versions/baseline.json2
-rw-r--r--versions/n-/nlohmann-json.json5
5 files changed, 43 insertions, 57 deletions
diff --git a/ports/nlohmann-json/CONTROL b/ports/nlohmann-json/CONTROL
deleted file mode 100644
index f474ce906..000000000
--- a/ports/nlohmann-json/CONTROL
+++ /dev/null
@@ -1,4 +0,0 @@
-Source: nlohmann-json
-Version: 3.9.1
-Homepage: https://github.com/nlohmann/json
-Description: JSON for Modern C++
diff --git a/ports/nlohmann-json/portfile.cmake b/ports/nlohmann-json/portfile.cmake
index 448ca04b3..e6c34a526 100644
--- a/ports/nlohmann-json/portfile.cmake
+++ b/ports/nlohmann-json/portfile.cmake
@@ -1,68 +1,37 @@
-set(SOURCE_VERSION 3.9.1)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${PORT}-v${SOURCE_VERSION})
-
-file(MAKE_DIRECTORY ${SOURCE_PATH})
-
-function(download_src SUBPATH SHA512)
- vcpkg_download_distfile(FILE
- URLS "https://github.com/nlohmann/json/raw/v${SOURCE_VERSION}/${SUBPATH}"
- FILENAME "${PORT}-v${SOURCE_VERSION}/${SUBPATH}"
- SHA512 ${SHA512}
- )
- get_filename_component(SUBPATH_DIR "${SOURCE_PATH}/${SUBPATH}" DIRECTORY)
- file(COPY ${FILE} DESTINATION ${SUBPATH_DIR})
-endfunction()
-
-download_src(CMakeLists.txt d0ea797de0e3f98778cfcfa1249e9a363f0ae14f057f8f4338a2026d59eb929ddee9e45889c7f25d2c48633baa89ae9b4db4e5d99205f5ce7e1238fd82f3c113)
-download_src(LICENSE.MIT d5f7bb6a33469e19250a5e20db44e7ba09602ee85bc0afb03e4932402b08ca1c0dbbe6376b7e0a84eb11c782d70ae96f130755967204d35420c6ecbcafd301e5)
-download_src(nlohmann_json.natvis 9bce6758db0e54777394a4e718e60a281952b15f0c6dc6a6ad4a6d023c958b5515b2d39b7d4c66c03f0d3fdfdc1d6c23afb8b8419f1345c9d44d7b9a9ee2582b)
-download_src(cmake/config.cmake.in 7caab6166baa891f77f5b632ac4a920e548610ec41777b885ec51fe68d3665ffe91984dd2881caf22298b5392dfbd84b526fda252467bb66de9eb90e6e6ade5a)
-download_src(cmake/pkg-config.pc.in 34afe9f9ef9c77c9053f81bdc5605523ba5c20ca1bc2e0cb26afe1754362b25e88d809df47cdd63024c60f346240010a6aa343ff46d6a959a38612b3f1955664)
-download_src(cmake/nlohmann_jsonConfigVersion.cmake.in 3b3ca2cfe740ba9646e5976b1112ba37c229bf527959bfb47a5e6c2fcd5ba6b5626d3c2455c181fe41a72ec78500738e2950e4fe76a2e91ba2073ba01f5595a8)
-
-vcpkg_download_distfile(ARCHIVE
- URLS "https://github.com/nlohmann/json/releases/download/v${SOURCE_VERSION}/include.zip"
- FILENAME ${PORT}-v${SOURCE_VERSION}-include.zip
- SHA512 24984da33c5bf80eb276712d4bdc698c2724e72dc0f4c70e87527fb6b16e21f535f5a022d52c7ed2f59dcfe4a4e5b61a56101b61def09b31c827689f6c7ec673
-)
-vcpkg_extract_source_archive_ex(
- OUT_SOURCE_PATH OUT_PATH
- ARCHIVE ${ARCHIVE}
- REF ${SOURCE_VERSION}
- WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}
- NO_REMOVE_ONE_LEVEL
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO nlohmann/json
+ REF v3.10.2
+ SHA512 9a399dfc8aab19c9fc12470e8087895b1c05d48a9bcc731b483d8670c361cffb2adc3ccced822b7f17255e88387a441d619c4e1f1afeb702d1d035ad24fe22ed
+ HEAD_REF master
)
-file(COPY "${OUT_PATH}/include" DESTINATION ${SOURCE_PATH})
-vcpkg_configure_cmake(
+vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
- PREFER_NINJA
- OPTIONS
- -DJSON_BuildTests=0
+ OPTIONS
+ -DJSON_Install=ON
-DJSON_MultipleHeaders=ON
+ -DJSON_BuildTests=OFF
)
-
-vcpkg_install_cmake()
-
-vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/nlohmann_json TARGET_PATH share/nlohmann_json)
+vcpkg_cmake_install()
+vcpkg_cmake_config_fixup(PACKAGE_NAME "nlohmann_json" CONFIG_PATH "lib/cmake/nlohmann_json")
+vcpkg_fixup_pkgconfig()
vcpkg_replace_string(
- ${CURRENT_PACKAGES_DIR}/share/nlohmann_json/nlohmann_jsonTargets.cmake
+ "${CURRENT_PACKAGES_DIR}/share/nlohmann_json/nlohmann_jsonTargets.cmake"
"{_IMPORT_PREFIX}/nlohmann_json.natvis"
"{_IMPORT_PREFIX}/share/nlohmann_json/nlohmann_json.natvis"
)
-
-file(REMOVE_RECURSE
- ${CURRENT_PACKAGES_DIR}/debug
- ${CURRENT_PACKAGES_DIR}/lib
-)
-
if(EXISTS ${CURRENT_PACKAGES_DIR}/nlohmann_json.natvis)
file(RENAME
- ${CURRENT_PACKAGES_DIR}/nlohmann_json.natvis
- ${CURRENT_PACKAGES_DIR}/share/nlohmann_json/nlohmann_json.natvis
+ "${CURRENT_PACKAGES_DIR}/nlohmann_json.natvis"
+ "${CURRENT_PACKAGES_DIR}/share/nlohmann_json/nlohmann_json.natvis"
)
endif()
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
+file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/nlohmann_json.natvis")
+
# Handle copyright
-file(INSTALL ${SOURCE_PATH}/LICENSE.MIT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
+file(INSTALL "${SOURCE_PATH}/LICENSE.MIT" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
diff --git a/ports/nlohmann-json/vcpkg.json b/ports/nlohmann-json/vcpkg.json
new file mode 100644
index 000000000..10650043f
--- /dev/null
+++ b/ports/nlohmann-json/vcpkg.json
@@ -0,0 +1,16 @@
+{
+ "name": "nlohmann-json",
+ "version-semver": "3.10.2",
+ "description": "JSON for Modern C++",
+ "homepage": "https://github.com/nlohmann/json",
+ "dependencies": [
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}
diff --git a/versions/baseline.json b/versions/baseline.json
index 353e719b8..470e22f6d 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -4433,7 +4433,7 @@
"port-version": 0
},
"nlohmann-json": {
- "baseline": "3.9.1",
+ "baseline": "3.10.2",
"port-version": 0
},
"nlopt": {
diff --git a/versions/n-/nlohmann-json.json b/versions/n-/nlohmann-json.json
index 035d248b8..435786805 100644
--- a/versions/n-/nlohmann-json.json
+++ b/versions/n-/nlohmann-json.json
@@ -1,6 +1,11 @@
{
"versions": [
{
+ "git-tree": "8221e7cbc0745629018b122f192835bed642e844",
+ "version-semver": "3.10.2",
+ "port-version": 0
+ },
+ {
"git-tree": "3b9a6d5f3d94db5699d4448f717ff32e4ea5722b",
"version-string": "3.9.1",
"port-version": 0