New port: devel/ignition-transport: Ignition transport classes and functions for robot applications

This commit is contained in:
Yuri Victorovich 2018-11-20 22:34:38 +00:00
parent 3447c74592
commit ee5c1b5da8
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=485490
10 changed files with 222 additions and 0 deletions

View file

@ -1232,6 +1232,7 @@
SUBDIR += ignition-msgs
SUBDIR += ignition-plugin
SUBDIR += ignition-tools
SUBDIR += ignition-transport
SUBDIR += imake
SUBDIR += inastemp
SUBDIR += include-what-you-use

View file

@ -0,0 +1,42 @@
# $FreeBSD$
PORTNAME= ignition-transport
DISTVERSION= 6.0.0
CATEGORIES= devel
MASTER_SITES= https://bitbucket.org/${BB_ACCOUNT}/${BB_PROJECT}/get/${BB_COMMIT}.tar.gz?dummy=/
MAINTAINER= yuri@FreeBSD.org
COMMENT= Ignition transport classes and functions for robot applications
LICENSE= APACHE20
BUILD_DEPENDS= ignition-cmake==2:devel/ignition-cmake \
ignition-tools>0:devel/ignition-tools \
cppzmq>0:net/cppzmq
LIB_DEPENDS= libignition-math6.so:math/ignition-math \
libignition-msgs3.so:devel/ignition-msgs \
libprotobuf.so:devel/protobuf \
libuuid.so:misc/e2fsprogs-libuuid \
libzmq.so:net/libzmq4
RUN_DEPENDS= ignition-tools>0:devel/ignition-tools
USES= cmake:outsource pkgconfig sqlite
USE_LDCONFIG= yes
CMAKE_OFF= BUILD_TESTING
BB_ACCOUNT= ignitionrobotics
BB_PROJECT= ign-transport
BB_COMMIT= 4b78da2af04c
WRKSRC= ${WRKDIR}/${BB_ACCOUNT}-${BB_PROJECT}-${BB_COMMIT}
PLIST_SUB+= TRANSPORT_IGN_VER=transport${DISTVERSION:R:R}
do-test: # 1 test is known to fail: https://bitbucket.org/ignitionrobotics/ign-transport/issues/100/test-integration_log_versioned_symbols
@cd ${BUILD_WRKSRC} && \
${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} -DBUILD_TESTING=ON ${CMAKE_SOURCE_PATH} && \
${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${ALL_TARGET} && \
${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} test
.include <bsd.port.mk>

View file

@ -0,0 +1,3 @@
TIMESTAMP = 1542653754
SHA256 (ignition-transport-6.0.0.tar.gz) = 691a6566774f7952297aee2d48fc638cdbc49c4a6529606b56d879fcda155185
SIZE (ignition-transport-6.0.0.tar.gz) = 529120

View file

@ -0,0 +1,11 @@
--- CMakeLists.txt.orig 2018-11-19 20:02:52 UTC
+++ CMakeLists.txt
@@ -22,7 +22,7 @@ ign_configure_project(VERSION_SUFFIX pre
# ignition-transport currently has no options that are unique to it
-if (UNIX AND NOT APPLE)
+if (UNIX AND NOT APPLE AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "^(FreeBSD|DragonFly)$")
set (EXTRA_TEST_LIB_DEPS stdc++fs)
else()
set (EXTRA_TEST_LIB_DEPS)

View file

@ -0,0 +1,29 @@
--- log/include/ignition/transport/log/SqlStatement.hh.orig 2018-11-20 22:07:06 UTC
+++ log/include/ignition/transport/log/SqlStatement.hh
@@ -59,22 +59,22 @@ namespace ignition
/// \sa Set(std::nullptr_t)
/// \brief Construct NULL parameter
- public: explicit SqlParameter(std::nullptr_t);
+ public: SqlParameter(std::nullptr_t);
/// \sa Set(int64_t)
/// \brief Construct integer parameter
/// \param[in] _integer an integer
- public: explicit SqlParameter(int64_t _integer);
+ public: SqlParameter(int64_t _integer);
/// \sa Set(double)
/// \brief Construct real parameter
/// \param[in] _real a real number
- public: explicit SqlParameter(double _real);
+ public: SqlParameter(double _real);
/// \sa Set(const std::string &)
/// \brief Construct string parameter
/// \param[in] _string a string
- public: explicit SqlParameter(const std::string &_text);
+ public: SqlParameter(const std::string &_text);
/// \brief Copy constructor
/// \param[in] _other Another SqlParameter

View file

@ -0,0 +1,20 @@
--- log/src/QueryOptions.cc.orig 2018-11-20 22:08:14 UTC
+++ log/src/QueryOptions.cc
@@ -113,7 +113,7 @@ class TimeRangeOption::Implementation
if (!startCompare.empty())
{
sql.statement += "time_recv " + startCompare + " ?";
- sql.parameters.emplace_back(start.GetTime()->count());
+ sql.parameters.emplace_back((int64_t)start.GetTime()->count());
if (!finishCompare.empty())
sql.statement += " AND ";
@@ -122,7 +122,7 @@ class TimeRangeOption::Implementation
if (!finishCompare.empty())
{
sql.statement += "time_recv " + finishCompare + " ?";
- sql.parameters.emplace_back(finish.GetTime()->count());
+ sql.parameters.emplace_back((int64_t)finish.GetTime()->count());
}
return sql;

View file

@ -0,0 +1,28 @@
--- src/NetUtils.cc.orig 2018-11-19 19:50:00 UTC
+++ src/NetUtils.cc
@@ -23,6 +23,7 @@
#else
#include <arpa/inet.h>
#include <net/if.h>
+ #include <netinet/in.h>
#include <netdb.h>
#include <pwd.h>
#include <unistd.h>
@@ -208,10 +209,17 @@ inline namespace IGNITION_TRANSPORT_VERS
}
// If we already have the same SIOCGIFINDEX, ignore it (subinterface).
+# if defined(__FreeBSD__) || defined(__DragonFly__)
+ if (realIdx.find(ifIdx.ifr_index) != realIdx.end())
+ continue;
+
+ realIdx.insert(ifIdx.ifr_index);
+# else
if (realIdx.find(ifIdx.ifr_ifindex) != realIdx.end())
continue;
realIdx.insert(ifIdx.ifr_ifindex);
+# endif
#endif
if (getnameinfo(ifa->ifa_addr, salen, ip_, sizeof(ip_), nullptr, 0,

View file

@ -0,0 +1,20 @@
--- test/test_config.h.in.orig 2018-09-11 18:30:00 UTC
+++ test/test_config.h.in
@@ -30,7 +30,7 @@
DETAIL_IGN_TRANSPORT_TEST_DIR
#endif
-#ifndef __APPLE__
+#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__DragonFly__)
#include <experimental/filesystem>
#include <filesystem>
#endif
@@ -91,7 +91,7 @@ namespace testing
std::string portablePathUnion(const std::string &_str1,
const std::string &_str2)
{
-#ifdef __APPLE__
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__DragonFly__)
// Ugly as hell but trying to avoid boost::filesystem
return _str1 + "/" + _str2;
#else

View file

@ -0,0 +1,4 @@
Ignition transport is a component in the ignition framework, a set of libraries
designed to rapidly develop robot applications.
WWW: https://ignitionrobotics.org/home

View file

@ -0,0 +1,64 @@
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport.hh
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport/AdvertiseOptions.hh
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport/Clock.hh
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport/Discovery.hh
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport/Export.hh
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport/HandlerStorage.hh
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport/Helpers.hh
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport/MessageInfo.hh
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport/NetUtils.hh
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport/Node.hh
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport/NodeOptions.hh
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport/NodeShared.hh
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport/Packet.hh
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport/Publisher.hh
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport/RepHandler.hh
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport/ReqHandler.hh
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport/SubscribeOptions.hh
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport/SubscriptionHandler.hh
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport/TopicStorage.hh
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport/TopicUtils.hh
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport/TransportTypes.hh
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport/Uuid.hh
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport/config.hh
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport/detail/Export.hh
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport/detail/Node.hh
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport/ign.hh
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport/log.hh
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport/log/Batch.hh
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport/log/Descriptor.hh
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport/log/Export.hh
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport/log/Log.hh
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport/log/Message.hh
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport/log/MsgIter.hh
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport/log/Playback.hh
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport/log/QualifiedTime.hh
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport/log/QueryOptions.hh
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport/log/Recorder.hh
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport/log/SqlStatement.hh
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport/log/detail/Export.hh
include/ignition/%%TRANSPORT_IGN_VER%%/ignition/transport/log/detail/QueryOptions.hh
lib/cmake/ignition-%%TRANSPORT_IGN_VER%%-all/ignition-%%TRANSPORT_IGN_VER%%-all-config-version.cmake
lib/cmake/ignition-%%TRANSPORT_IGN_VER%%-all/ignition-%%TRANSPORT_IGN_VER%%-all-config.cmake
lib/cmake/ignition-%%TRANSPORT_IGN_VER%%-all/ignition-%%TRANSPORT_IGN_VER%%-all-targets.cmake
lib/cmake/ignition-%%TRANSPORT_IGN_VER%%-log/ignition-%%TRANSPORT_IGN_VER%%-log-config-version.cmake
lib/cmake/ignition-%%TRANSPORT_IGN_VER%%-log/ignition-%%TRANSPORT_IGN_VER%%-log-config.cmake
lib/cmake/ignition-%%TRANSPORT_IGN_VER%%-log/ignition-%%TRANSPORT_IGN_VER%%-log-targets-%%CMAKE_BUILD_TYPE%%.cmake
lib/cmake/ignition-%%TRANSPORT_IGN_VER%%-log/ignition-%%TRANSPORT_IGN_VER%%-log-targets.cmake
lib/cmake/ignition-%%TRANSPORT_IGN_VER%%/ignition-%%TRANSPORT_IGN_VER%%-config-version.cmake
lib/cmake/ignition-%%TRANSPORT_IGN_VER%%/ignition-%%TRANSPORT_IGN_VER%%-config.cmake
lib/cmake/ignition-%%TRANSPORT_IGN_VER%%/ignition-%%TRANSPORT_IGN_VER%%-targets-%%CMAKE_BUILD_TYPE%%.cmake
lib/cmake/ignition-%%TRANSPORT_IGN_VER%%/ignition-%%TRANSPORT_IGN_VER%%-targets.cmake
lib/libignition-%%TRANSPORT_IGN_VER%%-log.so
lib/libignition-%%TRANSPORT_IGN_VER%%-log.so.6
lib/libignition-%%TRANSPORT_IGN_VER%%-log.so.6.0.0~pre2
lib/libignition-%%TRANSPORT_IGN_VER%%.so
lib/libignition-%%TRANSPORT_IGN_VER%%.so.6
lib/libignition-%%TRANSPORT_IGN_VER%%.so.6.0.0~pre2
lib/ruby/ignition/cmdlog6.rb
lib/ruby/ignition/cmd%%TRANSPORT_IGN_VER%%.rb
libdata/pkgconfig/ignition-%%TRANSPORT_IGN_VER%%-log.pc
libdata/pkgconfig/ignition-%%TRANSPORT_IGN_VER%%.pc
share/ignition/ignition-%%TRANSPORT_IGN_VER%%/sql/0.1.0.sql
share/ignition/%%TRANSPORT_IGN_VER%%.yaml
share/ignition/transportlog6.yaml