From 5f6425efba0fe594ea3bde198a32e100bc477939 Mon Sep 17 00:00:00 2001 From: autoantwort <41973254+autoantwort@users.noreply.github.com> Date: Wed, 9 Feb 2022 20:55:07 +0100 Subject: [PATCH] [ignition-transport4,9] use system libuuid (#22998) --- ports/ignition-transport4/portfile.cmake | 5 ++++- ports/ignition-transport4/uuid-osx.patch | 26 ++++++++++++++++++++++++ ports/ignition-transport4/vcpkg.json | 4 ++-- ports/ignition-transport9/portfile.cmake | 5 ++++- ports/ignition-transport9/uuid-osx.patch | 26 ++++++++++++++++++++++++ ports/ignition-transport9/vcpkg.json | 4 ++-- versions/baseline.json | 4 ++-- versions/i-/ignition-transport4.json | 5 +++++ versions/i-/ignition-transport9.json | 5 +++++ 9 files changed, 76 insertions(+), 8 deletions(-) create mode 100644 ports/ignition-transport4/uuid-osx.patch create mode 100644 ports/ignition-transport9/uuid-osx.patch diff --git a/ports/ignition-transport4/portfile.cmake b/ports/ignition-transport4/portfile.cmake index cdab5c0a6b768d..09a868c14002d6 100644 --- a/ports/ignition-transport4/portfile.cmake +++ b/ports/ignition-transport4/portfile.cmake @@ -4,4 +4,7 @@ ignition_modular_library(NAME transport VERSION "4.0.0" SHA512 d4125044c21fdd6754f3b8b06f372df3f858080d5d33e97ed7a8ef8f6fb9857d562082aad41c89ea9146a33b1c3814305d33c5c8f8bcde66a16477b4a01655b4 # This can be removed when the pc file of libuuid on Windows is fixed - DISABLE_PKGCONFIG_INSTALL) + DISABLE_PKGCONFIG_INSTALL + PATCHES + uuid-osx.patch + ) diff --git a/ports/ignition-transport4/uuid-osx.patch b/ports/ignition-transport4/uuid-osx.patch new file mode 100644 index 00000000000000..c18d8caeaa3ce2 --- /dev/null +++ b/ports/ignition-transport4/uuid-osx.patch @@ -0,0 +1,26 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5453cd0..10c2ad4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -58,6 +58,8 @@ ign_find_package(CPPZMQ REQUIRED PRIVATE + # Find uuid + if (MSVC) + message (STATUS "UUID: Using Windows RPC UuidCreate function\n") ++elseif (APPLE) ++ message (STATUS "Use system uuid header") + else() + ign_find_package(UUID REQUIRED) + endif() +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 6683e64..33669ab 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -18,7 +18,7 @@ target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME} + ) + + # Windows system library provides UUID +-if (NOT MSVC) ++if (NOT MSVC AND NOT APPLE) + target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME} + PUBLIC + UUID::UUID diff --git a/ports/ignition-transport4/vcpkg.json b/ports/ignition-transport4/vcpkg.json index 02dc957ac28829..b7e6b193e35925 100644 --- a/ports/ignition-transport4/vcpkg.json +++ b/ports/ignition-transport4/vcpkg.json @@ -1,7 +1,7 @@ { "name": "ignition-transport4", - "version-string": "4.0.0", - "port-version": 4, + "version": "4.0.0", + "port-version": 5, "description": "Transport middleware for robotics", "dependencies": [ "cppzmq", diff --git a/ports/ignition-transport9/portfile.cmake b/ports/ignition-transport9/portfile.cmake index cd224b3f72cffc..fcd8e6b46f1d26 100644 --- a/ports/ignition-transport9/portfile.cmake +++ b/ports/ignition-transport9/portfile.cmake @@ -4,4 +4,7 @@ ignition_modular_library(NAME transport VERSION "9.0.0" SHA512 c3edb7a8a063b4aa5826838ae08c8ec2b3d14563492022df632a719409c95272f4f6a43d91f0c317e44b85921b5aedc1685670b81a7baa949f01af3b3534d76e # This can be removed when the pc file of sqlite3 is available ( https://github.com/microsoft/vcpkg/issues/14327 ) - DISABLE_PKGCONFIG_INSTALL) + DISABLE_PKGCONFIG_INSTALL + PATCHES + uuid-osx.patch + ) diff --git a/ports/ignition-transport9/uuid-osx.patch b/ports/ignition-transport9/uuid-osx.patch new file mode 100644 index 00000000000000..350a0b43daf064 --- /dev/null +++ b/ports/ignition-transport9/uuid-osx.patch @@ -0,0 +1,26 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 084b6da..6fd212d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -70,6 +70,8 @@ ign_find_package(CPPZMQ REQUIRED PRIVATE + # Find uuid + if (MSVC) + message (STATUS "UUID: Using Windows RPC UuidCreate function\n") ++elseif (APPLE) ++ message (STATUS "Use system uuid header") + else() + ign_find_package(UUID REQUIRED) + endif() +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 9777240..9e860a9 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -31,7 +31,7 @@ target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME} + ) + + # Windows system library provides UUID +-if (NOT MSVC) ++if (NOT MSVC AND NOT APPLE) + target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME} + PUBLIC + UUID::UUID diff --git a/ports/ignition-transport9/vcpkg.json b/ports/ignition-transport9/vcpkg.json index b428eec8ca909e..cfbbf4d87902ea 100644 --- a/ports/ignition-transport9/vcpkg.json +++ b/ports/ignition-transport9/vcpkg.json @@ -1,7 +1,7 @@ { "name": "ignition-transport9", - "version-string": "9.0.0", - "port-version": 2, + "version": "9.0.0", + "port-version": 3, "description": "Transport middleware for robotics", "dependencies": [ "cppzmq", diff --git a/versions/baseline.json b/versions/baseline.json index 8790127cbe42d1..cb31107df8b4ac 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2830,7 +2830,7 @@ }, "ignition-transport4": { "baseline": "4.0.0", - "port-version": 4 + "port-version": 5 }, "ignition-transport8": { "baseline": "8.1.0", @@ -2838,7 +2838,7 @@ }, "ignition-transport9": { "baseline": "9.0.0", - "port-version": 2 + "port-version": 3 }, "igraph": { "baseline": "0.9.6", diff --git a/versions/i-/ignition-transport4.json b/versions/i-/ignition-transport4.json index cc2527f21d00fc..916bf8f0664631 100644 --- a/versions/i-/ignition-transport4.json +++ b/versions/i-/ignition-transport4.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "17d4c446fb99c9510ee2324a03529b6fb1119a41", + "version": "4.0.0", + "port-version": 5 + }, { "git-tree": "24af2dccedbb77ff7f1d514871f291776fd7a86f", "version-string": "4.0.0", diff --git a/versions/i-/ignition-transport9.json b/versions/i-/ignition-transport9.json index 4885b6f75712ec..b121adedc90263 100644 --- a/versions/i-/ignition-transport9.json +++ b/versions/i-/ignition-transport9.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "abbc50866e79bb1566460eb88135358ed740268d", + "version": "9.0.0", + "port-version": 3 + }, { "git-tree": "0829d67a63010fca7f587ca7370db716570aa969", "version-string": "9.0.0",