Ticket #34838: build-with-clang-and-fix-rev-upgrade-problem.patch

File build-with-clang-and-fix-rev-upgrade-problem.patch, 35.9 KB (added by neverpanic (Clemens Lang), 12 years ago)

Patch against $(port dir vxl), fixing issues when compiling with clang and a missing libvpgl.dylib

  • files/patch-contrib__prip__vpyr__vpyr_2_pyramid_level_elts.h-clang-compatibility.diff

     
     1--- contrib/prip/vpyr/vpyr_2_pyramid_level_elts.h.orig  2012-06-15 00:17:43.000000000 +0200
     2+++ contrib/prip/vpyr/vpyr_2_pyramid_level_elts.h       2012-06-15 00:20:57.000000000 +0200
     3@@ -144,7 +144,7 @@
     4   vpyr_2_pyramid_level_dart_base_iterator(const vpyr_2_pyramid_level_dart_base_iterator<FDp,Refp,Ptrp,Itp> &it)
     5     :it_((It)it.reference())
     6   {
     7-    set(*it_, it.level()) ;
     8+    this->set(*it_, it.level()) ;
     9   }
     10 
     11   //:
     12@@ -152,7 +152,7 @@
     13   self_type & operator=(const vpyr_2_pyramid_level_dart_base_iterator<FDp,Refp,Ptrp,Itp> &it)
     14   {
     15     it_=(It)it.reference() ;
     16-    set(*it_, it.level()) ;
     17+    this->set(*it_, it.level()) ;
     18     return *this ;
     19   }
     20 
     21@@ -267,7 +267,7 @@
     22   vpyr_2_pyramid_level_dart_base_iterator(It arg,vmap_level_index l)
     23     :it_(arg)
     24   {
     25-    set(*arg,l) ;
     26+    this->set(*arg,l) ;
     27   }
     28 
     29   //:
  • files/patch-contrib__prip__vmap__vmap_2_map.txx.diff

     
     1--- contrib/prip/vmap/vmap_2_map.txx.orig       2012-06-15 00:08:27.000000000 +0200
     2+++ contrib/prip/vmap/vmap_2_map.txx    2012-06-15 00:13:24.000000000 +0200
     3@@ -214,7 +214,7 @@
     4 template <class D>
     5 void vmap_2_map<D>::contraction(contraction_kernel const& arg_kernel)
     6 {
     7-  int ld=get_dart_pointer.size(), id ;
     8+  int ld=nb_darts(), id ;
     9 
     10   typename contraction_kernel::const_iterator itk ;
     11   for (itk=arg_kernel.begin(); itk!=arg_kernel.end(); ++itk)
     12@@ -247,7 +247,7 @@
     13     }
     14   }
     15 
     16-  ld=get_dart_pointer.size()-ld ;
     17+  ld=nb_darts()-ld ;
     18   for (id=0; id<ld ; ++id )
     19   {
     20 #if 0
     21@@ -261,7 +261,7 @@
     22 template <class D>
     23 void vmap_2_map<D>::removal(removal_kernel const& arg_kernel)
     24 {
     25-  int ld=get_dart_pointer.size(), id ;
     26+  int ld=nb_darts(), id ;
     27 
     28   typename contraction_kernel::const_iterator itk ;
     29   for (itk=arg_kernel.begin(); itk!=arg_kernel.end(); ++itk)
     30@@ -294,7 +294,7 @@
     31     }
     32   }
     33 
     34-  ld=get_dart_pointer.size()-ld ;
     35+  ld=nb_darts()-ld ;
     36   for (id=0; id<ld ; ++id )
     37   {
     38 #if 0
  • files/patch-core__vnl__vnl_matrix_fixed_ref.h-clang-compatibility.diff

     
     1--- core/vnl/vnl_matrix_fixed_ref.h.orig        2012-06-14 21:16:52.000000000 +0200
     2+++ core/vnl/vnl_matrix_fixed_ref.h     2012-06-14 21:17:56.000000000 +0200
     3@@ -653,7 +653,7 @@
     4   //: Return true if *this == rhs
     5   bool operator_eq (vnl_matrix_fixed_ref_const<T,num_rows,num_cols> const & rhs) const
     6   {
     7-    return equal( this->data_block(), rhs.data_block() );
     8+    return this->equal( this->data_block(), rhs.data_block() );
     9   }
     10 
     11   //: Equality operator
  • files/patch-core__vil__tests__test_image_view.cxx-clang-compatibility.diff

     
     1--- core/vil/tests/test_image_view.cxx.orig     2012-06-14 21:46:57.000000000 +0200
     2+++ core/vil/tests/test_image_view.cxx  2012-06-14 21:57:48.000000000 +0200
     3@@ -536,6 +536,19 @@
     4 TESTMAIN(test_image_view);
     5 
     6 
     7+// vil_image_view.txx will instanciate convert_components_from_planes<my_int>,
     8+// which we however want to explicitly specialize afterwards.  Provide a forward
     9+// declaration here to prevent the compiler from assuming implicit
     10+// instanciation.
     11+
     12+class my_int;
     13+template <class T>
     14+inline bool convert_components_from_planes(vil_image_view<T> &lhs, const
     15+               vil_image_view_base &rhs_base);
     16+VCL_DEFINE_SPECIALIZATION
     17+inline bool convert_components_from_planes(vil_image_view<my_int> &,
     18+               const vil_image_view_base &);
     19+
     20 #include <vil/vil_image_view.txx>
     21 
     22 class my_int
  • files/patch-contrib__rpl__rgrl__rgrl_est_proj_rad_func.txx-clang-compatibility.diff

     
     1--- contrib/rpl/rgrl/rgrl_est_proj_rad_func.txx.orig    2012-06-15 15:40:24.000000000 +0200
     2+++ contrib/rpl/rgrl/rgrl_est_proj_rad_func.txx 2012-06-15 15:40:53.000000000 +0200
     3@@ -139,7 +139,7 @@
     4 
     5   // 1. get projection matrix jacobian
     6   vnl_matrix_fixed<double, Tdim, (Tdim+1)*(Fdim+1)-1> dP_dp;
     7-  reduced_proj_jacobian( dP_dp, proj, from );
     8+  this->reduced_proj_jacobian( dP_dp, proj, from );
     9 
     10   // 2. gradient w.r.t to mapped location
     11   vnl_matrix_fixed<double, Tdim, Tdim >  dD_dx;
     12@@ -220,7 +220,7 @@
     13 
     14   // 1. get projection matrix jacobian
     15   vnl_matrix_fixed<double, Tdim, (Tdim+1)*(Fdim+1)> dP_dp;
     16-  full_proj_jacobian( dP_dp, proj, from );
     17+  this->full_proj_jacobian( dP_dp, proj, from );
     18 
     19   // 2. gradient w.r.t to mapped location
     20   vnl_matrix_fixed<double, Tdim, Tdim >  dD_dx;
     21@@ -358,7 +358,7 @@
     22 
     23   // retrieve the projection matrix
     24   vnl_matrix_fixed<double, Tdim+1, Fdim+1> proj;
     25-  restored_centered_proj( proj, x );
     26+  this->restored_centered_proj( proj, x );
     27 
     28   // retrieve the radial distortion parameters
     29   transfer_radial_params_into_temp_storage( x );
     30@@ -407,7 +407,7 @@
     31 
     32   // retrieve the projection matrix
     33   vnl_matrix_fixed<double, Tdim+1, Fdim+1> proj;
     34-  restored_centered_proj( proj, x );
     35+  this->restored_centered_proj( proj, x );
     36 
     37   // retrieve the radial distortion parameters
     38   transfer_radial_params_into_temp_storage( x );
  • files/patch-contrib__gel__mrc__vpgl__txx-clang-compatibility.diff

     
     1--- contrib/gel/mrc/vpgl/vpgl_affine_camera.txx.orig    2012-06-14 23:55:53.000000000 +0200
     2+++ contrib/gel/mrc/vpgl/vpgl_affine_camera.txx 2012-06-15 00:01:44.000000000 +0200
     3@@ -14,7 +14,7 @@
     4 {
     5   vnl_matrix_fixed<T,3,4> C( (T)0 );
     6   C(0,0) = C(1,1) = C(2,3) = (T)1;
     7-  set_matrix( C );
     8+  this->set_matrix( C );
     9 }
     10 
     11 
     12@@ -35,7 +35,7 @@
     13   vnl_matrix_fixed<T,3,4> C( camera_matrix );
     14   C = C/C(2,3);
     15   C(2,0) = (T)0; C(2,1) = (T)0; C(2,2) = (T)0;
     16-  set_matrix( C );
     17+  this->set_matrix( C );
     18 }
     19 
     20 
     21@@ -51,7 +51,7 @@
     22     C(1,i) = row2(i);
     23   }
     24   C(2,3) = (T)1;
     25-  set_matrix( C );
     26+  this->set_matrix( C );
     27  }
     28 
     29 // Code for easy instantiation.
     30--- contrib/gel/mrc/vpgl/vpgl_affine_fundamental_matrix.txx.orig        2012-06-14 23:55:53.000000000 +0200
     31+++ contrib/gel/mrc/vpgl/vpgl_affine_fundamental_matrix.txx     2012-06-15 00:01:47.000000000 +0200
     32@@ -16,7 +16,7 @@
     33   vnl_matrix_fixed<T,3,3> default_matrix( (T)0 );
     34   default_matrix(0,1) = default_matrix(0,2) = (T)1;
     35   default_matrix(1,0) = default_matrix(2,0) = -(T)1;
     36-  set_matrix( default_matrix );
     37+  this->set_matrix( default_matrix );
     38 }
     39 
     40 
     41@@ -40,7 +40,7 @@
     42   fm.put( 2, 2, c );
     43   fm.put( 1, 2, d );
     44   fm.put( 0, 2, e );
     45-  set_matrix( fm );
     46+  this->set_matrix( fm );
     47 };
     48 
     49 
     50--- contrib/gel/mrc/vpgl/vpgl_essential_matrix.txx.orig 2012-06-14 23:55:53.000000000 +0200
     51+++ contrib/gel/mrc/vpgl/vpgl_essential_matrix.txx      2012-06-15 00:02:01.000000000 +0200
     52@@ -66,7 +66,7 @@
     53 const vpgl_essential_matrix<T>&
     54 vpgl_essential_matrix<T>::operator=( const vpgl_essential_matrix<T>& fm )
     55 {
     56-  set_matrix( fm.F_ );
     57+  this->set_matrix( fm.F_ );
     58   return *this;
     59 }
     60 
     61--- contrib/gel/mrc/vpgl/vpgl_fundamental_matrix.txx.orig       2012-06-14 23:55:53.000000000 +0200
     62+++ contrib/gel/mrc/vpgl/vpgl_fundamental_matrix.txx    2012-06-15 00:02:09.000000000 +0200
     63@@ -27,7 +27,7 @@
     64 {
     65   vnl_matrix_fixed<T,3,3> default_matrix( (T)0 );
     66   default_matrix(0,0) = default_matrix(1,1) = (T)1;
     67-  set_matrix( default_matrix );
     68+  this->set_matrix( default_matrix );
     69 }
     70 
     71 //---------------------------------
     72@@ -37,7 +37,7 @@
     73   const vpgl_fundamental_matrix<T>& other)
     74   : cached_svd_(NULL)
     75 {
     76-  set_matrix( other.F_ );
     77+  this->set_matrix( other.F_ );
     78 }
     79 
     80 
     81@@ -46,7 +46,7 @@
     82 const vpgl_fundamental_matrix<T>&
     83 vpgl_fundamental_matrix<T>::operator=( const vpgl_fundamental_matrix<T>& fm )
     84 {
     85-  set_matrix( fm.F_ );
     86+  this->set_matrix( fm.F_ );
     87   return *this;
     88 }
     89 
     90@@ -206,7 +206,7 @@
     91                                              const vpgl_proj_camera<T>& cl )
     92 {
     93   vnl_cross_product_matrix e2x( cl.get_matrix() * cr.svd()->nullvector() );
     94-  set_matrix( e2x * cl.get_matrix() * cr.svd()->inverse() );
     95+  this->set_matrix( e2x * cl.get_matrix() * cr.svd()->inverse() );
     96 }
     97 
     98 
     99--- contrib/gel/mrc/vpgl/vpgl_local_rational_camera.txx.orig    2012-06-14 23:55:53.000000000 +0200
     100+++ contrib/gel/mrc/vpgl/vpgl_local_rational_camera.txx 2012-06-15 00:04:58.000000000 +0200
     101@@ -126,16 +126,16 @@
     102            << "SpecId = \"RPC00B\";\n"
     103            << "BEGIN_GROUP = IMAGE\n"
     104            << "\n\n"  // skip errBias and errRand fields
     105-           << "  lineOffset = " << offset(vpgl_rational_camera<T>::V_INDX) << '\n'
     106-           << "  sampOffset = " << offset(vpgl_rational_camera<T>::U_INDX) << '\n'
     107-           << "  latOffset = " << offset(vpgl_rational_camera<T>::Y_INDX) << '\n'
     108-           << "  longOffset = " << offset(vpgl_rational_camera<T>::X_INDX) << '\n'
     109-           << "  heightOffset = " << offset(vpgl_rational_camera<T>::Z_INDX) << '\n'
     110-           << "  lineScale = " << scale(vpgl_rational_camera<T>::V_INDX) << '\n'
     111-           << "  sampScale = " << scale(vpgl_rational_camera<T>::U_INDX) << '\n'
     112-           << "  latScale = " << scale(vpgl_rational_camera<T>::Y_INDX) << '\n'
     113-           << "  longScale = " << scale(vpgl_rational_camera<T>::X_INDX) << '\n'
     114-           << "  heightScale = " << scale(vpgl_rational_camera<T>::Z_INDX) << '\n';
     115+           << "  lineOffset = " << this->offset(vpgl_rational_camera<T>::V_INDX) << '\n'
     116+           << "  sampOffset = " << this->offset(vpgl_rational_camera<T>::U_INDX) << '\n'
     117+           << "  latOffset = " << this->offset(vpgl_rational_camera<T>::Y_INDX) << '\n'
     118+           << "  longOffset = " << this->offset(vpgl_rational_camera<T>::X_INDX) << '\n'
     119+           << "  heightOffset = " << this->offset(vpgl_rational_camera<T>::Z_INDX) << '\n'
     120+           << "  lineScale = " << this->scale(vpgl_rational_camera<T>::V_INDX) << '\n'
     121+           << "  sampScale = " << this->scale(vpgl_rational_camera<T>::U_INDX) << '\n'
     122+           << "  latScale = " << this->scale(vpgl_rational_camera<T>::Y_INDX) << '\n'
     123+           << "  longScale = " << this->scale(vpgl_rational_camera<T>::X_INDX) << '\n'
     124+           << "  heightScale = " << this->scale(vpgl_rational_camera<T>::Z_INDX) << '\n';
     125   vnl_matrix_fixed<double,4,20> coeffs = this->coefficient_matrix();
     126   file_out << "  lineNumCoef = (";
     127   for (int i=0; i<20; i++) {
     128--- contrib/gel/mrc/vpgl/vpgl_proj_camera.txx.orig      2012-06-14 23:55:53.000000000 +0200
     129+++ contrib/gel/mrc/vpgl/vpgl_proj_camera.txx   2012-06-15 00:02:47.000000000 +0200
     130@@ -230,7 +230,7 @@
     131   {
     132    case 1:
     133      vsl_b_read(is, Pnew);
     134-     set_matrix(Pnew);
     135+     this->set_matrix(Pnew);
     136     break;
     137    default:
     138     vcl_cerr << "I/O ERROR: vpgl_proj_camera::b_read(vsl_b_istream&)\n"
     139--- contrib/gel/mrc/vpgl/vpgl_rational_camera.txx.orig  2012-06-14 23:55:53.000000000 +0200
     140+++ contrib/gel/mrc/vpgl/vpgl_rational_camera.txx       2012-06-15 00:05:07.000000000 +0200
     141@@ -378,16 +378,16 @@
     142            << "SpecId = \"RPC00B\";\n"
     143            << "BEGIN_GROUP = IMAGE\n"
     144            << "\n\n"  // skip errBias and errRand fields
     145-           << "  lineOffset = " << offset(V_INDX) << '\n'
     146-           << "  sampOffset = " << offset(U_INDX) << '\n'
     147-           << "  latOffset = " << offset(Y_INDX) << '\n'
     148-           << "  longOffset = " << offset(X_INDX) << '\n'
     149-           << "  heightOffset = " << offset(Z_INDX) << '\n'
     150-           << "  lineScale = " << scale(V_INDX) << '\n'
     151-           << "  sampScale = " << scale(U_INDX) << '\n'
     152-           << "  latScale = " << scale(Y_INDX) << '\n'
     153-           << "  longScale = " << scale(X_INDX) << '\n'
     154-           << "  heightScale = " << scale(Z_INDX) << '\n';
     155+           << "  lineOffset = " << this->offset(V_INDX) << '\n'
     156+           << "  sampOffset = " << this->offset(U_INDX) << '\n'
     157+           << "  latOffset = " << this->offset(Y_INDX) << '\n'
     158+           << "  longOffset = " << this->offset(X_INDX) << '\n'
     159+           << "  heightOffset = " << this->offset(Z_INDX) << '\n'
     160+           << "  lineScale = " << this->scale(V_INDX) << '\n'
     161+           << "  sampScale = " << this->scale(U_INDX) << '\n'
     162+           << "  latScale = " << this->scale(Y_INDX) << '\n'
     163+           << "  longScale = " << this->scale(X_INDX) << '\n'
     164+           << "  heightScale = " << this->scale(Z_INDX) << '\n';
     165   vnl_matrix_fixed<double,4,20> coeffs = this->coefficient_matrix();
     166   file_out << "  lineNumCoef = (";
     167   for (int i=0; i<20; i++) {
     168--- contrib/gel/mrc/vpgl/vpgl_reg_fundamental_matrix.txx.orig   2012-06-14 23:55:53.000000000 +0200
     169+++ contrib/gel/mrc/vpgl/vpgl_reg_fundamental_matrix.txx        2012-06-15 00:03:02.000000000 +0200
     170@@ -16,7 +16,7 @@
     171   vnl_matrix_fixed<T,3,3> default_matrix( (T)0 );
     172   default_matrix(0,1) = default_matrix(0,2) = (T)1;
     173   default_matrix(1,0) = default_matrix(2,0) = -(T)1;
     174-  set_matrix( default_matrix );
     175+  this->set_matrix( default_matrix );
     176 }
     177 
     178 
     179@@ -53,7 +53,7 @@
     180   fm.put( 1, 2, -ex );
     181   fm.put( 2, 0, -ey );
     182   fm.put( 2, 1, ex );
     183-  set_matrix( fm );
     184+  this->set_matrix( fm );
     185   return true;
     186 }
     187 
     188@@ -67,7 +67,7 @@
     189   fm.put( 1, 2, -b );
     190   fm.put( 2, 0, -a );
     191   fm.put( 2, 1, b );
     192-  set_matrix( fm );
     193+  this->set_matrix( fm );
     194 };
     195 
     196 
  • files/patch-contrib__prip__vmap__vmap_ptr_sequences.h-clang-compatibility.diff

     
     1--- contrib/prip/vmap/vmap_ptr_sequences.h.orig 2012-06-15 00:15:15.000000000 +0200
     2+++ contrib/prip/vmap/vmap_ptr_sequences.h      2012-06-15 00:15:30.000000000 +0200
     3@@ -292,7 +292,7 @@
     4   {
     5     clear() ;
     6     storage_.resize(arg_size) ;
     7-    set_begin(new pointer[arg_size]) ;
     8+    this->set_begin(new pointer[arg_size]) ;
     9     vmap_ptr_sequence<D>::resize(arg_size) ;
     10 
     11     for (int i=0; i<arg_size; ++i)
  • files/patch-contrib__prip__vpyr__vpyr_2_tpyramid_level_elts.h-clang-compatibility.diff

     
     1--- contrib/prip/vpyr/vpyr_2_tpyramid_level_elts.h.orig 2012-06-15 00:22:32.000000000 +0200
     2+++ contrib/prip/vpyr/vpyr_2_tpyramid_level_elts.h      2012-06-15 00:22:40.000000000 +0200
     3@@ -179,7 +179,7 @@
     4   vpyr_2_tpyramid_level_element_iterator(It arg,vmap_level_index l)
     5     :it_(arg)
     6   {
     7-    set(*arg,l) ;
     8+    this->set(*arg,l) ;
     9   }
     10 
     11   //:
  • files/patch-core__examples__vnl_calc__vnl_calc.cxx-clang-compatibility.diff

     
     1--- core/examples/vnl_calc/vnl_calc.cxx.orig    2012-06-14 22:01:07.000000000 +0200
     2+++ core/examples/vnl_calc/vnl_calc.cxx 2012-06-14 22:01:18.000000000 +0200
     3@@ -33,7 +33,7 @@
     4 class mystack : public vcl_vector<T>
     5 {
     6  public:
     7-  void push(const T& t) { push_back(t); }
     8+  void push(const T& t) { this->push_back(t); }
     9 
     10   T pop() {
     11     int n = this->size();
  • files/patch-core__vil__tests__test_image_resource.cxx-clang-compatibility.diff

     
     1--- core/vil/tests/test_image_resource.cxx.orig 2012-06-14 21:41:57.000000000 +0200
     2+++ core/vil/tests/test_image_resource.cxx      2012-06-14 21:42:55.000000000 +0200
     3@@ -4,7 +4,6 @@
     4 #include <vcl_iostream.h>
     5 #include <vcl_complex.h>
     6 #include <vil/vil_image_resource.h>
     7-#include <vil/vil_math.h>
     8 #include <vil/vil_new.h>
     9 #include <vil/vil_crop.h>
     10 #include <vil/vil_clamp.h>
     11@@ -21,6 +20,10 @@
     12 static inline bool operator> (vcl_complex<float> const&, vcl_complex<float> const&) { return false; }
     13 static inline bool operator> (vcl_complex<double>const&, vcl_complex<double>const&) { return false; }
     14 
     15+// vil_math.h needs to be included _after_ declaring the operators, or the
     16+// operator need to be in namespace that vcl_complex is in
     17+#include <vil/vil_math.h>
     18+
     19 template <class T>
     20 void test_image_resource(vcl_string type, vil_pixel_format format, T /*dummy*/)
     21 {
  • files/patch-contrib__tbl__vipl__txx-clang-compatibility.diff

     
     1--- contrib/tbl/vipl/vipl_add_random_noise.txx.orig     2012-06-14 23:26:05.000000000 +0200
     2+++ contrib/tbl/vipl/vipl_add_random_noise.txx  2012-06-14 23:35:42.000000000 +0200
     3@@ -7,10 +7,10 @@
     4 template <class ImgIn,class ImgOut,class DataIn,class DataOut,class PixelItr>
     5 bool vipl_add_random_noise <ImgIn,ImgOut,DataIn,DataOut,PixelItr> :: section_applyop()
     6 {
     7-  int startx = start(this->X_Axis());
     8-  int starty = start(this->Y_Axis());
     9-  int stopx = stop(this->X_Axis());
     10-  int stopy = stop(this->Y_Axis());
     11+  int startx = this->start(this->X_Axis());
     12+  int starty = this->start(this->Y_Axis());
     13+  int stopx = this->stop(this->X_Axis());
     14+  int stopy = this->stop(this->Y_Axis());
     15   for (register int j = starty; j < stopy; ++j)
     16     for (register int i = startx; i < stopx; ++i)
     17     {
     18--- contrib/tbl/vipl/vipl_convert.txx.orig      2012-06-14 23:34:00.000000000 +0200
     19+++ contrib/tbl/vipl/vipl_convert.txx   2012-06-14 23:36:22.000000000 +0200
     20@@ -14,10 +14,10 @@
     21   const ImgIn &in = this->in_data(0);
     22   ImgOut &out = this->out_data(0);
     23 
     24-  int startx = start(this->X_Axis());
     25-  int starty = start(this->Y_Axis());
     26-  int stopx = stop(this->X_Axis());
     27-  int stopy = stop(this->Y_Axis());
     28+  int startx = this->start(this->X_Axis());
     29+  int starty = this->start(this->Y_Axis());
     30+  int stopx = this->stop(this->X_Axis());
     31+  int stopy = this->stop(this->Y_Axis());
     32   for (int j = starty; j < stopy; ++j)
     33     for (int i = startx; i < stopx; ++i)
     34       fsetpixel(out, i, j, (DataOut)fgetpixel(in,i,j,DataIn(0)));
     35--- contrib/tbl/vipl/vipl_dilate_disk.txx.orig  2012-06-14 23:34:06.000000000 +0200
     36+++ contrib/tbl/vipl/vipl_dilate_disk.txx       2012-06-14 23:37:08.000000000 +0200
     37@@ -12,10 +12,10 @@
     38   int size = (radius() < 0) ? 0 : int(radius());
     39   // mask is filled in preop function
     40   // apply filter:
     41-  int startx = start(this->X_Axis());
     42-  int starty = start(this->Y_Axis());
     43-  int stopx = stop(this->X_Axis());
     44-  int stopy = stop(this->Y_Axis());
     45+  int startx = this->start(this->X_Axis());
     46+  int starty = this->start(this->Y_Axis());
     47+  int stopx = this->stop(this->X_Axis());
     48+  int stopy = this->stop(this->Y_Axis());
     49   for (register int j = starty, ej =  stopy; j < ej  ; ++j)
     50     for (register int i = startx, ei = stopx; i < ei ; ++i)
     51     {
     52--- contrib/tbl/vipl/vipl_dyadic.txx.orig       2012-06-14 23:31:27.000000000 +0200
     53+++ contrib/tbl/vipl/vipl_dyadic.txx    2012-06-14 23:37:17.000000000 +0200
     54@@ -9,10 +9,10 @@
     55   const ImgIn &in = this->in_data();
     56   ImgOut &out = this->out_data();
     57 
     58-  int startx = start(this->X_Axis());
     59-  int starty = start(this->Y_Axis());
     60-  int stopx = stop(this->X_Axis());
     61-  int stopy = stop(this->Y_Axis());
     62+  int startx = this->start(this->X_Axis());
     63+  int starty = this->start(this->Y_Axis());
     64+  int stopx = this->stop(this->X_Axis());
     65+  int stopy = this->stop(this->Y_Axis());
     66   for (int j = starty; j < stopy; ++j)
     67     for (int i = startx; i < stopx; ++i) {
     68       DataIn p = fgetpixel(in, i, j, DataIn(0));
     69--- contrib/tbl/vipl/vipl_erode_disk.txx.orig   2012-06-14 23:34:13.000000000 +0200
     70+++ contrib/tbl/vipl/vipl_erode_disk.txx        2012-06-14 23:37:28.000000000 +0200
     71@@ -21,10 +21,10 @@
     72 #ifdef DEBUG
     73   vcl_cout << " set start & stop ...";
     74 #endif
     75-  int startx = start(this->X_Axis());
     76-  int starty = 0; // = start(this->Y_Axis());
     77-  int stopx = stop(this->X_Axis());
     78-  int stopy = stop(this->Y_Axis()); // = height(out);
     79+  int startx = this->start(this->X_Axis());
     80+  int starty = 0; // = this->start(this->Y_Axis());
     81+  int stopx = this->stop(this->X_Axis());
     82+  int stopy = this->stop(this->Y_Axis()); // = height(out);
     83 #ifdef DEBUG
     84   vcl_cout << " (" << startx << ':' << stopx << ',' << starty << ':' << stopy << ')';
     85   vcl_cout << " run over image ...";
     86--- contrib/tbl/vipl/vipl_gaussian_convolution.txx.orig 2012-06-14 23:34:20.000000000 +0200
     87+++ contrib/tbl/vipl/vipl_gaussian_convolution.txx      2012-06-14 23:37:38.000000000 +0200
     88@@ -12,21 +12,21 @@
     89   int size = masksize();
     90 
     91   // Make temporary buffer to hold result of first (horizontal) convolution
     92-  int width  = stop(this->X_Axis()) - start(this->X_Axis());
     93-  int height = stop(this->Y_Axis()) - start(this->Y_Axis());
     94+  int width  = this->stop(this->X_Axis()) - this->start(this->X_Axis());
     95+  int height = this->stop(this->Y_Axis()) - this->start(this->Y_Axis());
     96   double* buf = new double[width*height];
     97   if (!buf) return false; // memory allocation failed
     98 
     99   // 1-D mask was generated in preop(), we just use it here:
     100 
     101   // horizontal convolution:
     102-  int starty = start(this->Y_Axis());
     103-  int stopy = stop(this->Y_Axis());
     104+  int starty = this->start(this->Y_Axis());
     105+  int stopy = this->stop(this->Y_Axis());
     106   for (int j = starty; j < stopy; ++j)
     107   {
     108     int buf_j = j - starty;
     109-    int startx = start(this->X_Axis(),j);
     110-    int stopx = stop(this->X_Axis(),j);
     111+    int startx = this->start(this->X_Axis(),j);
     112+    int stopx = this->stop(this->X_Axis(),j);
     113     for (int i = startx; i < stopx; ++i) {
     114       int buf_i = i - startx;
     115       double result = mask()[0] * fgetpixel(in, i, j, DataIn(0));
     116@@ -39,8 +39,8 @@
     117   for (int j = starty; j < stopy; ++j)
     118   {
     119     int buf_j = j - starty;
     120-    int startx = start(this->X_Axis(),j);
     121-    int stopx = stop(this->X_Axis(),j);
     122+    int startx = this->start(this->X_Axis(),j);
     123+    int stopx = this->stop(this->X_Axis(),j);
     124     for (int i = startx; i < stopx; ++i) {
     125       int buf_i = i - startx;
     126       double result = mask()[0] * buf[buf_i+width*buf_j];
     127--- contrib/tbl/vipl/vipl_gradient_dir.txx.orig 2012-06-14 23:34:25.000000000 +0200
     128+++ contrib/tbl/vipl/vipl_gradient_dir.txx      2012-06-14 23:37:44.000000000 +0200
     129@@ -10,10 +10,10 @@
     130   const ImgIn &in = this->in_data(0);
     131   ImgOut &out = *this->out_data_ptr();
     132 
     133-  int startx = start(this->X_Axis());
     134-  int starty = start(this->Y_Axis());
     135-  int stopx = stop(this->X_Axis());
     136-  int stopy = stop(this->Y_Axis());
     137+  int startx = this->start(this->X_Axis());
     138+  int starty = this->start(this->Y_Axis());
     139+  int stopx = this->stop(this->X_Axis());
     140+  int stopy = this->stop(this->Y_Axis());
     141   for (int j = starty; j < stopy; ++j)
     142     for (int i = startx; i < stopx; ++i) {
     143       register double dx = fgetpixel(in, i, j, DataIn(0)) - getpixel(in, i-1, j, DataIn(0));
     144--- contrib/tbl/vipl/vipl_gradient_mag.txx.orig 2012-06-14 23:34:31.000000000 +0200
     145+++ contrib/tbl/vipl/vipl_gradient_mag.txx      2012-06-14 23:37:57.000000000 +0200
     146@@ -11,10 +11,10 @@
     147   ImgOut &out = *this->out_data_ptr();
     148 
     149   register double dx, dy;
     150-  int startx = start(this->X_Axis());
     151-  int starty = start(this->Y_Axis());
     152-  int stopx = stop(this->X_Axis());
     153-  int stopy = stop(this->Y_Axis());
     154+  int startx = this->start(this->X_Axis());
     155+  int starty = this->start(this->Y_Axis());
     156+  int stopx = this->stop(this->X_Axis());
     157+  int stopy = this->stop(this->Y_Axis());
     158   for (int j = starty; j < stopy; ++j)
     159     for (int i = startx; i < stopx; ++i) {
     160       dx = fgetpixel(in, i, j, DataIn(0)) - getpixel(in, i-1, j, DataIn(0));
     161--- contrib/tbl/vipl/vipl_histogram.txx.orig    2012-06-14 23:34:38.000000000 +0200
     162+++ contrib/tbl/vipl/vipl_histogram.txx 2012-06-14 23:45:54.000000000 +0200
     163@@ -14,8 +14,8 @@
     164   if (index < 0) index = 0;
     165 #endif
     166   if (checkrange() == 1)  { // check range is slow, we always keep the divide...
     167-    for (int j = start(this->Y_Axis()), ej = stop(this->Y_Axis()) ; j < ej ; ++j)
     168-      for (int i = start(this->X_Axis(),j), ei = stop(this->X_Axis(),j) ; i < ei ; ++i) {
     169+    for (int j = this->start(this->Y_Axis()), ej = this->stop(this->Y_Axis()) ; j < ej ; ++j)
     170+      for (int i = this->start(this->X_Axis(),j), ei = this->stop(this->X_Axis(),j) ; i < ei ; ++i) {
     171         long bin = long(0.5 + (shiftin()+getpixel(in,i,j,DataIn(0)))/scalein());
     172 #if 0
     173         if (bin < 0) bin = 0;
     174@@ -26,22 +26,22 @@
     175       }
     176   }  // else we want speed, skip safety check, check special cases
     177   else  if (scalein() == 1 && scaleout() == 1 && shiftin() == 0) {
     178-    for (int j = start(this->Y_Axis()), ej = stop(this->Y_Axis()) ; j < ej ; ++j)
     179-      for (int i = start(this->X_Axis(),j), ei = stop(this->X_Axis(),j) ; i < ei ; ++i) {
     180+    for (int j = this->start(this->Y_Axis()), ej = this->stop(this->Y_Axis()) ; j < ej ; ++j)
     181+      for (int i = this->start(this->X_Axis(),j), ei = this->stop(this->X_Axis(),j) ; i < ei ; ++i) {
     182         long bin = long(0.5 + (getpixel(in,i,j,DataIn(0))));
     183         DataOut bs = getpixel(out,bin,index,DataOut(0));
     184         setpixel(out, bin, index, bs+1);
     185       }
     186   } else  if (scalein() == 1)  {
     187-    for (int j = start(this->Y_Axis()), ej = stop(this->Y_Axis()) ; j < ej ; ++j)
     188-      for (int i = start(this->X_Axis(),j), ei = stop(this->X_Axis(),j) ; i < ei ; ++i) {
     189+    for (int j = this->start(this->Y_Axis()), ej = this->stop(this->Y_Axis()) ; j < ej ; ++j)
     190+      for (int i = this->start(this->X_Axis(),j), ei = this->stop(this->X_Axis(),j) ; i < ei ; ++i) {
     191         long bin = long(0.5 + (shiftin()+getpixel(in,i,j,DataIn(0))));
     192         DataOut bs = getpixel(out,bin,index,DataOut(0));
     193         setpixel(out, bin, index, scaleout()+bs);
     194       }
     195   } else { // all modes
     196-    for (int j = start(this->Y_Axis()), ej = stop(this->Y_Axis()) ; j < ej ; ++j)
     197-      for (int i = start(this->X_Axis(),j), ei = stop(this->X_Axis(),j) ; i < ei ; ++i) {
     198+    for (int j = this->start(this->Y_Axis()), ej = this->stop(this->Y_Axis()) ; j < ej ; ++j)
     199+      for (int i = this->start(this->X_Axis(),j), ei = this->stop(this->X_Axis(),j) ; i < ei ; ++i) {
     200         long bin = long(0.5 + (shiftin()+getpixel(in,i,j,DataIn(0)))/scalein());
     201         DataOut bs = getpixel(out,bin,index,DataOut(0));
     202         setpixel(out, bin, index, scaleout()+bs);
     203@@ -55,8 +55,8 @@
     204 {
     205   const int index = indexout();
     206   ImgOut &out = *this->out_data_ptr();
     207-  for (int i = start_dst(this->X_Axis()),
     208-    ei = stop_dst(this->X_Axis()); i < ei; ++i)
     209+  for (int i = this->start_dst(this->X_Axis()),
     210+    ei = this->stop_dst(this->X_Axis()); i < ei; ++i)
     211     setpixel(out, i, index, DataOut(0));
     212   return true;
     213 }
     214--- contrib/tbl/vipl/vipl_median.txx.orig       2012-06-14 23:34:45.000000000 +0200
     215+++ contrib/tbl/vipl/vipl_median.txx    2012-06-14 23:38:53.000000000 +0200
     216@@ -14,10 +14,10 @@
     217 
     218   // apply filter:
     219   DataIn* v = new DataIn[(2*size+1)*(2*size+1)];
     220-  int startx = start(this->X_Axis());
     221-  int starty = start(this->Y_Axis());
     222-  int stopx = stop(this->X_Axis());
     223-  int stopy = stop(this->Y_Axis());
     224+  int startx = this->start(this->X_Axis());
     225+  int starty = this->start(this->Y_Axis());
     226+  int stopx = this->stop(this->X_Axis());
     227+  int stopy = this->stop(this->Y_Axis());
     228   for (int j = starty; j < stopy; ++j)
     229     for (int i = startx; i < stopx; ++i) {
     230       register int count = 0;
     231--- contrib/tbl/vipl/vipl_moment.txx.orig       2012-06-14 23:34:49.000000000 +0200
     232+++ contrib/tbl/vipl/vipl_moment.txx    2012-06-14 23:44:02.000000000 +0200
     233@@ -46,10 +46,10 @@
     234 
     235   // We create a (double) float buffer to hold the computed values.
     236 
     237-  int startx = start(this->X_Axis());
     238-  int starty = start(this->Y_Axis());
     239-  int stopx = stop(this->X_Axis());
     240-  int stopy = stop(this->Y_Axis());
     241+  int startx = this->start(this->X_Axis());
     242+  int starty = this->start(this->Y_Axis());
     243+  int stopx = this->stop(this->X_Axis());
     244+  int stopy = this->stop(this->Y_Axis());
     245 
     246   int sizex = stopx-startx+1;
     247   int sizey = stopy-starty+1;
     248--- contrib/tbl/vipl/vipl_monadic.txx.orig      2012-06-14 23:28:14.000000000 +0200
     249+++ contrib/tbl/vipl/vipl_monadic.txx   2012-06-14 23:38:58.000000000 +0200
     250@@ -9,10 +9,10 @@
     251   const ImgIn &in = this->in_data();
     252   ImgOut &out = this->out_data();
     253 
     254-  int startx = start(this->X_Axis());
     255-  int starty = start(this->Y_Axis());
     256-  int stopx = stop(this->X_Axis());
     257-  int stopy = stop(this->Y_Axis());
     258+  int startx = this->start(this->X_Axis());
     259+  int starty = this->start(this->Y_Axis());
     260+  int stopx = this->stop(this->X_Axis());
     261+  int stopy = this->stop(this->Y_Axis());
     262   for (int j = starty; j < stopy; ++j)
     263     for (int i = startx; i < stopx; ++i)
     264       fsetpixel(out, i, j, func()(fgetpixel(in, i, j, DataIn(0))));
     265--- contrib/tbl/vipl/vipl_sobel.txx.orig        2012-06-14 23:34:55.000000000 +0200
     266+++ contrib/tbl/vipl/vipl_sobel.txx     2012-06-14 23:39:15.000000000 +0200
     267@@ -9,10 +9,10 @@
     268   const ImgIn &in = this->in_data(0);
     269   ImgOut &out = this->out_data();
     270   // apply filter:
     271-  int startx = start(this->X_Axis());
     272-  int starty = start(this->Y_Axis());
     273-  int stopx = stop(this->X_Axis());
     274-  int stopy = stop(this->Y_Axis());
     275+  int startx = this->start(this->X_Axis());
     276+  int starty = this->start(this->Y_Axis());
     277+  int stopx = this->stop(this->X_Axis());
     278+  int stopy = this->stop(this->Y_Axis());
     279   for (int j = starty, ej =  stopy; j < ej  ; ++j)
     280     for (int i = startx, ei = stopx; i < ei ; ++i)
     281       fsetpixel(out, i, j, (DataOut)(
     282--- contrib/tbl/vipl/vipl_threshold.txx.orig    2012-06-14 23:20:41.000000000 +0200
     283+++ contrib/tbl/vipl/vipl_threshold.txx 2012-06-14 23:39:23.000000000 +0200
     284@@ -9,10 +9,10 @@
     285   const ImgIn &in = this->in_data();
     286   ImgOut &out = this->out_data();
     287 
     288-  int startx = start(this->X_Axis());
     289-  int starty = start(this->Y_Axis());
     290-  int stopx = stop(this->X_Axis());
     291-  int stopy = stop(this->Y_Axis());
     292+  int startx = this->start(this->X_Axis());
     293+  int starty = this->start(this->Y_Axis());
     294+  int stopx = this->stop(this->X_Axis());
     295+  int stopy = this->stop(this->Y_Axis());
     296   for (int j = starty; j < stopy; ++j)
     297     for (int i = startx; i < stopx; ++i) {
     298       DataIn p = fgetpixel(in, i, j, DataIn(0));
     299--- contrib/tbl/vipl/vipl_x_gradient.txx.orig   2012-06-14 23:35:09.000000000 +0200
     300+++ contrib/tbl/vipl/vipl_x_gradient.txx        2012-06-14 23:39:29.000000000 +0200
     301@@ -9,10 +9,10 @@
     302   const ImgIn &in = this->in_data(0);
     303   ImgOut &out = *this->out_data_ptr();
     304 
     305-  int startx = start(this->X_Axis());
     306-  int starty = start(this->Y_Axis());
     307-  int stopx = stop(this->X_Axis());
     308-  int stopy = stop(this->Y_Axis());
     309+  int startx = this->start(this->X_Axis());
     310+  int starty = this->start(this->Y_Axis());
     311+  int stopx = this->stop(this->X_Axis());
     312+  int stopy = this->stop(this->Y_Axis());
     313   for (register int j = starty; j < stopy; ++j)
     314     for (register int i = startx+1; i < stopx; ++i) {
     315       DataIn w = fgetpixel(in, i,  j, DataIn(0))
     316--- contrib/tbl/vipl/vipl_y_gradient.txx.orig   2012-06-14 23:35:14.000000000 +0200
     317+++ contrib/tbl/vipl/vipl_y_gradient.txx        2012-06-14 23:39:38.000000000 +0200
     318@@ -9,10 +9,10 @@
     319   const ImgIn &in = this->in_data(0);
     320   ImgOut &out = *this->out_data_ptr();
     321 
     322-  int startx = start(this->X_Axis());
     323-  int starty = start(this->Y_Axis());
     324-  int stopx = stop(this->X_Axis());
     325-  int stopy = stop(this->Y_Axis());
     326+  int startx = this->start(this->X_Axis());
     327+  int starty = this->start(this->Y_Axis());
     328+  int stopx = this->stop(this->X_Axis());
     329+  int stopy = this->stop(this->Y_Axis());
     330   for (register int j = starty+1; j < stopy; ++j)
     331     for (register int i = startx; i < stopx; ++i) {
     332       DataIn w = fgetpixel(in, i, j,   DataIn(0))
  • Portfile

     
    11# $Id$
    22
    33PortSystem 1.0
     4PortGroup  cmake 1.0
    45
    56name             vxl
    67version          1.14.0
    7 revision         1
     8revision         2
    89set branch       [join [lrange [split ${version} .] 0 1] .]
    910categories       devel
    1011maintainers      maeth.com:wiking
     
    2728# error: integer constant is too large for 'long' type
    2829universal_variant no
    2930
    30 patchfiles       patch-v3p__mpeg2__libmpeg2__idct_altivec.c \
    31                  patch-v3p__mpeg2__libmpeg2__motion_comp_altivec.c
     31patchfiles      patch-contrib__gel__mrc__vpgl__txx-clang-compatibility.diff \
     32                patch-contrib__prip__vmap__vmap_2_map.txx.diff \
     33                patch-contrib__prip__vmap__vmap_ptr_sequences.h-clang-compatibility.diff \
     34                patch-contrib__prip__vpyr__vpyr_2_pyramid_level_elts.h-clang-compatibility.diff \
     35                patch-contrib__prip__vpyr__vpyr_2_tpyramid_level_elts.h-clang-compatibility.diff \
     36                patch-contrib__rpl__rgrl__rgrl_est_proj_rad_func.txx-clang-compatibility.diff \
     37                patch-contrib__tbl__vipl__filter__vipl_filter_2d.txx-clang-compatibility.diff \
     38                patch-contrib__tbl__vipl__txx-clang-compatibility.diff \
     39                patch-core__examples__vnl_calc__vnl_calc.cxx-clang-compatibility.diff \
     40                patch-core__vil__tests__test_image_resource.cxx-clang-compatibility.diff \
     41                patch-core__vil__tests__test_image_view.cxx-clang-compatibility.diff \
     42                patch-core__vnl__vnl_matrix_fixed_ref.h-clang-compatibility.diff \
     43                patch-v3p__mpeg2__libmpeg2__idct_altivec.c \
     44                patch-v3p__mpeg2__libmpeg2__motion_comp_altivec.c
     45
    3246post-patch {
    3347        file delete ${worksrcpath}/contrib/mul/vil3d/Templates/vil3d_tricub_interp+uint-.cxx
    3448}
     
    3953                 port:libgeotiff \
    4054                 port:libpng
    4155
    42 configure.cmd      ${prefix}/bin/cmake
    43 configure.pre_args -DCMAKE_INSTALL_PREFIX=${prefix}
    44 configure.args     -DBUILD_SHARED_LIBS=YES \
     56if {${configure.compiler} == "clang"} {
     57        configure.cxxflags-append -Werror=gnu -Wno-error=vla
     58}
     59configure.args-append -DBUILD_SHARED_LIBS=YES \
    4560                   -DCMAKE_INSTALL_NAME_DIR=${prefix}/lib/${name} \
    46                    -DBUILD_BRL=NO \
    47                    ${worksrcpath}
    48 
    49 use_parallel_build no
     61                   -DBUILD_BRL=NO
    5062
    5163# shuffle directories around to turn ${prefix}/lib into ${prefix}/lib/${name}
    5264post-destroot {
    5365        file rename ${destroot}${prefix}/lib ${destroot}${prefix}/tmp
    5466        file mkdir ${destroot}${prefix}/lib
    5567        file rename ${destroot}${prefix}/tmp ${destroot}${prefix}/lib/${name}
     68
     69        # for some reason this file doesn't get installed, making rev-upgrade complain
     70        xinstall -m 755 ${worksrcpath}/lib/libvpgl.dylib ${destroot}${prefix}/lib/${name}
    5671}
    5772
    5873livecheck.regex     /${name}-(\[0-9.\]+)${extract.suffix}