guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: VTK 8: Re-fix a build failure with recent ve


From: guix-commits
Subject: branch master updated: gnu: VTK 8: Re-fix a build failure with recent versions of freetype.
Date: Wed, 07 Jul 2021 16:51:39 -0400

This is an automated email from the git hooks/post-receive script.

lfam pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 99aecc0  gnu: VTK 8: Re-fix a build failure with recent versions of 
freetype.
99aecc0 is described below

commit 99aecc0988e5fb0b6c2773db13d93501650e928c
Author: Leo Famulari <leo@famulari.name>
AuthorDate: Wed Jul 7 16:11:26 2021 -0400

    gnu: VTK 8: Re-fix a build failure with recent versions of freetype.
    
    * gnu/packages/patches/vtk-8-fix-freetypetools-build-failure.patch: New 
file.
    * gnu/local.mk (dist_patch_DATA): Add it.
    * gnu/packages/image-processing.scm (vtk-8): Dis-inherit from VTK. Use the
    package definition that predated the update to VTK 9, taken from commit
    f4dc8ac6dfa036d98aa0990ae22268a9650899d0.
---
 gnu/local.mk                                       |  1 +
 gnu/packages/image-processing.scm                  | 83 ++++++++++++++++++++--
 .../vtk-8-fix-freetypetools-build-failure.patch    | 36 ++++++++++
 3 files changed, 116 insertions(+), 4 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 66687b4..09a9965 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1821,6 +1821,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/vte-CVE-2012-2738-pt1.patch                     \
   %D%/packages/patches/vte-CVE-2012-2738-pt2.patch                     \
   %D%/packages/patches/vtk-fix-freetypetools-build-failure.patch       \
+  %D%/packages/patches/vtk-8-fix-freetypetools-build-failure.patch     \
   %D%/packages/patches/warsow-qfusion-fix-bool-return-type.patch       \
   %D%/packages/patches/webkitgtk-share-store.patch             \
   %D%/packages/patches/webkitgtk-bind-all-fonts.patch          \
