1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-18 19:49:40 +00:00

Third round of adapting port to new boost 1.66

PR:		224094
Reported by:	jbeich@FreeBSD.org
This commit is contained in:
Lev A. Serebryakov 2017-12-05 17:06:48 +00:00
parent da22e50781
commit 32c76c47d8
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=455593
5 changed files with 90 additions and 8 deletions

View File

@ -2,7 +2,7 @@
PORTNAME= msp430-debug-stack
PORTVERSION= 3.10.001.000
PORTREVISION= 5
PORTREVISION= 6
CATEGORIES= devel
MASTER_SITES= http://www.ti.com/lit/sw/slac460v/ \
http://www.ti.com/lit/ug/slau320z/:doc1 \

View File

@ -1,6 +1,49 @@
--- DLL430_v3/src/TI/DLL430/UsbCdcIoChannel.cpp.orig 2017-12-05 18:49:13.159254000 +0300
+++ DLL430_v3/src/TI/DLL430/UsbCdcIoChannel.cpp 2017-12-05 18:49:23.590490000 +0300
@@ -401,7 +401,7 @@ bool UsbCdcIoChannel::openPort()
--- DLL430_v3/src/TI/DLL430/UsbCdcIoChannel.cpp.orig 2017-12-05 19:25:19.220234000 +0300
+++ DLL430_v3/src/TI/DLL430/UsbCdcIoChannel.cpp 2017-12-05 19:31:57.808647000 +0300
@@ -309,6 +309,22 @@
}
#else
stringstream cdcIdStream;
+
+#ifdef __FreeBSD__
+
+ path p( "/dev" );
+ if( exists(p) && is_directory(p) ) {
+
+ cdcIdStream << hex << setfill('0') << "mspfet" << setw(4) << productId;
+
+ const directory_iterator end;
+ for( directory_iterator it(p); it != end; ++it ) {
+
+ string dir = it->path().string();
+ if( dir.find( cdcIdStream.str() ) != string::npos ) {
+ {
+
+#else
cdcIdStream << hex << setfill('0') << "usb:v" << setw(4) << vendorId << "p" << setw(4) << productId;
path p("/sys/class/tty/");
@@ -330,6 +346,7 @@
ifNumStream >> interfaceNumber;
if (modalias.find(cdcIdStream.str()) == 0 && interfaceNumber == 0)
{
+#endif
const string filename = it->path().filename().string();
const string portPath = string("/dev/") + filename;
@@ -375,7 +392,11 @@
bool UsbCdcIoChannel::openPort()
{
+#if BOOST_VERSION < 106600
ioService = new boost::asio::io_service;
+#else
+ ioService = new boost::asio::io_context;
+#endif
port = new boost::asio::serial_port(*ioService);
timer = new boost::asio::deadline_timer(*ioService);
@@ -384,7 +405,7 @@
int retry = 5;
while (ec && --retry )
{
@ -9,7 +52,7 @@
ec = port->open(portInfo.path, ec);
}
@@ -426,7 +426,7 @@ void UsbCdcIoChannel::retrieveStatus()
@@ -409,7 +430,7 @@
{
openPort();
//Seeing issues on some platforms (eg. Ubuntu) when port is immediately closed again

View File

@ -0,0 +1,14 @@
--- DLL430_v3/src/TI/DLL430/UsbCdcIoChannel.h.orig 2017-12-05 19:32:41.218250000 +0300
+++ DLL430_v3/src/TI/DLL430/UsbCdcIoChannel.h 2017-12-05 19:33:09.405049000 +0300
@@ -73,7 +73,11 @@
private:
std::vector<uint8_t> inputBuffer;
+#if BOOST_VERSION < 106600
boost::asio::io_service* ioService;
+#else
+ boost::asio::io_context* ioService;
+#endif
boost::asio::serial_port* port;
boost::asio::deadline_timer* timer;
ComState comState;

View File

@ -1,6 +1,18 @@
--- ThirdParty/BSL430_DLL/BSL430_DLL/Physical_Interfaces/MSPBSL_PhysicalInterfaceSerialUART.cpp.orig 2017-12-05 18:38:46.034235000 +0300
+++ ThirdParty/BSL430_DLL/BSL430_DLL/Physical_Interfaces/MSPBSL_PhysicalInterfaceSerialUART.cpp 2017-12-05 18:39:30.622349000 +0300
@@ -193,27 +193,27 @@ void MSPBSL_PhysicalInterfaceSerialUART:
--- ThirdParty/BSL430_DLL/BSL430_DLL/Physical_Interfaces/MSPBSL_PhysicalInterfaceSerialUART.cpp.orig 2017-12-05 19:25:19.310735000 +0300
+++ ThirdParty/BSL430_DLL/BSL430_DLL/Physical_Interfaces/MSPBSL_PhysicalInterfaceSerialUART.cpp 2017-12-05 19:34:23.723027000 +0300
@@ -129,7 +129,11 @@
//TODO: Catch exception forunknown ports
+#if BOOST_VERSION < 106600
io_service io;
+#else
+ io_context io;
+#endif
port = new serial_port( io, PORT );
port->set_option( serial_port_base::character_size( 8 ) );
port->set_option( serial_port_base::flow_control( serial_port_base::flow_control::none ) );
@@ -193,27 +197,27 @@
port->set_option(RESETControl(LOW_SIGNAL));
port->set_option(TESTControl(LOW_SIGNAL));

View File

@ -0,0 +1,13 @@
--- ThirdParty/BSL430_DLL/BSL430_DLL/Physical_Interfaces/MSPBSL_PhysicalInterfaceSerialUART.h.orig 2017-12-05 19:35:16.469154000 +0300
+++ ThirdParty/BSL430_DLL/BSL430_DLL/Physical_Interfaces/MSPBSL_PhysicalInterfaceSerialUART.h 2017-12-05 19:35:38.930835000 +0300
@@ -72,6 +72,10 @@
virtual std::string getErrorInformation( uint16_t err );
private:
+#if BOOST_VERSION < 106600
boost::asio::io_service io;
+#else
+ boost::asio::io_context io;
+#endif
boost::asio::serial_port* port;
};