From: Carl Hetherington Date: Sat, 2 Feb 2013 19:09:51 +0000 (+0000) Subject: Insist on boost 1.45 and hence filesystem v3 now that libdcp requires it. X-Git-Tag: v2.0.48~1337^2~715 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=55e5d61e68d9ee95594562f911c9db0397246fbe Insist on boost 1.45 and hence filesystem v3 now that libdcp requires it. --- diff --git a/src/lib/film.cc b/src/lib/film.cc index e7ea77023..8720e79e4 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -810,16 +810,8 @@ Film::set_content (string c) { string check = directory (); -#if BOOST_FILESYSTEM_VERSION == 3 boost::filesystem::path slash ("/"); string platform_slash = slash.make_preferred().string (); -#else -#ifdef DVDOMATIC_WINDOWS - string platform_slash = "\\"; -#else - string platform_slash = "/"; -#endif -#endif if (!ends_with (check, platform_slash)) { check += platform_slash; diff --git a/src/lib/scp_dcp_job.cc b/src/lib/scp_dcp_job.cc index 22129f56c..3d941888e 100644 --- a/src/lib/scp_dcp_job.cc +++ b/src/lib/scp_dcp_job.cc @@ -161,12 +161,7 @@ SCPDCPJob::run () for (boost::filesystem::directory_iterator i = boost::filesystem::directory_iterator (dcp_dir); i != boost::filesystem::directory_iterator(); ++i) { - /* Aah, the sweet smell of progress */ -#if BOOST_FILESYSTEM_VERSION == 3 string const leaf = boost::filesystem::path(*i).leaf().generic_string (); -#else - string const leaf = i->leaf (); -#endif set_status ("copying " + leaf); diff --git a/src/lib/util.cc b/src/lib/util.cc index ce89d5355..328be066a 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -934,11 +934,7 @@ video_frames_to_audio_frames (SourceFrame v, float audio_sample_rate, float fram bool still_image_file (string f) { -#if BOOST_FILESYSTEM_VERSION == 3 string ext = boost::filesystem::path(f).extension().string(); -#else - string ext = boost::filesystem::path(f).extension(); -#endif transform (ext.begin(), ext.end(), ext.begin(), ::tolower); diff --git a/src/tools/dvdomatic.cc b/src/tools/dvdomatic.cc index d5dca2ab4..9a1db3fed 100644 --- a/src/tools/dvdomatic.cc +++ b/src/tools/dvdomatic.cc @@ -270,11 +270,7 @@ public: maybe_save_then_delete_film (); film.reset (new Film (d->get_path (), false)); film->log()->set_level (log_level); -#if BOOST_FILESYSTEM_VERSION == 3 film->set_name (boost::filesystem::path (d->get_path()).filename().generic_string()); -#else - film->set_name (boost::filesystem::path (d->get_path()).filename()); -#endif set_film (); } diff --git a/src/wx/dir_picker_ctrl.cc b/src/wx/dir_picker_ctrl.cc index cb811fc10..b6558a881 100644 --- a/src/wx/dir_picker_ctrl.cc +++ b/src/wx/dir_picker_ctrl.cc @@ -50,11 +50,7 @@ DirPickerCtrl::SetPath (wxString p) if (_path == wxStandardPaths::Get().GetDocumentsDir()) { _folder->SetLabel (_("My Documents")); } else { -#if BOOST_FILESYSTEM_VERSION == 3 _folder->SetLabel (std_to_wx (filesystem::path (wx_to_std (_path)).leaf().string())); -#else - _folder->SetLabel (std_to_wx (filesystem::path (wx_to_std (_path)).leaf())); -#endif } } diff --git a/wscript b/wscript index bf5cf1daa..ed45b278d 100644 --- a/wscript +++ b/wscript @@ -106,6 +106,18 @@ def configure(conf): conf.check_cfg(package = 'libopenjpeg', args = '--cflags --libs', atleast_version = '1.5.0', uselib_store = 'OPENJPEG', mandatory = True) conf.check_cfg(package = 'libopenjpeg', args = '--cflags --libs', max_version = '1.5.1', mandatory = True) + conf.check_cxx(fragment = """ + #include \n + #if BOOST_VERSION < 104500\n + #error boost too old\n + #endif\n + int main(void) { return 0; }\n + """, + mandatory = True, + msg = 'Checking for boost library >= 1.45', + okmsg = 'yes', + errmsg = 'too old\nPlease install boost version 1.45 or higher.') + conf.check_cc(fragment = """ #include \n int main () {\n @@ -118,6 +130,7 @@ def configure(conf): #include \n int main() { boost::thread t (); }\n """, msg = 'Checking for boost threading library', + libpath = '/usr/local/lib', lib = [boost_thread, 'boost_system%s' % boost_lib_suffix], uselib_store = 'BOOST_THREAD')