diff --git a/gnu/packages/image-processing.scm 
b/gnu/packages/image-processing.scm
index d1d890e..7408457 100644
--- a/gnu/packages/image-processing.scm
+++ b/gnu/packages/image-processing.scm
@@ -358,7 +358,8 @@ integrates with various databases on GUI toolkits such as 
Qt and Tk.")
 
 ;; freecad needs an old version of VTK, because VTK's API changed from 8 to 9
 (define-public vtk-8
-  (package (inherit vtk)
+  (package
+    (name "vtk")
     (version "8.2.0")
     (source (origin
               (method url-fetch)
@@ -367,10 +368,84 @@ integrates with various databases on GUI toolkits such as 
Qt and Tk.")
                                   "/VTK-" version ".tar.gz"))
               (sha256
                (base32
-                "1fspgp8k0myr6p2a6wkc21ldcswb4bvmb484m12mxgk1a9vxrhrl"))))
+                "1fspgp8k0myr6p2a6wkc21ldcswb4bvmb484m12mxgk1a9vxrhrl"))
+              (patches
+               (search-patches "vtk-8-fix-freetypetools-build-failure.patch"))
+              (modules '((guix build utils)))
+              (snippet
+               '(begin
+                  (for-each
+                    (lambda (dir)
+                      (delete-file-recursively
+                        (string-append "ThirdParty/" dir "/vtk" dir)))
+                    ;; ogg, pugixml depended upon unconditionally
+                    '("doubleconversion" "eigen" "expat" "freetype" "gl2ps"
+                      "glew" "hdf5" "jpeg" "jsoncpp" "libproj" "libxml2" "lz4"
+                      "netcdf" "png" "sqlite" "theora" "tiff" "zlib"))
+                  #t))))
+    (build-system cmake-build-system)
+    (arguments
+     '(#:build-type "Release"           ;Build without '-g' to save space.
+       #:configure-flags '(;"-DBUILD_TESTING:BOOL=TRUE"
+                           ;"-DVTK_MODULE_USE_EXTERNAL_vtkogg:BOOL=TRUE"    ; 
not honored
+                           "-DVTK_USE_SYSTEM_DOUBLECONVERSION:BOOL=TRUE"
+                           "-DVTK_USE_SYSTEM_EIGEN:BOOL=TRUE"
+                           "-DVTK_USE_SYSTEM_EXPAT:BOOL=TRUE"
+                           "-DVTK_USE_SYSTEM_FREETYPE:BOOL=TRUE"
+                           "-DVTK_USE_SYSTEM_GL2PS:BOOL=TRUE"
+                           "-DVTK_USE_SYSTEM_GLEW:BOOL=TRUE"
+                           "-DVTK_USE_SYSTEM_HDF5:BOOL=TRUE"
+                           "-DVTK_USE_SYSTEM_JPEG:BOOL=TRUE"
+                           "-DVTK_USE_SYSTEM_JSONCPP:BOOL=TRUE"
+                           "-DVTK_USE_SYSTEM_LIBPROJ:BOOL=TRUE"
+                           "-DVTK_USE_SYSTEM_LIBXML2:BOOL=TRUE"
+                           "-DVTK_USE_SYSTEM_LZ4:BOOL=TRUE"
+                           "-DVTK_USE_SYSTEM_NETCDF:BOOL=TRUE"
+                           "-DVTK_USE_SYSTEM_PNG:BOOL=TRUE"
+                           ;"-DVTK_USE_SYSTEM_PUGIXML:BOOL=TRUE"    ; breaks 
IO/CityGML
+                           "-DVTK_USE_SYSTEM_SQLITE:BOOL=TRUE"
+                           "-DVTK_USE_SYSTEM_THEORA:BOOL=TRUE"
+                           "-DVTK_USE_SYSTEM_TIFF:BOOL=TRUE"
+                           "-DVTK_USE_SYSTEM_ZLIB:BOOL=TRUE")
+       #:tests? #f))        ;XXX: test data not included
     (inputs
-     `(("jsoncpp" ,jsoncpp-for-tensorflow)
-       ,@(alist-delete "jsoncpp" (package-inputs vtk))))))
+     `(("double-conversion" ,double-conversion)
+       ("eigen" ,eigen)
+       ("expat" ,expat)
+       ("freetype" ,freetype)
+       ("gl2ps" ,gl2ps)
+       ("glew" ,glew)
+       ("glu" ,glu)
+       ("hdf5" ,hdf5)
+       ("jpeg" ,libjpeg-turbo)
+       ("jsoncpp" ,jsoncpp)
+       ;("libogg" ,libogg)
+       ("libtheora" ,libtheora)
+       ("libX11" ,libx11)
+       ("libxml2" ,libxml2)
+       ("libXt" ,libxt)
+       ("lz4" ,lz4)
+       ("mesa" ,mesa)
+       ("netcdf" ,netcdf)
+       ("png" ,libpng)
+       ("proj" ,proj.4)
+       ;("pugixml" ,pugixml)
+       ("sqlite" ,sqlite)
+       ("tiff" ,libtiff)
+       ("xorgproto" ,xorgproto)
+       ("zlib" ,zlib)))
+    (home-page "https://vtk.org/";)
+    (synopsis "Libraries for 3D computer graphics")
+    (description
+     "The Visualization Toolkit (VTK) is a C++ library for 3D computer 
graphics,
+image processing and visualization.  It supports a wide variety of
+visualization algorithms including: scalar, vector, tensor, texture, and
+volumetric methods; and advanced modeling techniques such as: implicit
+modeling, polygon reduction, mesh smoothing, cutting, contouring, and Delaunay
+triangulation.  VTK has an extensive information visualization framework, has
+a suite of 3D interaction widgets, supports parallel processing, and
+integrates with various databases on GUI toolkits such as Qt and Tk.")
+    (license license:bsd-3)))
 
 ;; itksnap needs an older variant of VTK.
 (define-public vtk-6
diff --git a/gnu/packages/patches/vtk-8-fix-freetypetools-build-failure.patch 
b/gnu/packages/patches/vtk-8-fix-freetypetools-build-failure.patch
new file mode 100644
index 0000000..6988e65
--- /dev/null
+++ b/gnu/packages/patches/vtk-8-fix-freetypetools-build-failure.patch
@@ -0,0 +1,36 @@
+This fixes a build failure in VTK when building against recent versions
+of freetype.
+
+  https://gitlab.kitware.com/vtk/vtk/-/merge_requests/7432
+
+Patch by Ben Boeckel <ben.boeckel@kitware.com>
+
+Subject: [PATCH] vtkFreeTypeTools: avoid using an internal macro
+
+This macro has been removed upstream as it was always intended to be
+private.
+---
+ Rendering/FreeType/vtkFreeTypeTools.cxx | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+diff --git a/Rendering/FreeType/vtkFreeTypeTools.cxx 
b/Rendering/FreeType/vtkFreeTypeTools.cxx
+index c54289dc60..03b899c4da 100644
+--- a/Rendering/FreeType/vtkFreeTypeTools.cxx
++++ b/Rendering/FreeType/vtkFreeTypeTools.cxx
+@@ -387,11 +387,8 @@ FTC_CMapCache* vtkFreeTypeTools::GetCMapCache()
+ }
+ 
+ //----------------------------------------------------------------------------
+-FT_CALLBACK_DEF(FT_Error)
+-vtkFreeTypeToolsFaceRequester(FTC_FaceID face_id,
+-                              FT_Library lib,
+-                              FT_Pointer request_data,
+-                              FT_Face* face)
++static FT_Error vtkFreeTypeToolsFaceRequester(
++  FTC_FaceID face_id, FT_Library lib, FT_Pointer request_data, FT_Face* face)
+ {
+ #if VTK_FTFC_DEBUG_CD
+   printf("vtkFreeTypeToolsFaceRequester()\n");
+-- 
+2.30.1
+



reply via email to

[Prev in Thread] Current Thread [Next in Thread]