Insist on boost 1.45 and hence filesystem v3 now that libdcp requires it.
authorCarl Hetherington <cth@carlh.net>
Sat, 2 Feb 2013 19:09:51 +0000 (19:09 +0000)
committerCarl Hetherington <cth@carlh.net>
Sat, 2 Feb 2013 19:09:51 +0000 (19:09 +0000)
src/lib/film.cc
src/lib/scp_dcp_job.cc
src/lib/util.cc
src/tools/dvdomatic.cc
src/wx/dir_picker_ctrl.cc
wscript

index e7ea770236109b6ea35f00d0d248a67a16138bcb..8720e79e46c86e6d053dc9abbcd3f7cda844ce79 100644 (file)
@@ -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;
index 22129f56cdf05e2edadda7baedce3378e012160f..3d941888e76585350f461417893d9bd4daab32dd 100644 (file)
@@ -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);
                
index ce89d5355527dfcd137ddcf4da71d53cd27d2d9d..328be066a4f2266bc7163ca1d10e62df4c0079ec 100644 (file)
@@ -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);
        
index d5dca2ab4eb3d185cd59e2851a2b498dcbed8883..9a1db3fedd50c64c8b402e83b681bccc7af4289b 100644 (file)
@@ -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 ();
                }
                
index cb811fc1087a26839832a5b73f1bdb735d1d0ba3..b6558a881eee90169ba681cc9ff8757ff2a0b01a 100644 (file)
@@ -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 bf5cf1daa282d0fefa40a4eef13bdc67407167c9..ed45b278dc34fc297add780a1f745778fa4890be 100644 (file)
--- 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 <boost/version.hpp>\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 <libssh/libssh.h>\n
                               int main () {\n
@@ -118,6 +130,7 @@ def configure(conf):
                              #include <boost/thread.hpp>\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')