Index: Portfile
===================================================================
--- Portfile	(revision 109302)
+++ Portfile	(working copy)
@@ -5,8 +5,7 @@
 PortGroup       cmake 1.0
 
 name            vxl
-version         1.14.0
-revision        5
+version         1.17.0
 set branch      [join [lrange [split ${version} .] 0 1] .]
 categories      devel
 maintainers     maeth.com:wiking
@@ -22,9 +21,9 @@
 
 master_sites    sourceforge:project/vxl/vxl/${branch}
 use_zip         yes
-checksums       md5    0329521f2fda61d2835e7b3c7c1189df \
-                sha1   db42cfce42448c40d37fcdd3127e6d586660c8c3 \
-                rmd160 2b7c72ead698d928cfd5d56205b2e1b3f7f2fef9
+checksums       md5     95b5ecbbe164d1b540ab52fd0ca26b47 \
+                sha1    bfa7e9df3fb8807ef3b14921c31d568e94f3edf4 \
+                rmd160  a00d811aa86b2d3a2dad292ff94991c034092434
 
 # licenses in vxl:
 # (see also: http://anonscm.debian.org/viewvc/debian-med/trunk/packages/vxl/trunk/debian/copyright?revision=10688&view=markup)
@@ -41,42 +40,27 @@
 # Boost     for vcl_atomic_count.h and vcl/internal/*
 license         BSD GPL-2+ zlib MIT Boost
 
-# error: integer constant is too large for 'long' type
-universal_variant no
+# ensure that embedded openjpeg2 takes precedence over external openjpeg15 or openjpeg
+# disable ffmpeg support that fails to build with current ffmpeg versions
+# disable broken contrib/prip code
 
-patchfiles      patch-v3p__mpeg2__libmpeg2__idct_altivec.c \
-                patch-v3p__mpeg2__libmpeg2__motion_comp_altivec.c \
-                libpng15.diff
-
-if {[string match *clang* ${configure.compiler}]} {
-    patchfiles-append \
-        patch-contrib__gel__mrc__vpgl__txx-clang-compatibility.diff \
-        patch-contrib__prip__vmap__vmap_2_map.txx.diff \
-        patch-contrib__prip__vmap__vmap_ptr_sequences.h-clang-compatibility.diff \
-        patch-contrib__prip__vpyr__vpyr_2_pyramid_level_elts.h-clang-compatibility.diff \
-        patch-contrib__prip__vpyr__vpyr_2_tpyramid_level_elts.h-clang-compatibility.diff \
-        patch-contrib__rpl__rgrl__rgrl_est_proj_rad_func.txx-clang-compatibility.diff \
-        patch-contrib__tbl__vipl__filter__vipl_filter_2d.txx-clang-compatibility.diff \
-        patch-contrib__tbl__vipl__txx-clang-compatibility.diff \
-        patch-core__examples__vnl_calc__vnl_calc.cxx-clang-compatibility.diff \
-        patch-core__vil__tests__test_image_resource.cxx-clang-compatibility.diff \
-        patch-core__vil__tests__test_image_view.cxx-clang-compatibility.diff \
-        patch-core__vnl__vnl_matrix_fixed_ref.h-clang-compatibility.diff
-}
-
-post-patch {
-    file delete ${worksrcpath}/contrib/mul/vil3d/Templates/vil3d_tricub_interp+uint-.cxx
-}
-
-depends_build   port:cmake
-
-depends_lib     path:lib/libavcodec.dylib:ffmpeg \
+patchfiles      patch-use-embedded-openjpeg2.diff \
+                patch-disable-broken-ffmpeg.diff \
+                patch-disable-contrib-prip.diff
+                
+depends_lib-append \
+                port:jpeg \
+                port:tiff \
                 port:libgeotiff \
-                port:libpng
+                port:libpng \
+                port:zlib \
+                port:bzip2 \
+                port:libdc1394
 
 if {${configure.compiler} == "clang"} {
     configure.cxxflags-append -Werror=gnu -Wno-error=vla
 }
+
 configure.args-append \
     -DBUILD_SHARED_LIBS=YES \
     -DCMAKE_INSTALL_NAME_DIR=${prefix}/lib/${name} \
@@ -93,4 +77,3 @@
 }
 
 livecheck.regex /${name}-(\[0-9.\]+)${extract.suffix}
