[NEW] math/vtk8

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[NEW] math/vtk8

Charlie Burnett
Howdy,

I'm starting to work through and add the dependencies for FreeCAD,
attached you'll find the patch adding the Visual Toolkit Library 8.2.0
to ports. There's a version 9 available but 8.2 is what's required for
FreeCAD.

Development page is here: https://gitlab.kitware.com/vtk/vtk

Let me know if there's anything I missed!


vtk8.tar.gz (33K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [NEW] math/vtk8

Stuart Henderson
On 2020/06/05 14:44, Charlie Burnett wrote:

> Howdy,
>
> I'm starting to work through and add the dependencies for FreeCAD, attached
> you'll find the patch adding the Visual Toolkit Library 8.2.0 to ports.
> There's a version 9 available but 8.2 is what's required for FreeCAD.
>
> Development page is here: https://gitlab.kitware.com/vtk/vtk
>
> Let me know if there's anything I missed!
>

quick review, sorry for brevity:

- send new ports as a tar.gz of the port directory, not of a diff

- add the rcsid line at the top of the file

# $OpenBSD$

- PKG_ARCH=* means "the produced package works on all arches" which isn't
the case for anything with binaries

- SHARED_LIBS version numbers should use the "major.minor" format and start
from 0.0, however with the huge number of libraries it's going to be insane
to analyse and figure out which individual ones need bumps in future I think
you can just do it like this, so all the versions can be updated in one go

LIBVER = 0.0
SHARED_LIBS +=  vtkChartsCore                           ${LIBVER}
SHARED_LIBS +=  vtkCommonColor                          ${LIBVER}
SHARED_LIBS +=  vtkCommonComputationalGeometry          ${LIBVER}
SHARED_LIBS +=  vtkCommonCore                           ${LIBVER}
etc.

- the following are set by default when cmake is used, please drop the lines:
SEPARATE_BUILD
USE_NINJA

- PKGNAME=${DISTNAME} is set by default and normally should be dropped,
though we generally prefer lowercase package names so for this I'd use
PKGNAME=${DISTNAME:L} to do that

- DESCR should be word-wrapped

- was there a particular reason for the patches that rename the libraries?
e.g.
+-  qt5_wrap_cpp(PluginMocSrcs ${PluginMocHeaders} TARGET QVTKWidgetPlugin)
++  qt5_wrap_cpp(PluginMocSrcs ${PluginMocHeaders} TARGET QVTKWidgetPlugin-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION})

doing this usually causes problems (and causes the library names to not match
your SHARED_LIBS lines which results in the version numbers not being set
properly). Probably want to drop those patches and rerun "make plist" which
with the SHARED_LIBS changes should result in replacing

lib/libvtkChartsCore-8.2.so.1
lib/libvtkCommonColor-8.2.so.1

with

@so lib/libvtkChartsCore.so.${LIBvtkChartsCore_VERSION}
@so lib/libvtkCommonColor.so.${LIBvtkCommonColor_VERSION}

etc.

There will be some other things but it will be easier to look at
them with the above changed.

Reply | Threaded
Open this post in threaded view
|

Re: [NEW] math/vtk8

Charlie Burnett
Hi Stuart,

Is this better? I believe I covered all the bases you mentioned, thanks
for the help!

On 2020-06-05 4:27 PM, Stuart Henderson wrote:

