diff --git a/ports/gazebo/0001-Fix-deps.patch b/ports/gazebo/0001-Fix-deps.patch index a933d6884f9b04..aa4aca02428c5d 100644 --- a/ports/gazebo/0001-Fix-deps.patch +++ b/ports/gazebo/0001-Fix-deps.patch @@ -1,8 +1,81 @@ -diff --git a/cmake/SearchForStuff.cmake b/cmake/SearchForStuff.cmake -index 4085b5aaeb..f89ac88333 100644 +diff --git a/cmake/FindFreeimage.cmake b/cmake/FindFreeimage.cmake +index a989ec7..7cc6f44 100644 +--- a/cmake/FindFreeimage.cmake ++++ b/cmake/FindFreeimage.cmake +@@ -3,7 +3,7 @@ include (${gazebo_cmake_dir}/GazeboUtils.cmake) + + ######################################## + # Find packages +-if (PKG_CONFIG_FOUND) ++if (false) + pkg_check_modules(freeimage freeimage>=${MIN_FREEIMAGE_VERSION}) + if (NOT freeimage_FOUND) + message (STATUS " freeimage.pc not found, trying freeimage_include_dir and freeimage_library_dir flags.") +@@ -11,6 +11,7 @@ if (PKG_CONFIG_FOUND) + endif (PKG_CONFIG_FOUND) + + if (NOT freeimage_FOUND) ++ if (false) + find_path(freeimage_INCLUDE_DIRS FreeImage.h) + if (NOT freeimage_INCLUDE_DIRS) + message (STATUS " Looking for FreeImage.h - not found") +@@ -32,7 +33,11 @@ if (NOT freeimage_FOUND) + message (STATUS " Looking for FreeImage.h - found") + endif (NOT FREEIMAGE_RUNS) + endif (NOT freeimage_INCLUDE_DIRS) ++ endif() + ++ find_package(freeimage CONFIG REQUIRED) ++ set(freeimage_LIBRARIES freeimage::FreeImage) ++ if (0) + if (WIN32) + if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") + find_library(freeimage_LIBRARIES FreeImaged) +@@ -49,4 +54,5 @@ if (NOT freeimage_FOUND) + message (STATUS " Looking for libfreeimage - found") + include_directories(${freeimage_INCLUDE_DIRS}) + endif (NOT freeimage_LIBRARIES) ++ endif() + endif (NOT freeimage_FOUND) +diff --git a/cmake/SearchForStuff.cmake b/cmake/SearchForStuff.cmake +index 9777a46..be03eb8 100644 --- a/cmake/SearchForStuff.cmake +++ b/cmake/SearchForStuff.cmake -@@ -179,7 +179,7 @@ if (PKG_CONFIG_FOUND) +@@ -31,7 +31,10 @@ endif() + + ######################################## + # The Google Protobuf library for message generation + serialization +-find_package(Protobuf REQUIRED) ++find_package(protobuf CONFIG REQUIRED) ++set(GZ_PROTOBUF_LIBRARY protobuf::libprotobuf protobuf::libprotobuf-lite) ++set(GZ_PROTOBUF_PROTOC_LIBRARY protobuf::libprotoc) ++if (0) + if (NOT PROTOBUF_FOUND) + BUILD_ERROR ("Missing: Google Protobuf (libprotobuf-dev)") + endif() +@@ -49,6 +52,7 @@ else() + set (GZ_PROTOBUF_LIBRARY ${PROTOBUF_LIBRARY}) + set (GZ_PROTOBUF_PROTOC_LIBRARY ${PROTOBUF_PROTOC_LIBRARY}) + endif() ++endif() + + ######################################## + include (FindOpenGL) +@@ -144,7 +148,12 @@ if (PKG_CONFIG_FOUND) + # Find Simbody + set(SimTK_INSTALL_DIR ${SimTK_INSTALL_PREFIX}) + #list(APPEND CMAKE_MODULE_PATH ${SimTK_INSTALL_PREFIX}/share/cmake) +- find_package(Simbody) ++ find_package(Simbody CONFIG REQUIRED) ++ if (TARGET SimTKmath_static) ++ set(Simbody_LIBRARIES SimTKmath_static SimTKcommon_static SimTKsimbody_static) ++ else() ++ set(Simbody_LIBRARIES SimTKmath SimTKcommon SimTKsimbody) ++ endif() + if (Simbody_FOUND) + message (STATUS "Looking for Simbody - found") + set (HAVE_SIMBODY TRUE) +@@ -179,7 +188,7 @@ if (PKG_CONFIG_FOUND) # (needed, at least, for MacOS) # Use system installation on UNIX and Apple, and internal copy on Windows @@ -11,7 +84,7 @@ index 4085b5aaeb..f89ac88333 100644 message (STATUS "Using system tinyxml.") set (USE_EXTERNAL_TINYXML True) elseif(WIN32) -@@ -225,7 +225,7 @@ if (PKG_CONFIG_FOUND) +@@ -225,7 +234,7 @@ if (PKG_CONFIG_FOUND) # (needed, at least, for MacOS) # Use system installation on UNIX and Apple, and internal copy on Windows @@ -20,7 +93,26 @@ index 4085b5aaeb..f89ac88333 100644 message (STATUS "Using system tinyxml2.") set (USE_EXTERNAL_TINYXML2 True) elseif(WIN32) -@@ -513,7 +513,7 @@ if (PKG_CONFIG_FOUND) +@@ -329,6 +338,7 @@ if (PKG_CONFIG_FOUND) + ################################################# + # Find OGRE + ++ if (false) + pkg_check_modules(OGRE-RTShaderSystem + OGRE-RTShaderSystem>=${MIN_OGRE_VERSION}) + +@@ -375,8 +385,8 @@ if (PKG_CONFIG_FOUND) + set (OGRE_PLUGINDIR ${_pkgconfig_invoke_result}) + endif() + endif() +- +- if (NOT OGRE_FOUND) ++ endif() ++ if (true) + # Workaround for CMake bug https://gitlab.kitware.com/cmake/cmake/issues/17135, + # that prevents to successfully run a find_package() call if before there + # was a failed call to pkg_check_modules( ) +@@ -513,7 +523,7 @@ if (PKG_CONFIG_FOUND) endif () if (libavutil_FOUND AND libavformat_FOUND AND libavcodec_FOUND AND @@ -29,7 +121,7 @@ index 4085b5aaeb..f89ac88333 100644 set (HAVE_FFMPEG TRUE) else () set (HAVE_FFMPEG FALSE) -@@ -538,7 +538,7 @@ if (PKG_CONFIG_FOUND) +@@ -538,7 +548,7 @@ if (PKG_CONFIG_FOUND) ######################################## # Find GNU Triangulation Surface Library pkg_check_modules(gts gts) @@ -38,7 +130,7 @@ index 4085b5aaeb..f89ac88333 100644 message (STATUS "Looking for GTS - found") set (HAVE_GTS TRUE) else () -@@ -551,13 +551,14 @@ if (PKG_CONFIG_FOUND) +@@ -551,13 +561,14 @@ if (PKG_CONFIG_FOUND) # First and preferred option is to look for bullet standard pkgconfig, # so check it first. if it is not present, check for the OSRF # custom bullet2.82.pc file @@ -54,7 +146,7 @@ index 4085b5aaeb..f89ac88333 100644 add_definitions( -DLIBBULLET_VERSION=${BULLET_VERSION} ) else() set (HAVE_BULLET FALSE) -@@ -572,7 +573,7 @@ if (PKG_CONFIG_FOUND) +@@ -572,7 +583,7 @@ if (PKG_CONFIG_FOUND) ######################################## # Find libusb pkg_check_modules(libusb-1.0 libusb-1.0) @@ -63,7 +155,7 @@ index 4085b5aaeb..f89ac88333 100644 BUILD_WARNING ("libusb-1.0 not found. USB peripherals support will be disabled.") set (HAVE_USB OFF CACHE BOOL "HAVE USB" FORCE) else() -@@ -648,7 +649,7 @@ endif () +@@ -648,7 +659,7 @@ endif () ######################################## # Find gdal include (FindGDAL) @@ -72,7 +164,7 @@ index 4085b5aaeb..f89ac88333 100644 message (STATUS "Looking for libgdal - not found") BUILD_WARNING ("GDAL not found, Digital elevation terrains support will be disabled.") set (HAVE_GDAL OFF CACHE BOOL "HAVE GDAL" FORCE) -@@ -718,7 +719,7 @@ endif() +@@ -732,7 +743,7 @@ endif() ######################################## # Find graphviz include (${gazebo_cmake_dir}/FindGraphviz.cmake) @@ -82,7 +174,7 @@ index 4085b5aaeb..f89ac88333 100644 BUILD_WARNING ("Graphviz not found, Model editor's schematic view will be disabled.") set (HAVE_GRAPHVIZ OFF CACHE BOOL "HAVE GRAPHVIZ" FORCE) diff --git a/cmake/gazebo-config.cmake.in b/cmake/gazebo-config.cmake.in -index b57a90dd76..63ce97095e 100644 +index b57a90d..63ce970 100644 --- a/cmake/gazebo-config.cmake.in +++ b/cmake/gazebo-config.cmake.in @@ -99,12 +99,13 @@ list(APPEND @PKG_NAME@_CFLAGS -I${GAZEBO_INSTALL_INCLUDE_DIR}/gazebo-@GAZEBO_MAJ diff --git a/ports/gazebo/add-features.patch b/ports/gazebo/add-features.patch new file mode 100644 index 00000000000000..cf9581d3127024 --- /dev/null +++ b/ports/gazebo/add-features.patch @@ -0,0 +1,39 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3e0ae3d..eeb1ba7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -384,16 +384,18 @@ else (build_errors) + set(TEST_TYPE "UNIT") + add_subdirectory(gazebo) + add_subdirectory(media) ++ if (BUILD_TOOLS) + add_subdirectory(tools) ++ endif() ++ if (BUILD_PLUGINS) + add_subdirectory(plugins) ++ endif() + add_subdirectory(interfaces) + add_subdirectory(worlds) + add_subdirectory(models) + + if (BUILD_TESTING) + add_subdirectory(test) +- else() +- add_subdirectory(test EXCLUDE_FROM_ALL) + endif() + + endif (BUILD_GAZEBO) +diff --git a/gazebo/CMakeLists.txt b/gazebo/CMakeLists.txt +index 9ad9d02..5c45753 100644 +--- a/gazebo/CMakeLists.txt ++++ b/gazebo/CMakeLists.txt +@@ -41,7 +41,9 @@ add_subdirectory(gui) + add_subdirectory(physics) + add_subdirectory(sensors) + add_subdirectory(util) ++if (BUILD_TESTING) + add_subdirectory(test) ++endif() + + add_dependencies(gazebo_physics gazebo_msgs) + add_dependencies(gazebo_gui gazebo_msgs) diff --git a/ports/gazebo/fix-build-type.patch b/ports/gazebo/fix-build-type.patch new file mode 100644 index 00000000000000..3ccf63c650ef5c --- /dev/null +++ b/ports/gazebo/fix-build-type.patch @@ -0,0 +1,18 @@ +diff --git a/cmake/GazeboUtils.cmake b/cmake/GazeboUtils.cmake +index f1710e9..ace50f9 100644 +--- a/cmake/GazeboUtils.cmake ++++ b/cmake/GazeboUtils.cmake +@@ -146,13 +146,11 @@ endmacro () + ################################################# + macro (gz_setup_unix) + # Using dynamic linking in UNIX by default +- set(BUILD_SHARED_LIBS TRUE) + endmacro() + + ################################################# + macro (gz_setup_windows) + # Using dynamic linking in Windows by default +- set(BUILD_SHARED_LIBS TRUE) + add_definitions(-DWIN32_LEAN_AND_MEAN) + + # Need for M_PI constant diff --git a/ports/gazebo/fix-opengl-def.patch b/ports/gazebo/fix-opengl-def.patch new file mode 100644 index 00000000000000..84db09c90c5274 --- /dev/null +++ b/ports/gazebo/fix-opengl-def.patch @@ -0,0 +1,13 @@ +diff --git a/gazebo/rendering/RenderEngine.cc b/gazebo/rendering/RenderEngine.cc +index 87d78ea95d..bd90493266 100644 +--- a/gazebo/rendering/RenderEngine.cc ++++ b/gazebo/rendering/RenderEngine.cc +@@ -22,6 +22,8 @@ + + // Not Apple or Windows + #if not defined(__APPLE__) && not defined(_WIN32) ++#define GL_GLEXT_LEGACY ++#define GLX_GLXEXT_LEGACY + # include + # include + # include diff --git a/ports/gazebo/portfile.cmake b/ports/gazebo/portfile.cmake index 40de3b16bff7d3..dea45546ecb661 100644 --- a/ports/gazebo/portfile.cmake +++ b/ports/gazebo/portfile.cmake @@ -1,18 +1,13 @@ -vcpkg_download_distfile(gazebo3211 - URLS "https://patch-diff.githubusercontent.com/raw/osrf/gazebo/pull/3211.diff" - FILENAME "gazebo3211.diff" - SHA512 761e254866d4705acc0b81479285f979c436b3b611739a207a575031d8a8daba48de4fc0c8de5edb9a9f89725586c5caeef9e6e1e3d63a2d961ca09df974f7de -) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO osrf/gazebo - REF 382dcc3f36095a8d79b5bc9c8b8ad346e867c51d - SHA512 57638cd0b23b5f2bfd32fdc159d6cd77ca34e3bd695c225591979aef4b7271eac93d3706fa1ffa2340f90013267a4171bebe1e4c142f19ad2bf67963dfed627e - HEAD_REF gazebo11 + REF gazebo11_11.11.0 + SHA512 0f625f71ce9c6a875ac4d694cc767735243ed20922282fb1f0ef614ddeadf35e8e08e1d8484f9dbf3c873259fae93b550742deab7954c00b055890bad2b22dff PATCHES 0001-Fix-deps.patch - ${gazebo3211} + fix-build-type.patch + fix-opengl-def.patch + add-features.patch ) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS @@ -20,6 +15,8 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS openal HAVE_OPENAL ffmpeg FFMPEG_FEATURE gts GTS_FEATURE + plugins BUILD_PLUGINS + tools BUILD_TOOLS INVERTED_FEATURES simbody CMAKE_DISABLE_FIND_PACKAGE_Simbody dart CMAKE_DISABLE_FIND_PACKAGE_DART @@ -32,9 +29,10 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS - -DUSE_EXTERNAL_TINY_PROCESS_LIBRARY=ON - -DPKG_CONFIG_EXECUTABLE=${CURRENT_HOST_INSTALLED_DIR}/tools/pkgconf/pkgconf${VCPKG_HOST_EXECUTABLE_SUFFIX} ${FEATURE_OPTIONS} + -DUSE_EXTERNAL_TINY_PROCESS_LIBRARY=ON + "-DPKG_CONFIG_EXECUTABLE=${CURRENT_HOST_INSTALLED_DIR}/tools/pkgconf/pkgconf${VCPKG_HOST_EXECUTABLE_SUFFIX}" + -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=ON -DBUILD_TESTING=OFF # Not enabled by default, but to be sure ) diff --git a/ports/gazebo/vcpkg.json b/ports/gazebo/vcpkg.json index 30b8dac5baac5b..2c953f914d33be 100644 --- a/ports/gazebo/vcpkg.json +++ b/ports/gazebo/vcpkg.json @@ -1,7 +1,6 @@ { "name": "gazebo", - "version-date": "2022-01-20", - "port-version": 3, + "version": "11.11.0", "description": "Open source robotics simulator.", "homepage": "http://gazebosim.org", "license": "Apache-2.0", @@ -19,6 +18,7 @@ "boost-thread", "boost-uuid", "ccd", + "freeimage", { "name": "hdf5", "features": [ @@ -30,7 +30,12 @@ "ignition-math6", "ignition-msgs5", "ignition-transport8", + { + "name": "libtar", + "platform": "!windows" + }, "ogre", + "opengl", { "name": "pkgconf", "host": true @@ -38,6 +43,10 @@ "protobuf", "qwt", "sdformat9", + { + "name": "simbody", + "platform": "!windows" + }, "tbb", "tiny-process-library", { @@ -116,11 +125,19 @@ "openal-soft" ] }, + "plugins": { + "description": "Build gazebo plugins", + "supports": "!linux" + }, "simbody": { "description": "Use the simbody physics engine", "dependencies": [ "simbody" ] + }, + "tools": { + "description": "Build gazebo tools", + "supports": "!(linux & static)" } } } diff --git a/ports/libtar/portfile.cmake b/ports/libtar/portfile.cmake new file mode 100644 index 00000000000000..edb41301679e8e --- /dev/null +++ b/ports/libtar/portfile.cmake @@ -0,0 +1,16 @@ +set(VCPKG_USE_HEAD_VERSION ON) +vcpkg_from_git( + OUT_SOURCE_PATH SOURCE_PATH + URL https://repo.or.cz/libtar.git + HEAD_REF v1.2.20 +) + +vcpkg_configure_make( + SOURCE_PATH "${SOURCE_PATH}" +) + +vcpkg_install_make() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share") + +file(INSTALL "${SOURCE_PATH}/COPYRIGHT" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/libtar/vcpkg.json b/ports/libtar/vcpkg.json new file mode 100644 index 00000000000000..d07de7154ab632 --- /dev/null +++ b/ports/libtar/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "libtar", + "version": "1.2.20", + "description": "libtar - C library for manipulating tar files", + "homepage": "https://repo.or.cz/libtar.git", + "supports": "!windows" +} diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 35c7103040bea2..1958b99500e923 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -272,9 +272,6 @@ ftgl:arm-uwp=fail # https://github.com/GoogleCloudPlatform/functions-framework-cpp/issues/207 functions-framework-cpp:x64-uwp=fail -# VS 2022 Update 3 seems to have broken Gazebo: https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_workitems/edit/1522474 -gazebo:x64-windows=fail -gazebo:x64-linux=fail # gsoap does not offer stable public source downloads gsoap:x64-windows = skip gsoap:x86-windows = skip diff --git a/versions/baseline.json b/versions/baseline.json index 80346e0d37c063..7310266394298b 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2477,8 +2477,8 @@ "port-version": 1 }, "gazebo": { - "baseline": "2022-01-20", - "port-version": 3 + "baseline": "11.11.0", + "port-version": 0 }, "gcem": { "baseline": "1.14.1", @@ -4148,6 +4148,10 @@ "baseline": "3.25", "port-version": 0 }, + "libtar": { + "baseline": "1.2.20", + "port-version": 0 + }, "libtasn1": { "baseline": "4.17.0", "port-version": 3 diff --git a/versions/g-/gazebo.json b/versions/g-/gazebo.json index 202e801f08c750..537d075ad91114 100644 --- a/versions/g-/gazebo.json +++ b/versions/g-/gazebo.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "cb1797db605abbde18f8925fb96144daf28331a4", + "version": "11.11.0", + "port-version": 0 + }, { "git-tree": "094ba2b47c08f30d45b33081f8b2b3790b2ec070", "version-date": "2022-01-20", diff --git a/versions/l-/libtar.json b/versions/l-/libtar.json new file mode 100644 index 00000000000000..c96f85ede50915 --- /dev/null +++ b/versions/l-/libtar.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "c981b35ed9259a0f23aefe903584e5adfecc2f08", + "version": "1.2.20", + "port-version": 0 + } + ] +}