-
Index: files/libpng15.diff
===================================================================
--- files/libpng15.diff	(revision 109302)
+++ files/libpng15.diff	(working copy)
@@ -1,42 +0,0 @@
---- core/vil/file_formats/vil_png.cxx	2012/04/22 11:00:07	34801
-+++ core/vil/file_formats/vil_png.cxx	2012/04/23 02:12:59	34802
-@@ -189,15 +189,15 @@
- 
-   bool alloc_image()
-   {
--    rows = new png_byte* [info_ptr->height];
-+    rows = new png_byte* [png_get_image_height(png_ptr, info_ptr)];
-     if (rows == 0)
-       return ok = problem("couldn't allocate space for image");
- 
-     unsigned long linesize;
-     if (png_get_bit_depth(png_ptr, info_ptr) == 16)
--      linesize = 2 * info_ptr->width;
-+      linesize = 2 * png_get_image_width(png_ptr, info_ptr);
-     else
--      linesize = info_ptr->width;
-+      linesize = png_get_image_width(png_ptr, info_ptr);
- 
-     if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY_ALPHA)
-       linesize *= 2;
---- core/vil1/file_formats/vil1_png.cxx	2012/04/22 11:00:07	34801
-+++ core/vil1/file_formats/vil1_png.cxx	2012/04/23 02:12:59	34802
-@@ -181,15 +181,15 @@
- 
-   bool alloc_image()
-   {
--    rows = new png_byte* [info_ptr->height];
-+    rows = new png_byte* [png_get_image_height(png_ptr, info_ptr)];
-     if (rows == 0)
-       return ok = problem("couldn't allocate space for image");
- 
-     unsigned long linesize;
-     if (png_get_bit_depth( png_ptr, info_ptr ) == 16)
--      linesize = 2 * info_ptr->width;
-+      linesize = 2 * png_get_image_width(png_ptr, info_ptr);
-     else
--      linesize = info_ptr->width;
-+      linesize = png_get_image_width(png_ptr, info_ptr);
- 
-     if (png_get_color_type( png_ptr, info_ptr ) == PNG_COLOR_TYPE_GRAY_ALPHA)
-       linesize *= 2;
Index: files/patch-contrib__gel__mrc__vpgl__txx-clang-compatibility.diff
===================================================================
--- files/patch-contrib__gel__mrc__vpgl__txx-clang-compatibility.diff	(revision 109302)
+++ files/patch-contrib__gel__mrc__vpgl__txx-clang-compatibility.diff	(working copy)
@@ -1,196 +0,0 @@
---- contrib/gel/mrc/vpgl/vpgl_affine_camera.txx.orig	2012-06-14 23:55:53.000000000 +0200
-+++ contrib/gel/mrc/vpgl/vpgl_affine_camera.txx	2012-06-15 00:01:44.000000000 +0200
-@@ -14,7 +14,7 @@
- {
-   vnl_matrix_fixed<T,3,4> C( (T)0 );
-   C(0,0) = C(1,1) = C(2,3) = (T)1;
--  set_matrix( C );
-+  this->set_matrix( C );
- }
- 
- 
-@@ -35,7 +35,7 @@
-   vnl_matrix_fixed<T,3,4> C( camera_matrix );
-   C = C/C(2,3);
-   C(2,0) = (T)0; C(2,1) = (T)0; C(2,2) = (T)0;
--  set_matrix( C );
-+  this->set_matrix( C );
- }
- 
- 
-@@ -51,7 +51,7 @@
-     C(1,i) = row2(i);
-   }
-   C(2,3) = (T)1;
--  set_matrix( C );
-+  this->set_matrix( C );
-  }
- 
- // Code for easy instantiation.
---- contrib/gel/mrc/vpgl/vpgl_affine_fundamental_matrix.txx.orig	2012-06-14 23:55:53.000000000 +0200
-+++ contrib/gel/mrc/vpgl/vpgl_affine_fundamental_matrix.txx	2012-06-15 00:01:47.000000000 +0200
-@@ -16,7 +16,7 @@
-   vnl_matrix_fixed<T,3,3> default_matrix( (T)0 );
-   default_matrix(0,1) = default_matrix(0,2) = (T)1;
-   default_matrix(1,0) = default_matrix(2,0) = -(T)1;
--  set_matrix( default_matrix );
-+  this->set_matrix( default_matrix );
- }
- 
- 
-@@ -40,7 +40,7 @@
-   fm.put( 2, 2, c );
-   fm.put( 1, 2, d );
-   fm.put( 0, 2, e );
--  set_matrix( fm );
-+  this->set_matrix( fm );
- };
- 
- 
---- contrib/gel/mrc/vpgl/vpgl_essential_matrix.txx.orig	2012-06-14 23:55:53.000000000 +0200
-+++ contrib/gel/mrc/vpgl/vpgl_essential_matrix.txx	2012-06-15 00:02:01.000000000 +0200
-@@ -66,7 +66,7 @@
- const vpgl_essential_matrix<T>&
- vpgl_essential_matrix<T>::operator=( const vpgl_essential_matrix<T>& fm )
- {
--  set_matrix( fm.F_ );
-+  this->set_matrix( fm.F_ );
-   return *this;
- }
- 
---- contrib/gel/mrc/vpgl/vpgl_fundamental_matrix.txx.orig	2012-06-14 23:55:53.000000000 +0200
-+++ contrib/gel/mrc/vpgl/vpgl_fundamental_matrix.txx	2012-06-15 00:02:09.000000000 +0200
-@@ -27,7 +27,7 @@
- {
-   vnl_matrix_fixed<T,3,3> default_matrix( (T)0 );
-   default_matrix(0,0) = default_matrix(1,1) = (T)1;
--  set_matrix( default_matrix );
-+  this->set_matrix( default_matrix );
- }
- 
- //---------------------------------
-@@ -37,7 +37,7 @@
-   const vpgl_fundamental_matrix<T>& other)
-   : cached_svd_(NULL)
- {
--  set_matrix( other.F_ );
-+  this->set_matrix( other.F_ );
- }
- 
- 
-@@ -46,7 +46,7 @@
- const vpgl_fundamental_matrix<T>&
- vpgl_fundamental_matrix<T>::operator=( const vpgl_fundamental_matrix<T>& fm )
- {
--  set_matrix( fm.F_ );
-+  this->set_matrix( fm.F_ );
-   return *this;
- }
- 
-@@ -206,7 +206,7 @@
-                                              const vpgl_proj_camera<T>& cl )
- {
-   vnl_cross_product_matrix e2x( cl.get_matrix() * cr.svd()->nullvector() );
--  set_matrix( e2x * cl.get_matrix() * cr.svd()->inverse() );
-+  this->set_matrix( e2x * cl.get_matrix() * cr.svd()->inverse() );
- }
- 
- 
---- contrib/gel/mrc/vpgl/vpgl_local_rational_camera.txx.orig	2012-06-14 23:55:53.000000000 +0200
-+++ contrib/gel/mrc/vpgl/vpgl_local_rational_camera.txx	2012-06-15 00:04:58.000000000 +0200
-@@ -126,16 +126,16 @@
-            << "SpecId = \"RPC00B\";\n"
-            << "BEGIN_GROUP = IMAGE\n"
-            << "\n\n"  // skip errBias and errRand fields
--           << "  lineOffset = " << offset(vpgl_rational_camera<T>::V_INDX) << '\n'
--           << "  sampOffset = " << offset(vpgl_rational_camera<T>::U_INDX) << '\n'
--           << "  latOffset = " << offset(vpgl_rational_camera<T>::Y_INDX) << '\n'
--           << "  longOffset = " << offset(vpgl_rational_camera<T>::X_INDX) << '\n'
--           << "  heightOffset = " << offset(vpgl_rational_camera<T>::Z_INDX) << '\n'
--           << "  lineScale = " << scale(vpgl_rational_camera<T>::V_INDX) << '\n'
--           << "  sampScale = " << scale(vpgl_rational_camera<T>::U_INDX) << '\n'
--           << "  latScale = " << scale(vpgl_rational_camera<T>::Y_INDX) << '\n'
--           << "  longScale = " << scale(vpgl_rational_camera<T>::X_INDX) << '\n'
--           << "  heightScale = " << scale(vpgl_rational_camera<T>::Z_INDX) << '\n';
-+           << "  lineOffset = " << this->offset(vpgl_rational_camera<T>::V_INDX) << '\n'
-+           << "  sampOffset = " << this->offset(vpgl_rational_camera<T>::U_INDX) << '\n'
-+           << "  latOffset = " << this->offset(vpgl_rational_camera<T>::Y_INDX) << '\n'
-+           << "  longOffset = " << this->offset(vpgl_rational_camera<T>::X_INDX) << '\n'
-+           << "  heightOffset = " << this->offset(vpgl_rational_camera<T>::Z_INDX) << '\n'
-+           << "  lineScale = " << this->scale(vpgl_rational_camera<T>::V_INDX) << '\n'
-+           << "  sampScale = " << this->scale(vpgl_rational_camera<T>::U_INDX) << '\n'
-+           << "  latScale = " << this->scale(vpgl_rational_camera<T>::Y_INDX) << '\n'
-+           << "  longScale = " << this->scale(vpgl_rational_camera<T>::X_INDX) << '\n'
-+           << "  heightScale = " << this->scale(vpgl_rational_camera<T>::Z_INDX) << '\n';
-   vnl_matrix_fixed<double,4,20> coeffs = this->coefficient_matrix();
-   file_out << "  lineNumCoef = (";
-   for (int i=0; i<20; i++) {
---- contrib/gel/mrc/vpgl/vpgl_proj_camera.txx.orig	2012-06-14 23:55:53.000000000 +0200
-+++ contrib/gel/mrc/vpgl/vpgl_proj_camera.txx	2012-06-15 00:02:47.000000000 +0200
-@@ -230,7 +230,7 @@
-   {
-    case 1:
-      vsl_b_read(is, Pnew);
--     set_matrix(Pnew);
-+     this->set_matrix(Pnew);
-     break;
-    default:
-     vcl_cerr << "I/O ERROR: vpgl_proj_camera::b_read(vsl_b_istream&)\n"
---- contrib/gel/mrc/vpgl/vpgl_rational_camera.txx.orig	2012-06-14 23:55:53.000000000 +0200
-+++ contrib/gel/mrc/vpgl/vpgl_rational_camera.txx	2012-06-15 00:05:07.000000000 +0200
-@@ -378,16 +378,16 @@
-            << "SpecId = \"RPC00B\";\n"
-            << "BEGIN_GROUP = IMAGE\n"
-            << "\n\n"  // skip errBias and errRand fields
--           << "  lineOffset = " << offset(V_INDX) << '\n'
--           << "  sampOffset = " << offset(U_INDX) << '\n'
--           << "  latOffset = " << offset(Y_INDX) << '\n'
--           << "  longOffset = " << offset(X_INDX) << '\n'
--           << "  heightOffset = " << offset(Z_INDX) << '\n'
--           << "  lineScale = " << scale(V_INDX) << '\n'
--           << "  sampScale = " << scale(U_INDX) << '\n'
--           << "  latScale = " << scale(Y_INDX) << '\n'
--           << "  longScale = " << scale(X_INDX) << '\n'
--           << "  heightScale = " << scale(Z_INDX) << '\n';
-+           << "  lineOffset = " << this->offset(V_INDX) << '\n'
-+           << "  sampOffset = " << this->offset(U_INDX) << '\n'
-+           << "  latOffset = " << this->offset(Y_INDX) << '\n'
-+           << "  longOffset = " << this->offset(X_INDX) << '\n'
-+           << "  heightOffset = " << this->offset(Z_INDX) << '\n'
-+           << "  lineScale = " << this->scale(V_INDX) << '\n'
-+           << "  sampScale = " << this->scale(U_INDX) << '\n'
-+           << "  latScale = " << this->scale(Y_INDX) << '\n'
-+           << "  longScale = " << this->scale(X_INDX) << '\n'
-+           << "  heightScale = " << this->scale(Z_INDX) << '\n';
-   vnl_matrix_fixed<double,4,20> coeffs = this->coefficient_matrix();
-   file_out << "  lineNumCoef = (";
-   for (int i=0; i<20; i++) {
---- contrib/gel/mrc/vpgl/vpgl_reg_fundamental_matrix.txx.orig	2012-06-14 23:55:53.000000000 +0200
-+++ contrib/gel/mrc/vpgl/vpgl_reg_fundamental_matrix.txx	2012-06-15 00:03:02.000000000 +0200
-@@ -16,7 +16,7 @@
-   vnl_matrix_fixed<T,3,3> default_matrix( (T)0 );
-   default_matrix(0,1) = default_matrix(0,2) = (T)1;
-   default_matrix(1,0) = default_matrix(2,0) = -(T)1;
--  set_matrix( default_matrix );
-+  this->set_matrix( default_matrix );
- }
- 
- 
-@@ -53,7 +53,7 @@
-   fm.put( 1, 2, -ex );
-   fm.put( 2, 0, -ey );
-   fm.put( 2, 1, ex );
--  set_matrix( fm );
-+  this->set_matrix( fm );
-   return true;
- }
- 
-@@ -67,7 +67,7 @@
-   fm.put( 1, 2, -b );
-   fm.put( 2, 0, -a );
-   fm.put( 2, 1, b );
--  set_matrix( fm );
-+  this->set_matrix( fm );
- };
- 
- 
Index: files/patch-contrib__prip__vmap__vmap_2_map.txx.diff
===================================================================
--- files/patch-contrib__prip__vmap__vmap_2_map.txx.diff	(revision 109302)
+++ files/patch-contrib__prip__vmap__vmap_2_map.txx.diff	(working copy)
@@ -1,38 +0,0 @@
---- contrib/prip/vmap/vmap_2_map.txx.orig	2012-06-15 00:08:27.000000000 +0200
-+++ contrib/prip/vmap/vmap_2_map.txx	2012-06-15 00:13:24.000000000 +0200
-@@ -214,7 +214,7 @@
- template <class D>
- void vmap_2_map<D>::contraction(contraction_kernel const& arg_kernel)
- {
--  int ld=get_dart_pointer.size(), id ;
-+  int ld=nb_darts(), id ;
- 
-   typename contraction_kernel::const_iterator itk ;
-   for (itk=arg_kernel.begin(); itk!=arg_kernel.end(); ++itk)
-@@ -247,7 +247,7 @@
-     }
-   }
- 
--  ld=get_dart_pointer.size()-ld ;
-+  ld=nb_darts()-ld ;
-   for (id=0; id<ld ; ++id )
-   {
- #if 0
-@@ -261,7 +261,7 @@
- template <class D>
- void vmap_2_map<D>::removal(removal_kernel const& arg_kernel)
- {
--  int ld=get_dart_pointer.size(), id ;
-+  int ld=nb_darts(), id ;
- 
-   typename contraction_kernel::const_iterator itk ;
-   for (itk=arg_kernel.begin(); itk!=arg_kernel.end(); ++itk)
-@@ -294,7 +294,7 @@
-     }
-   }
- 
--  ld=get_dart_pointer.size()-ld ;
-+  ld=nb_darts()-ld ;
-   for (id=0; id<ld ; ++id )
-   {
- #if 0
Index: files/patch-contrib__prip__vmap__vmap_ptr_sequences.h-clang-compatibility.diff
===================================================================
--- files/patch-contrib__prip__vmap__vmap_ptr_sequences.h-clang-compatibility.diff	(revision 109302)
+++ files/patch-contrib__prip__vmap__vmap_ptr_sequences.h-clang-compatibility.diff	(working copy)
@@ -1,11 +0,0 @@
---- contrib/prip/vmap/vmap_ptr_sequences.h.orig	2012-06-15 00:15:15.000000000 +0200
-+++ contrib/prip/vmap/vmap_ptr_sequences.h	2012-06-15 00:15:30.000000000 +0200
-@@ -292,7 +292,7 @@
-   {
-     clear() ;
-     storage_.resize(arg_size) ;
--    set_begin(new pointer[arg_size]) ;
-+    this->set_begin(new pointer[arg_size]) ;
-     vmap_ptr_sequence<D>::resize(arg_size) ;
- 
-     for (int i=0; i<arg_size; ++i)
Index: files/patch-contrib__prip__vpyr__vpyr_2_pyramid_level_elts.h-clang-compatibility.diff
===================================================================
--- files/patch-contrib__prip__vpyr__vpyr_2_pyramid_level_elts.h-clang-compatibility.diff	(revision 109302)
+++ files/patch-contrib__prip__vpyr__vpyr_2_pyramid_level_elts.h-clang-compatibility.diff	(working copy)
@@ -1,29 +0,0 @@
---- contrib/prip/vpyr/vpyr_2_pyramid_level_elts.h.orig	2012-06-15 00:17:43.000000000 +0200
-+++ contrib/prip/vpyr/vpyr_2_pyramid_level_elts.h	2012-06-15 00:20:57.000000000 +0200
-@@ -144,7 +144,7 @@
-   vpyr_2_pyramid_level_dart_base_iterator(const vpyr_2_pyramid_level_dart_base_iterator<FDp,Refp,Ptrp,Itp> &it)
-     :it_((It)it.reference())
-   {
--    set(*it_, it.level()) ;
-+    this->set(*it_, it.level()) ;
-   }
- 
-   //:
-@@ -152,7 +152,7 @@
-   self_type & operator=(const vpyr_2_pyramid_level_dart_base_iterator<FDp,Refp,Ptrp,Itp> &it)
-   {
-     it_=(It)it.reference() ;
--    set(*it_, it.level()) ;
-+    this->set(*it_, it.level()) ;
-     return *this ;
-   }
- 
-@@ -267,7 +267,7 @@
-   vpyr_2_pyramid_level_dart_base_iterator(It arg,vmap_level_index l)
-     :it_(arg)
-   {
--    set(*arg,l) ;
-+    this->set(*arg,l) ;
-   }
- 
-   //:
Index: files/patch-contrib__prip__vpyr__vpyr_2_tpyramid_level_elts.h-clang-compatibility.diff
===================================================================
--- files/patch-contrib__prip__vpyr__vpyr_2_tpyramid_level_elts.h-clang-compatibility.diff	(revision 109302)
+++ files/patch-contrib__prip__vpyr__vpyr_2_tpyramid_level_elts.h-clang-compatibility.diff	(working copy)
@@ -1,11 +0,0 @@
---- contrib/prip/vpyr/vpyr_2_tpyramid_level_elts.h.orig	2012-06-15 00:22:32.000000000 +0200
-+++ contrib/prip/vpyr/vpyr_2_tpyramid_level_elts.h	2012-06-15 00:22:40.000000000 +0200
-@@ -179,7 +179,7 @@
-   vpyr_2_tpyramid_level_element_iterator(It arg,vmap_level_index l)
-     :it_(arg)
-   {
--    set(*arg,l) ;
-+    this->set(*arg,l) ;
-   }
- 
-   //:
Index: files/patch-contrib__rpl__rgrl__rgrl_est_proj_rad_func.txx-clang-compatibility.diff
===================================================================
--- files/patch-contrib__rpl__rgrl__rgrl_est_proj_rad_func.txx-clang-compatibility.diff	(revision 109302)
+++ files/patch-contrib__rpl__rgrl__rgrl_est_proj_rad_func.txx-clang-compatibility.diff	(working copy)
@@ -1,38 +0,0 @@
---- contrib/rpl/rgrl/rgrl_est_proj_rad_func.txx.orig	2012-06-15 15:40:24.000000000 +0200
-+++ contrib/rpl/rgrl/rgrl_est_proj_rad_func.txx	2012-06-15 15:40:53.000000000 +0200
-@@ -139,7 +139,7 @@
- 
-   // 1. get projection matrix jacobian
-   vnl_matrix_fixed<double, Tdim, (Tdim+1)*(Fdim+1)-1> dP_dp;
--  reduced_proj_jacobian( dP_dp, proj, from );
-+  this->reduced_proj_jacobian( dP_dp, proj, from );
- 
-   // 2. gradient w.r.t to mapped location
-   vnl_matrix_fixed<double, Tdim, Tdim >  dD_dx;
-@@ -220,7 +220,7 @@
- 
-   // 1. get projection matrix jacobian
-   vnl_matrix_fixed<double, Tdim, (Tdim+1)*(Fdim+1)> dP_dp;
--  full_proj_jacobian( dP_dp, proj, from );
-+  this->full_proj_jacobian( dP_dp, proj, from );
- 
-   // 2. gradient w.r.t to mapped location
-   vnl_matrix_fixed<double, Tdim, Tdim >  dD_dx;
-@@ -358,7 +358,7 @@
- 
-   // retrieve the projection matrix
-   vnl_matrix_fixed<double, Tdim+1, Fdim+1> proj;
--  restored_centered_proj( proj, x );
-+  this->restored_centered_proj( proj, x );
- 
-   // retrieve the radial distortion parameters
-   transfer_radial_params_into_temp_storage( x );
-@@ -407,7 +407,7 @@
- 
-   // retrieve the projection matrix
-   vnl_matrix_fixed<double, Tdim+1, Fdim+1> proj;
--  restored_centered_proj( proj, x );
-+  this->restored_centered_proj( proj, x );
- 
-   // retrieve the radial distortion parameters
-   transfer_radial_params_into_temp_storage( x );
Index: files/patch-contrib__tbl__vipl__filter__vipl_filter_2d.txx-clang-compatibility.diff
===================================================================
--- files/patch-contrib__tbl__vipl__filter__vipl_filter_2d.txx-clang-compatibility.diff	(revision 109302)
+++ files/patch-contrib__tbl__vipl__filter__vipl_filter_2d.txx-clang-compatibility.diff	(working copy)
@@ -1,38 +0,0 @@
---- contrib/tbl/vipl/filter/vipl_filter_2d.txx.orig	2012-06-15 19:50:50.000000000 +0200
-+++ contrib/tbl/vipl/filter/vipl_filter_2d.txx	2012-06-15 19:51:14.000000000 +0200
-@@ -112,7 +112,7 @@
-       vipl_section_descriptor<DataOut>& secDesc = *dstitr;
-       put_secp( new vipl_section_descriptor<DataOut> (secDesc) );
- #else
--      put_secp( new vipl_section_descriptor<DataOut> (*dstitr));
-+      this->put_secp( new vipl_section_descriptor<DataOut> (*dstitr));
- #endif
-       this->ref_dst_section()->ref_overlap()[0] = this->image_border_size();
-       this->ref_dst_section()->ref_overlap()[1] = this->image_border_size();
-@@ -121,7 +121,7 @@
-         vipl_section_descriptor<DataIn>& inSecDesc = *it;
-         put_insecp( new vipl_section_descriptor<DataIn> (inSecDesc));
- #else
--        put_insecp( new vipl_section_descriptor<DataIn> (*it));
-+        this->put_insecp( new vipl_section_descriptor<DataIn> (*it));
- #endif
-         this->ref_src_section()->ref_overlap()[0] = this->image_border_size();
-         this->ref_src_section()->ref_overlap()[1] = this->image_border_size();
-@@ -151,7 +151,7 @@
-       vipl_section_descriptor<DataOut>& secDesc2 = *it;
-       put_secp( new vipl_section_descriptor<DataOut> (secDesc2));
- #else
--      put_secp( new vipl_section_descriptor<DataOut> (*it));
-+      this->put_secp( new vipl_section_descriptor<DataOut> (*it));
- #endif
-       this->ref_dst_section()->ref_overlap()[0] = this->image_border_size();
-       this->ref_dst_section()->ref_overlap()[1] = this->image_border_size();
-@@ -160,7 +160,7 @@
-         vipl_section_descriptor<DataIn>& inSecDesc2 = *srcitr;
-         put_insecp( new vipl_section_descriptor<DataIn> (inSecDesc2));
- #else
--        put_insecp( new vipl_section_descriptor<DataIn> (*srcitr));
-+        this->put_insecp( new vipl_section_descriptor<DataIn> (*srcitr));
- #endif
-         this->ref_src_section()->ref_overlap()[0] = this->image_border_size();
-         this->ref_src_section()->ref_overlap()[1] = this->image_border_size();
Index: files/patch-contrib__tbl__vipl__txx-clang-compatibility.diff
===================================================================
--- files/patch-contrib__tbl__vipl__txx-clang-compatibility.diff	(revision 109302)
+++ files/patch-contrib__tbl__vipl__txx-clang-compatibility.diff	(working copy)
@@ -1,332 +0,0 @@
---- contrib/tbl/vipl/vipl_add_random_noise.txx.orig	2012-06-14 23:26:05.000000000 +0200
-+++ contrib/tbl/vipl/vipl_add_random_noise.txx	2012-06-14 23:35:42.000000000 +0200
-@@ -7,10 +7,10 @@
- template <class ImgIn,class ImgOut,class DataIn,class DataOut,class PixelItr>
- bool vipl_add_random_noise <ImgIn,ImgOut,DataIn,DataOut,PixelItr> :: section_applyop()
- {
--  int startx = start(this->X_Axis());
--  int starty = start(this->Y_Axis());
--  int stopx = stop(this->X_Axis());
--  int stopy = stop(this->Y_Axis());
-+  int startx = this->start(this->X_Axis());
-+  int starty = this->start(this->Y_Axis());
-+  int stopx = this->stop(this->X_Axis());
-+  int stopy = this->stop(this->Y_Axis());
-   for (register int j = starty; j < stopy; ++j)
-     for (register int i = startx; i < stopx; ++i)
-     {
---- contrib/tbl/vipl/vipl_convert.txx.orig	2012-06-14 23:34:00.000000000 +0200
-+++ contrib/tbl/vipl/vipl_convert.txx	2012-06-14 23:36:22.000000000 +0200
-@@ -14,10 +14,10 @@
-   const ImgIn &in = this->in_data(0);
-   ImgOut &out = this->out_data(0);
- 
--  int startx = start(this->X_Axis());
--  int starty = start(this->Y_Axis());
--  int stopx = stop(this->X_Axis());
--  int stopy = stop(this->Y_Axis());
-+  int startx = this->start(this->X_Axis());
-+  int starty = this->start(this->Y_Axis());
-+  int stopx = this->stop(this->X_Axis());
-+  int stopy = this->stop(this->Y_Axis());
-   for (int j = starty; j < stopy; ++j)
-     for (int i = startx; i < stopx; ++i)
-       fsetpixel(out, i, j, (DataOut)fgetpixel(in,i,j,DataIn(0)));
---- contrib/tbl/vipl/vipl_dilate_disk.txx.orig	2012-06-14 23:34:06.000000000 +0200
-+++ contrib/tbl/vipl/vipl_dilate_disk.txx	2012-06-14 23:37:08.000000000 +0200
-@@ -12,10 +12,10 @@
-   int size = (radius() < 0) ? 0 : int(radius());
-   // mask is filled in preop function
-   // apply filter:
--  int startx = start(this->X_Axis());
--  int starty = start(this->Y_Axis());
--  int stopx = stop(this->X_Axis());
--  int stopy = stop(this->Y_Axis());
-+  int startx = this->start(this->X_Axis());
-+  int starty = this->start(this->Y_Axis());
-+  int stopx = this->stop(this->X_Axis());
-+  int stopy = this->stop(this->Y_Axis());
-   for (register int j = starty, ej =  stopy; j < ej  ; ++j)
-     for (register int i = startx, ei = stopx; i < ei ; ++i)
-     {
---- contrib/tbl/vipl/vipl_dyadic.txx.orig	2012-06-14 23:31:27.000000000 +0200
-+++ contrib/tbl/vipl/vipl_dyadic.txx	2012-06-14 23:37:17.000000000 +0200
-@@ -9,10 +9,10 @@
-   const ImgIn &in = this->in_data();
-   ImgOut &out = this->out_data();
- 
--  int startx = start(this->X_Axis());
--  int starty = start(this->Y_Axis());
--  int stopx = stop(this->X_Axis());
--  int stopy = stop(this->Y_Axis());
-+  int startx = this->start(this->X_Axis());
-+  int starty = this->start(this->Y_Axis());
-+  int stopx = this->stop(this->X_Axis());
-+  int stopy = this->stop(this->Y_Axis());
-   for (int j = starty; j < stopy; ++j)
-     for (int i = startx; i < stopx; ++i) {
-       DataIn p = fgetpixel(in, i, j, DataIn(0));
---- contrib/tbl/vipl/vipl_erode_disk.txx.orig	2012-06-14 23:34:13.000000000 +0200
-+++ contrib/tbl/vipl/vipl_erode_disk.txx	2012-06-14 23:37:28.000000000 +0200
-@@ -21,10 +21,10 @@
- #ifdef DEBUG
-   vcl_cout << " set start & stop ...";
- #endif
--  int startx = start(this->X_Axis());
--  int starty = 0; // = start(this->Y_Axis());
--  int stopx = stop(this->X_Axis());
--  int stopy = stop(this->Y_Axis()); // = height(out);
-+  int startx = this->start(this->X_Axis());
-+  int starty = 0; // = this->start(this->Y_Axis());
-+  int stopx = this->stop(this->X_Axis());
-+  int stopy = this->stop(this->Y_Axis()); // = height(out);
- #ifdef DEBUG
-   vcl_cout << " (" << startx << ':' << stopx << ',' << starty << ':' << stopy << ')';
-   vcl_cout << " run over image ...";
---- contrib/tbl/vipl/vipl_gaussian_convolution.txx.orig	2012-06-14 23:34:20.000000000 +0200
-+++ contrib/tbl/vipl/vipl_gaussian_convolution.txx	2012-06-14 23:37:38.000000000 +0200
-@@ -12,21 +12,21 @@
-   int size = masksize();
- 
-   // Make temporary buffer to hold result of first (horizontal) convolution
--  int width  = stop(this->X_Axis()) - start(this->X_Axis());
--  int height = stop(this->Y_Axis()) - start(this->Y_Axis());
-+  int width  = this->stop(this->X_Axis()) - this->start(this->X_Axis());
-+  int height = this->stop(this->Y_Axis()) - this->start(this->Y_Axis());
-   double* buf = new double[width*height];
-   if (!buf) return false; // memory allocation failed
- 
-   // 1-D mask was generated in preop(), we just use it here:
- 
-   // horizontal convolution:
--  int starty = start(this->Y_Axis());
--  int stopy = stop(this->Y_Axis());
-+  int starty = this->start(this->Y_Axis());
-+  int stopy = this->stop(this->Y_Axis());
-   for (int j = starty; j < stopy; ++j)
-   {
-     int buf_j = j - starty;
--    int startx = start(this->X_Axis(),j);
--    int stopx = stop(this->X_Axis(),j);
-+    int startx = this->start(this->X_Axis(),j);
-+    int stopx = this->stop(this->X_Axis(),j);
-     for (int i = startx; i < stopx; ++i) {
-       int buf_i = i - startx;
-       double result = mask()[0] * fgetpixel(in, i, j, DataIn(0));
-@@ -39,8 +39,8 @@
-   for (int j = starty; j < stopy; ++j)
-   {
-     int buf_j = j - starty;
--    int startx = start(this->X_Axis(),j);
--    int stopx = stop(this->X_Axis(),j);
-+    int startx = this->start(this->X_Axis(),j);
-+    int stopx = this->stop(this->X_Axis(),j);
-     for (int i = startx; i < stopx; ++i) {
-       int buf_i = i - startx;
-       double result = mask()[0] * buf[buf_i+width*buf_j];
---- contrib/tbl/vipl/vipl_gradient_dir.txx.orig	2012-06-14 23:34:25.000000000 +0200
-+++ contrib/tbl/vipl/vipl_gradient_dir.txx	2012-06-14 23:37:44.000000000 +0200
-@@ -10,10 +10,10 @@
-   const ImgIn &in = this->in_data(0);
-   ImgOut &out = *this->out_data_ptr();
- 
--  int startx = start(this->X_Axis());
--  int starty = start(this->Y_Axis());
--  int stopx = stop(this->X_Axis());
--  int stopy = stop(this->Y_Axis());
-+  int startx = this->start(this->X_Axis());
-+  int starty = this->start(this->Y_Axis());
-+  int stopx = this->stop(this->X_Axis());
-+  int stopy = this->stop(this->Y_Axis());
-   for (int j = starty; j < stopy; ++j)
-     for (int i = startx; i < stopx; ++i) {
-       register double dx = fgetpixel(in, i, j, DataIn(0)) - getpixel(in, i-1, j, DataIn(0));
---- contrib/tbl/vipl/vipl_gradient_mag.txx.orig	2012-06-14 23:34:31.000000000 +0200
-+++ contrib/tbl/vipl/vipl_gradient_mag.txx	2012-06-14 23:37:57.000000000 +0200
-@@ -11,10 +11,10 @@
-   ImgOut &out = *this->out_data_ptr();
- 
-   register double dx, dy;
--  int startx = start(this->X_Axis());
--  int starty = start(this->Y_Axis());
--  int stopx = stop(this->X_Axis());
--  int stopy = stop(this->Y_Axis());
-+  int startx = this->start(this->X_Axis());
-+  int starty = this->start(this->Y_Axis());
-+  int stopx = this->stop(this->X_Axis());
-+  int stopy = this->stop(this->Y_Axis());
-   for (int j = starty; j < stopy; ++j)
-     for (int i = startx; i < stopx; ++i) {
-       dx = fgetpixel(in, i, j, DataIn(0)) - getpixel(in, i-1, j, DataIn(0));
---- contrib/tbl/vipl/vipl_histogram.txx.orig	2012-06-14 23:34:38.000000000 +0200
-+++ contrib/tbl/vipl/vipl_histogram.txx	2012-06-14 23:45:54.000000000 +0200
-@@ -14,8 +14,8 @@
-   if (index < 0) index = 0;
- #endif
-   if (checkrange() == 1)  { // check range is slow, we always keep the divide...
--    for (int j = start(this->Y_Axis()), ej = stop(this->Y_Axis()) ; j < ej ; ++j)
--      for (int i = start(this->X_Axis(),j), ei = stop(this->X_Axis(),j) ; i < ei ; ++i) {
-+    for (int j = this->start(this->Y_Axis()), ej = this->stop(this->Y_Axis()) ; j < ej ; ++j)
-+      for (int i = this->start(this->X_Axis(),j), ei = this->stop(this->X_Axis(),j) ; i < ei ; ++i) {
-         long bin = long(0.5 + (shiftin()+getpixel(in,i,j,DataIn(0)))/scalein());
- #if 0
-         if (bin < 0) bin = 0;
-@@ -26,22 +26,22 @@
-       }
-   }  // else we want speed, skip safety check, check special cases
-   else  if (scalein() == 1 && scaleout() == 1 && shiftin() == 0) {
--    for (int j = start(this->Y_Axis()), ej = stop(this->Y_Axis()) ; j < ej ; ++j)
--      for (int i = start(this->X_Axis(),j), ei = stop(this->X_Axis(),j) ; i < ei ; ++i) {
-+    for (int j = this->start(this->Y_Axis()), ej = this->stop(this->Y_Axis()) ; j < ej ; ++j)
-+      for (int i = this->start(this->X_Axis(),j), ei = this->stop(this->X_Axis(),j) ; i < ei ; ++i) {
-         long bin = long(0.5 + (getpixel(in,i,j,DataIn(0))));
-         DataOut bs = getpixel(out,bin,index,DataOut(0));
-         setpixel(out, bin, index, bs+1);
-       }
-   } else  if (scalein() == 1)  {
--    for (int j = start(this->Y_Axis()), ej = stop(this->Y_Axis()) ; j < ej ; ++j)
--      for (int i = start(this->X_Axis(),j), ei = stop(this->X_Axis(),j) ; i < ei ; ++i) {
-+    for (int j = this->start(this->Y_Axis()), ej = this->stop(this->Y_Axis()) ; j < ej ; ++j)
-+      for (int i = this->start(this->X_Axis(),j), ei = this->stop(this->X_Axis(),j) ; i < ei ; ++i) {
-         long bin = long(0.5 + (shiftin()+getpixel(in,i,j,DataIn(0))));
-         DataOut bs = getpixel(out,bin,index,DataOut(0));
-         setpixel(out, bin, index, scaleout()+bs);
-       }
-   } else { // all modes
--    for (int j = start(this->Y_Axis()), ej = stop(this->Y_Axis()) ; j < ej ; ++j)
--      for (int i = start(this->X_Axis(),j), ei = stop(this->X_Axis(),j) ; i < ei ; ++i) {
-+    for (int j = this->start(this->Y_Axis()), ej = this->stop(this->Y_Axis()) ; j < ej ; ++j)
-+      for (int i = this->start(this->X_Axis(),j), ei = this->stop(this->X_Axis(),j) ; i < ei ; ++i) {
-         long bin = long(0.5 + (shiftin()+getpixel(in,i,j,DataIn(0)))/scalein());
-         DataOut bs = getpixel(out,bin,index,DataOut(0));
-         setpixel(out, bin, index, scaleout()+bs);
-@@ -55,8 +55,8 @@
- {
-   const int index = indexout();
-   ImgOut &out = *this->out_data_ptr();
--  for (int i = start_dst(this->X_Axis()),
--    ei = stop_dst(this->X_Axis()); i < ei; ++i)
-+  for (int i = this->start_dst(this->X_Axis()),
-+    ei = this->stop_dst(this->X_Axis()); i < ei; ++i)
-     setpixel(out, i, index, DataOut(0));
-   return true;
- }
---- contrib/tbl/vipl/vipl_median.txx.orig	2012-06-14 23:34:45.000000000 +0200
-+++ contrib/tbl/vipl/vipl_median.txx	2012-06-14 23:38:53.000000000 +0200
-@@ -14,10 +14,10 @@
- 
-   // apply filter:
-   DataIn* v = new DataIn[(2*size+1)*(2*size+1)];
--  int startx = start(this->X_Axis());
--  int starty = start(this->Y_Axis());
--  int stopx = stop(this->X_Axis());
--  int stopy = stop(this->Y_Axis());
-+  int startx = this->start(this->X_Axis());
-+  int starty = this->start(this->Y_Axis());
-+  int stopx = this->stop(this->X_Axis());
-+  int stopy = this->stop(this->Y_Axis());
-   for (int j = starty; j < stopy; ++j)
-     for (int i = startx; i < stopx; ++i) {
-       register int count = 0;
---- contrib/tbl/vipl/vipl_moment.txx.orig	2012-06-14 23:34:49.000000000 +0200
-+++ contrib/tbl/vipl/vipl_moment.txx	2012-06-14 23:44:02.000000000 +0200
-@@ -46,10 +46,10 @@
- 
-   // We create a (double) float buffer to hold the computed values.
- 
--  int startx = start(this->X_Axis());
--  int starty = start(this->Y_Axis());
--  int stopx = stop(this->X_Axis());
--  int stopy = stop(this->Y_Axis());
-+  int startx = this->start(this->X_Axis());
-+  int starty = this->start(this->Y_Axis());
-+  int stopx = this->stop(this->X_Axis());
-+  int stopy = this->stop(this->Y_Axis());
- 
-   int sizex = stopx-startx+1;
-   int sizey = stopy-starty+1;
---- contrib/tbl/vipl/vipl_monadic.txx.orig	2012-06-14 23:28:14.000000000 +0200
-+++ contrib/tbl/vipl/vipl_monadic.txx	2012-06-14 23:38:58.000000000 +0200
-@@ -9,10 +9,10 @@
-   const ImgIn &in = this->in_data();
-   ImgOut &out = this->out_data();
- 
--  int startx = start(this->X_Axis());
--  int starty = start(this->Y_Axis());
--  int stopx = stop(this->X_Axis());
--  int stopy = stop(this->Y_Axis());
-+  int startx = this->start(this->X_Axis());
-+  int starty = this->start(this->Y_Axis());
-+  int stopx = this->stop(this->X_Axis());
-+  int stopy = this->stop(this->Y_Axis());
-   for (int j = starty; j < stopy; ++j)
-     for (int i = startx; i < stopx; ++i)
-       fsetpixel(out, i, j, func()(fgetpixel(in, i, j, DataIn(0))));
---- contrib/tbl/vipl/vipl_sobel.txx.orig	2012-06-14 23:34:55.000000000 +0200
-+++ contrib/tbl/vipl/vipl_sobel.txx	2012-06-14 23:39:15.000000000 +0200
-@@ -9,10 +9,10 @@
-   const ImgIn &in = this->in_data(0);
-   ImgOut &out = this->out_data();
-   // apply filter:
--  int startx = start(this->X_Axis());
--  int starty = start(this->Y_Axis());
--  int stopx = stop(this->X_Axis());
--  int stopy = stop(this->Y_Axis());
-+  int startx = this->start(this->X_Axis());
-+  int starty = this->start(this->Y_Axis());
-+  int stopx = this->stop(this->X_Axis());
-+  int stopy = this->stop(this->Y_Axis());
-   for (int j = starty, ej =  stopy; j < ej  ; ++j)
-     for (int i = startx, ei = stopx; i < ei ; ++i)
-       fsetpixel(out, i, j, (DataOut)(
---- contrib/tbl/vipl/vipl_threshold.txx.orig	2012-06-14 23:20:41.000000000 +0200
-+++ contrib/tbl/vipl/vipl_threshold.txx	2012-06-14 23:39:23.000000000 +0200
-@@ -9,10 +9,10 @@
-   const ImgIn &in = this->in_data();
-   ImgOut &out = this->out_data();
- 
--  int startx = start(this->X_Axis());
--  int starty = start(this->Y_Axis());
--  int stopx = stop(this->X_Axis());
--  int stopy = stop(this->Y_Axis());
-+  int startx = this->start(this->X_Axis());
-+  int starty = this->start(this->Y_Axis());
-+  int stopx = this->stop(this->X_Axis());
-+  int stopy = this->stop(this->Y_Axis());
-   for (int j = starty; j < stopy; ++j)
-     for (int i = startx; i < stopx; ++i) {
-       DataIn p = fgetpixel(in, i, j, DataIn(0));
---- contrib/tbl/vipl/vipl_x_gradient.txx.orig	2012-06-14 23:35:09.000000000 +0200
-+++ contrib/tbl/vipl/vipl_x_gradient.txx	2012-06-14 23:39:29.000000000 +0200
-@@ -9,10 +9,10 @@
-   const ImgIn &in = this->in_data(0);
-   ImgOut &out = *this->out_data_ptr();
- 
--  int startx = start(this->X_Axis());
--  int starty = start(this->Y_Axis());
--  int stopx = stop(this->X_Axis());
--  int stopy = stop(this->Y_Axis());
-+  int startx = this->start(this->X_Axis());
-+  int starty = this->start(this->Y_Axis());
-+  int stopx = this->stop(this->X_Axis());
-+  int stopy = this->stop(this->Y_Axis());
-   for (register int j = starty; j < stopy; ++j)
-     for (register int i = startx+1; i < stopx; ++i) {
-       DataIn w = fgetpixel(in, i,  j, DataIn(0))
---- contrib/tbl/vipl/vipl_y_gradient.txx.orig	2012-06-14 23:35:14.000000000 +0200
-+++ contrib/tbl/vipl/vipl_y_gradient.txx	2012-06-14 23:39:38.000000000 +0200
-@@ -9,10 +9,10 @@
-   const ImgIn &in = this->in_data(0);
-   ImgOut &out = *this->out_data_ptr();
- 
--  int startx = start(this->X_Axis());
--  int starty = start(this->Y_Axis());
--  int stopx = stop(this->X_Axis());
--  int stopy = stop(this->Y_Axis());
-+  int startx = this->start(this->X_Axis());
-+  int starty = this->start(this->Y_Axis());
-+  int stopx = this->stop(this->X_Axis());
-+  int stopy = this->stop(this->Y_Axis());
-   for (register int j = starty+1; j < stopy; ++j)
-     for (register int i = startx; i < stopx; ++i) {
-       DataIn w = fgetpixel(in, i, j,   DataIn(0))
Index: files/patch-core__examples__vnl_calc__vnl_calc.cxx-clang-compatibility.diff
===================================================================
--- files/patch-core__examples__vnl_calc__vnl_calc.cxx-clang-compatibility.diff	(revision 109302)
+++ files/patch-core__examples__vnl_calc__vnl_calc.cxx-clang-compatibility.diff	(working copy)
@@ -1,11 +0,0 @@
---- core/examples/vnl_calc/vnl_calc.cxx.orig	2012-06-14 22:01:07.000000000 +0200
-+++ core/examples/vnl_calc/vnl_calc.cxx	2012-06-14 22:01:18.000000000 +0200
-@@ -33,7 +33,7 @@
- class mystack : public vcl_vector<T>
- {
-  public:
--  void push(const T& t) { push_back(t); }
-+  void push(const T& t) { this->push_back(t); }
- 
-   T pop() {
-     int n = this->size();
Index: files/patch-core__vil__tests__test_image_resource.cxx-clang-compatibility.diff
===================================================================
--- files/patch-core__vil__tests__test_image_resource.cxx-clang-compatibility.diff	(revision 109302)
+++ files/patch-core__vil__tests__test_image_resource.cxx-clang-compatibility.diff	(working copy)
@@ -1,21 +0,0 @@
---- core/vil/tests/test_image_resource.cxx.orig	2012-06-14 21:41:57.000000000 +0200
-+++ core/vil/tests/test_image_resource.cxx	2012-06-14 21:42:55.000000000 +0200
-@@ -4,7 +4,6 @@
- #include <vcl_iostream.h>
- #include <vcl_complex.h>
- #include <vil/vil_image_resource.h>
--#include <vil/vil_math.h>
- #include <vil/vil_new.h>
- #include <vil/vil_crop.h>
- #include <vil/vil_clamp.h>
-@@ -21,6 +20,10 @@
- static inline bool operator> (vcl_complex<float> const&, vcl_complex<float> const&) { return false; }
- static inline bool operator> (vcl_complex<double>const&, vcl_complex<double>const&) { return false; }
- 
-+// vil_math.h needs to be included _after_ declaring the operators, or the
-+// operator need to be in namespace that vcl_complex is in
-+#include <vil/vil_math.h>
-+
- template <class T>
- void test_image_resource(vcl_string type, vil_pixel_format format, T /*dummy*/)
- {
Index: files/patch-core__vil__tests__test_image_view.cxx-clang-compatibility.diff
===================================================================
--- files/patch-core__vil__tests__test_image_view.cxx-clang-compatibility.diff	(revision 109302)
+++ files/patch-core__vil__tests__test_image_view.cxx-clang-compatibility.diff	(working copy)
@@ -1,22 +0,0 @@
---- core/vil/tests/test_image_view.cxx.orig	2012-06-14 21:46:57.000000000 +0200
-+++ core/vil/tests/test_image_view.cxx	2012-06-14 21:57:48.000000000 +0200
-@@ -536,6 +536,19 @@
- TESTMAIN(test_image_view);
- 
- 
-+// vil_image_view.txx will instanciate convert_components_from_planes<my_int>,
-+// which we however want to explicitly specialize afterwards.  Provide a forward
-+// declaration here to prevent the compiler from assuming implicit
-+// instanciation.
-+
-+class my_int;
-+template <class T>
-+inline bool convert_components_from_planes(vil_image_view<T> &lhs, const
-+		vil_image_view_base &rhs_base);
-+VCL_DEFINE_SPECIALIZATION
-+inline bool convert_components_from_planes(vil_image_view<my_int> &,
-+		const vil_image_view_base &);
-+
- #include <vil/vil_image_view.txx>
- 
- class my_int
Index: files/patch-core__vnl__vnl_matrix_fixed_ref.h-clang-compatibility.diff
===================================================================
--- files/patch-core__vnl__vnl_matrix_fixed_ref.h-clang-compatibility.diff	(revision 109302)
+++ files/patch-core__vnl__vnl_matrix_fixed_ref.h-clang-compatibility.diff	(working copy)
@@ -1,11 +0,0 @@
---- core/vnl/vnl_matrix_fixed_ref.h.orig	2012-06-14 21:16:52.000000000 +0200
-+++ core/vnl/vnl_matrix_fixed_ref.h	2012-06-14 21:17:56.000000000 +0200
-@@ -653,7 +653,7 @@
-   //: Return true if *this == rhs
-   bool operator_eq (vnl_matrix_fixed_ref_const<T,num_rows,num_cols> const & rhs) const
-   {
--    return equal( this->data_block(), rhs.data_block() );
-+    return this->equal( this->data_block(), rhs.data_block() );
-   }
- 
-   //: Equality operator
Index: files/patch-disable-broken-ffmpeg.diff
===================================================================
--- files/patch-disable-broken-ffmpeg.diff	(revision 0)
+++ files/patch-disable-broken-ffmpeg.diff	(working copy)
@@ -0,0 +1,20 @@
+--- core/vidl/CMakeLists.txt.orig	2011-12-18 02:52:26.000000000 -0800
++++ core/vidl/CMakeLists.txt	2013-08-11 15:21:54.000000000 -0700
+@@ -8,7 +8,7 @@
+   DESCRIPTION "Video Sequence Library"
+ )
+ 
+-INCLUDE( ${VXL_CMAKE_DIR}/NewCMake/FindFFMPEG.cmake )
++# INCLUDE( ${VXL_CMAKE_DIR}/NewCMake/FindFFMPEG.cmake )
+ INCLUDE( ${VXL_CMAKE_DIR}/NewCMake/FindDC1394.cmake )
+ INCLUDE( ${VXL_CMAKE_DIR}/NewCMake/FindDirectShow.cmake )
+ FIND_FILE (VIDEODEV_FOUND videodev.h /usr/include/linux/)
+@@ -17,6 +17,8 @@
+ CONFIGURE_FILE( ${vxl_SOURCE_DIR}/core/vidl/vidl_config.h.in
+                 ${vxl_BINARY_DIR}/core/vidl/vidl_config.h )
+ 
++SET(FFMPEG_FOUND "NO")
++
+ IF( FFMPEG_FOUND )
+   INCLUDE_DIRECTORIES(${FFMPEG_INCLUDE_DIR})
+ ENDIF( FFMPEG_FOUND )
Index: files/patch-disable-contrib-prip.diff
===================================================================
--- files/patch-disable-contrib-prip.diff	(revision 0)
+++ files/patch-disable-contrib-prip.diff	(working copy)
@@ -0,0 +1,16 @@
+--- contrib/prip/CMakeLists.txt.orig	2013-08-11 14:24:32.000000000 -0700
++++ contrib/prip/CMakeLists.txt	2013-08-11 14:24:48.000000000 -0700
+@@ -9,10 +9,10 @@
+ INCLUDE_DIRECTORIES(${PRIP_INCLUDE_DIR})
+ 
+ # Combinatorial Maps and Topological Maps handling
+-SUBDIRS( vmap )
++#SUBDIRS( vmap )
+ 
+ # Digital Topology
+-SUBDIRS( vdtop )
++#SUBDIRS( vdtop )
+ 
+ # Combinatorial Pyramids and Topological Pyramids handling
+-SUBDIRS( vpyr )
++#SUBDIRS( vpyr )
Index: files/patch-use-embedded-openjpeg2.diff
===================================================================
--- files/patch-use-embedded-openjpeg2.diff	(revision 0)
+++ files/patch-use-embedded-openjpeg2.diff	(working copy)
@@ -0,0 +1,11 @@
+--- core/vil/CMakeLists.txt.orig	2013-08-11 09:58:38.000000000 -0700
++++ core/vil/CMakeLists.txt	2013-08-11 09:59:49.000000000 -0700
+@@ -61,7 +61,7 @@
+ ##############################
+ INCLUDE( ${VXL_CMAKE_DIR}/FindOpenJPEG2.cmake )
+ IF(OPENJPEG2_FOUND)
+-  INCLUDE_DIRECTORIES(${OPENJPEG2_INCLUDE_DIR})
++  INCLUDE_DIRECTORIES(BEFORE ${OPENJPEG2_INCLUDE_DIR})
+   ADD_DEFINITIONS( ${OPENJPEG2_DEFINITIONS} )
+   SET( vil_sources ${vil_sources}
+     file_formats/vil_openjpeg.h  file_formats/vil_openjpeg.cxx
Index: files/patch-v3p__mpeg2__libmpeg2__idct_altivec.c
===================================================================
--- files/patch-v3p__mpeg2__libmpeg2__idct_altivec.c	(revision 109302)
+++ files/patch-v3p__mpeg2__libmpeg2__idct_altivec.c	(working copy)
@@ -1,11 +0,0 @@
---- v3p/mpeg2/libmpeg2/idct_altivec.c.orig	2008-12-02 20:17:34.000000000 -0800
-+++ v3p/mpeg2/libmpeg2/idct_altivec.c	2008-12-02 20:17:45.000000000 -0800
-@@ -21,7 +21,7 @@
-  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-  */
- 
--#ifndef __ALTIVEC__
-+#if 1
- 
- #include "config.h"
- 
Index: files/patch-v3p__mpeg2__libmpeg2__motion_comp_altivec.c
===================================================================
--- files/patch-v3p__mpeg2__libmpeg2__motion_comp_altivec.c	(revision 109302)
+++ files/patch-v3p__mpeg2__libmpeg2__motion_comp_altivec.c	(working copy)
@@ -1,11 +0,0 @@
---- v3p/mpeg2/libmpeg2/motion_comp_altivec.c.orig	2008-12-02 20:17:11.000000000 -0800
-+++ v3p/mpeg2/libmpeg2/motion_comp_altivec.c	2008-12-02 20:17:26.000000000 -0800
-@@ -21,7 +21,7 @@
-  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-  */
- 
--#ifndef __ALTIVEC__
-+#if 1
- 
- #include "config.h"
- 