> On 2020/06/05 14:44, Charlie Burnett wrote:
>> Howdy,
>>
>> I'm starting to work through and add the dependencies for FreeCAD, attached
>> you'll find the patch adding the Visual Toolkit Library 8.2.0 to ports.
>> There's a version 9 available but 8.2 is what's required for FreeCAD.
>>
>> Development page is here: https://gitlab.kitware.com/vtk/vtk
>>
>> Let me know if there's anything I missed!
>>
> quick review, sorry for brevity:
>
> - send new ports as a tar.gz of the port directory, not of a diff
>
> - add the rcsid line at the top of the file
>
> # $OpenBSD$
>
> - PKG_ARCH=* means "the produced package works on all arches" which isn't
> the case for anything with binaries
>
> - SHARED_LIBS version numbers should use the "major.minor" format and start
> from 0.0, however with the huge number of libraries it's going to be insane
> to analyse and figure out which individual ones need bumps in future I think
> you can just do it like this, so all the versions can be updated in one go
>
> LIBVER = 0.0
> SHARED_LIBS +=  vtkChartsCore                           ${LIBVER}
> SHARED_LIBS +=  vtkCommonColor                          ${LIBVER}
> SHARED_LIBS +=  vtkCommonComputationalGeometry          ${LIBVER}
> SHARED_LIBS +=  vtkCommonCore                           ${LIBVER}
> etc.
>
> - the following are set by default when cmake is used, please drop the lines:
> SEPARATE_BUILD
> USE_NINJA
>
> - PKGNAME=${DISTNAME} is set by default and normally should be dropped,
> though we generally prefer lowercase package names so for this I'd use
> PKGNAME=${DISTNAME:L} to do that
>
> - DESCR should be word-wrapped
>
> - was there a particular reason for the patches that rename the libraries?
> e.g.
> +-  qt5_wrap_cpp(PluginMocSrcs ${PluginMocHeaders} TARGET QVTKWidgetPlugin)
> ++  qt5_wrap_cpp(PluginMocSrcs ${PluginMocHeaders} TARGET QVTKWidgetPlugin-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION})
>
> doing this usually causes problems (and causes the library names to not match
> your SHARED_LIBS lines which results in the version numbers not being set
> properly). Probably want to drop those patches and rerun "make plist" which
> with the SHARED_LIBS changes should result in replacing
>
> lib/libvtkChartsCore-8.2.so.1
> lib/libvtkCommonColor-8.2.so.1
>
> with
>
> @so lib/libvtkChartsCore.so.${LIBvtkChartsCore_VERSION}
> @so lib/libvtkCommonColor.so.${LIBvtkCommonColor_VERSION}
>
> etc.
>
> There will be some other things but it will be easier to look at
> them with the above changed.
>

vtk8.tar.gz (59K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [NEW] math/vtk8

Justin Noor
Are you sure FreeCAD requires VTK 8.2?

https://wiki.freecadweb.org/Third_Party_Libraries


On Sat, Jun 6, 2020 at 2:00 PM Charlie Burnett <[hidden email]> wrote:

> Hi Stuart,
>
> Is this better? I believe I covered all the bases you mentioned, thanks
> for the help!
>
> On 2020-06-05 4:27 PM, Stuart Henderson wrote:
> > On 2020/06/05 14:44, Charlie Burnett wrote:
> >> Howdy,
> >>
> >> I'm starting to work through and add the dependencies for FreeCAD,
> attached
> >> you'll find the patch adding the Visual Toolkit Library 8.2.0 to ports.
> >> There's a version 9 available but 8.2 is what's required for FreeCAD.
> >>
> >> Development page is here: https://gitlab.kitware.com/vtk/vtk
> >>
> >> Let me know if there's anything I missed!
> >>
> > quick review, sorry for brevity:
> >
> > - send new ports as a tar.gz of the port directory, not of a diff
> >
> > - add the rcsid line at the top of the file
> >
> > # $OpenBSD$
> >
> > - PKG_ARCH=* means "the produced package works on all arches" which isn't
> > the case for anything with binaries
> >
> > - SHARED_LIBS version numbers should use the "major.minor" format and
> start
> > from 0.0, however with the huge number of libraries it's going to be
> insane
> > to analyse and figure out which individual ones need bumps in future I
> think
> > you can just do it like this, so all the versions can be updated in one
> go
> >
> > LIBVER =      0.0
> > SHARED_LIBS +=  vtkChartsCore                           ${LIBVER}
> > SHARED_LIBS +=  vtkCommonColor                          ${LIBVER}
> > SHARED_LIBS +=  vtkCommonComputationalGeometry          ${LIBVER}
> > SHARED_LIBS +=  vtkCommonCore                           ${LIBVER}
> > etc.
> >
> > - the following are set by default when cmake is used, please drop the
> lines:
> > SEPARATE_BUILD
> > USE_NINJA
> >
> > - PKGNAME=${DISTNAME} is set by default and normally should be dropped,
> > though we generally prefer lowercase package names so for this I'd use
> > PKGNAME=${DISTNAME:L} to do that
> >
> > - DESCR should be word-wrapped
> >
> > - was there a particular reason for the patches that rename the
> libraries?
> > e.g.
> > +-  qt5_wrap_cpp(PluginMocSrcs ${PluginMocHeaders} TARGET
> QVTKWidgetPlugin)
> > ++  qt5_wrap_cpp(PluginMocSrcs ${PluginMocHeaders} TARGET
> QVTKWidgetPlugin-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION})
> >
> > doing this usually causes problems (and causes the library names to not
> match
> > your SHARED_LIBS lines which results in the version numbers not being set
> > properly). Probably want to drop those patches and rerun "make plist"
> which
> > with the SHARED_LIBS changes should result in replacing
> >
> > lib/libvtkChartsCore-8.2.so.1
> > lib/libvtkCommonColor-8.2.so.1
> >
> > with
> >
> > @so lib/libvtkChartsCore.so.${LIBvtkChartsCore_VERSION}
> > @so lib/libvtkCommonColor.so.${LIBvtkCommonColor_VERSION}
> >
> > etc.
> >
> > There will be some other things but it will be easier to look at
> > them with the above changed.
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: [NEW] math/vtk8

