[MacPorts] #63069: vtk: migrate from python variants to subports
MacPorts
noreply at macports.org
Mon Jan 20 14:59:38 UTC 2025
#63069: vtk: migrate from python variants to subports
--------------------------+----------------------
Reporter: mascguy | Owner: stromnov
Type: enhancement | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.7.2
Resolution: | Keywords:
Port: vtk |
--------------------------+----------------------
Comment (by mascguy):
Replying to [comment:14 mascguy]:
> Replying to [comment:12 Dave-Allured]:
> > Would someone kindly give me a couple of tips on how to start for
subports? I will give this a try. BTW, update 9.4.0 for VTK is imminent.
>
> We have a few ports where we migrated from variants to subports, such as
`opencv3` and `opencv4`. You can use those as rough examples, to get an
overall idea.
I've also started some of the work for `vtk`, in the following branch:
https://github.com/macports/macports-ports/compare/master...mascguy
:macports-ports:mascguy-vtk-subports
One of the key things is to migrate the Python setup to a procedure, so
that it can be called as needed within each subport. That's mostly done in
my branch, though it hasn't been tested thoroughly.
Then it's a matter of defining each subport, and calling the Python setup
from there.
Another thing that's needed, is to ensure the subports don't include the
parent port's contents. That can be done with this snippet, which is used
in various ports:
{{{
# Deconflict with parent port contents
post-destroot {
ui_debug "${subport}: python subport: removing parent port
contents"
foreach f [exec port -q contents ${name}] {
delete ${destroot}${f}
}
}
}}}
--
Ticket URL: <https://trac.macports.org/ticket/63069#comment:15>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list