Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recipe for VTK #10776

Closed
wants to merge 132 commits into from
Closed
Show file tree
Hide file tree
Changes from 52 commits
Commits
Show all changes
132 commits
Select commit Hold shift + click to select a range
277d84e
Package VTK, first pass.
paulharris May 13, 2022
ecd76e1
Move patch code into build() step
paulharris May 13, 2022
b8e19f9
Exported cmake variable to help test_package link
paulharris May 13, 2022
0d27216
Fixes to patching (not copying source)
paulharris May 13, 2022
357c287
Quotes in conandata.yml
paulharris May 13, 2022
883f32a
Support old Conan CI, and more component hacks
paulharris May 14, 2022
75d473d
Hack, add all lib list for one last scenario
paulharris May 14, 2022
a72bb6e
Set a specific cmake version requirement
paulharris May 14, 2022
c2fdc7a
Fixes as suggested on GH
paulharris May 15, 2022
0e4b7e1
Fixup freetype to work with preferconfig=true
paulharris May 17, 2022
cefb31d
Use conan EXPAT
paulharris May 17, 2022
4ebeaca
More attempts
paulharris May 17, 2022
2fedad5
Working again
paulharris May 17, 2022
2c9139b
Tweak package naming
paulharris May 17, 2022
f66c86f
No longer export VTK cmake files
paulharris May 18, 2022
460b048
Auto-detect modules from library files. Cleaned up component list.
paulharris May 18, 2022
a1f3cdd
build_requires --> tool_requires
paulharris May 18, 2022
4edf3d9
Trying to fix build overrides
paulharris May 18, 2022
7d0dd36
why wont it work
paulharris May 18, 2022
413748c
weird...
paulharris May 18, 2022
df97aaf
fiddle
paulharris May 18, 2022
14af1a1
Tweak to test_package
paulharris May 18, 2022
5118936
More requirements. Has problem with cmake+openssl+libcurl
paulharris May 18, 2022
89eef73
Require minimum compiler, and workaround conan dep bug
paulharris May 18, 2022
77f5e9f
Fixes for compiler plus HDF5 plus Theora
paulharris May 18, 2022
cebe686
Try to diagnose apple-clang issue
paulharris May 18, 2022
5383148
More dependency external support
paulharris May 19, 2022
ba03266
Minor fix, and support conan cgns
paulharris May 19, 2022
c53b939
Many more dependencies
paulharris May 19, 2022
2c00f98
Enabling 'build_all_modules'
paulharris May 19, 2022
382b792
Run build in RunEnvironment shared-build works
paulharris May 20, 2022
bc298b3
Dependency updates
paulharris May 24, 2022
48b035a
Don't set the builddirs
paulharris Jun 10, 2022
aa23091
Fixes for C++20
paulharris Jun 10, 2022
0c268a9
Don't build with xorg/system on Windows
paulharris Jun 17, 2022
3de32dc
Fixup iterator patch for the tarball
paulharris Jun 17, 2022
3b02da9
Add option to enable/disable remote modules
paulharris Jun 17, 2022
5b9f9ba
Tweak for windows
paulharris Jun 24, 2022
598373d
Implemented automatic scanning of modules.json
paulharris Jun 24, 2022
07306f6
Add a mini-conan-specific component to avoid stdout spam
paulharris Jun 24, 2022
c4a5f85
Working on using vtk module file
paulharris Jun 24, 2022
36608c9
Fixes for windows module approach, use kissfft:datatype=double
paulharris Jun 28, 2022
9c3d359
Bump dep versions
paulharris Jul 8, 2022
001fcbf
Attempted to set resdirs, i have no idea
paulharris Jul 9, 2022
916d7c3
More conan fixes
paulharris Oct 25, 2022
c1f098f
Include private internal deps in component requires
paulharris Nov 2, 2022
03776ae
vtk - ensure it links to QtOpenGL when required
paulharris Sep 9, 2022
118cba9
vtk - fixes for copying modules.json into the right spot
paulharris Sep 9, 2022
65b0943
Use external libharu
paulharris Nov 8, 2022
f2b4195
Upgrade for conan 1.53
paulharris Nov 8, 2022
4683aa5
Cleanup, and add 9.2.2
paulharris Nov 8, 2022
29157dc
Fixes for building vtk 9.2.2
paulharris Nov 8, 2022
859e275
Fix source get() and fix bug testing if group/modules are enabled
paulharris Dec 1, 2022
0d6f8b0
python fixes
paulharris Dec 1, 2022
f5a6b81
Allow choice between libjpeg and libjpeg-turbo
paulharris Dec 16, 2022
f191c7a
Thanks @EricAtORS - VTK can only compile with the pugixml option wcha…
paulharris Dec 16, 2022
fd25725
Fix problem when QT is not enabled
paulharris Dec 16, 2022
816e0f1
Added small comment
paulharris Dec 16, 2022
f9825d3
Support building for a specific git commit or branch or non-version tag
paulharris Dec 16, 2022
6f5af7a
Add example git-commit version in config.yml
paulharris Dec 16, 2022
7648a98
Bump dependencies
paulharris Dec 16, 2022
073c0a9
in progress
paulharris Dec 16, 2022
7a710fd
Cleaned up a lot of the old stuff in recipe
paulharris Dec 16, 2022
fdc117d
Fixes from @EricAtORS, especially for python-wrap
paulharris Feb 2, 2023
a24ec21
Third-party libs: don't patch VTK, instead use CMakeDeps set_property()
paulharris Feb 3, 2023
aa5ea77
Check IOExport is built with wrap_python - EricAtORS says required.
paulharris Feb 3, 2023
71256b0
Fixup NetCDF, VTK needs a CMake definition.
paulharris Feb 3, 2023
ba84149
Fixup for C++17/20
paulharris Feb 3, 2023
5e47665
Drop vtk 9.1.0
paulharris Feb 3, 2023
6c8c0c2
Bump dependency for sqlite3
paulharris Feb 3, 2023
988023f
Check kissfft:datatype=double in validate
paulharris Feb 3, 2023
f3f305e
Override libcurl version requirement, for CCI build for now
paulharris Feb 3, 2023
a9e60a2
Fixup kissfft configuration
paulharris Feb 3, 2023
2fe4f4b
Remove require-override
paulharris Feb 3, 2023
52a8b8f
Fix linter
paulharris Feb 3, 2023
160d54a
Add version 9.2.5
paulharris Feb 4, 2023
16c79c0
Add sqlite3 to build_requirements
paulharris Feb 9, 2023
f046ac9
Declare both libs and kits as components. Extra recipe debugging.
paulharris Feb 11, 2023
7cc821e
Removed 9.2.2, added 9.2.6. Added and fixed patches.
paulharris Mar 22, 2023
4ac8677
Added ALL currently available modules to recipe with a loop
paulharris Mar 22, 2023
88e782a
Support VTK's autoinit with a different approach
paulharris Mar 22, 2023
033c3fb
Add patch for python wrapping
paulharris Mar 22, 2023
aa9060d
Dropped version 9.2.5
paulharris Mar 22, 2023
537d85b
Backported patch for vtkCGNSReader.cxx
paulharris Mar 22, 2023
a1cdc08
temp fix for vtk to find shared library
EricAtORS Apr 4, 2023
9aa136d
Update conan dependency versions
paulharris Apr 5, 2023
291d9f4
Downgrade deps to help build on C3I
paulharris Apr 6, 2023
2085bbb
Another attempt to get it to build on C3I
paulharris Apr 6, 2023
936fb92
Give up, just ask for latest dependencies
paulharris Apr 6, 2023
8e6756d
Split some of the code out of package_info for generating a header.
paulharris May 27, 2023
914e4e6
Merge remote-tracking branch 'eric/package-vtk' into package-vtk
paulharris May 31, 2023
5e4990e
Fixup shared support for glew, freetype, jsoncpp, lzma
paulharris May 31, 2023
6d3422f
Fix for lzma shared/static detection (use xz_utils)
paulharris Jun 7, 2023
3fc9959
Bump deps
paulharris Jun 7, 2023
6a29799
Unbump deps
paulharris Jun 8, 2023
3b538de
Bugfix for shared/static dependency detection
paulharris Jun 9, 2023
f02f504
Attempt to resolve openssl version conflicts with my dependencies
paulharris Jun 9, 2023
ecc239b
Try a different 'requires' for openssl
paulharris Jun 9, 2023
0933da1
Disable OpenVR dependency until its recipe is ready for conan v2
paulharris Jun 9, 2023
350b752
Extra work to avoid requiring OpenVR
paulharris Jun 9, 2023
a7d9d80
Add patch for future upstreamed patch
paulharris Jun 21, 2023
f8d53de
Compile fix for GCC13
paulharris Sep 1, 2023
50e9152
Add patches for vtkBoxClipDataSet, vtkCleanPolyData (pointmerging) an…
paulharris Oct 25, 2023
a4a8e74
Added patch for vtkHardwarePicker. Renamed some patches.
paulharris Nov 30, 2023
9722afc
Requires to use ranges
paulharris Feb 14, 2024
d87768a
Tweaking recipe
paulharris Feb 14, 2024
943cf1e
Use tarball source
paulharris Feb 16, 2024
0377e6a
Add external script for finding modules in src
paulharris Feb 16, 2024
515a55d
Force dependency versions to avoid conflict with
paulharris Feb 16, 2024
298f4eb
Tweak libxml2 version
paulharris Feb 16, 2024
33cf7ef
Add comments, fix expat dependency conflict
paulharris Feb 16, 2024
d84dc03
Use conan's kissfft rather than internal package
paulharris Feb 16, 2024
a1fbf0a
And add the patch
paulharris Feb 16, 2024
d5440a9
Disable group_enable_Web (default) until wrapping is enabled by default
paulharris Feb 16, 2024
220eaa0
Also disable QtQuick support as QT's default package isn't enabled
paulharris Feb 16, 2024
c40d561
VTK recipe is now driven by json file with all the dependency info
paulharris Feb 26, 2024
926c669
Rearranged methods in the assumed order that they would be called
paulharris Feb 26, 2024
377ed95
Cleaned up the option-resolution system
paulharris Feb 26, 2024
26410a3
Remove some debugging
paulharris Feb 26, 2024
5015b30
Fix comma typos
paulharris Feb 27, 2024
91fa330
Add vtkHull patch
paulharris Mar 6, 2024
4bac365
Add patch to specify OutputPrecision for vtkQuadricDecimation
paulharris Mar 7, 2024
c4397a6
Merge remote-tracking branch 'gitlab/package-vtk-mxrap-60' into packa…
paulharris Mar 12, 2024
38fb011
Consumers don't use private deps. Use transitive headers+libs for con…
paulharris Mar 13, 2024
c6428d7
Port 2 new 9.2.6 patches to 9.3.0
paulharris Mar 13, 2024
4ba98e1
Merge remote-tracking branch 'mygithub/package-vtk' into package-vtk
paulharris Mar 13, 2024
ceb745b
Typo
paulharris Mar 14, 2024
cd5c005
Re-enable printouts. Fixup xorg handling for Windows.
paulharris Apr 22, 2024
ebf902c
Include private dependencies in the component requirements, for linking
paulharris May 16, 2024
7cad99c
Bump some dependencies
paulharris May 17, 2024
74d4d53
More vtkQuadricDecimation fixes
paulharris May 27, 2024
50d0a8b
Dropped patches and configuration for VTK 9.2.6
paulharris May 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions recipes/vtk/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
sources:
"9.1.0":
url: "https://www.vtk.org/files/release/9.1/VTK-9.1.0.tar.gz"
sha256: "8fed42f4f8f1eb8083107b68eaa9ad71da07110161a3116ad807f43e5ca5ce96"
"9.2.2":
url: "https://www.vtk.org/files/release/9.2/VTK-9.2.2.tar.gz"
sha256: "1c5b0a2be71fac96ff4831af69e350f7a0ea3168981f790c000709dcf9121075"