Charlie Burnett
I ported VTK8.2 because FreeBSD has that specified in their makefile, and
that if there was any weird issues porting from other platforms they
might’ve caught them already- I figured start from there since that’s
likely to work and then once we get FreeCAD fully functional we can bump it
up to VTK9? I’m about to work on libarea, and I’m compiling what paco’s git
had to check it out but then I’ll push the repository to GitHub once it
finishes!

On Sat, Jun 6, 2020 at 6:50 PM Justin Noor <[hidden email]> wrote:

> Are you sure FreeCAD requires VTK 8.2?
>
> https://wiki.freecadweb.org/Third_Party_Libraries
>
>
> On Sat, Jun 6, 2020 at 2:00 PM Charlie Burnett <[hidden email]> wrote:
>
>> Hi Stuart,
>>
>> Is this better? I believe I covered all the bases you mentioned, thanks
>> for the help!
>>
>> On 2020-06-05 4:27 PM, Stuart Henderson wrote:
>> > On 2020/06/05 14:44, Charlie Burnett wrote:
>> >> Howdy,
>> >>
>> >> I'm starting to work through and add the dependencies for FreeCAD,
>> attached
>> >> you'll find the patch adding the Visual Toolkit Library 8.2.0 to ports.
>> >> There's a version 9 available but 8.2 is what's required for FreeCAD.
>> >>
>> >> Development page is here: https://gitlab.kitware.com/vtk/vtk
>> >>
>> >> Let me know if there's anything I missed!
>> >>
>> > quick review, sorry for brevity:
>> >
>> > - send new ports as a tar.gz of the port directory, not of a diff
>> >
>> > - add the rcsid line at the top of the file
>> >
>> > # $OpenBSD$
>> >
>> > - PKG_ARCH=* means "the produced package works on all arches" which
>> isn't
>> > the case for anything with binaries
>> >
>> > - SHARED_LIBS version numbers should use the "major.minor" format and
>> start
>> > from 0.0, however with the huge number of libraries it's going to be
>> insane
>> > to analyse and figure out which individual ones need bumps in future I
>> think
>> > you can just do it like this, so all the versions can be updated in one
>> go
>> >
>> > LIBVER =      0.0
>> > SHARED_LIBS +=  vtkChartsCore                           ${LIBVER}
>> > SHARED_LIBS +=  vtkCommonColor                          ${LIBVER}
>> > SHARED_LIBS +=  vtkCommonComputationalGeometry          ${LIBVER}
>> > SHARED_LIBS +=  vtkCommonCore                           ${LIBVER}
>> > etc.
>> >
>> > - the following are set by default when cmake is used, please drop the
>> lines:
>> > SEPARATE_BUILD
>> > USE_NINJA
>> >
>> > - PKGNAME=${DISTNAME} is set by default and normally should be dropped,
>> > though we generally prefer lowercase package names so for this I'd use
>> > PKGNAME=${DISTNAME:L} to do that
>> >
>> > - DESCR should be word-wrapped
>> >
>> > - was there a particular reason for the patches that rename the
>> libraries?
>> > e.g.
>> > +-  qt5_wrap_cpp(PluginMocSrcs ${PluginMocHeaders} TARGET
>> QVTKWidgetPlugin)
>> > ++  qt5_wrap_cpp(PluginMocSrcs ${PluginMocHeaders} TARGET
>> QVTKWidgetPlugin-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION})
>> >
>> > doing this usually causes problems (and causes the library names to not
>> match
>> > your SHARED_LIBS lines which results in the version numbers not being
>> set
>> > properly). Probably want to drop those patches and rerun "make plist"
>> which
>> > with the SHARED_LIBS changes should result in replacing
>> >
>> > lib/libvtkChartsCore-8.2.so.1
>> > lib/libvtkCommonColor-8.2.so.1
>> >
>> > with
>> >
>> > @so lib/libvtkChartsCore.so.${LIBvtkChartsCore_VERSION}
>> > @so lib/libvtkCommonColor.so.${LIBvtkCommonColor_VERSION}
>> >
>> > etc.
>> >
>> > There will be some other things but it will be easier to look at
>> > them with the above changed.
>> >
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: [NEW] math/vtk8

