From e29f8ab7b124d324126a7e9326d22848c8c77c0f Mon Sep 17 00:00:00 2001 From: Thomas1664 <46387399+Thomas1664@users.noreply.github.com> Date: Fri, 25 Mar 2022 20:18:21 +0100 Subject: [PATCH] [fuzzylite] Fix Linux build (#23658) * [fuzzylite] fix unix build * update version scheme * version * unsupported on UWP * remove from CI baseline * version * fix typo * version * windows only * version * Add fuzzylite:x64-osx * Fix typo * cr * version * Fix string replace on static * version * Don't rename artifacts * version --- ports/fuzzylite/portfile.cmake | 36 ++++++++++++++-------------------- ports/fuzzylite/vcpkg.json | 14 ++++++++++--- scripts/ci.baseline.txt | 3 --- versions/baseline.json | 2 +- versions/f-/fuzzylite.json | 5 +++++ 5 files changed, 32 insertions(+), 28 deletions(-) diff --git a/ports/fuzzylite/portfile.cmake b/ports/fuzzylite/portfile.cmake index cd79ecc7cd..79ec38f106 100644 --- a/ports/fuzzylite/portfile.cmake +++ b/ports/fuzzylite/portfile.cmake @@ -6,17 +6,11 @@ vcpkg_from_github( HEAD_REF master ) -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - set(FL_BUILD_SHARED ON) - set(FL_BUILD_STATIC OFF) -else() - set(FL_BUILD_SHARED OFF) - set(FL_BUILD_STATIC ON) -endif() +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" FL_BUILD_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" FL_BUILD_SHARED) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH}/fuzzylite - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}/fuzzylite" OPTIONS -DFL_BUILD_SHARED=${FL_BUILD_SHARED} -DFL_BUILD_STATIC=${FL_BUILD_STATIC} @@ -24,23 +18,23 @@ vcpkg_configure_cmake( -DFL_BUILD_TESTS=OFF ) -vcpkg_install_cmake() +vcpkg_cmake_install() vcpkg_copy_pdbs() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/fuzzylite-static.lib ${CURRENT_PACKAGES_DIR}/lib/fuzzylite.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/fuzzylite-static-debug.lib ${CURRENT_PACKAGES_DIR}/debug/lib/fuzzylite-debug.lib) -endif() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/pkgconfig") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/fl/fuzzylite.h + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/fl/fuzzylite.h" "#elif defined(FL_IMPORT_LIBRARY)" "#elif 1" ) +elseif(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/fl/fuzzylite.h" + "#elif defined(FL_IMPORT_LIBRARY)" + "#elif 0" + ) endif() -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/fuzzylite/vcpkg.json b/ports/fuzzylite/vcpkg.json index 2bddccc38c..98bb4ba80c 100644 --- a/ports/fuzzylite/vcpkg.json +++ b/ports/fuzzylite/vcpkg.json @@ -1,7 +1,15 @@ { "name": "fuzzylite", - "version-string": "6.0", - "port-version": 4, + "version": "6.0", + "port-version": 5, "description": "A fuzzy logic control library in C++", - "homepage": "https://github.com/fuzzylite/fuzzylite" + "homepage": "https://github.com/fuzzylite/fuzzylite", + "license": "GPL-3.0", + "supports": "!uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + } + ] } diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 587b21418c..53df3b66d3 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -310,10 +310,7 @@ freetype-gl:x64-uwp=fail ftgl:x64-uwp=fail # https://github.com/GoogleCloudPlatform/functions-framework-cpp/issues/207 functions-framework-cpp:x64-uwp=fail -fuzzylite:arm-uwp=fail -fuzzylite:x64-linux=fail fuzzylite:x64-osx=fail -fuzzylite:x64-uwp=fail # gsoap does not offer stable public source downloads gsoap:x64-windows = skip diff --git a/versions/baseline.json b/versions/baseline.json index d04ca64dca..97e103671f 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2358,7 +2358,7 @@ }, "fuzzylite": { "baseline": "6.0", - "port-version": 4 + "port-version": 5 }, "fxdiv": { "baseline": "2021-02-21", diff --git a/versions/f-/fuzzylite.json b/versions/f-/fuzzylite.json index 735d20e807..8741a481ea 100644 --- a/versions/f-/fuzzylite.json +++ b/versions/f-/fuzzylite.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "27926f33e6bab79f1eefa5c7999645f855c5fda3", + "version": "6.0", + "port-version": 5 + }, { "git-tree": "df47396ca528792e73f67bb8f297a064b46ef21b", "version-string": "6.0",