diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57b991e --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +/urg-0.8.11.zip +/urg-0.8.18 +/urg-0.8.18-* +/x86_64 +*.log +*.rpm +/urg-0.8.18.zip diff --git a/dead.package b/dead.package deleted file mode 100644 index 5204a84..0000000 --- a/dead.package +++ /dev/null @@ -1 +0,0 @@ -Orphaned for 6+ weeks diff --git a/sources b/sources new file mode 100644 index 0000000..fb127ac --- /dev/null +++ b/sources @@ -0,0 +1 @@ +93f90d2ccc36e784407c5282ef6bd2cb urg-0.8.18.zip diff --git a/urg-0.8.18-fixes.patch b/urg-0.8.18-fixes.patch new file mode 100644 index 0000000..0c2c5cc --- /dev/null +++ b/urg-0.8.18-fixes.patch @@ -0,0 +1,148 @@ +diff -urN urg-0.8.18/src/cpp/urg/ScipHandler.cpp urg-0.8.18-fixes/src/cpp/urg/ScipHandler.cpp +--- urg-0.8.18/src/cpp/urg/ScipHandler.cpp 2012-04-05 18:23:54.000000000 +0200 ++++ urg-0.8.18-fixes/src/cpp/urg/ScipHandler.cpp 2018-02-13 09:50:52.149984626 +0100 +@@ -120,7 +120,7 @@ + + // QT の発行 + int return_code = -1; +- char qt_expected_response[] = { 0, -1 }; ++ signed char qt_expected_response[] = { 0, -1 }; + // return_code を使いたいため、setLaserOutput() を用いずに QT を送信する + if (response(return_code, "QT\n", qt_expected_response)) { + laser_state_ = LaserOff; +@@ -139,7 +139,7 @@ + + } else if (return_code == Scip11Response) { + // SCIP1.1 プロトコルの場合のみ、SCIP2.0 を送信する +- char scip20_expected_response[] = { 0, -1 }; ++ signed char scip20_expected_response[] = { 0, -1 }; + if (! response(return_code, "SCIP2.0\n", scip20_expected_response)) { + error_message_ = + "SCIP1.1 protocol is not supported. Please update URG firmware, or reconnect after a few seconds because sensor is booting."; +@@ -150,7 +150,7 @@ + + } else if (return_code == 0xE) { + // TM モードとみなし、TM2 を発行する +- char tm2_expected_response[] = { 0, -1 }; ++ signed char tm2_expected_response[] = { 0, -1 }; + if (response(return_code, "TM2\n", tm2_expected_response)) { + laser_state_ = LaserOff; + return changeBothBaudrate(baudrate); +@@ -202,7 +202,7 @@ + snprintf(send_buffer, 10, "SS%06ld\n", baudrate); + int return_code = -1; + // !!! 既に設定対象のボーレート、の場合の戻り値を ss_expected... に追加する +- char ss_expected_response[] = { 0, 0x3, 0x4, 0xf, -1 }; ++ signed char ss_expected_response[] = { 0, 0x3, 0x4, 0xf, -1 }; + if (! response(return_code, send_buffer, ss_expected_response)) { + error_message_ = "Baudrate change fail."; + return false; +@@ -216,7 +216,7 @@ + { + // PP の送信とデータの受信 + int return_code = -1; +- char pp_expected_response[] = { 0, -1 }; ++ signed char pp_expected_response[] = { 0, -1 }; + vector lines; + if (! response(return_code, "PP\n", pp_expected_response, &lines)) { + error_message_ = "PP fail."; +@@ -251,14 +251,14 @@ + } + + +- int substr2int(const string& line, int from_n, int length = string::npos) ++ int substr2int(const string& line, int from_n, string::size_type length = string::npos) + { + return atoi(line.substr(from_n, length).c_str()); + } + + + bool response(int& return_code, const char send_command[], +- char expected_response[], ++ signed char expected_response[], + vector* lines = NULL) + { + return_code = -1; +@@ -356,7 +356,7 @@ + + if (on) { + int return_code = -1; +- char expected_response[] = { 0, -1 }; ++ signed char expected_response[] = { 0, -1 }; + if (! response(return_code, "BM\n", expected_response)) { + error_message_ = "BM fail."; + return false; +@@ -369,7 +369,7 @@ + if (! mx_capturing_) { + // 消灯するための QT では、応答を待つべき + int return_code = -1; +- char qt_expected_response[] = { 0, -1 }; ++ signed char qt_expected_response[] = { 0, -1 }; + if (! response(return_code, "QT\n", qt_expected_response)) { + return false; + } +@@ -777,7 +777,7 @@ + bool ScipHandler::versionLines(vector& lines) + { + int return_code = -1; +- char expected_response[] = { 0, -1 }; ++ signed char expected_response[] = { 0, -1 }; + if (! pimpl->response(return_code, "VV\n", expected_response, &lines)) { + return false; + } +@@ -792,7 +792,7 @@ + + // TM0 or TM2 の送信 + int return_code = -1; +- char expected_response[] = { 0, -1 }; ++ signed char expected_response[] = { 0, -1 }; + if (! pimpl->response(return_code, send_command, expected_response)) { + pimpl->error_message_ = (on) ? "TM0 fail." : "TM2 fail."; + return false; +@@ -809,7 +809,7 @@ + { + // TM1 の値を返す + int return_code = -1; +- char expected_response[] = { 0, -1 }; ++ signed char expected_response[] = { 0, -1 }; + vector lines; + if (! pimpl->response(return_code, "TM1\n", expected_response, &lines)) { + pimpl->error_message_ = "TM1 fail."; +diff -urN urg-0.8.18/src/cpp/urg/UrgDevice.cpp urg-0.8.18-fixes/src/cpp/urg/UrgDevice.cpp +--- urg-0.8.18/src/cpp/urg/UrgDevice.cpp 2012-09-11 07:57:06.000000000 +0200 ++++ urg-0.8.18-fixes/src/cpp/urg/UrgDevice.cpp 2018-02-13 09:54:51.078764891 +0100 +@@ -89,7 +89,7 @@ + // !!! ここでの送受信には、送受信パラメータの内容を用いる + + char buffer[] = "GDbbbbeeeegg\n"; +- snprintf(buffer, strlen(buffer) + 1, "GD%04d%04d%02u\n", ++ snprintf(buffer, strlen(buffer) + 1, "GD%04d%04d%02zu\n", + pimpl_->capture_begin_, pimpl_->capture_end_, + pimpl_->capture_skip_lines_); + +@@ -160,7 +160,7 @@ + string createCaptureCommand(void) + { + char buffer[] = "MDbbbbeeeeggstt\n"; +- snprintf(buffer, strlen(buffer) + 1, "MD%04d%04d%02u%01u%02u\n", ++ snprintf(buffer, strlen(buffer) + 1, "MD%04d%04d%02zu%01zu%02lu\n", + pimpl_->capture_begin_, pimpl_->capture_end_, + pimpl_->capture_skip_lines_, + pimpl_->capture_frame_interval_, +@@ -251,14 +251,14 @@ + (! pimpl_->urg_type_.compare("URG-04LX-UG01")) || + (! pimpl_->urg_type_.compare("UBG-04LX-F01"))) { + // URG-04LX ならば、FF 形式でデータ送信を行う +- snprintf(buffer, strlen(buffer) + 1, "MD%04d%04dFF%01u%02u\n", ++ snprintf(buffer, strlen(buffer) + 1, "MD%04d%04dFF%01zu%02lu\n", + pimpl_->capture_begin_, pimpl_->capture_end_, + pimpl_->capture_frame_interval_, + (pimpl_->capture_times_ > 99) ? 0 : pimpl_->capture_times_); + + } else { + // UTM-30LX ならば、ME コマンドを用いる +- snprintf(buffer, strlen(buffer) + 1, "ME%04d%04d%02u%01u%02u\n", ++ snprintf(buffer, strlen(buffer) + 1, "ME%04d%04d%02zu%01zu%02lu\n", + pimpl_->capture_begin_, pimpl_->capture_end_, + pimpl_->capture_skip_lines_, + pimpl_->capture_frame_interval_, diff --git a/urg-0.8.18-missing-includes.patch b/urg-0.8.18-missing-includes.patch new file mode 100644 index 0000000..0e8ecd8 --- /dev/null +++ b/urg-0.8.18-missing-includes.patch @@ -0,0 +1,11 @@ +diff -ur urg-0.8.18.orig/src/c/connection/serial_ctrl_lin.c urg-0.8.18/src/c/connection/serial_ctrl_lin.c +--- urg-0.8.18.orig/src/c/connection/serial_ctrl_lin.c 2010-11-22 01:48:01.000000000 +0000 ++++ urg-0.8.18/src/c/connection/serial_ctrl_lin.c 2013-07-09 11:16:16.659693677 +0100 +@@ -14,6 +14,7 @@ + #include "ring_buffer.h" + #include + #include ++#include + #include + #include + #include diff --git a/urg-0.8.18-unique-ptr.patch b/urg-0.8.18-unique-ptr.patch new file mode 100644 index 0000000..47d8ddf --- /dev/null +++ b/urg-0.8.18-unique-ptr.patch @@ -0,0 +1,528 @@ +diff -ur urg-0.8.18/include/cpp/ConditionVariable.h urg-0.8.18-uniqueptr/include/cpp/ConditionVariable.h +--- urg-0.8.18/include/cpp/ConditionVariable.h 2009-05-05 10:56:20.000000000 +0200 ++++ urg-0.8.18-uniqueptr/include/cpp/ConditionVariable.h 2018-02-13 09:34:43.984313629 +0100 +@@ -26,7 +26,7 @@ + ConditionVariable& operator = (const ConditionVariable& rhs); + + struct pImpl; +- const std::auto_ptr pimpl; ++ const std::unique_ptr pimpl; + + public: + enum { +diff -ur urg-0.8.18/include/cpp/Coordinate.h urg-0.8.18-uniqueptr/include/cpp/Coordinate.h +--- urg-0.8.18/include/cpp/Coordinate.h 2010-01-04 16:09:51.000000000 +0100 ++++ urg-0.8.18-uniqueptr/include/cpp/Coordinate.h 2018-02-13 09:34:43.920315805 +0100 +@@ -95,7 +95,7 @@ + Coordinate& operator = (const Coordinate& rhs); + + struct pImpl; +- std::auto_ptr pimpl; ++ std::unique_ptr pimpl; + }; + } + +diff -ur urg-0.8.18/include/cpp/DeviceIpManager.h urg-0.8.18-uniqueptr/include/cpp/DeviceIpManager.h +--- urg-0.8.18/include/cpp/DeviceIpManager.h 2009-05-05 10:56:20.000000000 +0200 ++++ urg-0.8.18-uniqueptr/include/cpp/DeviceIpManager.h 2018-02-13 09:34:43.913316043 +0100 +@@ -25,7 +25,7 @@ + DeviceIpManager& operator = (const DeviceIpManager& rhs); + + struct pImpl; +- std::auto_ptr pimpl; ++ std::unique_ptr pimpl; + + public: + ~DeviceIpManager(void); +diff -ur urg-0.8.18/include/cpp/FindComPorts.h urg-0.8.18-uniqueptr/include/cpp/FindComPorts.h +--- urg-0.8.18/include/cpp/FindComPorts.h 2010-04-30 18:12:06.000000000 +0200 ++++ urg-0.8.18-uniqueptr/include/cpp/FindComPorts.h 2018-02-13 09:34:43.962314377 +0100 +@@ -77,7 +77,7 @@ + FindComPorts& operator = (const FindComPorts& rhs); + + struct pImpl; +- std::auto_ptr pimpl; ++ std::unique_ptr pimpl; + }; + } + +diff -ur urg-0.8.18/include/cpp/LockGuard.h urg-0.8.18-uniqueptr/include/cpp/LockGuard.h +--- urg-0.8.18/include/cpp/LockGuard.h 2011-07-18 00:08:17.000000000 +0200 ++++ urg-0.8.18-uniqueptr/include/cpp/LockGuard.h 2018-02-13 09:34:43.990313425 +0100 +@@ -31,7 +31,7 @@ + //void* operator new[] (size_t); + + struct pImpl; +- std::auto_ptr pimpl; ++ std::unique_ptr pimpl; + + public: + /*! +diff -ur urg-0.8.18/include/cpp/Lock.h urg-0.8.18-uniqueptr/include/cpp/Lock.h +--- urg-0.8.18/include/cpp/Lock.h 2011-07-18 00:08:17.000000000 +0200 ++++ urg-0.8.18-uniqueptr/include/cpp/Lock.h 2018-02-13 09:34:43.956314581 +0100 +@@ -32,7 +32,7 @@ + //void* operator new[] (size_t); + + struct pImpl; +- const std::auto_ptr pimpl; ++ const std::unique_ptr pimpl; + + public: + Lock(void); +diff -ur urg-0.8.18/include/cpp/LogNameHolder.h urg-0.8.18-uniqueptr/include/cpp/LogNameHolder.h +--- urg-0.8.18/include/cpp/LogNameHolder.h 2009-05-05 10:56:20.000000000 +0200 ++++ urg-0.8.18-uniqueptr/include/cpp/LogNameHolder.h 2018-02-13 09:34:43.967314207 +0100 +@@ -26,7 +26,7 @@ + LogNameHolder& operator = (const LogNameHolder& rhs); + + struct pImpl; +- const std::auto_ptr pimpl; ++ const std::unique_ptr pimpl; + + public: + ~LogNameHolder(void); +diff -ur urg-0.8.18/include/cpp/mConnection.h urg-0.8.18-uniqueptr/include/cpp/mConnection.h +--- urg-0.8.18/include/cpp/mConnection.h 2009-09-15 23:51:25.000000000 +0200 ++++ urg-0.8.18-uniqueptr/include/cpp/mConnection.h 2018-02-13 09:34:43.946314920 +0100 +@@ -26,7 +26,7 @@ + mConnection& operator = (const mConnection& rhs); + + struct pImpl; +- const std::auto_ptr pimpl; ++ const std::unique_ptr pimpl; + + public: + explicit mConnection(Connection* connection); +diff -ur urg-0.8.18/include/cpp/MonitorDataHandler.h urg-0.8.18-uniqueptr/include/cpp/MonitorDataHandler.h +--- urg-0.8.18/include/cpp/MonitorDataHandler.h 2009-05-05 10:56:20.000000000 +0200 ++++ urg-0.8.18-uniqueptr/include/cpp/MonitorDataHandler.h 2018-02-13 09:34:44.019312420 +0100 +@@ -38,7 +38,7 @@ + MonitorDataHandler& operator = (const MonitorDataHandler& rhs); + + struct pImpl; +- std::auto_ptr pimpl; ++ std::unique_ptr pimpl; + + public: + explicit MonitorDataHandler(std::string file, +diff -ur urg-0.8.18/include/cpp/MonitorEventScheduler.h urg-0.8.18-uniqueptr/include/cpp/MonitorEventScheduler.h +--- urg-0.8.18/include/cpp/MonitorEventScheduler.h 2009-05-05 10:56:20.000000000 +0200 ++++ urg-0.8.18-uniqueptr/include/cpp/MonitorEventScheduler.h 2018-02-13 09:34:43.933315362 +0100 +@@ -30,7 +30,7 @@ + MonitorEventScheduler& operator = (const MonitorEventScheduler& rhs); + + struct pImpl; +- std::auto_ptr pimpl; ++ std::unique_ptr pimpl; + + public: + ~MonitorEventScheduler(void); +diff -ur urg-0.8.18/include/cpp/MonitorModeManager.h urg-0.8.18-uniqueptr/include/cpp/MonitorModeManager.h +--- urg-0.8.18/include/cpp/MonitorModeManager.h 2009-05-05 10:56:20.000000000 +0200 ++++ urg-0.8.18-uniqueptr/include/cpp/MonitorModeManager.h 2018-02-13 09:34:43.996313221 +0100 +@@ -27,7 +27,7 @@ + MonitorModeManager& operator = (const MonitorModeManager& rhs); + + struct pImpl; +- std::auto_ptr pimpl; ++ std::unique_ptr pimpl; + + public: + +diff -ur urg-0.8.18/include/cpp/mUrgDevice.h urg-0.8.18-uniqueptr/include/cpp/mUrgDevice.h +--- urg-0.8.18/include/cpp/mUrgDevice.h 2010-06-06 14:01:11.000000000 +0200 ++++ urg-0.8.18-uniqueptr/include/cpp/mUrgDevice.h 2018-02-13 09:34:43.973314003 +0100 +@@ -25,7 +25,7 @@ + mUrgDevice& operator = (const mUrgDevice& rhs); + + struct pImpl; +- std::auto_ptr pimpl; ++ std::unique_ptr pimpl; + + public: + /*! +diff -ur urg-0.8.18/include/cpp/Semaphore.h urg-0.8.18-uniqueptr/include/cpp/Semaphore.h +--- urg-0.8.18/include/cpp/Semaphore.h 2011-05-06 09:18:01.000000000 +0200 ++++ urg-0.8.18-uniqueptr/include/cpp/Semaphore.h 2018-02-13 09:34:44.009312770 +0100 +@@ -28,7 +28,7 @@ + Semaphore& operator = (const Semaphore& rhs); + + struct pImpl; +- const std::auto_ptr pimpl; ++ const std::unique_ptr pimpl; + + public: + /*! +diff -ur urg-0.8.18/include/cpp/SerialDevice.h urg-0.8.18-uniqueptr/include/cpp/SerialDevice.h +--- urg-0.8.18/include/cpp/SerialDevice.h 2010-04-30 18:12:06.000000000 +0200 ++++ urg-0.8.18-uniqueptr/include/cpp/SerialDevice.h 2018-02-13 09:34:44.002313016 +0100 +@@ -45,7 +45,7 @@ + SerialDevice& operator = (const SerialDevice& rhs); + + struct pImpl; +- const std::auto_ptr pimpl; ++ const std::unique_ptr pimpl; + }; + } + +diff -ur urg-0.8.18/include/cpp/TcpipSocket.h urg-0.8.18-uniqueptr/include/cpp/TcpipSocket.h +--- urg-0.8.18/include/cpp/TcpipSocket.h 2010-05-09 11:04:32.000000000 +0200 ++++ urg-0.8.18-uniqueptr/include/cpp/TcpipSocket.h 2018-02-13 09:34:43.951314751 +0100 +@@ -64,7 +64,7 @@ + TcpipSocket& operator = (const TcpipSocket& rhs); + + struct pImpl; +- const std::auto_ptr pimpl; ++ const std::unique_ptr pimpl; + }; + } + +diff -ur urg-0.8.18/include/cpp/Thread.h urg-0.8.18-uniqueptr/include/cpp/Thread.h +--- urg-0.8.18/include/cpp/Thread.h 2009-05-21 00:16:32.000000000 +0200 ++++ urg-0.8.18-uniqueptr/include/cpp/Thread.h 2018-02-13 09:34:43.978313833 +0100 +@@ -25,7 +25,7 @@ + Thread& operator = (const Thread& rhs); + + struct pImpl; +- const std::auto_ptr pimpl; ++ const std::unique_ptr pimpl; + + public: + enum { +diff -ur urg-0.8.18/include/cpp/UrgCtrl.h urg-0.8.18-uniqueptr/include/cpp/UrgCtrl.h +--- urg-0.8.18/include/cpp/UrgCtrl.h 2010-06-06 12:43:46.000000000 +0200 ++++ urg-0.8.18-uniqueptr/include/cpp/UrgCtrl.h 2018-02-13 09:34:44.014312595 +0100 +@@ -92,7 +92,7 @@ + UrgCtrl& operator = (const UrgCtrl& rhs); + + struct pImpl; +- std::auto_ptr pimpl; ++ std::unique_ptr pimpl; + }; + } + +diff -ur urg-0.8.18/include/cpp/UrgDevice.h urg-0.8.18-uniqueptr/include/cpp/UrgDevice.h +--- urg-0.8.18/include/cpp/UrgDevice.h 2010-06-14 01:26:56.000000000 +0200 ++++ urg-0.8.18-uniqueptr/include/cpp/UrgDevice.h 2018-02-13 09:34:43.939315158 +0100 +@@ -250,7 +250,7 @@ + UrgDevice& operator = (const UrgDevice& rhs); + + struct pImpl; +- std::auto_ptr pimpl; ++ std::unique_ptr pimpl; + }; + } + +diff -ur urg-0.8.18/include/cpp/UrgServer.h urg-0.8.18-uniqueptr/include/cpp/UrgServer.h +--- urg-0.8.18/include/cpp/UrgServer.h 2009-05-05 10:56:20.000000000 +0200 ++++ urg-0.8.18-uniqueptr/include/cpp/UrgServer.h 2018-02-13 09:34:43.926315601 +0100 +@@ -25,7 +25,7 @@ + UrgServer& operator = (const UrgServer& rhs); + + struct pImpl; +- std::auto_ptr pimpl; ++ std::unique_ptr pimpl; + + public: + UrgServer(void); +diff -ur urg-0.8.18/src/cpp/connection/FindComPorts.h urg-0.8.18-uniqueptr/src/cpp/connection/FindComPorts.h +--- urg-0.8.18/src/cpp/connection/FindComPorts.h 2010-04-30 18:12:06.000000000 +0200 ++++ urg-0.8.18-uniqueptr/src/cpp/connection/FindComPorts.h 2018-02-13 09:27:30.476234976 +0100 +@@ -77,7 +77,7 @@ + FindComPorts& operator = (const FindComPorts& rhs); + + struct pImpl; +- std::auto_ptr pimpl; ++ std::unique_ptr pimpl; + }; + } + +diff -ur urg-0.8.18/src/cpp/connection/sdl/SdlNetInit.h urg-0.8.18-uniqueptr/src/cpp/connection/sdl/SdlNetInit.h +--- urg-0.8.18/src/cpp/connection/sdl/SdlNetInit.h 2010-05-26 13:19:49.000000000 +0200 ++++ urg-0.8.18-uniqueptr/src/cpp/connection/sdl/SdlNetInit.h 2018-02-13 09:27:30.481234801 +0100 +@@ -22,7 +22,7 @@ + SdlNetInit& operator = (const SdlNetInit& rhs); + + struct pImpl; +- std::auto_ptr pimpl; ++ std::unique_ptr pimpl; + + protected: + SdlNetInit(void); +diff -ur urg-0.8.18/src/cpp/connection/sdl/SocketSet.h urg-0.8.18-uniqueptr/src/cpp/connection/sdl/SocketSet.h +--- urg-0.8.18/src/cpp/connection/sdl/SocketSet.h 2010-05-26 13:23:08.000000000 +0200 ++++ urg-0.8.18-uniqueptr/src/cpp/connection/sdl/SocketSet.h 2018-02-13 09:27:30.492234416 +0100 +@@ -64,7 +64,7 @@ + SocketSet& operator = (const SocketSet& rhs); + + struct pImpl; +- const std::auto_ptr pimpl; ++ const std::unique_ptr pimpl; + }; + } + +diff -ur urg-0.8.18/src/cpp/connection/sdl/TcpipServer.h urg-0.8.18-uniqueptr/src/cpp/connection/sdl/TcpipServer.h +--- urg-0.8.18/src/cpp/connection/sdl/TcpipServer.h 2010-05-26 13:23:08.000000000 +0200 ++++ urg-0.8.18-uniqueptr/src/cpp/connection/sdl/TcpipServer.h 2018-02-13 09:27:30.486234626 +0100 +@@ -49,7 +49,7 @@ + TcpipServer& operator = (const TcpipServer& rhs); + + struct pImpl; +- const std::auto_ptr pimpl; ++ const std::unique_ptr pimpl; + }; + } + +diff -ur urg-0.8.18/src/cpp/connection/SerialDevice.h urg-0.8.18-uniqueptr/src/cpp/connection/SerialDevice.h +--- urg-0.8.18/src/cpp/connection/SerialDevice.h 2010-04-30 18:12:06.000000000 +0200 ++++ urg-0.8.18-uniqueptr/src/cpp/connection/SerialDevice.h 2018-02-13 09:27:30.497234241 +0100 +@@ -45,7 +45,7 @@ + SerialDevice& operator = (const SerialDevice& rhs); + + struct pImpl; +- const std::auto_ptr pimpl; ++ const std::unique_ptr pimpl; + }; + } + +diff -ur urg-0.8.18/src/cpp/connection/TcpipSocket.h urg-0.8.18-uniqueptr/src/cpp/connection/TcpipSocket.h +--- urg-0.8.18/src/cpp/connection/TcpipSocket.h 2010-05-09 11:04:32.000000000 +0200 ++++ urg-0.8.18-uniqueptr/src/cpp/connection/TcpipSocket.h 2018-02-13 09:27:30.470235186 +0100 +@@ -64,7 +64,7 @@ + TcpipSocket& operator = (const TcpipSocket& rhs); + + struct pImpl; +- const std::auto_ptr pimpl; ++ const std::unique_ptr pimpl; + }; + } + +diff -ur urg-0.8.18/src/cpp/coordinate/Coordinate.h urg-0.8.18-uniqueptr/src/cpp/coordinate/Coordinate.h +--- urg-0.8.18/src/cpp/coordinate/Coordinate.h 2010-01-04 16:09:51.000000000 +0100 ++++ urg-0.8.18-uniqueptr/src/cpp/coordinate/Coordinate.h 2018-02-13 09:27:30.361239001 +0100 +@@ -95,7 +95,7 @@ + Coordinate& operator = (const Coordinate& rhs); + + struct pImpl; +- std::auto_ptr pimpl; ++ std::unique_ptr pimpl; + }; + } + +diff -ur urg-0.8.18/src/cpp/monitor/DeviceIpManager.h urg-0.8.18-uniqueptr/src/cpp/monitor/DeviceIpManager.h +--- urg-0.8.18/src/cpp/monitor/DeviceIpManager.h 2009-05-05 10:56:20.000000000 +0200 ++++ urg-0.8.18-uniqueptr/src/cpp/monitor/DeviceIpManager.h 2018-02-13 09:27:30.368238756 +0100 +@@ -25,7 +25,7 @@ + DeviceIpManager& operator = (const DeviceIpManager& rhs); + + struct pImpl; +- std::auto_ptr pimpl; ++ std::unique_ptr pimpl; + + public: + ~DeviceIpManager(void); +diff -ur urg-0.8.18/src/cpp/monitor/LogNameHolder.h urg-0.8.18-uniqueptr/src/cpp/monitor/LogNameHolder.h +--- urg-0.8.18/src/cpp/monitor/LogNameHolder.h 2009-05-05 10:56:20.000000000 +0200 ++++ urg-0.8.18-uniqueptr/src/cpp/monitor/LogNameHolder.h 2018-02-13 09:27:30.391237951 +0100 +@@ -26,7 +26,7 @@ + LogNameHolder& operator = (const LogNameHolder& rhs); + + struct pImpl; +- const std::auto_ptr pimpl; ++ const std::unique_ptr pimpl; + + public: + ~LogNameHolder(void); +diff -ur urg-0.8.18/src/cpp/monitor/mConnection.h urg-0.8.18-uniqueptr/src/cpp/monitor/mConnection.h +--- urg-0.8.18/src/cpp/monitor/mConnection.h 2009-09-15 23:51:25.000000000 +0200 ++++ urg-0.8.18-uniqueptr/src/cpp/monitor/mConnection.h 2018-02-13 09:27:30.385238161 +0100 +@@ -26,7 +26,7 @@ + mConnection& operator = (const mConnection& rhs); + + struct pImpl; +- const std::auto_ptr pimpl; ++ const std::unique_ptr pimpl; + + public: + explicit mConnection(Connection* connection); +diff -ur urg-0.8.18/src/cpp/monitor/MonitorDataHandler.h urg-0.8.18-uniqueptr/src/cpp/monitor/MonitorDataHandler.h +--- urg-0.8.18/src/cpp/monitor/MonitorDataHandler.h 2009-05-05 10:56:20.000000000 +0200 ++++ urg-0.8.18-uniqueptr/src/cpp/monitor/MonitorDataHandler.h 2018-02-13 09:27:30.409237321 +0100 +@@ -38,7 +38,7 @@ + MonitorDataHandler& operator = (const MonitorDataHandler& rhs); + + struct pImpl; +- std::auto_ptr pimpl; ++ std::unique_ptr pimpl; + + public: + explicit MonitorDataHandler(std::string file, +diff -ur urg-0.8.18/src/cpp/monitor/MonitorEventScheduler.h urg-0.8.18-uniqueptr/src/cpp/monitor/MonitorEventScheduler.h +--- urg-0.8.18/src/cpp/monitor/MonitorEventScheduler.h 2009-05-05 10:56:20.000000000 +0200 ++++ urg-0.8.18-uniqueptr/src/cpp/monitor/MonitorEventScheduler.h 2018-02-13 09:27:30.379238371 +0100 +@@ -30,7 +30,7 @@ + MonitorEventScheduler& operator = (const MonitorEventScheduler& rhs); + + struct pImpl; +- std::auto_ptr pimpl; ++ std::unique_ptr pimpl; + + public: + ~MonitorEventScheduler(void); +diff -ur urg-0.8.18/src/cpp/monitor/MonitorModeManager.h urg-0.8.18-uniqueptr/src/cpp/monitor/MonitorModeManager.h +--- urg-0.8.18/src/cpp/monitor/MonitorModeManager.h 2009-05-05 10:56:20.000000000 +0200 ++++ urg-0.8.18-uniqueptr/src/cpp/monitor/MonitorModeManager.h 2018-02-13 09:27:30.403237531 +0100 +@@ -27,7 +27,7 @@ + MonitorModeManager& operator = (const MonitorModeManager& rhs); + + struct pImpl; +- std::auto_ptr pimpl; ++ std::unique_ptr pimpl; + + public: + +diff -ur urg-0.8.18/src/cpp/monitor/mUrgDevice.h urg-0.8.18-uniqueptr/src/cpp/monitor/mUrgDevice.h +--- urg-0.8.18/src/cpp/monitor/mUrgDevice.h 2010-06-06 14:01:11.000000000 +0200 ++++ urg-0.8.18-uniqueptr/src/cpp/monitor/mUrgDevice.h 2018-02-13 09:27:30.397237741 +0100 +@@ -25,7 +25,7 @@ + mUrgDevice& operator = (const mUrgDevice& rhs); + + struct pImpl; +- std::auto_ptr pimpl; ++ std::unique_ptr pimpl; + + public: + /*! +diff -ur urg-0.8.18/src/cpp/monitor/UrgServer.h urg-0.8.18-uniqueptr/src/cpp/monitor/UrgServer.h +--- urg-0.8.18/src/cpp/monitor/UrgServer.h 2009-05-05 10:56:20.000000000 +0200 ++++ urg-0.8.18-uniqueptr/src/cpp/monitor/UrgServer.h 2018-02-13 09:27:30.373238581 +0100 +@@ -25,7 +25,7 @@ + UrgServer& operator = (const UrgServer& rhs); + + struct pImpl; +- std::auto_ptr pimpl; ++ std::unique_ptr pimpl; + + public: + UrgServer(void); +diff -ur urg-0.8.18/src/cpp/system/ConditionVariable.h urg-0.8.18-uniqueptr/src/cpp/system/ConditionVariable.h +--- urg-0.8.18/src/cpp/system/ConditionVariable.h 2009-05-05 10:56:20.000000000 +0200 ++++ urg-0.8.18-uniqueptr/src/cpp/system/ConditionVariable.h 2018-02-13 09:27:30.448235956 +0100 +@@ -26,7 +26,7 @@ + ConditionVariable& operator = (const ConditionVariable& rhs); + + struct pImpl; +- const std::auto_ptr pimpl; ++ const std::unique_ptr pimpl; + + public: + enum { +diff -ur urg-0.8.18/src/cpp/system/LockGuard.h urg-0.8.18-uniqueptr/src/cpp/system/LockGuard.h +--- urg-0.8.18/src/cpp/system/LockGuard.h 2011-07-18 00:08:17.000000000 +0200 ++++ urg-0.8.18-uniqueptr/src/cpp/system/LockGuard.h 2018-02-13 09:27:30.453235781 +0100 +@@ -31,7 +31,7 @@ + //void* operator new[] (size_t); + + struct pImpl; +- std::auto_ptr pimpl; ++ std::unique_ptr pimpl; + + public: + /*! +diff -ur urg-0.8.18/src/cpp/system/Lock.h urg-0.8.18-uniqueptr/src/cpp/system/Lock.h +--- urg-0.8.18/src/cpp/system/Lock.h 2011-07-18 00:08:17.000000000 +0200 ++++ urg-0.8.18-uniqueptr/src/cpp/system/Lock.h 2018-02-13 09:27:30.437236341 +0100 +@@ -32,7 +32,7 @@ + //void* operator new[] (size_t); + + struct pImpl; +- const std::auto_ptr pimpl; ++ const std::unique_ptr pimpl; + + public: + Lock(void); +diff -ur urg-0.8.18/src/cpp/system/MonitorModeManager.h urg-0.8.18-uniqueptr/src/cpp/system/MonitorModeManager.h +--- urg-0.8.18/src/cpp/system/MonitorModeManager.h 2009-05-05 10:56:20.000000000 +0200 ++++ urg-0.8.18-uniqueptr/src/cpp/system/MonitorModeManager.h 2018-02-13 09:27:30.459235571 +0100 +@@ -27,7 +27,7 @@ + MonitorModeManager& operator = (const MonitorModeManager& rhs); + + struct pImpl; +- std::auto_ptr pimpl; ++ std::unique_ptr pimpl; + + public: + +diff -ur urg-0.8.18/src/cpp/system/SdlInit.h urg-0.8.18-uniqueptr/src/cpp/system/SdlInit.h +--- urg-0.8.18/src/cpp/system/SdlInit.h 2009-05-05 10:56:20.000000000 +0200 ++++ urg-0.8.18-uniqueptr/src/cpp/system/SdlInit.h 2018-02-13 09:27:30.431236551 +0100 +@@ -24,7 +24,7 @@ + SdlInit& operator = (const SdlInit& rhs); + + struct pImpl; +- const std::auto_ptr pimpl; ++ const std::unique_ptr pimpl; + + protected: + SdlInit(void); +diff -ur urg-0.8.18/src/cpp/system/Semaphore.h urg-0.8.18-uniqueptr/src/cpp/system/Semaphore.h +--- urg-0.8.18/src/cpp/system/Semaphore.h 2011-05-06 09:18:01.000000000 +0200 ++++ urg-0.8.18-uniqueptr/src/cpp/system/Semaphore.h 2018-02-13 09:27:30.465235361 +0100 +@@ -28,7 +28,7 @@ + Semaphore& operator = (const Semaphore& rhs); + + struct pImpl; +- const std::auto_ptr pimpl; ++ const std::unique_ptr pimpl; + + public: + /*! +diff -ur urg-0.8.18/src/cpp/system/Thread.h urg-0.8.18-uniqueptr/src/cpp/system/Thread.h +--- urg-0.8.18/src/cpp/system/Thread.h 2009-05-21 00:16:32.000000000 +0200 ++++ urg-0.8.18-uniqueptr/src/cpp/system/Thread.h 2018-02-13 09:27:30.442236166 +0100 +@@ -25,7 +25,7 @@ + Thread& operator = (const Thread& rhs); + + struct pImpl; +- const std::auto_ptr pimpl; ++ const std::unique_ptr pimpl; + + public: + enum { +diff -ur urg-0.8.18/src/cpp/urg/ScipHandler.h urg-0.8.18-uniqueptr/src/cpp/urg/ScipHandler.h +--- urg-0.8.18/src/cpp/urg/ScipHandler.h 2010-02-25 00:30:35.000000000 +0100 ++++ urg-0.8.18-uniqueptr/src/cpp/urg/ScipHandler.h 2018-02-13 09:27:30.420236936 +0100 +@@ -69,7 +69,7 @@ + ScipHandler& operator = (const ScipHandler& rhs); + + struct pImpl; +- std::auto_ptr pimpl; ++ std::unique_ptr pimpl; + }; + } + +diff -ur urg-0.8.18/src/cpp/urg/UrgCtrl.h urg-0.8.18-uniqueptr/src/cpp/urg/UrgCtrl.h +--- urg-0.8.18/src/cpp/urg/UrgCtrl.h 2010-06-06 12:43:46.000000000 +0200 ++++ urg-0.8.18-uniqueptr/src/cpp/urg/UrgCtrl.h 2018-02-13 09:27:30.426236726 +0100 +@@ -92,7 +92,7 @@ + UrgCtrl& operator = (const UrgCtrl& rhs); + + struct pImpl; +- std::auto_ptr pimpl; ++ std::unique_ptr pimpl; + }; + } + +diff -ur urg-0.8.18/src/cpp/urg/UrgDevice.h urg-0.8.18-uniqueptr/src/cpp/urg/UrgDevice.h +--- urg-0.8.18/src/cpp/urg/UrgDevice.h 2010-06-14 01:26:56.000000000 +0200 ++++ urg-0.8.18-uniqueptr/src/cpp/urg/UrgDevice.h 2018-02-13 09:27:30.415237111 +0100 +@@ -250,7 +250,7 @@ + UrgDevice& operator = (const UrgDevice& rhs); + + struct pImpl; +- std::auto_ptr pimpl; ++ std::unique_ptr pimpl; + }; + } + diff --git a/urg.spec b/urg.spec new file mode 100644 index 0000000..c8f07a9 --- /dev/null +++ b/urg.spec @@ -0,0 +1,220 @@ +Name: urg +Version: 0.8.18 +Release: 30%{?dist} +Summary: Library to access Hokuyo URG laser range finders + +License: LGPLv3 +URL: http://www.hokuyo-aut.jp/cgi-bin/urg_programs_en/ +Source0: http://www.hokuyo-aut.jp/02sensor/07scanner/download/urg_programs_en/urg-%{version}.zip +Patch0: urg-0.8.18-missing-includes.patch +Patch1: urg-0.8.18-fixes.patch +%if 0%{?fedora} > 27 +Patch2: urg-0.8.18-unique-ptr.patch +%endif + +BuildRequires: make +BuildRequires: gcc-c++ +BuildRequires: autoconf automake libtool +BuildRequires: SDL_net-devel +BuildRequires: boost-devel >= 1.33.1 + +%description +This library uses the SCIP2.0 protocol to provide access to devices of +Hokuyo URG laser range finder series. + + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} +Requires: boost-devel + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + + +%prep +%setup -q +%patch0 -p1 -b .missing-includes +%patch1 -p1 -b .fixes +%if 0%{?fedora} > 27 +%patch2 -p1 -b .unique-ptr +%endif + + +%build +# autoreconf required for supporting aarch64 see rhbz #926685 +autoreconf -i -f +%configure --disable-static +make %{?_smp_mflags} + + +%install +make install DESTDIR=$RPM_BUILD_ROOT +find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' + + +%ldconfig_scriptlets + + +%files +%doc ChangeLog AUTHORS COPYING README +%{_libdir}/*.so.* + +%files devel +%{_bindir}/* +%{_includedir}/* +%{_libdir}/*.so + + +%changelog +* Sat Jan 21 2023 Fedora Release Engineering - 0.8.18-30 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Sat Jul 23 2022 Fedora Release Engineering - 0.8.18-29 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Sat Jan 22 2022 Fedora Release Engineering - 0.8.18-28 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 0.8.18-27 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Wed Jan 27 2021 Fedora Release Engineering - 0.8.18-26 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 0.8.18-25 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri Jan 31 2020 Fedora Release Engineering - 0.8.18-24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Sat Jul 27 2019 Fedora Release Engineering - 0.8.18-23 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sun Feb 03 2019 Fedora Release Engineering - 0.8.18-22 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sat Jul 14 2018 Fedora Release Engineering - 0.8.18-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Tue Feb 13 2018 Tim Niemueller - 0.8.18-20 +- Add patch to replace auto_ptr with unique_ptr + (easy since auto_ptr is only used as private member and not exposed) +- Add patch with fixes for ppc and arm platforms (narrowing, format fixes) +- Tested with URG-04LX-UG01 model (on x86_64 though, no other arch available) + +* Fri Feb 09 2018 Fedora Release Engineering - 0.8.18-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Aug 03 2017 Fedora Release Engineering - 0.8.18-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 0.8.18-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 0.8.18-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Tue Nov 08 2016 Filipe Rosset - 0.8.18-15 +- Rebuilt to fix FTBFS rhbz #1308211 + +* Fri Feb 05 2016 Fedora Release Engineering - 0.8.18-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Sat Jan 16 2016 Jonathan Wakely - 0.8.18-13 +- Rebuilt for Boost 1.60 + +* Fri Aug 28 2015 Jonathan Wakely - 0.8.18-12 +- Rebuilt for Boost 1.59 + +* Wed Jul 29 2015 Fedora Release Engineering - 0.8.18-11 +- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159 + +* Wed Jul 22 2015 David Tardon - 0.8.18-10 +- rebuild for Boost 1.58 + +* Fri Jun 19 2015 Fedora Release Engineering - 0.8.18-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat May 02 2015 Kalev Lember - 0.8.18-8 +- Rebuilt for GCC 5 C++11 ABI change + +* Tue Jan 27 2015 Petr Machata - 0.8.18-7 +- Rebuild for boost 1.57.0 + +* Mon Aug 18 2014 Fedora Release Engineering - 0.8.18-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sun Jun 08 2014 Fedora Release Engineering - 0.8.18-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Thu May 22 2014 Petr Machata - 0.8.18-4 +- Rebuild for boost 1.55.0 + +* Sun Aug 04 2013 Fedora Release Engineering - 0.8.18-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Tue Jul 30 2013 Petr Machata - 0.8.18-2 +- Rebuild for boost 1.54.0 + +* Tue Jul 09 2013 Mat Booth - 0.8.18-1 +- Fix FTBFS rhbz #913842 +- Fix aarch64 support rhbz #926685 +- Update to latest upstream and drop unneeded patches + +* Sat Feb 09 2013 Denis Arnaud - 0.8.11-7 +- Rebuild for Boost-1.53.0 + +* Sun Jul 22 2012 Fedora Release Engineering - 0.8.11-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sun Mar 4 2012 Peter Robinson - 0.8.11-5 +- Fix gcc 4.7 FTBFS + +* Tue Feb 28 2012 Fedora Release Engineering - 0.8.11-4 +- Rebuilt for c++ ABI breakage + +* Sat Jan 14 2012 Fedora Release Engineering - 0.8.11-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Fri Feb 11 2011 Tim Niemueller - 0.8.11-2 +- Added patch for GCC 4.6 compatibility + +* Thu Feb 10 2011 Tim Niemueller - 0.8.11-1 +- Update to 0.8.11 +- Remove upstreamed patches + +* Mon Feb 07 2011 Fedora Release Engineering - 0.8.7-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Sun Feb 06 2011 Thomas Spura - 0.8.7-5 +- rebuild for new boost + +* Tue Sep 07 2010 Dan Horテ。k - 0.8.7-4 +- fix build on 64-bit architectures + +* Thu Aug 05 2010 Tim Niemueller - 0.8.7-3 +- Rebuild for new Boost + +* Sun Jan 31 2010 Tim Niemueller - 0.8.7-2 +- Fixes from review request #560322: source set to direct file URL, + revised norpath patch to completely remove references to /usr/lib, + added boost-devel as requirement for devel sub-package + +* Sat Jan 30 2010 Tim Niemueller - 0.8.7-1 +- Update to 0.8.7 which contains another upstreamed patch + (separate m4 dir for macros, Boost macros separated) +- Exclude ppc64, does not compile atm +- Add patch to remove rpath, submitted upstream awaiting inclusion +- Add patch to require only Boost 1.33.1 (RHEL/CentOS) +- Add patch to require only Autoconf 2.59 (RHEL/CentOS) +- Add patch to remove some forward declarations (RHEL/CentOS) + +* Mon Jan 25 2010 Tim Niemueller - 0.8.6-1 +- Update to 0.8.6 which contains my upstreamed patches + (fixes for 64bit and GCC 4.4, renaming and placing of libs) + +* Fri Nov 27 2009 Tim Niemueller - 0.7.3-1 +- Initial package +