Stuart Henderson
In reply to this post by Charlie Burnett
I have cleaned things up a little locally but I haven't built it yet,
might send a new tarball in a bit.

It has many internal copies of libraries which are available in other
ports, it should be changed to use those from ports instead (as is also
done in the FreeBSD port).

On 2020/06/06 15:58, Charlie Burnett wrote:

> Hi Stuart,
>
> Is this better? I believe I covered all the bases you mentioned, thanks for
> the help!
>
> On 2020-06-05 4:27 PM, Stuart Henderson wrote:
> > On 2020/06/05 14:44, Charlie Burnett wrote:
> > > Howdy,
> > >
> > > I'm starting to work through and add the dependencies for FreeCAD, attached
> > > you'll find the patch adding the Visual Toolkit Library 8.2.0 to ports.
> > > There's a version 9 available but 8.2 is what's required for FreeCAD.
> > >
> > > Development page is here: https://gitlab.kitware.com/vtk/vtk
> > >
> > > Let me know if there's anything I missed!
> > >
> > quick review, sorry for brevity:
> >
> > - send new ports as a tar.gz of the port directory, not of a diff
> >
> > - add the rcsid line at the top of the file
> >
> > # $OpenBSD$
> >
> > - PKG_ARCH=* means "the produced package works on all arches" which isn't
> > the case for anything with binaries
> >
> > - SHARED_LIBS version numbers should use the "major.minor" format and start
> > from 0.0, however with the huge number of libraries it's going to be insane
> > to analyse and figure out which individual ones need bumps in future I think
> > you can just do it like this, so all the versions can be updated in one go
> >
> > LIBVER = 0.0
> > SHARED_LIBS +=  vtkChartsCore                           ${LIBVER}
> > SHARED_LIBS +=  vtkCommonColor                          ${LIBVER}
> > SHARED_LIBS +=  vtkCommonComputationalGeometry          ${LIBVER}
> > SHARED_LIBS +=  vtkCommonCore                           ${LIBVER}
> > etc.
> >
> > - the following are set by default when cmake is used, please drop the lines:
> > SEPARATE_BUILD
> > USE_NINJA
> >
> > - PKGNAME=${DISTNAME} is set by default and normally should be dropped,
> > though we generally prefer lowercase package names so for this I'd use
> > PKGNAME=${DISTNAME:L} to do that
> >
> > - DESCR should be word-wrapped
> >
> > - was there a particular reason for the patches that rename the libraries?
> > e.g.
> > +-  qt5_wrap_cpp(PluginMocSrcs ${PluginMocHeaders} TARGET QVTKWidgetPlugin)
> > ++  qt5_wrap_cpp(PluginMocSrcs ${PluginMocHeaders} TARGET QVTKWidgetPlugin-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION})
> >
> > doing this usually causes problems (and causes the library names to not match
> > your SHARED_LIBS lines which results in the version numbers not being set
> > properly). Probably want to drop those patches and rerun "make plist" which
> > with the SHARED_LIBS changes should result in replacing
> >
> > lib/libvtkChartsCore-8.2.so.1
> > lib/libvtkCommonColor-8.2.so.1
> >
> > with
> >
> > @so lib/libvtkChartsCore.so.${LIBvtkChartsCore_VERSION}
> > @so lib/libvtkCommonColor.so.${LIBvtkCommonColor_VERSION}
> >
> > etc.
> >
> > There will be some other things but it will be easier to look at
> > them with the above changed.
> >


