Build fixes for OS X.
authorCarl Hetherington <cth@carlh.net>
Wed, 29 May 2013 11:00:36 +0000 (12:00 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 29 May 2013 11:00:36 +0000 (12:00 +0100)
src/lib/image.cc
src/tools/servomatic_gui.cc
src/wx/audio_plot.cc
src/wx/film_viewer.cc
test/wscript

index b166dfac6a0c72054531dc19cce0b9a7fd445971..bd527e91ef5c3fcc2961b605e9fc3dfb50b28ed9 100644 (file)
@@ -68,7 +68,7 @@ Image::lines (int n) const
                throw PixelFormatError (N_("lines()"), _pixel_format);
        }
        
-       return size().height / pow(2, d->log2_chroma_h);
+       return size().height / pow(2.0f, d->log2_chroma_h);
 }
 
 /** @return Number of components */
@@ -417,13 +417,13 @@ Image::bytes_per_pixel (int c) const
 
        bpp[0] = floor ((d->comp[0].depth_minus1 + 1 + 7) / 8);
        if (d->nb_components > 1) {
-               bpp[1] = floor ((d->comp[1].depth_minus1 + 1 + 7) / 8) / pow (2, d->log2_chroma_w);
+               bpp[1] = floor ((d->comp[1].depth_minus1 + 1 + 7) / 8) / pow (2.0f, d->log2_chroma_w);
        }
        if (d->nb_components > 2) {
-               bpp[2] = floor ((d->comp[2].depth_minus1 + 1 + 7) / 8) / pow (2, d->log2_chroma_w);
+               bpp[2] = floor ((d->comp[2].depth_minus1 + 1 + 7) / 8) / pow (2.0f, d->log2_chroma_w);
        }
        if (d->nb_components > 3) {
-               bpp[3] = floor ((d->comp[3].depth_minus1 + 1 + 7) / 8) / pow (2, d->log2_chroma_w);
+               bpp[3] = floor ((d->comp[3].depth_minus1 + 1 + 7) / 8) / pow (2.0f, d->log2_chroma_w);
        }
        
        if ((d->flags & PIX_FMT_PLANAR) == 0) {
index 5e36660eb798b861372db178c5010f4c97a8d271..000c2019f40aaa665d0204f3a426c6f5ab82fe19 100644 (file)
@@ -102,8 +102,11 @@ public:
                wxBitmap bitmap (wxString::Format (wxT ("%s/taskbar_icon.png"), POSIX_ICON_PREFIX), wxBITMAP_TYPE_PNG);
                wxIcon icon;
                icon.CopyFromBitmap (bitmap);
-#endif         
+#endif
+#ifndef __WXOSX__
+               /* XXX: fix this for OS X */
                SetIcon (icon, std_to_wx ("DVD-o-matic encode server"));
+#endif         
 
                Connect (ID_status, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler (TaskBarIcon::status));
                Connect (ID_quit, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler (TaskBarIcon::quit));
index cf44eb69fa59c84c93011619c99718b5a0f27b2e..3fec1d3fe3dec0f2e2af8026e94c1e9aed497f20 100644 (file)
@@ -42,7 +42,9 @@ AudioPlot::AudioPlot (wxWindow* parent)
        , _gain (0)
        , _smoothing (max_smoothing / 2)
 {
+#ifndef __WXOSX__      
        SetDoubleBuffered (true);
+#endif 
 
        for (int i = 0; i < MAX_AUDIO_CHANNELS; ++i) {
                _channel_visible[i] = false;
index 4f2985a061db3677ebfb6d0ed5c89bf2fd25c9f8..82490e32978d6f7362c35e7b7fac93f7d93fa272 100644 (file)
@@ -59,7 +59,10 @@ FilmViewer::FilmViewer (shared_ptr<Film> f, wxWindow* p)
        , _display_frame_x (0)
        , _got_frame (false)
 {
+#ifndef __WXOSX__
        _panel->SetDoubleBuffered (true);
+#endif
+       
 #if wxMAJOR_VERSION == 2 && wxMINOR_VERSION >= 9
        _panel->SetBackgroundStyle (wxBG_STYLE_PAINT);
 #endif 
index 15d5410b3edbcc37f71172638c304295ce85a783..5de1a99cea5cb429bdc4b77e50820b400d507409 100644 (file)
@@ -3,7 +3,7 @@ def configure(conf):
                               #define BOOST_TEST_MODULE Config test\n
                              #include <boost/test/unit_test.hpp>\n
                               int main() {}
-                              """, msg = 'Checking for boost unit testing library', lib = 'boost_unit_test_framework-mt', uselib_store = 'BOOST_TEST')
+                              """, msg = 'Checking for boost unit testing library', lib = 'boost_unit_test_framework', uselib_store = 'BOOST_TEST')
 
 def build(bld):
     obj = bld(features = 'cxx cxxprogram')