[yomm2] new port (#17886)

This commit is contained in:
Fabien Péan 2021-05-26 19:33:43 +02:00 committed by GitHub
parent ce6253b6f4
commit 5c847acb56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 92 additions and 0 deletions

View File

@ -0,0 +1,26 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b7b88b1..02297e7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,7 +11,7 @@ project(YOMM2 VERSION 1.0)
# Find Boost dependency
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
include(find_or_download_package)
-find_or_download_package(Boost INSTALL_WITH_YOMM)
+find_package(Boost REQUIRED)
message(STATUS "Using Boost libraries from ${Boost_INCLUDE_DIRS}")
if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
diff --git a/cmake/Config.cmake.in b/cmake/Config.cmake.in
index 7272504..9f8b2ae 100644
--- a/cmake/Config.cmake.in
+++ b/cmake/Config.cmake.in
@@ -1,7 +1,7 @@
include(CMakeFindDependencyMacro)
# Tell library users about the Boost dependency
-find_dependency(Boost 1.53 HINTS ${CMAKE_CURRENT_LIST_DIR}/..)
+find_dependency(Boost 1.53)
# Add the targets file
include("${CMAKE_CURRENT_LIST_DIR}/YOMM2Targets.cmake")

View File

@ -0,0 +1,22 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2f16eb6..a46c8b7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,14 +15,15 @@ find_package(Boost)
message(STATUS "Using Boost libraries from ${Boost_INCLUDE_DIRS}")
if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -save-temps")
endif()
endif()
if(MSVC)
- set(CMAKE_CXX_FLAGS "/std:c++17 -D_SCL_SECURE_NO_WARNINGS /EHsc")
+ set(CMAKE_CXX_FLAGS "/std:c++17 -D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS /EHsc")
+else()
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
endif()
add_subdirectory(src)

View File

@ -0,0 +1,18 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO jll63/yomm2
REF v1.1.2
SHA512 f45c3f3d267dedaa3c76f9dab1a75be01941e3715e71b30b878be49157a5ba97f2188c9e635272be3ca396019b161bb21a30199ca504c94a18673685f5dbf06d
HEAD_REF master
PATCHES "fix_find_boost.patch" "fix_uwp_osx.patch"
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS -DYOMM2_ENABLE_EXAMPLES=OFF
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/YOMM2)
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

13
ports/yomm2/vcpkg.json Normal file
View File

@ -0,0 +1,13 @@
{
"name": "yomm2",
"version-string": "1.1.2",
"description": "YOMM2 is an implementation of open multi-methods.",
"homepage": "https://github.com/jll63/yomm2",
"dependencies": [
"boost-dynamic-bitset",
"boost-integer",
"boost-move",
"boost-preprocessor",
"boost-type-traits"
]
}

View File

@ -6640,6 +6640,10 @@
"baseline": "1.18.0-1",
"port-version": 0
},
"yomm2": {
"baseline": "1.1.2",
"port-version": 0
},
"yyjson": {
"baseline": "2021-04-12",
"port-version": 0

9
versions/y-/yomm2.json Normal file
View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "5d025f5bb550c4a43b070841b8a48936d0644017",
"version-string": "1.1.2",
"port-version": 0
}
]
}