Reply | Threaded
Open this post in threaded view
|

Re: [NEW] math/vtk8

Charlie Burnett
Thanks for all your help and extensive patience on this Stuart! I’ll try to
ensure I follow your advice on other stuff here forward. In a similar vein,
a dependency is part of a local version of a library for opencv (flann)- I
need to poke around a little more, but would it be advisable to try to make
that into its own port and point both packages to mark it as a dependency?

On Sun, Jun 7, 2020 at 7:47 AM Stuart Henderson <[hidden email]> wrote:

> I have cleaned things up a little locally but I haven't built it yet,
> might send a new tarball in a bit.
>
> It has many internal copies of libraries which are available in other
> ports, it should be changed to use those from ports instead (as is also
> done in the FreeBSD port).
>
> On 2020/06/06 15:58, Charlie Burnett wrote:
> > Hi Stuart,
> >
> > Is this better? I believe I covered all the bases you mentioned, thanks
> for
> > the help!
> >
> > On 2020-06-05 4:27 PM, Stuart Henderson wrote:
> > > On 2020/06/05 14:44, Charlie Burnett wrote:
> > > > Howdy,
> > > >
> > > > I'm starting to work through and add the dependencies for FreeCAD,
> attached
> > > > you'll find the patch adding the Visual Toolkit Library 8.2.0 to
> ports.
> > > > There's a version 9 available but 8.2 is what's required for FreeCAD.
> > > >
> > > > Development page is here: https://gitlab.kitware.com/vtk/vtk
> > > >
> > > > Let me know if there's anything I missed!
> > > >
> > > quick review, sorry for brevity:
> > >
> > > - send new ports as a tar.gz of the port directory, not of a diff
> > >
> > > - add the rcsid line at the top of the file
> > >
> > > # $OpenBSD$
> > >
> > > - PKG_ARCH=* means "the produced package works on all arches" which
> isn't
> > > the case for anything with binaries
> > >
> > > - SHARED_LIBS version numbers should use the "major.minor" format and
> start
> > > from 0.0, however with the huge number of libraries it's going to be
> insane
> > > to analyse and figure out which individual ones need bumps in future I
> think
> > > you can just do it like this, so all the versions can be updated in
> one go
> > >
> > > LIBVER =    0.0
> > > SHARED_LIBS +=  vtkChartsCore                           ${LIBVER}
> > > SHARED_LIBS +=  vtkCommonColor                          ${LIBVER}
> > > SHARED_LIBS +=  vtkCommonComputationalGeometry          ${LIBVER}
> > > SHARED_LIBS +=  vtkCommonCore                           ${LIBVER}
> > > etc.
> > >
> > > - the following are set by default when cmake is used, please drop the
> lines:
> > > SEPARATE_BUILD
> > > USE_NINJA
> > >
> > > - PKGNAME=${DISTNAME} is set by default and normally should be dropped,
> > > though we generally prefer lowercase package names so for this I'd use
> > > PKGNAME=${DISTNAME:L} to do that
> > >
> > > - DESCR should be word-wrapped
> > >
> > > - was there a particular reason for the patches that rename the
> libraries?
> > > e.g.
> > > +-  qt5_wrap_cpp(PluginMocSrcs ${PluginMocHeaders} TARGET
> QVTKWidgetPlugin)
> > > ++  qt5_wrap_cpp(PluginMocSrcs ${PluginMocHeaders} TARGET
> QVTKWidgetPlugin-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION})
> > >
> > > doing this usually causes problems (and causes the library names to
> not match
> > > your SHARED_LIBS lines which results in the version numbers not being
> set
> > > properly). Probably want to drop those patches and rerun "make plist"
> which
> > > with the SHARED_LIBS changes should result in replacing
> > >
> > > lib/libvtkChartsCore-8.2.so.1
> > > lib/libvtkCommonColor-8.2.so.1
> > >
> > > with
> > >
> > > @so lib/libvtkChartsCore.so.${LIBvtkChartsCore_VERSION}
> > > @so lib/libvtkCommonColor.so.${LIBvtkCommonColor_VERSION}
> > >
> > > etc.
> > >
> > > There will be some other things but it will be easier to look at
> > > them with the above changed.
> > >
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: [NEW] math/vtk8

