=== modified file 'CMakeLists.txt'
--- CMakeLists.txt	2012-03-17 15:17:13 +0000
+++ CMakeLists.txt	2012-04-08 23:41:18 +0000
@@ -86,13 +86,13 @@
 
 if(CMAKE_COMPILER_IS_GNUCXX)
     # Set default flags for Release build.
-    set(CMAKE_C_FLAGS_RELEASE "-Wall -O2 -DNDEBUG ")
-    set(CMAKE_CXX_FLAGS_RELEASE "-Wall -O2 -DNDEBUG")
+    set(CMAKE_C_FLAGS_RELEASE "-Wall -O2 -DNDEBUG -fPIC")
+    set(CMAKE_CXX_FLAGS_RELEASE "-Wall -O2 -DNDEBUG -fPIC")
     set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-s")
 
     # Set default flags for Debug build.
-    set(CMAKE_C_FLAGS_DEBUG "-Wall -g3 -ggdb3 -DDEBUG")
-    set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g3 -ggdb3 -DDEBUG")
+    set(CMAKE_C_FLAGS_DEBUG "-Wall -g3 -ggdb3 -DDEBUG -fPIC")
+    set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g3 -ggdb3 -DDEBUG -fPIC")
 
     if( USE_PNG_BITMAPS )
         #Add  -DUSE_PNG_BITMAPS to windres.exe command line

=== modified file 'common/CMakeLists.txt'
--- common/CMakeLists.txt	2012-02-16 20:03:33 +0000
+++ common/CMakeLists.txt	2012-04-08 23:42:15 +0000
@@ -150,6 +150,6 @@
     # This one gets made only when testing.
     # to build it, first enable #define STAND_ALONE at top of dsnlexer.cpp
     add_executable( dsntest EXCLUDE_FROM_ALL dsnlexer.cpp )
-    target_link_libraries( dsntest common ${wxWidgets_LIBRARIES} )
+    target_link_libraries( dsntest common ${wxWidgets_LIBRARIES} rt )
 
 endif( NOT MSVC )

=== modified file 'include/boost/polygon/polygon.hpp'
--- include/boost/polygon/polygon.hpp	2010-10-23 10:09:23 +0000
+++ include/boost/polygon/polygon.hpp	2012-04-09 00:51:01 +0000
@@ -24,6 +24,8 @@
 #include "transform.hpp"
 #include "detail/transform_detail.hpp"
 
+#include "detail/polygon_sort_adaptor.hpp"
+
 //interval
 #include "interval_data.hpp"
 #include "interval_traits.hpp"

=== modified file 'pcbnew/CMakeLists.txt'
--- pcbnew/CMakeLists.txt	2012-04-08 14:25:49 +0000
+++ pcbnew/CMakeLists.txt	2012-04-09 01:16:09 +0000
@@ -1,7 +1,7 @@
 add_definitions(-DPCBNEW)
 
 if (KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES)
-  EXECUTE_PROCESS(COMMAND python -c "import sys;print\"%s.%s\"%sys.version_info[0:2]" OUTPUT_VARIABLE PYTHON_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
+  EXECUTE_PROCESS(COMMAND python2 -c "import sys;print\"%s.%s\"%sys.version_info[0:2]" OUTPUT_VARIABLE PYTHON_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
   
   SET(PYTHON_DEST "lib/python${PYTHON_VERSION}/dist-packages" )
   file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/scripting)
@@ -392,6 +392,7 @@
     ${OPENGL_LIBRARIES}
     ${GDI_PLUS_LIBRARIES}
     ${PYTHON_LIBRARIES}
+    rt
     )
 
 ###
@@ -433,12 +434,12 @@
 if(NOT MSVC)
     # This one gets made only when testing.
     add_executable(specctra_test EXCLUDE_FROM_ALL specctra_test.cpp specctra.cpp)
-    target_link_libraries(specctra_test common ${wxWidgets_LIBRARIES})
+    target_link_libraries(specctra_test common ${wxWidgets_LIBRARIES} rt)
 endif(NOT MSVC)
 
 # This one gets made only when testing.
 add_executable(layer_widget_test WIN32 EXCLUDE_FROM_ALL
     layer_widget.cpp
     )
-target_link_libraries(layer_widget_test common ${wxWidgets_LIBRARIES})
+target_link_libraries(layer_widget_test common ${wxWidgets_LIBRARIES} rt)
 

=== modified file 'pcbnew/dialogs/dialog_scripting.cpp'
--- pcbnew/dialogs/dialog_scripting.cpp	2012-03-01 07:21:53 +0000
+++ pcbnew/dialogs/dialog_scripting.cpp	2012-04-08 23:00:25 +0000
@@ -3,12 +3,12 @@
  */
 
 
+#include <Python.h>
 #include <fctsys.h>
 #include <pcbnew.h>
 #include <wxPcbStruct.h>
 #include <pcbcommon.h>
 #include <dialog_scripting.h>
-#include <Python.h>
 
 
 DIALOG_SCRIPTING::DIALOG_SCRIPTING( wxWindow* parent )

=== modified file 'scripting/fixswigimports.py'
--- scripting/fixswigimports.py	2012-04-08 15:00:15 +0000
+++ scripting/fixswigimports.py	2012-04-09 00:40:35 +0000
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 
 # the purpose of this script is rewriting the swig_import_helper
 # call so it will not load _xxxxx.so/dso from inside a kicad executable

