Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Sep 2016 22:45:03 +0000 (UTC)
From:      Ruslan Makhmatkhanov <rm@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r422698 - in head/graphics: opencv py-opencv
Message-ID:  <201609232245.u8NMj3HW060383@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rm
Date: Fri Sep 23 22:45:02 2016
New Revision: 422698
URL: https://svnweb.freebsd.org/changeset/ports/422698

Log:
  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)

Modified:
  head/graphics/opencv/Makefile
  head/graphics/py-opencv/Makefile
  head/graphics/py-opencv/pkg-plist

Modified: head/graphics/opencv/Makefile
==============================================================================
--- head/graphics/opencv/Makefile	Fri Sep 23 21:42:02 2016	(r422697)
+++ head/graphics/opencv/Makefile	Fri Sep 23 22:45:02 2016	(r422698)
@@ -228,7 +228,7 @@ CMAKE_ARGS+=	-DBUILD_opencv_${module}:BO
 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

Modified: head/graphics/py-opencv/Makefile
==============================================================================
--- head/graphics/py-opencv/Makefile	Fri Sep 23 21:42:02 2016	(r422697)
+++ head/graphics/py-opencv/Makefile	Fri Sep 23 22:45:02 2016	(r422698)
@@ -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"

Modified: head/graphics/py-opencv/pkg-plist
==============================================================================
--- head/graphics/py-opencv/pkg-plist	Fri Sep 23 21:42:02 2016	(r422697)
+++ head/graphics/py-opencv/pkg-plist	Fri Sep 23 22:45:02 2016	(r422698)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609232245.u8NMj3HW060383>