Opened 3 years ago

Last modified 22 months ago

#62011 assigned enhancement

opencv/opencv4: eliminate portfile duplication, via subport — at Version 11

Reported by: mascguy (Christopher Nielsen) Owned by: mascguy (Christopher Nielsen)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: opencv3 opencv4

Description (last modified by mascguy (Christopher Nielsen))

Now that the two OpenCV-related ports have been brought up to parity, there are very few differences between them. Eliminate the portfile duplication, via subports.

Also add the following variants, which I missed when bringing both up to parity:

  • opencv: openmp
  • opencv4: openni

Other notable cleanup that will be tackled during the reconciliation:

  • Universal use of github portgroup. Currently used for opencv4, but not for opencv/opencv3.
  • Adopt cmake portgroup, to reduce number of CMake flags needed.
  • Fully implement variant openmp, which is effectively a stub at this point. (While OpenMP is being enabled via configure flag, compiler.openmp_version isn't being set. With the result being that OpenMP isn't found, effectively making this variant a no-op at the moment.)

There is additional cleanup as well, but that covers the most notable items.

Change History (11)

comment:1 Changed 3 years ago by mascguy (Christopher Nielsen)

Description: modified (diff)

comment:2 Changed 3 years ago by mascguy (Christopher Nielsen)

Description: modified (diff)

comment:3 Changed 3 years ago by mascguy (Christopher Nielsen)

This will be done in phases, coordinated with reinstatement of OpenCV 2 port (issue:49670):

  1. Add variants missed during opencv/opencv4 reconciliation (opencv +openmp, opencv4 +openni).
  2. Add new port opencv3, segregated like opencv4. Also include initial changes, supporting later conversion to subport.
  3. Update ports presently dependent upon opencv, to use opencv3. And update port opencv to be a stub port, with replaced_by opencv3, etc.
  4. Add new port opencv2, using same segregation strategy, etc.
  5. Reconcile all three into single opencv port, with three subports. This step may be combined with previous.

Thoughts/feedback welcome, as always.

Last edited 3 years ago by mascguy (Christopher Nielsen) (previous) (diff)

comment:5 Changed 3 years ago by Christopher Nielsen <mascguy@…>

In 1a1ad1dde0f1ed1a99f5bf431a30fa7eeaa269d0/macports-ports (master):

opencv3: new port to replace opencv, with opencv4-style isolation

See: #62011
See: #49670

comment:6 Changed 3 years ago by mascguy (Christopher Nielsen)

Description: modified (diff)

comment:7 Changed 3 years ago by Christopher Nielsen <mascguy@…>

In 33d1482c8b63962c23c3d6bc4556833317fff821/macports-ports (master):

opencv: add variant openmp

See: #62011

comment:8 Changed 3 years ago by Christopher Nielsen <mascguy@…>

In 49c839a35e1286a93ca495f13c268708783b4b3e/macports-ports (master):

opencv4: add variant openni

See: #62011

comment:9 Changed 3 years ago by Christopher Nielsen <mascguy@…>

In 7b38728c237c1be013b382640875f03d95d30e6f/macports-ports (master):

opencv/opencv4: variant openmp: implement fully, via compiler.openmp_version

See: #62011

comment:10 Changed 3 years ago by Christopher Nielsen <mascguy@…>

In 9987e0ce91de77778a17587f73061e550365cb1d/macports-ports (master):

opencv3: variant openmp: implement fully, via compiler.openmp_version

See: #62011

comment:11 Changed 3 years ago by mascguy (Christopher Nielsen)

Description: modified (diff)
Note: See TracTickets for help on using tickets.