With warnings as errors it fails to build due to const/non-const difference. Needs this patch:
--- /tmp/cv2.cpp 2019-10-26 09:53:41.521527000 -0400
+++ /usr/obj/usr/ports/graphics/opencv-core/work/opencv-3.4.1/modules/python/src2/cv2.cpp 2019-10-26 09:54:00.718930000 -0400
@@ -886,7 +886,7 @@
if(!obj || obj == Py_None)
- char* str = PyString_AsString(obj);
+ const char* str = PyString_AsString(obj);
value = String(str);
Upgrading to a current version of opencv may fix this.
(In reply to D'Arcy J.M. Cain from comment #1)
I got same failure with python 3.7 as default instead 3.6. Upstream have the same patch in sources already.
Can anybody commit this patch as temporary woraround before opencv 4 landed in ports?
Created attachment 209537 [details]
graphics/opencv python 3.7 support
It was fixed:
Fixed with ports r520008.