[matchit] Add first draft port (#26499)

* Add first draft port for matchit

* Adjust formatting

* Add version for matchit

* Update matchit to v1.0.1

* Run vcpkg x-add-version for v1.0.1

* Fix typo in command for copying license file

* Remove installation of redudant files

* Add usage instructions

* Update license info in vcpkg.json

* FIX: revert license change info to libzippp

Previous commit incorrectly change the license for the port libzippp. This commit fixes that.

* Run vcpkg x-add-version

* Update ports/matchit/portfile.cmake

Change HEAD_REF to main

Co-authored-by: Bowen Fu <BowenFu@users.noreply.github.com>

* Run vcpkg xdg-version

* Add command for installing usage file

* Run vcpkg x-add-version

* Update matchit.json

* Use quoted variables in portfile.cmake

Co-authored-by: Cheney Wang <38240633+Cheney-W@users.noreply.github.com>

* Run x-add-version

Co-authored-by: Bowen Fu <BowenFu@users.noreply.github.com>
Co-authored-by: Cheney Wang <38240633+Cheney-W@users.noreply.github.com>
This commit is contained in:
daljit97 2022-08-26 20:30:53 +01:00 committed by GitHub
parent de7091ee24
commit 024a041b66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 57 additions and 0 deletions

View File

@ -0,0 +1,23 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO BowenFu/matchit.cpp
REF v1.0.1
SHA512 60edc6a392f5629391fa9e3ff09b7b98a0a782919a066ad2999eabb58e60f38bd50e080037b1276c5bca986f81ca0dfff2914816d46458b7b4e1c947a6134169
HEAD_REF main
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DBUILD_TESTING=OFF
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/matchit")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib")
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

4
ports/matchit/usage Normal file
View File

@ -0,0 +1,4 @@
The package matchit provides CMake targets:
find_package(matchit CONFIG REQUIRED)
target_link_libraries(main PRIVATE matchit::matchit)

17
ports/matchit/vcpkg.json Normal file
View File

@ -0,0 +1,17 @@
{
"name": "matchit",
"version": "1.0.1",
"description": "matchit is a pattern matching library for C++17 with macro-free APIs",
"homepage": "https://github.com/BowenFu/matchit.cpp",
"license": "Apache-2.0",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}

View File

@ -4520,6 +4520,10 @@
"baseline": "2022-03-02",
"port-version": 0
},
"matchit": {
"baseline": "1.0.1",
"port-version": 0
},
"materialx": {
"baseline": "1.38.4",
"port-version": 0

9
versions/m-/matchit.json Normal file
View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "1076ccb795a41c9ac08c17b06a295043695ed6ab",
"version": "1.0.1",
"port-version": 0
}
]
}