[arch-commits] Commit in vtk/trunk (PKGBUILD proj6.patch)

Balló György bgyorgy at archlinux.org
Sun Jun 23 22:23:51 UTC 2019


    Date: Sunday, June 23, 2019 @ 22:23:51
  Author: bgyorgy
Revision: 483335

upgpkg: vtk 8.2.0-4

gdal 3.0.0 and proj 6.1.0 rebuild

Added:
  vtk/trunk/proj6.patch
Modified:
  vtk/trunk/PKGBUILD

-------------+
 PKGBUILD    |   16 ++++++--
 proj6.patch |  110 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 123 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-06-23 22:23:14 UTC (rev 483334)
+++ PKGBUILD	2019-06-23 22:23:51 UTC (rev 483335)
@@ -6,7 +6,7 @@
 
 pkgname=vtk
 pkgver=8.2.0
-pkgrel=3
+pkgrel=4
 pkgdesc="A software system for 3D computer graphics, image processing, and visualization"
 arch=('x86_64')
 url="https://www.vtk.org/"
@@ -42,14 +42,24 @@
             'unixodbc')
 source=("${url}/files/release/${pkgver%.*}/VTK-${pkgver}.tar.gz"
         "${url}/files/release/${pkgver%.*}/VTKData-${pkgver}.tar.gz"
-        "${url}/files/release/${pkgver%.*}/VTKLargeData-${pkgver}.tar.gz")
+        "${url}/files/release/${pkgver%.*}/VTKLargeData-${pkgver}.tar.gz"
+        proj6.patch)
 options=(staticlibs)
 sha512sums=('521bd4dabedbc24b0e80a314a34ecd7554b04af28a7973245e3a9cf99a09b995d1b8ac42305c8e53369f226a0a6da3cdb29105ba2c90b46492736ef717760286'
             '517d0f6dfdb0c61f59df933f06d3a28c8a48ea684aaff311456213fe493e2a20128886144325fc4edfa376b2d375a2dae6c60ad6e3d5d2f4a7b0ac1d8545c87b'
-            '8a7ea3d5870b1e4ccb31c77b4c270d00208349da1b2938e957210db3ec1449b678c66edc2faee1d4514aca6d725f642abc91e10ab0c151f6743cad1c53485588')
+            '8a7ea3d5870b1e4ccb31c77b4c270d00208349da1b2938e957210db3ec1449b678c66edc2faee1d4514aca6d725f642abc91e10ab0c151f6743cad1c53485588'
+            'bd095a848c198752307d6924eaa46d07af4fbbba70f4665e10c8b5dd8d2a84cb6d9ea6c25705463a6c054c5afa5af4c68030ad90d37953672c0fc609eaf24b07')
 
 prepare() {
   mkdir build
+  cd VTK-${pkgver}
+
+  # Fix build with proj 6.0
+  patch -Np1 -i ../proj6.patch
+
+  # Fix build with Java 12
+  sed -i 's/VTK_JAVA_SOURCE_VERSION "1.6"/VTK_JAVA_SOURCE_VERSION "1.7"/
+          s/VTK_JAVA_TARGET_VERSION "1.6"/VTK_JAVA_TARGET_VERSION "1.7"/' Wrapping/Java/CMakeLists.txt
 }
 
 build() {

Added: proj6.patch
===================================================================
--- proj6.patch	                        (rev 0)
+++ proj6.patch	2019-06-23 22:23:51 UTC (rev 483335)
@@ -0,0 +1,110 @@
+diff --git a/Geovis/Core/vtkGeoProjection.cxx b/Geovis/Core/vtkGeoProjection.cxx
+index f3a8852d94..824060348a 100644
+--- a/Geovis/Core/vtkGeoProjection.cxx
++++ b/Geovis/Core/vtkGeoProjection.cxx
+@@ -72,6 +72,7 @@ public:
+   }
+ 
+   std::map< std::string, std::string > OptionalParameters;
++  PJ_PROJ_INFO ProjInfo;
+ };
+ 
+ //-----------------------------------------------------------------------------
+@@ -80,7 +83,7 @@ int vtkGeoProjection::GetNumberOfProjections()
+   if ( vtkGeoProjectionNumProj < 0 )
+   {
+     vtkGeoProjectionNumProj = 0;
+-    for ( const PJ_LIST* pj = pj_get_list_ref(); pj && pj->id; ++ pj )
++    for ( const PJ_LIST* pj = proj_list_operations(); pj && pj->id; ++ pj )
+       ++ vtkGeoProjectionNumProj;
+   }
+   return vtkGeoProjectionNumProj;
+@@ -91,7 +94,7 @@ const char* vtkGeoProjection::GetProjectionName( int projection )
+   if ( projection < 0 || projection >= vtkGeoProjection::GetNumberOfProjections() )
+     return nullptr;
+ 
+-  return pj_get_list_ref()[projection].id;
++  return proj_list_operations()[projection].id;
+ }
+ //-----------------------------------------------------------------------------
+ const char* vtkGeoProjection::GetProjectionDescription( int projection )
+@@ -99,7 +102,7 @@ const char* vtkGeoProjection::GetProjectionDescription( int projection )
+   if ( projection < 0 || projection >= vtkGeoProjection::GetNumberOfProjections() )
+     return nullptr;
+ 
+-  return pj_get_list_ref()[projection].descr[0];
++  return proj_list_operations()[projection].descr[0];
+ }
+ //-----------------------------------------------------------------------------
+ vtkGeoProjection::vtkGeoProjection()
+@@ -144,7 +147,7 @@ void vtkGeoProjection::PrintSelf( ostream& os, vtkIndent indent )
+ int vtkGeoProjection::GetIndex()
+ {
+   int i = 0;
+-  for ( const PJ_LIST* proj = pj_get_list_ref(); proj && proj->id; ++ proj, ++ i )
++  for ( const PJ_LIST* proj = proj_list_operations(); proj && proj->id; ++ proj, ++ i )
+   {
+     if ( ! strcmp( proj->id, this->Name ) )
+     {
+@@ -161,7 +164,7 @@ const char* vtkGeoProjection::GetDescription()
+   {
+     return nullptr;
+   }
+-  return this->Projection->descr;
++  return this->Internals->ProjInfo.description;
+ }
+ //-----------------------------------------------------------------------------
+ projPJ vtkGeoProjection::GetProjection()
+@@ -232,6 +239,7 @@ int vtkGeoProjection::UpdateProjection()
+   this->ProjectionMTime = this->GetMTime();
+   if ( this->Projection )
+   {
++    this->Internals->ProjInfo = proj_pj_info(this->Projection);
+     return 0;
+   }
+   return 1;
+diff --git a/Geovis/Core/vtkGeoTransform.cxx b/Geovis/Core/vtkGeoTransform.cxx
+index aeeabc1075..b80a8c010c 100644
+--- a/Geovis/Core/vtkGeoTransform.cxx
++++ b/Geovis/Core/vtkGeoTransform.cxx
+@@ -167,9 +167,9 @@ void vtkGeoTransform::InternalTransformPoints( double* x, vtkIdType numPts, int
+     double* coord = x;
+     for ( vtkIdType i = 0; i < numPts; ++ i )
+     {
+-      xy.u = coord[0]; xy.v = coord[1];
++      xy.x = coord[0]; xy.y = coord[1];
+       lp = pj_inv( xy, src );
+-      coord[0] = lp.u; coord[1] = lp.v;
++      coord[0] = lp.lam; coord[1] = lp.phi;
+       coord += stride;
+     }
+   }
+@@ -191,9 +199,9 @@ void vtkGeoTransform::InternalTransformPoints( double* x, vtkIdType numPts, int
+     double* coord = x;
+     for ( vtkIdType i = 0; i < numPts; ++ i )
+     {
+-      lp.u = coord[0]; lp.v = coord[1];
++      lp.lam = coord[0]; lp.phi = coord[1];
+       xy = pj_fwd( lp, dst );
+-      coord[0] = xy.u; coord[1] = xy.v;
++      coord[0] = xy.x; coord[1] = xy.y;
+       coord += stride;
+     }
+   }
+diff --git a/ThirdParty/libproj/vtk_libproj.h.in b/ThirdParty/libproj/vtk_libproj.h.in
+index d52db07a95..4d8ffc3c5d 100644
+--- a/ThirdParty/libproj/vtk_libproj.h.in
++++ b/ThirdParty/libproj/vtk_libproj.h.in
+@@ -18,7 +18,8 @@
+ /* Use the libproj library configured for VTK.  */
+ #cmakedefine VTK_USE_SYSTEM_LIBPROJ
+ #ifdef VTK_USE_SYSTEM_LIBPROJ
+-# include <projects.h>
++# include <proj.h>
++# define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H 1
+ # include <proj_api.h>
+ # include <geodesic.h>
+ #else
+-- 
+2.21.0
+


More information about the arch-commits mailing list