Solved OpenCV: Missing Feature: GTK: build from ports or contact maintainer

I wanted to play around with OpenCV and C++ so I installed it from the repos via `pkg install opencv`. I found out that the package was built without GTK support so all of the examples I tried would fail. After building from ports and trying to install with `pkg add` (after removing the opencv package and it's dependencies with `pkg remove opencv` && `pkg autoremove`) it failed due to missing dependencies. My solution was the following:

  • pkg install opencv
  • pkg remove opencv
  • cd /usr/ports/graphics/opencv
  • make package
  • pkg add <freshly built package>
I guess this worked because removing the opencv package leaves behind the needed dependencies required for the fresh build of opencv. I'm guessing this is the worst way to get this installed but I'm not sure how else to get a working opencv installation that I can play with. fwiw I was able to build the examples and play around a bit. Is getting the package in the repos built with gtk something that would be possible?
 
ok, after that how is the packaged handled? Would `pkg remove <pkg> ` && `pkg autoremove` work as if it were a package from the repo?
 
Back
Top