Created attachment 445488 [details, diff] multipy.patch This patch for the opencv-3.1.0-r4.ebuild enabled the cv2 module in python2.7 and python3.4 on my PC. It shouldn't change anything else, please give it a try.
I've been helping Amynka with this. When I helped with the -r4 ebuild, I wanted to try to have it install the module for all versions of python a person wanted, but the build system had ... limitations. Just a couple of notes about the patch: 1) run_in_build_dir is no longer a function in python-r1.eclass, or others. I looked through them, but couldn't find it. Don't know why they removed it. 2) Since the above function doesn't work, new build dirs are defined for each impl of python. 3) Means that OpenCV compiles for each impl. CMake is smart enough to not recompile already compiled objects. 4) If in theory the source was built in the same directory, it would not compile or install all versions, just the latest impl as the configure would overwrite the previous ones. It took awhile, but I propose this one: https://github.com/dracwyrm/gentoo-ebuilds/blob/master/media-libs/opencv/opencv-3.1.0-r5.ebuild It does the configure, compile, and install in the same function so the configure phase doesn't overwrite before the compile and install phases. This also means that opencv main part is compiled once, then the modules. It should be quicker. Let me know if this works. For some reason the modules are installed in the right directories, but each have a different name. I may need to tweak it a bit more, but it's a start. Unless your ebuild has the modules as weird names as well.
author Jonathan Scruggs <j.scruggs@gmail.com> 2016-09-22 17:08:23 (GMT) committer Amy Winston <amynka@gentoo.org> 2016-09-27 14:22:31 (GMT) commit 366480ac81d84673ffbbfcfff277a91d6c6041df media-libs/opencv: revision bump to 3.1.0-r5 - Feature: added in support for installing the Python module for each implementation selected Gentoo-Bug: 593504 - Bug fix: under certain conditions the HDF5 library isn't found Gentoo-Bug: 588850 - Bug fix: OpenGL needs Qt or Gtk+ otherwise it's disabled - Misc: cleaned up usex expressions added qtwidgets depend moved openmp detection to pkg_pretend as per Gentoo style guidelines Signed off by Jonathan Scruggs (j.scruggs@gmail.com, irc: Dracwyrm)