diff --git a/ports/gazebo/0001-Fix-deps.patch b/ports/gazebo/0001-Fix-deps.patch new file mode 100644 index 00000000000000..a933d6884f9b04 --- /dev/null +++ b/ports/gazebo/0001-Fix-deps.patch @@ -0,0 +1,102 @@ +diff --git a/cmake/SearchForStuff.cmake b/cmake/SearchForStuff.cmake +index 4085b5aaeb..f89ac88333 100644 +--- a/cmake/SearchForStuff.cmake ++++ b/cmake/SearchForStuff.cmake +@@ -179,7 +179,7 @@ if (PKG_CONFIG_FOUND) + # (needed, at least, for MacOS) + + # Use system installation on UNIX and Apple, and internal copy on Windows +- if (UNIX OR APPLE) ++ if (true) + message (STATUS "Using system tinyxml.") + set (USE_EXTERNAL_TINYXML True) + elseif(WIN32) +@@ -225,7 +225,7 @@ if (PKG_CONFIG_FOUND) + # (needed, at least, for MacOS) + + # Use system installation on UNIX and Apple, and internal copy on Windows +- if (UNIX OR APPLE) ++ if (true) + message (STATUS "Using system tinyxml2.") + set (USE_EXTERNAL_TINYXML2 True) + elseif(WIN32) +@@ -513,7 +513,7 @@ if (PKG_CONFIG_FOUND) + endif () + + if (libavutil_FOUND AND libavformat_FOUND AND libavcodec_FOUND AND +- libswscale_FOUND) ++ libswscale_FOUND AND FFMPEG_FEATURE) + set (HAVE_FFMPEG TRUE) + else () + set (HAVE_FFMPEG FALSE) +@@ -538,7 +538,7 @@ if (PKG_CONFIG_FOUND) + ######################################## + # Find GNU Triangulation Surface Library + pkg_check_modules(gts gts) +- if (gts_FOUND) ++ if (GTS_FEATURE) + message (STATUS "Looking for GTS - found") + set (HAVE_GTS TRUE) + else () +@@ -551,13 +551,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 +- pkg_check_modules(BULLET bullet>=2.82) ++ find_package(BULLET CONFIG 2.82) + if (NOT BULLET_FOUND) + pkg_check_modules(BULLET bullet2.82>=2.82) + endif() + + if (BULLET_FOUND) + set (HAVE_BULLET TRUE) ++ set(BULLET_VERSION ${BULLET_VERSION_STRING}) + add_definitions( -DLIBBULLET_VERSION=${BULLET_VERSION} ) + else() + set (HAVE_BULLET FALSE) +@@ -572,7 +573,7 @@ if (PKG_CONFIG_FOUND) + ######################################## + # Find libusb + pkg_check_modules(libusb-1.0 libusb-1.0) +- if (NOT libusb-1.0_FOUND) ++ if (NO_LIBUSB_FEATURE) + 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 () + ######################################## + # Find gdal + include (FindGDAL) +-if (NOT GDAL_FOUND) ++if (NO_GDAL_FEATURE) + 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() + ######################################## + # Find graphviz + include (${gazebo_cmake_dir}/FindGraphviz.cmake) +-if (NOT GRAPHVIZ_FOUND) ++if (NO_GRAPHVIZ_FEATURE) + message (STATUS "Looking for libgraphviz-dev - not found") + 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 +--- 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 + + if (GAZEBO_HAS_BULLET) + if (PKG_CONFIG_FOUND) +- pkg_check_modules(BULLET bullet>=2.82) ++ find_package(BULLET CONFIG 2.82) + if (NOT BULLET_FOUND) + pkg_check_modules(BULLET bullet2.82>=2.82) + endif() + + if (BULLET_FOUND) ++ set(BULLET_VERSION ${BULLET_VERSION_STRING}) + add_definitions(-DLIBBULLET_VERSION=${BULLET_VERSION}) + else() + message(FATAL_ERROR "Error: Bullet > 2.82 not found, please install libbullet2.82-dev.") diff --git a/ports/gazebo/portfile.cmake b/ports/gazebo/portfile.cmake new file mode 100644 index 00000000000000..603eab88a00ef7 --- /dev/null +++ b/ports/gazebo/portfile.cmake @@ -0,0 +1,52 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO osrf/gazebo + REF 382dcc3f36095a8d79b5bc9c8b8ad346e867c51d + SHA512 57638cd0b23b5f2bfd32fdc159d6cd77ca34e3bd695c225591979aef4b7271eac93d3706fa1ffa2340f90013267a4171bebe1e4c142f19ad2bf67963dfed627e + HEAD_REF gazebo11 + PATCHES + 0001-Fix-deps.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + openal HAVE_OPENAL + ffmpeg FFMPEG_FEATURE + gts GTS_FEATURE + INVERTED_FEATURES + simbody CMAKE_DISABLE_FIND_PACKAGE_Simbody + dart CMAKE_DISABLE_FIND_PACKAGE_DART + bullet CMAKE_DISABLE_FIND_PACKAGE_BULLET + libusb NO_LIBUSB_FEATURE + gdal NO_GDAL_FEATURE + graphviz NO_GRAPHVIZ_FEATURE +) + +vcpkg_add_to_path("${CURRENT_INSTALLED_DIR}/debug/bin") +vcpkg_add_to_path("${CURRENT_INSTALLED_DIR}/bin") +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DUSE_EXTERNAL_TINY_PROCESS_LIBRARY=ON + -DPKG_CONFIG_EXECUTABLE=${CURRENT_HOST_INSTALLED_DIR}/tools/pkgconf/pkgconf.exe + ${FEATURE_OPTIONS} +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/gazebo") +vcpkg_copy_pdbs() + +vcpkg_copy_tools( + TOOL_NAMES gazebo gz gzclient gzserver + AUTO_CLEAN +) +set(EXTRA_OGRE_LIBS Codec_EXR Codec_FreeImage Codec_STBI OgreBites OgreMain OgreMeshLodGenerator OgreOverlay OgrePaging OgreProperty OgreRTShaderSystem OgreTerrain OgreVolume Plugin_BSPSceneManager Plugin_DotScene Plugin_OctreeSceneManager Plugin_OctreeZone Plugin_ParticleFX Plugin_PCZSceneManager RenderSystem_Direct3D11 RenderSystem_GL RenderSystem_GL3Plus) +foreach(LIB IN LISTS EXTRA_OGRE_LIBS) + set(FILE_NAME "${CMAKE_SHARED_LIBRARY_PREFIX}${LIB}${CMAKE_SHARED_LIBRARY_SUFFIX}") + file(COPY "${CURRENT_INSTALLED_DIR}/bin/${FILE_NAME}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") +endforeach() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share") + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/gazebo/vcpkg.json b/ports/gazebo/vcpkg.json new file mode 100644 index 00000000000000..8f4bd528696193 --- /dev/null +++ b/ports/gazebo/vcpkg.json @@ -0,0 +1,125 @@ +{ + "name": "gazebo", + "version-date": "2022-01-20", + "description": "Open source robotics simulator.", + "homepage": "http://gazebosim.org", + "license": "Apache-2.0", + "dependencies": [ + "boost-asio", + "boost-date-time", + "boost-filesystem", + "boost-format", + "boost-interprocess", + "boost-iostreams", + "boost-program-options", + "boost-property-tree", + "boost-regex", + "boost-system", + "boost-thread", + "boost-uuid", + "ccd", + { + "name": "hdf5", + "features": [ + "cpp" + ] + }, + "ignition-common3", + "ignition-fuel-tools4", + "ignition-math6", + "ignition-msgs5", + "ignition-transport8", + "ogre", + { + "name": "pkgconf", + "host": true + }, + "protobuf", + "qwt", + "sdformat9", + "tbb", + "tiny-process-library", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "default-features": [ + "bullet", + "dart", + "ffmpeg", + "gdal", + "graphviz", + "gts", + "libusb", + "openal", + "simbody" + ], + "features": { + "bullet": { + "description": "Use the bullet physics engine", + "dependencies": [ + "bullet3" + ] + }, + "dart": { + "description": "Use the dart physics engine", + "dependencies": [ + "dartsim" + ] + }, + "ffmpeg": { + "description": "Enable audio-video capabilities", + "dependencies": [ + { + "name": "ffmpeg", + "features": [ + "avcodec", + "avformat", + "swscale" + ] + } + ] + }, + "gdal": { + "description": "Enable digital elevation terrains support", + "dependencies": [ + "gdal" + ] + }, + "graphviz": { + "description": "Enable model editor's schematic view", + "dependencies": [ + "graphviz" + ] + }, + "gts": { + "description": "Enable CSG support", + "dependencies": [ + "gts" + ] + }, + "libusb": { + "description": "Enable USB peripheral support", + "dependencies": [ + "libusb" + ] + }, + "openal": { + "description": "Enable audio support", + "dependencies": [ + "openal-soft" + ] + }, + "simbody": { + "description": "Use the simbody physics engine", + "dependencies": [ + "simbody" + ] + } + } +} diff --git a/ports/sdformat9/portfile.cmake b/ports/sdformat9/portfile.cmake index c8677065fec48f..058988450fdd93 100644 --- a/ports/sdformat9/portfile.cmake +++ b/ports/sdformat9/portfile.cmake @@ -8,6 +8,7 @@ vcpkg_from_github( fix-dependency-urdfdom.patch fix-quote.patch no-absolute.patch + use-external-tinyxml-windows.patch ) # Ruby is required by the sdformat build process @@ -21,7 +22,6 @@ vcpkg_cmake_configure( OPTIONS -DBUILD_TESTING=OFF -DUSE_INTERNAL_URDF=OFF - -DUSE_EXTERNAL_TINYXML=ON ) vcpkg_cmake_install() diff --git a/ports/sdformat9/use-external-tinyxml-windows.patch b/ports/sdformat9/use-external-tinyxml-windows.patch new file mode 100644 index 00000000000000..1f48617bc04c36 --- /dev/null +++ b/ports/sdformat9/use-external-tinyxml-windows.patch @@ -0,0 +1,26 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3dad12e5..e290a3be 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -113,7 +113,7 @@ include (${sdf_cmake_dir}/SDFUtils.cmake) + + message (STATUS "\n\n====== Finding 3rd Party Packages ======") + # Use of tinyxml. System installation on UNIX. Internal copy on WIN +-if (UNIX) ++if (true) + message (STATUS "Using system tinyxml") + set (USE_EXTERNAL_TINYXML True) + elseif(WIN32) +diff --git a/cmake/SearchForStuff.cmake b/cmake/SearchForStuff.cmake +index 427e5e7a..655fafc0 100644 +--- a/cmake/SearchForStuff.cmake ++++ b/cmake/SearchForStuff.cmake +@@ -9,7 +9,7 @@ if (USE_EXTERNAL_TINYXML) + ################################################# + # Find tinyxml. Only debian distributions package tinyxml with a pkg-config + # Use pkg_check_modules and fallback to manual detection (needed, at least, for MacOS) +- pkg_check_modules(tinyxml tinyxml) ++ find_package(tinyxml CONFIG REQUIRED) + if (NOT tinyxml_FOUND) + find_path (tinyxml_INCLUDE_DIRS tinyxml.h ${tinyxml_INCLUDE_DIRS} ENV CPATH) + find_library(tinyxml_LIBRARIES NAMES tinyxml) diff --git a/ports/sdformat9/vcpkg.json b/ports/sdformat9/vcpkg.json index 716bc4703c9ef8..c4f2a7dcc84531 100644 --- a/ports/sdformat9/vcpkg.json +++ b/ports/sdformat9/vcpkg.json @@ -1,9 +1,10 @@ { "name": "sdformat9", "version": "9.4.0", - "port-version": 4, + "port-version": 5, "description": "Simulation Description Format (SDF) parser and description files.", "homepage": "http://sdformat.org/", + "license": "Apache-2.0", "supports": "!(linux | uwp)", "dependencies": [ "ignition-math6", diff --git a/versions/baseline.json b/versions/baseline.json index b8df75061fadb1..5a6308a73ee2a7 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2372,6 +2372,10 @@ "baseline": "2019-08-04", "port-version": 1 }, + "gazebo": { + "baseline": "2022-01-20", + "port-version": 0 + }, "gcem": { "baseline": "1.13.1", "port-version": 1 @@ -6246,7 +6250,7 @@ }, "sdformat9": { "baseline": "9.4.0", - "port-version": 4 + "port-version": 5 }, "sdl1": { "baseline": "1.2.15", diff --git a/versions/g-/gazebo.json b/versions/g-/gazebo.json new file mode 100644 index 00000000000000..78d9fcac424a3d --- /dev/null +++ b/versions/g-/gazebo.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "983e90284c8c0073e0193750a412eb4df01accdc", + "version-date": "2022-01-20", + "port-version": 0 + } + ] +} diff --git a/versions/s-/sdformat9.json b/versions/s-/sdformat9.json index 74f6ba91334767..547317e56551b4 100644 --- a/versions/s-/sdformat9.json +++ b/versions/s-/sdformat9.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "d050d624faf72f8dcb62fdb7a5378ae5d8e8b5d8", + "version": "9.4.0", + "port-version": 5 + }, { "git-tree": "2b064abf9a6849ed5234b03bf5604ccd0169db4a", "version": "9.4.0",