patches:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some patch_types are not fitting. Some are rather portability patches, like the ones that enable newer C++ standards.
And for the one that is upstreamed please add a patch_source, it is much easier to know then what can be removed with future upstream releases

https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/conandata_yml_format.md#patch_type

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, was going to do that later as the upstreamed patches were upstreamed quite a while ago, and at the time hadn't been accepted yet.

"9.2.2":
- patch_file: "patches/9.1.0-remove-qt-59-limit.patch"
patch_type: "conan"
patch_description: "Don't limit QT to 5.9.x"
- patch_file: "patches/9.2.2-third-party-update-specifications.patch"
patch_type: "conan"
patch_description: "Update third-party library specs to use conan-supplied libs"
- patch_file: "patches/9.2.2-fix-cxx20.patch"
patch_type: "conan"
patch_description: "Fixes to support C++20"
- patch_file: "patches/9.1.0-fix-cxx20-3rdparty-diy.patch"
patch_type: "conan"
patch_description: "Upgrade small_vector.hpp to newer code, patch is upstreamed but stuck"
"9.1.0":
- patch_file: "patches/9.1.0-remove-qt-59-limit.patch"
patch_type: "conan"
patch_description: "Don't limit QT to 5.9.x"
- patch_file: "patches/9.1.0-third-party-update-specifications.patch"
patch_type: "conan"
patch_description: "Update third-party library specs to use conan-supplied libs"
- patch_file: "patches/9.1.0-fix-cxx20.patch"
patch_type: "conan"
patch_description: "Fixes to support C++20"
- patch_file: "patches/9.1.0-fix-cxx20-3rdparty-diy.patch"
patch_type: "conan"
patch_description: "Upgrade small_vector.hpp to newer code, patch is upstreamed but stuck"
- patch_file: "patches/9.1.0-dont-inherit-iterator.patch"
patch_type: "conan"
patch_description: "Fix for modern C++: don't inherit from std::iterator"
854 changes: 854 additions & 0 deletions recipes/vtk/all/conanfile.py

