From 240fdfdd3ecd518b557849e942bdfb8d10ecf958 Mon Sep 17 00:00:00 2001 From: Herb Kuta Date: Wed, 12 Jun 2019 11:31:18 -0700 Subject: [PATCH] DRAFT [thud] opencv_3.2: Patch "invalid conversion from 'const char*' to 'char*'" error XXX When building with [thud], gcc has -fpermissive. --- .../opencv/opencv/fixmissingconst.patch | 15 +++++++++++++++ recipes-support/opencv/opencv_3.2.bb | 1 + 2 files changed, 16 insertions(+) create mode 100644 recipes-support/opencv/opencv/fixmissingconst.patch diff --git a/recipes-support/opencv/opencv/fixmissingconst.patch b/recipes-support/opencv/opencv/fixmissingconst.patch new file mode 100644 index 0000000..0df3f24 --- /dev/null +++ b/recipes-support/opencv/opencv/fixmissingconst.patch @@ -0,0 +1,15 @@ +diff --git modules/python/src2/cv2.cpp modules/python/src2/cv2.cpp +index e69e933375..11adc342cb 100644 +--- a/modules/python/src2/cv2.cpp ++++ b/modules/python/src2/cv2.cpp +@@ -727,7 +727,7 @@ bool pyopencv_to(PyObject* obj, String& value, const char* name) + (void)name; + if(!obj || obj == Py_None) + return true; +- char* str = PyString_AsString(obj); ++ const char* str = PyString_AsString(obj); + if(!str) + return false; + value = String(str); + + diff --git a/recipes-support/opencv/opencv_3.2.bb b/recipes-support/opencv/opencv_3.2.bb index cbc756b..ad84fe6 100644 --- a/recipes-support/opencv/opencv_3.2.bb +++ b/recipes-support/opencv/opencv_3.2.bb @@ -32,6 +32,7 @@ SRC_URI = "git://github.com/opencv/opencv.git;name=opencv \ file://0001-Make-opencv-ts-create-share-library-intead-of-static.patch \ file://0001-To-fix-errors-as-following.patch \ file://0001-tracking-make-opencv_dnn-dependancy-optional.patch;patchdir=../contrib/ \ + file://fixmissingconst.patch \ " PV = "3.2+git${SRCPV}"