Created attachment 547494 [details]
find_package(OGRE 1.10 QUIET)
...en-/disabling ovis module based on availability of >=ogre-1.10.
Oh, and the build error as follows:
/var/tmp/portage/media-libs/opencv-3.4.1-r4/work/opencv_contrib-3.4.1/modules/ovis/src/ovis.cpp:7:10: fatal error: OgreApplicationContext.h: No such file or directory
@Sven, do you have an idea where this should be coming from (USE-flag)?
@Sven, is USE=experimental going to stay with >=ogre-1.11 and >=ogre-2 as well, will it be a different USE flag or part of the default installation? That will influence how this dependency needs to be declared in opencv ebuild.
Bug 647266 comment 22 suggests that the dependency should be
contrib? ( dev-games/ogre[experimental(+)] )
(In reply to Andreas Sturmlechner from comment #2)
> Found it.
> @Sven, is USE=experimental going to stay with >=ogre-1.11 and >=ogre-2 as
> well, will it be a different USE flag or part of the default installation?
> That will influence how this dependency needs to be declared in opencv
The referenced "BITES" component is only marked as experimental in the Ogre 1.10 series, and a core component from Ogre 1.11 on. So this flag is only needed with Ogre 1.10 enabled. (*)
However, it is really only "ovis" that uses Ogre. Maybe an "ogre" USE flag that enables the "Ogre VISualizer" would be in order?
Or maybe, as there are several contrib_* flags already, a contrib_ovis flag? It could read:
"OVIS module requires dev-games/ogre"
which would nicely fall in line as well.
(*) I _think_ that the OpenCV ovis module is only compatible with Ogre-1.10, but I haven't checked against Ogre-1.11 or 2.1, yet.
(In reply to Sven Eden from comment #4)
> (*) I _think_ that the OpenCV ovis module is only compatible with Ogre-1.10,
> but I haven't checked against Ogre-1.11 or 2.1, yet.
FWIW, at least opencv-3.4.3 does build against ogre-1.11.2[-experimental] too.
Created attachment 603134 [details, diff]
Fix building against ogre-1.12.x
As long as OpenCV has no USE flag to allow or deny building of the OVIS app, the build system will automagically enable it when it detects the presence of Ogre.
Unfortunately it does not detect the version.
The latest stable Ogre release is 1.12.4, which is currently masked in the tree for reverse dependency checking. One of these is OpenCV, but only implicitly.
The provided patch removes the only single point of failure to build against ogre-1.12.4.
As a side note: OpenCV-4.1.2 does not build against ogre-1.9.0 and *needs* ogre-1.12.4.
Now to the evil part:
While this patch makes the ovis app in opencv-3.x to compile against ogre-1.12.4, it also breaks building against ogre-1.9.0.