Large diffs are not rendered by default.

130 changes: 130 additions & 0 deletions recipes/vtk/all/patches/9.1.0-dont-inherit-iterator.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
Don't inherit from std::iterator, different patch sent upstream

diff --git a/Common/Core/SMP/Common/vtkSMPThreadLocalAPI.h b/Common/Core/SMP/Common/vtkSMPThreadLocalAPI.h
index 3a64fb7129..e63ab157f8 100644
--- a/Common/Core/SMP/Common/vtkSMPThreadLocalAPI.h
+++ b/Common/Core/SMP/Common/vtkSMPThreadLocalAPI.h
@@ -122,9 +122,15 @@ public:
}

//--------------------------------------------------------------------------------
- class iterator : public std::iterator<std::forward_iterator_tag, T> // for iterator_traits
+ class iterator
{
public:
+ using iterator_category = std::forward_iterator_tag;
+ using value_type = T;
+ using difference_type = std::ptrdiff_t;
+ using pointer = T*;
+ using reference = T&;
+
iterator() = default;

iterator(const iterator& other)
diff --git a/Common/Core/vtkCollectionRange.h b/Common/Core/vtkCollectionRange.h
index 221e7b9367..9ac161b03d 100644
--- a/Common/Core/vtkCollectionRange.h
+++ b/Common/Core/vtkCollectionRange.h
@@ -100,23 +100,18 @@
// vtkObjects consts makes them unusable.
template <typename CollectionType>
struct CollectionIterator
- : public std::iterator<std::forward_iterator_tag,
- typename GetCollectionItemType<CollectionType>::Type*, int,
- typename GetCollectionItemType<CollectionType>::Type*,
- typename GetCollectionItemType<CollectionType>::Type*>
{
static_assert(IsCollection<CollectionType>::value, "Invalid vtkCollection subclass.");

private:
using ItemType = typename GetCollectionItemType<CollectionType>::Type;
- using Superclass = std::iterator<std::forward_iterator_tag, ItemType*, int, ItemType*, ItemType*>;

public:
- using iterator_category = typename Superclass::iterator_category;
- using value_type = typename Superclass::value_type;
- using difference_type = typename Superclass::difference_type;
- using pointer = typename Superclass::pointer;
- using reference = typename Superclass::reference;
+ using iterator_category = std::forward_iterator_tag;
+ using value_type = typename GetCollectionItemType<CollectionType>::Type*;
+ using difference_type = int;
+ using pointer = typename GetCollectionItemType<CollectionType>::Type*;
+ using reference = typename GetCollectionItemType<CollectionType>::Type*;

CollectionIterator() noexcept
: Element(nullptr)
diff --git a/Common/Core/vtkSMPTools.h b/Common/Core/vtkSMPTools.h
index 35d9312187..8a83b1293d 100644
--- a/Common/Core/vtkSMPTools.h
+++ b/Common/Core/vtkSMPTools.h
@@ -37,7 +37,6 @@
#include "vtkSMPThreadLocal.h" // For Initialized

#include <functional> // For std::function
-#include <iterator> // For std::iterator
#include <type_traits> // For std:::enable_if

#ifndef DOXYGEN_SHOULD_SKIP_THIS
diff --git a/Common/DataModel/vtkCompositeDataSetRange.h b/Common/DataModel/vtkCompositeDataSetRange.h
index 19c5981f6b..3c22876c7c 100644
--- a/Common/DataModel/vtkCompositeDataSetRange.h
+++ b/Common/DataModel/vtkCompositeDataSetRange.h
@@ -56,21 +56,17 @@
//------------------------------------------------------------------------------
// vtkCompositeDataSet iterator. Returns vtk::CompositeDataSetNodeReference.
struct CompositeDataSetIterator
- : public std::iterator<std::forward_iterator_tag, vtkDataObject*, int,
- CompositeDataSetIteratorReference, CompositeDataSetIteratorReference>
{
private:
- using Superclass = std::iterator<std::forward_iterator_tag, vtkDataObject*, int,
- CompositeDataSetIteratorReference, CompositeDataSetIteratorReference>;
using InternalIterator = vtkCompositeDataIterator;
using SmartIterator = vtkSmartPointer<InternalIterator>;

public:
- using iterator_category = typename Superclass::iterator_category;
- using value_type = typename Superclass::value_type;
- using difference_type = typename Superclass::difference_type;
- using pointer = typename Superclass::pointer;
- using reference = typename Superclass::reference;
+ using iterator_category = std::forward_iterator_tag;
+ using value_type = vtkDataObject*;
+ using difference_type = int;
+ using pointer = CompositeDataSetIteratorReference;
+ using reference = CompositeDataSetIteratorReference;

CompositeDataSetIterator(const CompositeDataSetIterator& o)
: Iterator(o.Iterator ? SmartIterator::Take(o.Iterator->NewInstance()) : nullptr)
diff --git a/Common/DataModel/vtkDataObjectTreeRange.h b/Common/DataModel/vtkDataObjectTreeRange.h
index 1a4c27729d..484a06c8d3 100644
--- a/Common/DataModel/vtkDataObjectTreeRange.h
+++ b/Common/DataModel/vtkDataObjectTreeRange.h
@@ -56,21 +56,17 @@
vtk::CompositeDataSetNodeReference<vtkDataObjectTreeIterator, DataObjectTreeIterator>;

struct DataObjectTreeIterator
- : public std::iterator<std::forward_iterator_tag, vtkDataObject*, int,
- DataObjectTreeIteratorReference, DataObjectTreeIteratorReference>
{
private:
- using Superclass = std::iterator<std::forward_iterator_tag, vtkDataObject*, int,
- DataObjectTreeIteratorReference, DataObjectTreeIteratorReference>;
using InternalIterator = vtkDataObjectTreeIterator;
using SmartIterator = vtkSmartPointer<InternalIterator>;

public:
- using iterator_category = typename Superclass::iterator_category;
- using value_type = typename Superclass::value_type;
- using difference_type = typename Superclass::difference_type;
- using pointer = typename Superclass::pointer;
- using reference = typename Superclass::reference;
+ using iterator_category = std::forward_iterator_tag;
+ using value_type = vtkDataObject*;
+ using difference_type = int;
+ using pointer = DataObjectTreeIteratorReference;
+ using reference = DataObjectTreeIteratorReference;

DataObjectTreeIterator(const DataObjectTreeIterator& o)
: Iterator(o.Iterator ? SmartIterator::Take(o.Iterator->NewInstance()) : nullptr)
Loading