2014-07-19 23:29 GMT+04:00 Vadim Zhukov <[email protected]>:
> This should fix the build of graphics/digikam-kde4 on archs where
> opencv-java is built by default (i.e., on amd64).
>
> Please, someone with amd64, test if the build succeeds for you
> (make sure you don't have opencv-java installed).
>
> I'm CC'ing Gilles Caulier, the Digikam SC maintainer, because we
> have a related conversation at KDE ReviewBoard.  Gilles, the long
> linking chain of libkface is caused by opencv_contrib, which pulls
> almost all other OpenCV modules in.
>
> The gory details are below:
>
> We have OpenCV actually somewhat broken, regarding multipackaging.
> The problem is that OpenCV CMake configuration files are different
> when you build -java and when you don't. And those config files go
> to -m ain.  So on amd64, where we build opencv-java by default,
> OpenCV CMake config do know about opencv_java.so.
>
> Then the find_package(Foo COMPONENTS ...) comes into play.  The
> OpenCV config supports such syntax, allowing you to choose the only
> components you need, and by default (without specifying COMPONENTS)
> you'll get the whole stuff. Which - yes - will mean getting dependency
> on opencv_java, too. And that's what happens in digikam-kde4 build,
> because while all CMakeLists.txt for things going in actual package
> were fixed, some tests were doing find_package(OpenCV), too. And
> the OpenCV CMake config _appends_ to OpenCV_LIBS variable on each
> find_package(OpenCV) invocation. As a result, the mentioned tests
> as well as any other stuff used target_link_libraries(foo ${OpenCV_LIBS})
> got linked to the whole OpenCV, including opencv_java.
>
> So there are a few points of brokeness:
>   1) OpenCV CMake config mentioning opencv_java.so;
>   2) OpenCV CMake config appending to OpenCV_LIBS;
>   3) JDK not building on all archs.
>
> For now, here is a patch for the (2), and I'll work on getting
> (1) fixed, likely - by patching the CMake config file.  Dropping
> -java isn't an option for me, I'm interested in it.  For (3)... I
> won't come back to JDK internals. :)

I'll commit the patch for (2) around 10:00 UTC unless someone will
object. Tweaking opencv package better to be leaved for post-release,
IMHO.

--
  WBR,
  Vadim Zhukov

Reply via email to