diff options
author | Alexis Ballier <aballier@gentoo.org> | 2025-01-08 14:21:20 +0100 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2025-01-09 10:56:26 +0100 |
commit | 57d5eb7bbc1ed9d1a8faa6c98c7761c328a3bf04 (patch) | |
tree | 87892b3cdbfc5a9e1af44136e3c06d5a860208b7 /sci-electronics | |
parent | media-sound/flake: update EAPI 7 -> 8, fix build instability (diff) | |
download | gentoo-57d5eb7bbc1ed9d1a8faa6c98c7761c328a3bf04.tar.gz gentoo-57d5eb7bbc1ed9d1a8faa6c98c7761c328a3bf04.tar.bz2 gentoo-57d5eb7bbc1ed9d1a8faa6c98c7761c328a3bf04.zip |
sci-electronics/gazebo: bump to 11.15.1
add patch to build with boost 1.87
Signed-off-by: Alexis Ballier <aballier@gentoo.org>
Diffstat (limited to 'sci-electronics')
-rw-r--r-- | sci-electronics/gazebo/Manifest | 1 | ||||
-rw-r--r-- | sci-electronics/gazebo/files/boost187.patch | 198 | ||||
-rw-r--r-- | sci-electronics/gazebo/gazebo-11.15.1.ebuild | 84 |
3 files changed, 283 insertions, 0 deletions
diff --git a/sci-electronics/gazebo/Manifest b/sci-electronics/gazebo/Manifest index 975f179885b5..2a69594a5cae 100644 --- a/sci-electronics/gazebo/Manifest +++ b/sci-electronics/gazebo/Manifest @@ -1,2 +1,3 @@ DIST gazebo-11.13.0.tar.bz2 56636967 BLAKE2B 7c0ef875711e832a213631d97584edc2300d25be6d538d6f2ac782ab279b6518e1fb7c59d895a1c7b92fbaec46bb0e7c505afb34f05ab2eece016f5bd15a7c3f SHA512 a77ce4a02f723c615738d11a13aa10fa5124705bc9ca95153477d8df25b296eef7d442769379d3888a9ba0f04c1e5a3e38d686e7b5eef393b91bdc78f792c390 DIST gazebo-11.14.0.tar.bz2 56640328 BLAKE2B 9712118339593edd6c3cc1321ffa3d60f9f986abecc858d0709a0ddd1600a00620b26141300083dcfbc8ff699ae01a21340190cda04b276d146e93ccd1bfc6dc SHA512 365bda1be67745b6b40834a059f220351559e962df5f7254c80d363a04cc4beb092d20eaa357469d87f64c00fd3c6b2480693d7b1d734b0b42a75eb0ba687e34 +DIST gazebo-11.15.1.tar.bz2 111639491 BLAKE2B 1a97fd04980310ed8e775c5ba8aa36af6d60ea0235c467ade763a4d7cb2ca72008bae2299c73018f89b0d5b12c23f3663948fd0a5c91b58a3cf235b49ffaa975 SHA512 085bd71f2495d86752274c02578d4e30d49f4e35dc91226ad11242f0cc5129f98686dfbae83120d228036d2034beb21b9cd1be91505a48d4ccc757d19cecb111 diff --git a/sci-electronics/gazebo/files/boost187.patch b/sci-electronics/gazebo/files/boost187.patch new file mode 100644 index 000000000000..30fe4a82fa4d --- /dev/null +++ b/sci-electronics/gazebo/files/boost187.patch @@ -0,0 +1,198 @@ +Index: gazebo-11.15.1/gazebo/transport/Connection.cc +=================================================================== +--- gazebo-11.15.1.orig/gazebo/transport/Connection.cc ++++ gazebo-11.15.1/gazebo/transport/Connection.cc +@@ -73,7 +73,7 @@ IOManager *Connection::iomanager = NULL; + // is stolen from adress::is_unspecified function in boost v1.52. + static bool addressIsUnspecified(const boost::asio::ip::address_v4 &_addr) + { +- return _addr.to_ulong() == 0; ++ return _addr.to_uint() == 0; + } + + // Version 1.52 of boost has an address::is_loopback function, but +@@ -81,7 +81,7 @@ static bool addressIsUnspecified(const b + // is stolen from adress::is_loopback function in boost v1.52. + static bool addressIsLoopback(const boost::asio::ip::address_v4 &_addr) + { +- return (_addr.to_ulong() & 0xFF000000) == 0x7F000000; ++ return (_addr.to_uint() & 0xFF000000) == 0x7F000000; + } + + ////////////////////////////////////////////////// +@@ -151,15 +151,15 @@ bool Connection::Connect(const std::stri + host = _host.substr(7, _host.size() - 7); + + // Resolve the host name into an IP address +- boost::asio::ip::tcp::resolver::iterator end; + boost::asio::ip::tcp::resolver resolver(iomanager->GetIO()); +- boost::asio::ip::tcp::resolver::query query(host, service, ++ ++ auto res = resolver.resolve(host, service, + boost::asio::ip::resolver_query_base::numeric_service); +- boost::asio::ip::tcp::resolver::iterator endpointIter; ++ auto endpointIter = res.begin(); ++ auto end = res.end(); + + try + { +- endpointIter = resolver.resolve(query); + + // Find the first valid IPv4 address + for (; endpointIter != end && +@@ -690,9 +690,9 @@ boost::asio::ip::tcp::endpoint Connectio + if (hostname && !std::string(hostname).empty()) + { + boost::asio::ip::tcp::resolver resolver(iomanager->GetIO()); +- boost::asio::ip::tcp::resolver::query query(hostname, ""); +- boost::asio::ip::tcp::resolver::iterator iter = resolver.resolve(query); +- boost::asio::ip::tcp::resolver::iterator end; ++ auto res = resolver.resolve(hostname, ""); ++ auto iter = res.begin(); ++ auto end = res.end(); + + // Loop through the results, and stop at the first valid address. + while (iter != end) +@@ -724,7 +724,7 @@ boost::asio::ip::tcp::endpoint Connectio + << "] is invalid. We will still try to use it, be warned.\n"; + } + +- address = boost::asio::ip::address_v4::from_string(ip); ++ address = boost::asio::ip::make_address_v4(ip); + } + + // Try to automatically find a valid address if GAZEBO_IP and +@@ -774,7 +774,7 @@ boost::asio::ip::tcp::endpoint Connectio + if (!ValidateIP(host)) + continue; + +- address = boost::asio::ip::address_v4::from_string(host); ++ address = boost::asio::ip::make_address_v4(host); + + // Also make sure that the IP address is not a loopback interface. + if (!addressIsLoopback(address)) +@@ -868,7 +868,7 @@ boost::asio::ip::tcp::endpoint Connectio + "but will almost certainly not work if you have remote processes." + "Report to the disc-zmq development team to seek a fix." << std::endl; + } +- address = boost::asio::ip::address_v4::from_string(retAddr); ++ address = boost::asio::ip::make_address_v4(retAddr); + #endif + } + +@@ -923,8 +923,9 @@ std::string Connection::GetHostname(boos + else + { + boost::asio::ip::tcp::resolver resolver(iomanager->GetIO()); +- boost::asio::ip::tcp::resolver::iterator iter = resolver.resolve(_ep); +- boost::asio::ip::tcp::resolver::iterator end; ++ auto res = resolver.resolve(_ep); ++ auto iter = res.begin(); ++ auto end = res.end(); + + while (iter != end) + { +@@ -950,7 +951,7 @@ std::string Connection::GetLocalHostname + + ////////////////////////////////////////////////// + void Connection::OnConnect(const boost::system::error_code &_error, +- boost::asio::ip::tcp::resolver::iterator /*_endPointIter*/) ++ boost::asio::ip::tcp::resolver::results_type::iterator /*_endPointIter*/) + { + // This function is called when a connection is successfully (or + // unsuccessfully) established. +Index: gazebo-11.15.1/gazebo/transport/Connection.hh +=================================================================== +--- gazebo-11.15.1.orig/gazebo/transport/Connection.hh ++++ gazebo-11.15.1/gazebo/transport/Connection.hh +@@ -409,7 +409,7 @@ namespace gazebo + /// \param[in] _error Error code thrown during connection + /// \param[in] _endPointIter Pointer to resolver iterator + private: void OnConnect(const boost::system::error_code &_error, +- boost::asio::ip::tcp::resolver::iterator _endPointIter); ++ boost::asio::ip::tcp::resolver::results_type::iterator _endPointIter); + + /// \brief Socket pointer + private: boost::asio::ip::tcp::socket *socket; +Index: gazebo-11.15.1/gazebo/transport/IOManager.cc +=================================================================== +--- gazebo-11.15.1.orig/gazebo/transport/IOManager.cc ++++ gazebo-11.15.1/gazebo/transport/IOManager.cc +@@ -17,6 +17,7 @@ + #include <atomic> + #include <boost/bind/bind.hpp> + #include <boost/thread/thread.hpp> ++#include <boost/asio/executor_work_guard.hpp> + #include <iostream> + #include "gazebo/transport/IOManager.hh" + +@@ -28,10 +29,10 @@ namespace transport + class IOManagerPrivate + { + /// \brief IO service. +- public: boost::asio::io_service *io_service = nullptr; ++ public: boost::asio::io_context *io_service = nullptr; + + /// \brief Use io_service::work to keep the io_service running in thread. +- public: boost::asio::io_service::work *work = nullptr; ++ //public: boost::asio::executor_work_guard<boost::asio::io_context> work; + + /// \brief Reference count of connections using this IOManager. + public: std::atomic_int count; +@@ -44,12 +45,11 @@ class IOManagerPrivate + IOManager::IOManager() + : dataPtr(new IOManagerPrivate) + { +- this->dataPtr->io_service = new boost::asio::io_service; +- this->dataPtr->work = new boost::asio::io_service::work( +- *this->dataPtr->io_service); ++ this->dataPtr->io_service = new boost::asio::io_context; ++ //this->dataPtr->work = boost::asio::make_work_guard(*this->dataPtr->io_service); + this->dataPtr->count = 0; + this->dataPtr->thread = new boost::thread(boost::bind( +- &boost::asio::io_service::run, this->dataPtr->io_service)); ++ &boost::asio::io_context::run, this->dataPtr->io_service)); + } + + ///////////////////////////////////////////////// +@@ -57,9 +57,6 @@ IOManager::~IOManager() + { + this->Stop(); + +- delete this->dataPtr->work; +- this->dataPtr->work = nullptr; +- + delete this->dataPtr->io_service; + this->dataPtr->io_service = nullptr; + +@@ -70,7 +67,7 @@ IOManager::~IOManager() + ///////////////////////////////////////////////// + void IOManager::Stop() + { +- this->dataPtr->io_service->reset(); ++ this->dataPtr->io_service->restart(); + this->dataPtr->io_service->stop(); + if (this->dataPtr->thread) + { +@@ -81,7 +78,7 @@ void IOManager::Stop() + } + + ///////////////////////////////////////////////// +-boost::asio::io_service &IOManager::GetIO() ++boost::asio::io_context &IOManager::GetIO() + { + return *this->dataPtr->io_service; + } +Index: gazebo-11.15.1/gazebo/transport/IOManager.hh +=================================================================== +--- gazebo-11.15.1.orig/gazebo/transport/IOManager.hh ++++ gazebo-11.15.1/gazebo/transport/IOManager.hh +@@ -42,7 +42,7 @@ namespace gazebo + + /// \brief Get handle to boost::asio IO service + /// \return Handle to boost::asio IO service +- public: boost::asio::io_service &GetIO(); ++ public: boost::asio::io_context &GetIO(); + + /// \brief Increment the event count by 1 + public: void IncCount(); diff --git a/sci-electronics/gazebo/gazebo-11.15.1.ebuild b/sci-electronics/gazebo/gazebo-11.15.1.ebuild new file mode 100644 index 000000000000..d5dea1bebd8b --- /dev/null +++ b/sci-electronics/gazebo/gazebo-11.15.1.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake + +DESCRIPTION="A 3D multiple robot simulator with dynamics" +HOMEPAGE="https://gazebosim.org/home" +SRC_URI="https://osrf-distributions.s3.amazonaws.com/gazebo/releases/${P}.tar.bz2" + +LICENSE="Apache-2.0" +# Subslot = major version = soname of libs +SLOT="0/11" +KEYWORDS="~amd64" +IUSE="cpu_flags_x86_sse2 test" +RESTRICT="!test? ( test )" + +RDEPEND=" + >=dev-libs/protobuf-2:= + virtual/opengl + media-libs/openal + net-misc/curl + dev-libs/tinyxml + >=dev-libs/tinyxml2-6:= + dev-libs/libtar + dev-cpp/tbb:= + >=dev-games/ogre-1.7.4:=[freeimage] + <dev-games/ogre-1.10 + >=media-libs/freeimage-3.15.4[png] + sci-libs/libccd + >=media-video/ffmpeg-2.6:0= + sci-libs/gts + >=sci-physics/bullet-2.82:= + >=dev-libs/sdformat-9.8:= + dev-qt/qtwidgets:5 + dev-qt/qtcore:5 + dev-qt/qtopengl:5 + dev-libs/boost:= + sci-libs/gdal:= + virtual/libusb:1 + dev-libs/libspnav + media-libs/freeimage + sci-libs/hdf5:=[cxx] + sys-apps/util-linux + >=media-gfx/graphviz-4 + net-libs/ignition-msgs:5= + sci-libs/ignition-math:6= + net-libs/ignition-transport:8= + sci-libs/ignition-common:3= + sci-libs/ignition-fuel-tools:4= + x11-libs/qwt:6=[qt5(+)] +" +DEPEND="${RDEPEND} + dev-qt/qttest:5 + x11-apps/mesa-progs + test? ( dev-libs/libxslt ) +" +BDEPEND=" + app-text/ronn-ng + app-arch/gzip + virtual/pkgconfig +" +CMAKE_BUILD_TYPE=RelWithDebInfo +PATCHES=( + "${FILESDIR}/qwt2.patch" + "${FILESDIR}/cmake.patch" + "${FILESDIR}/boost187.patch" +) + +src_configure() { + # find OGRE properly + sed -e "s#lib/OGRE#$(get_libdir)/OGRE#" -i cmake/gazebo-config.cmake.in || die + + local mycmakeargs=( + "-DUSE_UPSTREAM_CFLAGS=OFF" + "-DSSE2_FOUND=$(usex cpu_flags_x86_sse2 TRUE FALSE)" + "-DUSE_HOST_CFLAGS=FALSE" + "-DBUILD_TESTING=$(usex test TRUE FALSE)" + "-DENABLE_SCREEN_TESTS=FALSE" + "-DUSE_EXTERNAL_TINYXML2=TRUE" + ) + cmake_src_configure +} |