Stuart Henderson
Attached new tgz, I haven't done anything about the internal copies
of libraries though.

On 2020/06/07 08:01, Charlie Burnett wrote:
> Thanks for all your help and extensive patience on this Stuart! I’ll try to
> ensure I follow your advice on other stuff here forward. In a similar vein,
> a dependency is part of a local version of a library for opencv (flann)- I
> need to poke around a little more, but would it be advisable to try to make
> that into its own port and point both packages to mark it as a dependency?

Not sure, I don't know enough about that library to say really, it looks
like it might be an atypical case.

Many of the things in vtk's ThirdParty directory look like they should be
switched though. There is a cmake flag VTK_USE_SYSTEM_LIBRARIES that would
have it use system versions of everything it can find by default (e.g. in
CONFIGURE_ARGS set -DVTK_USE_SYSTEM_LIBRARIES=on), or there are various
settings for individual libs which might be better to use (auto detect
is often a problem when new ports are added later).

VTK_USE_SYSTEM_DIY2
VTK_USE_SYSTEM_DOUBLECONVERSION
VTK_USE_SYSTEM_EIGEN
VTK_USE_SYSTEM_EXPAT
VTK_USE_SYSTEM_FREETYPE
VTK_USE_SYSTEM_GL2PS
VTK_USE_SYSTEM_GLEW
VTK_USE_SYSTEM_HDF5
VTK_USE_SYSTEM_JPEG
VTK_USE_SYSTEM_JSONCPP
VTK_USE_SYSTEM_KISSFFT
VTK_USE_SYSTEM_LIBHARU
VTK_USE_SYSTEM_LIBPROJ
VTK_USE_SYSTEM_LIBXML2
VTK_USE_SYSTEM_LZ4
VTK_USE_SYSTEM_LZMA
VTK_USE_SYSTEM_NETCDF
VTK_USE_SYSTEM_PEGTL
VTK_USE_SYSTEM_PNG
VTK_USE_SYSTEM_PUGIXML
VTK_USE_SYSTEM_SQLITE
VTK_USE_SYSTEM_THEORA
VTK_USE_SYSTEM_TIFF
VTK_USE_SYSTEM_UTF8
VTK_USE_SYSTEM_XDMF3
VTK_USE_SYSTEM_ZFP
VTK_USE_SYSTEM_ZLIB

Not all of these are in ports, and for some of them vtk may want different
versions than we have so they might not work, but we'd definitely want system
versions of these if at all possible: expat freetype zlib (in base),
jpeg jsoncpp libxml2 lz4 lzma ogg png tiff (in ports).

These are also in ports and I think we'd at least want to try to use system
versions: doubleconversion eigen gl2ps glew hdf5 libharu libproj netcdf pugixml
sqlite (really sqlite3) theora



vtk8.tgz (33K) Download Attachment