diff options
Diffstat (limited to 'vcpkg/ports/mfl')
| -rw-r--r-- | vcpkg/ports/mfl/disable-tests.patch | 22 | ||||
| -rw-r--r-- | vcpkg/ports/mfl/fix-clang-detection.patch | 13 | ||||
| -rw-r--r-- | vcpkg/ports/mfl/portfile.cmake | 27 | ||||
| -rw-r--r-- | vcpkg/ports/mfl/vcpkg.json | 24 |
4 files changed, 86 insertions, 0 deletions
diff --git a/vcpkg/ports/mfl/disable-tests.patch b/vcpkg/ports/mfl/disable-tests.patch new file mode 100644 index 0000000..276e183 --- /dev/null +++ b/vcpkg/ports/mfl/disable-tests.patch @@ -0,0 +1,22 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c411d11..9336e1d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -18,17 +18,6 @@ include(cmake/StaticAnalyzers.cmake) + + + add_subdirectory(src) +-add_subdirectory(tests/fonts_for_tests) +-add_subdirectory(tests/unit_tests) +- +-# Building approval tests causes ICE on msvc +-if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") +- add_subdirectory(tests/approval_tests) +-endif() +- +-if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") +- add_subdirectory(tests/fuzz_tests) +-endif() + + include(GNUInstallDirs) + diff --git a/vcpkg/ports/mfl/fix-clang-detection.patch b/vcpkg/ports/mfl/fix-clang-detection.patch new file mode 100644 index 0000000..c970bb0 --- /dev/null +++ b/vcpkg/ports/mfl/fix-clang-detection.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/CompilerWarnings.cmake b/cmake/CompilerWarnings.cmake +index 34f1cc8..bda884d 100644 +--- a/cmake/CompilerWarnings.cmake ++++ b/cmake/CompilerWarnings.cmake +@@ -79,7 +79,7 @@ function(set_project_warnings project_name) + + if(MSVC) + set(PROJECT_WARNINGS ${MSVC_WARNINGS}) +- elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") ++ elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang") + set(PROJECT_WARNINGS ${CLANG_WARNINGS}) + else() + set(PROJECT_WARNINGS ${GCC_WARNINGS}) diff --git a/vcpkg/ports/mfl/portfile.cmake b/vcpkg/ports/mfl/portfile.cmake new file mode 100644 index 0000000..d23f391 --- /dev/null +++ b/vcpkg/ports/mfl/portfile.cmake @@ -0,0 +1,27 @@ +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +message(WARNING "${PORT} is a C++20 library and requires a corresponding compiler. GCC 10, Clang 10 and MSVC 2019 16.8 are known to work.") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cpp-niel/mfl + REF v0.0.1 + SHA512 a609b4ff23a01e9f9d9bf60bfa6e0b2346b054cf0c27e74e6da574dcfd2a6ead30dcb8464cf03cae2bb9995f15f01ffda5f862c0ec2744a9ad38b856ff27f073 + HEAD_REF master + PATCHES + disable-tests.patch + fix-clang-detection.patch +) + +vcpkg_cmake_configure(SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DWARNINGS_AS_ERRORS=FALSE +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/mfl) + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/vcpkg/ports/mfl/vcpkg.json b/vcpkg/ports/mfl/vcpkg.json new file mode 100644 index 0000000..26aeaec --- /dev/null +++ b/vcpkg/ports/mfl/vcpkg.json @@ -0,0 +1,24 @@ +{ + "name": "mfl", + "version": "0.0.1", + "port-version": 3, + "description": "Computes the layout information for mathematical formulas provided in TeX-like syntax.", + "homepage": "https://github.com/cpp-niel/mfl", + "license": "MIT", + "dependencies": [ + "cairo", + "doctest", + "fmt", + "freetype", + "harfbuzz", + "range-v3", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} |