From 00c1d69a8ef938fae7f318d67bba6e96d33d2a28 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 3 Feb 2019 22:33:18 +0000 Subject: Remove boost::filesystem in favour of std::filesystem --- libtmdb/Jamfile.jam | 13 ++++--------- p2pvr/daemon/storage.h | 2 +- p2pvr/daemon/unittests/Jamfile.jam | 6 +++--- p2pvr/daemon/unittests/mockDevices.cpp | 2 +- p2pvr/daemon/unittests/mockDevices.h | 2 +- p2pvr/daemon/unittests/testErrorHandling.cpp | 2 +- p2pvr/daemon/unittests/testMaint.cpp | 2 +- p2pvr/daemon/unittests/testRecording.cpp | 2 +- p2pvr/daemon/unittests/testRecordings.cpp | 2 +- p2pvr/daemon/unittests/testSched.cpp | 2 +- p2pvr/daemon/unittests/testSi.cpp | 2 +- p2pvr/daemon/unittests/testStorage.cpp | 3 +-- p2pvr/devices/Jamfile.jam | 20 ++++++-------------- p2pvr/devices/devices.cpp | 2 +- p2pvr/devices/devices.h | 8 ++++---- p2pvr/devices/mockTuner.cpp | 2 +- p2pvr/devices/mockTuner.h | 2 +- p2pvr/devices/tuner.cpp | 4 ++-- p2pvr/devices/tuner.h | 8 ++++---- p2pvr/dvb/Jamfile.jam | 3 --- p2pvr/dvb/unittests/Jamfile.jam | 9 +++------ p2pvr/dvb/unittests/createBroadcast.cpp | 4 ++-- p2pvr/dvb/unittests/createSamples.cpp | 4 ++-- p2pvr/lib/Jamfile.jam | 9 +++------ 24 files changed, 46 insertions(+), 69 deletions(-) diff --git a/libtmdb/Jamfile.jam b/libtmdb/Jamfile.jam index f6c8366..9c7a40e 100644 --- a/libtmdb/Jamfile.jam +++ b/libtmdb/Jamfile.jam @@ -5,8 +5,7 @@ lib slicer-json : : : : /usr/include/slicer ; lib Ice : : Ice++11 ; lib jsonpp ; lib pthread ; -lib boost_system ; -lib boost_filesystem ; +lib stdc++fs ; lib curl ; lib boost_utf : : boost_unit_test_framework ; lib adhocutil : : : : /usr/include/adhocutil ; @@ -18,7 +17,6 @@ lib tmdb : pthread slicer slicer-json - boost_system ..//glibmm curl adhocutil @@ -46,8 +44,7 @@ run tmdb slicer slicer-json - boost_filesystem - boost_system + stdc++fs tmdb : testModels @@ -61,8 +58,7 @@ run tmdb slicer slicer-json - boost_filesystem - boost_system + stdc++fs tmdb : testFormatUrls @@ -76,8 +72,7 @@ run tmdb slicer slicer-json - boost_filesystem - boost_system + stdc++fs tmdb : testCallMockApi diff --git a/p2pvr/daemon/storage.h b/p2pvr/daemon/storage.h index c9c984d..f062b28 100644 --- a/p2pvr/daemon/storage.h +++ b/p2pvr/daemon/storage.h @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include "temporaryIceAdapterObject.h" #include #include diff --git a/p2pvr/daemon/unittests/Jamfile.jam b/p2pvr/daemon/unittests/Jamfile.jam index 8c25c07..017beb1 100644 --- a/p2pvr/daemon/unittests/Jamfile.jam +++ b/p2pvr/daemon/unittests/Jamfile.jam @@ -1,7 +1,7 @@ import testing ; lib boost_system ; -lib boost_filesystem ; +lib stdc++fs ; lib Ice : : Ice++11 ; lib IceBox : : IceBox++11 ; lib dbppcore : : : : /usr/include/dbpp ; @@ -41,7 +41,7 @@ lib testCommon : ../../devices//p2pvrMockTuner ../../devices//p2pvrdevices boost_system - boost_filesystem + stdc++fs ../../ice ../../ice : : @@ -55,7 +55,7 @@ lib testCommon : Ice IceBox boost_system - boost_filesystem + stdc++fs ../..//boost_utf ../../devices//p2pvrMockTuner ../../devices//mockdata diff --git a/p2pvr/daemon/unittests/mockDevices.cpp b/p2pvr/daemon/unittests/mockDevices.cpp index 135664f..b374e20 100644 --- a/p2pvr/daemon/unittests/mockDevices.cpp +++ b/p2pvr/daemon/unittests/mockDevices.cpp @@ -11,7 +11,7 @@ namespace P2PVR { } TunerPtr - MockDevices::openTuner(const boost::filesystem::path & path) const + MockDevices::openTuner(const std::filesystem::path & path) const { return std::make_shared(path, ic); } diff --git a/p2pvr/daemon/unittests/mockDevices.h b/p2pvr/daemon/unittests/mockDevices.h index a9ed170..596a7bd 100644 --- a/p2pvr/daemon/unittests/mockDevices.h +++ b/p2pvr/daemon/unittests/mockDevices.h @@ -11,7 +11,7 @@ namespace P2PVR { public: MockDevices(Ice::CommunicatorPtr ic); - TunerPtr openTuner(const boost::filesystem::path &) const override; + TunerPtr openTuner(const std::filesystem::path &) const override; private: Ice::CommunicatorPtr ic; diff --git a/p2pvr/daemon/unittests/testErrorHandling.cpp b/p2pvr/daemon/unittests/testErrorHandling.cpp index e38ac8e..0cb71bf 100644 --- a/p2pvr/daemon/unittests/testErrorHandling.cpp +++ b/p2pvr/daemon/unittests/testErrorHandling.cpp @@ -1,6 +1,6 @@ #define BOOST_TEST_MODULE ErrorHandling #include -#include +#include #include #include #include diff --git a/p2pvr/daemon/unittests/testMaint.cpp b/p2pvr/daemon/unittests/testMaint.cpp index feb5153..4c72933 100644 --- a/p2pvr/daemon/unittests/testMaint.cpp +++ b/p2pvr/daemon/unittests/testMaint.cpp @@ -1,6 +1,6 @@ #define BOOST_TEST_MODULE Maintenance #include -#include +#include #include #include #include diff --git a/p2pvr/daemon/unittests/testRecording.cpp b/p2pvr/daemon/unittests/testRecording.cpp index 533859a..63a54ad 100644 --- a/p2pvr/daemon/unittests/testRecording.cpp +++ b/p2pvr/daemon/unittests/testRecording.cpp @@ -1,6 +1,6 @@ #define BOOST_TEST_MODULE Recording #include -#include +#include #include #include #include diff --git a/p2pvr/daemon/unittests/testRecordings.cpp b/p2pvr/daemon/unittests/testRecordings.cpp index b68a2a3..4c78ac9 100644 --- a/p2pvr/daemon/unittests/testRecordings.cpp +++ b/p2pvr/daemon/unittests/testRecordings.cpp @@ -1,6 +1,6 @@ #define BOOST_TEST_MODULE Recordings #include -#include +#include #include #include #include diff --git a/p2pvr/daemon/unittests/testSched.cpp b/p2pvr/daemon/unittests/testSched.cpp index 8450a4c..f263d39 100644 --- a/p2pvr/daemon/unittests/testSched.cpp +++ b/p2pvr/daemon/unittests/testSched.cpp @@ -1,6 +1,6 @@ #define BOOST_TEST_MODULE Scheduler #include -#include +#include #include #include #include diff --git a/p2pvr/daemon/unittests/testSi.cpp b/p2pvr/daemon/unittests/testSi.cpp index a894155..fc37681 100644 --- a/p2pvr/daemon/unittests/testSi.cpp +++ b/p2pvr/daemon/unittests/testSi.cpp @@ -1,6 +1,6 @@ #define BOOST_TEST_MODULE SI #include -#include +#include #include #include #include diff --git a/p2pvr/daemon/unittests/testStorage.cpp b/p2pvr/daemon/unittests/testStorage.cpp index f186f4f..5e7032c 100644 --- a/p2pvr/daemon/unittests/testStorage.cpp +++ b/p2pvr/daemon/unittests/testStorage.cpp @@ -1,6 +1,6 @@ #define BOOST_TEST_MODULE Storage #include -#include +#include #include #include #include @@ -16,7 +16,6 @@ using namespace P2PVR; using namespace P2PVR::Testing; -const boost::filesystem::path storageRootDir = "/tmp/ut/p2pvr/recordings"; namespace P2PVR { namespace Testing { class TestService : public StandardMockDatabase { diff --git a/p2pvr/devices/Jamfile.jam b/p2pvr/devices/Jamfile.jam index bb9f70e..363215c 100644 --- a/p2pvr/devices/Jamfile.jam +++ b/p2pvr/devices/Jamfile.jam @@ -2,17 +2,14 @@ import type ; import generators ; import testing ; -lib boost_system ; -lib boost_thread ; -lib boost_filesystem ; +lib stdc++fs ; lib boost_program_options ; lib lzma ; lib p2pvrdevices : [ glob-tree *.cpp : mock*.cpp ] : - boost_system - boost_filesystem + stdc++fs boost_program_options ../dvb//p2pvrdvb ../ice//p2pvrice @@ -21,9 +18,8 @@ lib p2pvrdevices : ..//icetray ../ice//p2pvrice : : - boost_filesystem + stdc++fs ../ice//p2pvrice - boost_system . ; @@ -43,9 +39,7 @@ lib p2pvrMockTuner : mockTuner.cpp : mockdata - boost_system - boost_thread - boost_filesystem + stdc++fs p2pvrdevices ../dvb//p2pvrdvb ../ice//p2pvrice @@ -54,9 +48,8 @@ lib p2pvrMockTuner : ..//icetray ../ice//p2pvrice : : - boost_filesystem + stdc++fs ../ice//p2pvrice - boost_system . ; @@ -77,8 +70,7 @@ run ..//adhocutil ..//icetray mockdata - boost_filesystem - boost_system + stdc++fs ..//boost_utf BOOST_TEST_DYN_LINK ; diff --git a/p2pvr/devices/devices.cpp b/p2pvr/devices/devices.cpp index 4e7bb09..2906c64 100644 --- a/p2pvr/devices/devices.cpp +++ b/p2pvr/devices/devices.cpp @@ -114,7 +114,7 @@ DevicesI::getTuner(const DeliveryProvider & provider) } TunerPtr -DevicesI::openTuner(const boost::filesystem::path & path) const +DevicesI::openTuner(const std::filesystem::path & path) const { return std::make_shared(path); } diff --git a/p2pvr/devices/devices.h b/p2pvr/devices/devices.h index f734012..9647c40 100644 --- a/p2pvr/devices/devices.h +++ b/p2pvr/devices/devices.h @@ -9,7 +9,7 @@ #include #include #include -#include +#include namespace P2PVR { class OpenTuner; @@ -21,7 +21,7 @@ class DLL_PUBLIC DevicesI : public Tuners { ICETRAY_OPTIONS_DECLARE; - std::vector devices; + std::vector devices; }; DevicesI(); @@ -44,7 +44,7 @@ class DLL_PUBLIC DevicesI : public Tuners { ::Ice::Int TunerCount(const Ice::Current &) override; protected: - virtual TunerPtr openTuner(const boost::filesystem::path &) const; + virtual TunerPtr openTuner(const std::filesystem::path &) const; typedef boost::function DeliveryProvider; typedef boost::function Target; @@ -60,7 +60,7 @@ class DLL_PUBLIC DevicesI : public Tuners { OpenDevices openDevices; BackgroundOperations backgroundOperations; - std::vector devices; + std::vector devices; std::mutex lock; IceTray::OptionsResolver options; diff --git a/p2pvr/devices/mockTuner.cpp b/p2pvr/devices/mockTuner.cpp index 531e6a1..3533861 100644 --- a/p2pvr/devices/mockTuner.cpp +++ b/p2pvr/devices/mockTuner.cpp @@ -45,7 +45,7 @@ class MockFrontend : public DVB::Frontend { } }; -MockTuner::MockTuner(const boost::filesystem::path & deviceFrontend, Ice::CommunicatorPtr c) : +MockTuner::MockTuner(const std::filesystem::path & deviceFrontend, Ice::CommunicatorPtr c) : TunerI(deviceFrontend, DVB::FrontendPtr(new MockFrontend(this, dvb_frontend_info(), logger))), MockData(c), ic(c) diff --git a/p2pvr/devices/mockTuner.h b/p2pvr/devices/mockTuner.h index 2277deb..ec73d25 100644 --- a/p2pvr/devices/mockTuner.h +++ b/p2pvr/devices/mockTuner.h @@ -14,7 +14,7 @@ namespace DVB { namespace Testing { class DLL_PUBLIC MockTuner : public DVB::TunerI, MockData { public: - MockTuner(const boost::filesystem::path & deviceFrontend, Ice::CommunicatorPtr); + MockTuner(const std::filesystem::path & deviceFrontend, Ice::CommunicatorPtr); AdHoc::FileUtils::FileHandle OpenDemux() const override; void RequestPID(int, int) const override; diff --git a/p2pvr/devices/tuner.cpp b/p2pvr/devices/tuner.cpp index 531397d..7983adb 100644 --- a/p2pvr/devices/tuner.cpp +++ b/p2pvr/devices/tuner.cpp @@ -17,9 +17,9 @@ namespace P2PVR { namespace DVB { IceTray::Logging::LoggerPtr TunerI::logger = LOGMANAGER()->getLogger(); -TunerI::TunerI(const boost::filesystem::path & df, FrontendPtr pfe) : +TunerI::TunerI(const std::filesystem::path & df, FrontendPtr pfe) : deviceFrontend(df), - deviceRoot(df.branch_path()), + deviceRoot(df.parent_path()), frontendFD(deviceFrontend, O_RDWR), backgroundThread(NULL) { diff --git a/p2pvr/devices/tuner.h b/p2pvr/devices/tuner.h index 11fbf07..7e852f1 100644 --- a/p2pvr/devices/tuner.h +++ b/p2pvr/devices/tuner.h @@ -2,7 +2,7 @@ #define P2PVR_TUNER_H #include -#include +#include #include #include #include "frontend.h" @@ -42,7 +42,7 @@ class DLL_PUBLIC TunerI : public Tuner { typedef std::shared_ptr BackgroundClient; typedef std::map BackgroundClients; - TunerI(const boost::filesystem::path & deviceFrontend, FrontendPtr = FrontendPtr()); + TunerI(const std::filesystem::path & deviceFrontend, FrontendPtr = FrontendPtr()); ~TunerI(); void TuneTo(const DVBSI::DeliveryPtr &) override; @@ -76,8 +76,8 @@ class DLL_PUBLIC TunerI : public Tuner { void senderThread(); static void setBufferSize(int fd, unsigned long bytes); - const boost::filesystem::path deviceFrontend; - const boost::filesystem::path deviceRoot; + const std::filesystem::path deviceFrontend; + const std::filesystem::path deviceRoot; AdHoc::FileUtils::FileHandle frontendFD; BackgroundClients backgroundClients; std::thread * backgroundThread; diff --git a/p2pvr/dvb/Jamfile.jam b/p2pvr/dvb/Jamfile.jam index b3176bb..7c99c83 100644 --- a/p2pvr/dvb/Jamfile.jam +++ b/p2pvr/dvb/Jamfile.jam @@ -1,12 +1,9 @@ -lib boost_system ; - lib p2pvrdvb : [ glob-tree *.cpp : unittests ] : ../ice//p2pvrice ..//adhocutil ..//icetray - boost_system ../..//glibmm ../ice//p2pvrice : : diff --git a/p2pvr/dvb/unittests/Jamfile.jam b/p2pvr/dvb/unittests/Jamfile.jam index c812c5c..b724fa5 100644 --- a/p2pvr/dvb/unittests/Jamfile.jam +++ b/p2pvr/dvb/unittests/Jamfile.jam @@ -1,8 +1,7 @@ import testing ; lib adhocutil ; -lib boost_system ; -lib boost_filesystem ; +lib stdc++fs ; lib Ice : : Ice++11 ; path-constant me : . ; @@ -15,8 +14,7 @@ exe createSamples : ..//p2pvrdvb ../../ice//p2pvrice Ice - boost_system - boost_filesystem + stdc++fs ../..//boost_utf ROOT=\"$(me)\" ; @@ -30,8 +28,7 @@ exe createBroadcast : ../../lib//p2pvrlib ../../ice//p2pvrice Ice - boost_system - boost_filesystem + stdc++fs ../..//boost_utf ROOT=\"$(me)\" ; diff --git a/p2pvr/dvb/unittests/createBroadcast.cpp b/p2pvr/dvb/unittests/createBroadcast.cpp index b7e047b..bf1de2d 100644 --- a/p2pvr/dvb/unittests/createBroadcast.cpp +++ b/p2pvr/dvb/unittests/createBroadcast.cpp @@ -1,6 +1,6 @@ #define BOOST_TEST_MODULE CreateSamples #include -#include +#include #include #include #include @@ -81,7 +81,7 @@ class Sampler { } private: - void Save(Ice::CommunicatorPtr ic, const Sampled & s, const boost::filesystem::path & fileName) + void Save(Ice::CommunicatorPtr ic, const Sampled & s, const std::filesystem::path & fileName) { Ice::OutputStream out(ic); out.write(s); diff --git a/p2pvr/dvb/unittests/createSamples.cpp b/p2pvr/dvb/unittests/createSamples.cpp index c36b49d..523cccb 100644 --- a/p2pvr/dvb/unittests/createSamples.cpp +++ b/p2pvr/dvb/unittests/createSamples.cpp @@ -1,6 +1,6 @@ #define BOOST_TEST_MODULE CreateSamples #include -#include +#include #include #include #include @@ -67,7 +67,7 @@ class SiSampleCollector : public Base { template static std::shared_ptr> -CaptureAndSave(const boost::filesystem::path & fileName, const boost::function & method, const P & ... pp) +CaptureAndSave(const std::filesystem::path & fileName, const boost::function & method, const P & ... pp) { auto icp = standardConfig>(pp...); auto ic = std::get<0>(icp); diff --git a/p2pvr/lib/Jamfile.jam b/p2pvr/lib/Jamfile.jam index 0e15277..818a496 100644 --- a/p2pvr/lib/Jamfile.jam +++ b/p2pvr/lib/Jamfile.jam @@ -1,12 +1,10 @@ lib slicer : : slicer : : /usr/include/slicer ; -lib boost_system ; -lib boost_filesystem ; +lib stdc++fs ; lib p2pvrlib : [ glob-tree *.cpp ] : - boost_system - boost_filesystem + stdc++fs ../ice//p2pvrice ../dvb//p2pvrdvb ..//icetray @@ -14,8 +12,7 @@ lib p2pvrlib : ../ice//p2pvrice slicer : : - boost_filesystem + stdc++fs ../ice//p2pvrice - boost_system . ; -- cgit v1.2.3