aboutsummaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorrm <rm@FreeBSD.org>2016-09-24 06:45:02 +0800
committerrm <rm@FreeBSD.org>2016-09-24 06:45:02 +0800
commitafe1181269fe7e4f4753905c77d69c93d5ccb122 (patch)
tree3d62a1e461f7a69157e704859cf7aa438f389bd7 /graphics
parentadbee0ba4165f39428b7ffd756b4c22b751d70f5 (diff)
downloadfreebsd-ports-gnome-afe1181269fe7e4f4753905c77d69c93d5ccb122.tar.gz
freebsd-ports-gnome-afe1181269fe7e4f4753905c77d69c93d5ccb122.tar.zst
freebsd-ports-gnome-afe1181269fe7e4f4753905c77d69c93d5ccb122.zip
graphics/py-opencv: limit python version to 2.x
Python module of OpenCV 2.4.9 is not compatible with Python 3.x - both on cmake infrastructure level and on module itself level, so just mark it as Python 2.x only and remove all the python3 shims - they are don't make any difference anyway. We can patch that hardly to make it work, but it's better to just update to latest version that have python3 support out of the box. PR: 204519 (for tracking)
Diffstat (limited to 'graphics')
-rw-r--r--graphics/opencv/Makefile2
-rw-r--r--graphics/py-opencv/Makefile9
-rw-r--r--graphics/py-opencv/pkg-plist6
3 files changed, 3 insertions, 14 deletions
diff --git a/graphics/opencv/Makefile b/graphics/opencv/Makefile
index 39a5284a319f..a2dc5235ea06 100644
--- a/graphics/opencv/Makefile
+++ b/graphics/opencv/Makefile
@@ -228,7 +228,7 @@ CMAKE_ARGS+= -DBUILD_opencv_${module}:BOOL=Off
LIB_DEPENDS+= libopencv_legacy.so:graphics/opencv
BUILD_DEPENDS+= ${PYNUMPY}
RUN_DEPENDS+= ${PYNUMPY}
-USES+= python
+USES+= python:2.7
CMAKE_ARGS+= -DBUILD_opencv_python:BOOL=On
. for module in apps java stitching superres videostab
CMAKE_ARGS+= -DBUILD_opencv_${module}:BOOL=Off
diff --git a/graphics/py-opencv/Makefile b/graphics/py-opencv/Makefile
index 77b0a0d7c295..c4b156385c22 100644
--- a/graphics/py-opencv/Makefile
+++ b/graphics/py-opencv/Makefile
@@ -12,13 +12,4 @@ OCV_PYTHON= yes
MASTERDIR= ${.CURDIR:H}/opencv
PLIST= ${.CURDIR}/pkg-plist
-.if defined(PYTHON_REL) && ${PYTHON_REL} >= 3200
-PLIST_SUB+= PYTHON3="" \
- PYTHON2="@comment " \
- PYTHON_SUFFIX="${PYTHON_SUFFIX}"
-.else
-PLIST_SUB+= PYTHON3="@comment " \
- PYTHON2=""
-.endif
-
.include "${MASTERDIR}/Makefile"
diff --git a/graphics/py-opencv/pkg-plist b/graphics/py-opencv/pkg-plist
index 10122aa92232..cc41f22ca9c3 100644
--- a/graphics/py-opencv/pkg-plist
+++ b/graphics/py-opencv/pkg-plist
@@ -1,6 +1,4 @@
%%PYTHON_SITELIBDIR%%/cv.py
-%%PYTHON2%%%%PYTHON_SITELIBDIR%%/cv.pyc
-%%PYTHON2%%%%PYTHON_SITELIBDIR%%/cv.pyo
-%%PYTHON3%%%%PYTHON_SITELIBDIR%%/__pycache__/cv.cpython-%%PYTHON_SUFFIX%%.pyc
-%%PYTHON3%%%%PYTHON_SITELIBDIR%%/__pycache__/cv.cpython-%%PYTHON_SUFFIX%%.pyo
+%%PYTHON_SITELIBDIR%%/cv.pyc
+%%PYTHON_SITELIBDIR%%/cv.pyo
%%PYTHON_SITELIBDIR%%/cv2.so