aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--graphics/opencv-core/Makefile2
-rw-r--r--graphics/opencv-core/pkg-plist9
-rw-r--r--graphics/opencv-java/Makefile4
-rw-r--r--graphics/opencv-java/pkg-plist4
-rw-r--r--graphics/opencv/Makefile56
-rw-r--r--graphics/opencv/distinfo4
-rw-r--r--graphics/opencv/files/patch-cmake__templates__OpenCVConfig.cmake.in11
-rw-r--r--graphics/opencv/files/patch-modules__core__src__system.cpp4
-rw-r--r--graphics/py-opencv/Makefile11
-rw-r--r--graphics/py-opencv/pkg-plist5
10 files changed, 60 insertions, 50 deletions
diff --git a/graphics/opencv-core/Makefile b/graphics/opencv-core/Makefile
index 7ec85eab4d25..f3931332ccb6 100644
--- a/graphics/opencv-core/Makefile
+++ b/graphics/opencv-core/Makefile
@@ -1,7 +1,7 @@
# Created by: Martin Matuska <mm@FreeBSD.org>
# $FreeBSD$
-PORTREVISION= 1
+PORTREVISION= 0
PKGNAMESUFFIX= -${OCV_SLAVE}
COMMENT= OpenCV core libraries
diff --git a/graphics/opencv-core/pkg-plist b/graphics/opencv-core/pkg-plist
index 06e1e9da9a3f..58bd2071263b 100644
--- a/graphics/opencv-core/pkg-plist
+++ b/graphics/opencv-core/pkg-plist
@@ -1,3 +1,4 @@
+include/opencv2/core/affine.hpp
include/opencv2/core/core.hpp
include/opencv2/core/core_c.h
include/opencv2/core/cuda_devptrs.hpp
@@ -15,6 +16,8 @@ include/opencv2/core/wimage.hpp
include/opencv2/imgproc/imgproc.hpp
include/opencv2/imgproc/imgproc_c.h
include/opencv2/imgproc/types_c.h
+@comment include/opencv2/opencv.hpp
+@comment include/opencv2/opencv_modules.hpp
lib/libopencv_core.so
lib/libopencv_core.so.2
lib/libopencv_core.so.%%VERSION%%
@@ -23,8 +26,8 @@ lib/libopencv_imgproc.so.2
lib/libopencv_imgproc.so.%%VERSION%%
libdata/pkgconfig/opencv-core.pc
share/cmake/Modules/FindOpenCVCore.cmake
+@dirrmtry include/opencv2/core
+@dirrmtry include/opencv2/imgproc
+@dirrmtry include/opencv2
@dirrmtry share/cmake/Modules
@dirrmtry share/cmake
-@dirrm include/opencv2/imgproc
-@dirrm include/opencv2/core
-@dirrmtry include/opencv2
diff --git a/graphics/opencv-java/Makefile b/graphics/opencv-java/Makefile
index 1bc6e07199ca..d17fd9e0be70 100644
--- a/graphics/opencv-java/Makefile
+++ b/graphics/opencv-java/Makefile
@@ -1,6 +1,6 @@
# $FreeBSD$
-PORTREVISION= 1
+PORTREVISION= 0
CATEGORIES= graphics java
PKGNAMESUFFIX= -${OCV_SLAVE}
@@ -11,4 +11,6 @@ OCV_JAVA= yes
MASTERDIR= ${.CURDIR:H}/opencv
PLIST= ${.CURDIR}/pkg-plist
+PLIST_SUB+= OCV_VER=${PORTVERSION:S|.||g}
+
.include "${MASTERDIR}/Makefile"
diff --git a/graphics/opencv-java/pkg-plist b/graphics/opencv-java/pkg-plist
index 1019de1d62ea..f7e0698f1408 100644
--- a/graphics/opencv-java/pkg-plist
+++ b/graphics/opencv-java/pkg-plist
@@ -1,3 +1,3 @@
-%%DATADIR%%/java/libopencv_java247.so
-%%DATADIR%%/java/opencv-247.jar
+%%DATADIR%%/java/libopencv_java%%OCV_VER%%.so
+%%DATADIR%%/java/opencv-%%OCV_VER%%.jar
@dirrmtry %%DATADIR%%/java
diff --git a/graphics/opencv/Makefile b/graphics/opencv/Makefile
index 894b7b3acd0b..1eb963a60e64 100644
--- a/graphics/opencv/Makefile
+++ b/graphics/opencv/Makefile
@@ -2,18 +2,18 @@
# $FreeBSD$
PORTNAME?= opencv
-PORTVERSION= 2.4.7
-PORTREVISION?= 1
+PORTVERSION= 2.4.9
+PORTREVISION?= 0
CATEGORIES= graphics
MASTER_SITES= SF/${PORTNAME}library/${PORTNAME}-unix/${PORTVERSION}
MAINTAINER= jhale@FreeBSD.org
COMMENT= Open Source Computer Vision library
-LICENSE= BSD
-LICENSE_FILE= ${WRKSRC}/doc/license.txt
+LICENSE= BSD3CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE
-USES= cmake pkgconfig
+USES= cmake pkgconfig zip
USE_LDCONFIG= yes
WANT_GSTREAMER= yes
MAKE_JOBS_UNSAFE= yes
@@ -54,9 +54,6 @@ OPTIONS_SUB= yes
.if defined(OCV_CORE)
OPTIONS_EXCLUDE= DC1394 EXAMPLES GTK2 QT4 JASPER JPEG NONFREE OPENEXR \
OPENGL PNG TIFF FFMPEG GSTREAMER V4L XINE
-.elif defined(OCV_PYTHON)
-OPTIONS_EXCLUDE= DC1394 GTK2 QT4 JASPER JPEG NONFREE OPENEXR \
- OPENGL PNG TIFF TBB EIGEN3 FFMPEG GSTREAMER V4L XINE
.endif
DC1394_DESC= IEEE 1394 camera support
@@ -203,19 +200,17 @@ CMAKE_ARGS+= -DBUILD_opencv_${module}:BOOL=Off
LIB_DEPENDS+= libopencv_legacy.so:${PORTSDIR}/graphics/opencv
BUILD_DEPENDS+= ${PYNUMPY}
RUN_DEPENDS+= ${PYNUMPY}
-USE_PYTHON= yes
-CFLAGS+= -I${LOCALBASE}/include
+USES+= python
CMAKE_ARGS+= -DBUILD_opencv_python:BOOL=On
-. for module in ${OCV_MODS} ${OCV_CORE_MODS} ${OCV_JAVA_MODS}
+. for module in apps java stitching superres videostab
CMAKE_ARGS+= -DBUILD_opencv_${module}:BOOL=Off
. endfor
-CMAKE_ENV+= LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib"
INSTALL_WRKSRC= ${WRKSRC}/modules/python
.elif defined(OCV_JAVA)
BUILD_DEPENDS+= ant:${PORTSDIR}/devel/apache-ant
LIB_DEPENDS+= libopencv_legacy.so:${PORTSDIR}/graphics/opencv
+USES+= python:build
USE_JAVA= yes
-USE_PYTHON_BUILD= yes
CMAKE_ARGS+= -DBUILD_opencv_java:BOOL=On
. for module in apps python stitching superres videostab
CMAKE_ARGS+= -DBUILD_opencv_${module}:BOOL=Off
@@ -233,40 +228,47 @@ post-patch:
@${MKDIR} ${CONFIGURE_WRKSRC}
@${REINPLACE_CMD} -e '/pkgconfig/s|$${OPENCV_LIB_INSTALL_PATH}|libdata|' \
${WRKSRC}/cmake/OpenCVGenPkgconfig.cmake
- @${REINPLACE_CMD} -e 's|share/OpenCV/doc|share/doc/${PORTNAME}|g' \
+ @${REINPLACE_CMD} -e 's|share/OpenCV/doc|${DOCSDIR_REL}|g' \
+ -e 's|share/OpenCV/samples|${EXAMPLESDIR_REL}|g' \
${WRKSRC}/CMakeLists.txt
- @${REINPLACE_CMD} -e 's|[Oo]pen[Cc][Vv]/samples|examples/${PORTNAME}|g' \
- ${WRKSRC}/samples/*/CMakeLists.txt \
- ${WRKSRC}/samples/*/*/CMakeLists.txt
@${FIND} ${WRKSRC} -name '*.orig' -exec ${RM} {} \;
.if defined(OCV_CORE)
@${REINPLACE_CMD} -e 's|opencv.pc|opencv-core.pc|g' \
${WRKSRC}/cmake/OpenCVGenPkgconfig.cmake
@${REINPLACE_CMD} -e 's|Name:.*|Name: OpenCV-core|' \
- ${WRKSRC}/cmake/templates/opencv-XXX.pc.cmake.in
+ ${WRKSRC}/cmake/templates/opencv-XXX.pc.in
.endif
-.if defined(OCV_PYTHON)
-. for module in ${OCV_CORE_MODS} ${OCV_MODS} ${OCV_NONFREE_MODS}
- @${REINPLACE_CMD} -e 's|opencv_${module} | |' \
- -e 's|opencv_${module}$$||' \
- -e 's|opencv_${module})|)|' \
- ${WRKSRC}/modules/*/CMakeLists.txt
-. endfor
- ${REINPLACE_CMD} -e '/[Ee][Xx][Pp][Oo][Rr][Tt]/d' \
- ${WRKSRC}/cmake/OpenCVGenConfig.cmake
+.if defined(OCV_SLAVE)
+ @${REINPLACE_CMD} -e 's|add_subdirectory(data)||g' \
+ ${WRKSRC}/CMakeLists.txt
.endif
post-install:
+.if !defined(OCV_SLAVE)
+ (cd ${STAGEDIR}${PREFIX} && \
+ ${RM} -r include/opencv2/core include/opencv2/imgproc \
+ lib/libopencv_core* lib/libopencv_imgproc*)
+.endif
.if defined(OCV_CORE)
+ ${RM} -r ${STAGEDIR}${PREFIX}/include/opencv
+ ${RM} -r ${STAGEDIR}${DATADIR}
${MKDIR} ${STAGEDIR}${PREFIX}/share/cmake/Modules
${INSTALL_DATA} ${WRKDIR}/FindOpenCVCore.cmake ${STAGEDIR}${PREFIX}/share/cmake/Modules
.endif
.if defined(OCV_PYTHON)
+ (cd ${STAGEDIR}${PREFIX} && \
+ ${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py \
+ -d ${PYTHONPREFIX_SITELIBDIR} -f ${PYTHONPREFIX_SITELIBDIR:S|${PREFIX}/||} && \
+ ${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py \
+ -d ${PYTHONPREFIX_SITELIBDIR} -f ${PYTHONPREFIX_SITELIBDIR:S|${PREFIX}/||})
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+. if defined(PYTHON_REL) && ${PYTHON_REL} >= 300
cd ${WRKSRC}/samples/python && \
${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}/python
+. else
cd ${WRKSRC}/samples/python2 && \
${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}/python2
+. endif
.endif
.if defined(OCV_JAVA)
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
diff --git a/graphics/opencv/distinfo b/graphics/opencv/distinfo
index 65415bbd75e7..e0a7bd87e311 100644
--- a/graphics/opencv/distinfo
+++ b/graphics/opencv/distinfo
@@ -1,2 +1,2 @@
-SHA256 (opencv-2.4.7.tar.gz) = c48d6c735bfa40c76cadcc0106051e095d8b492b05ac7d2cc9647be807dd2a43
-SIZE (opencv-2.4.7.tar.gz) = 85587316
+SHA256 (opencv-2.4.9.zip) = 803010848154988e9cbda8b3fa857fcbb27382c2946ed729e1a7e40600bb4c71
+SIZE (opencv-2.4.9.zip) = 91684751
diff --git a/graphics/opencv/files/patch-cmake__templates__OpenCVConfig.cmake.in b/graphics/opencv/files/patch-cmake__templates__OpenCVConfig.cmake.in
deleted file mode 100644
index a4796f178c39..000000000000
--- a/graphics/opencv/files/patch-cmake__templates__OpenCVConfig.cmake.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./cmake/templates/OpenCVConfig.cmake.in.orig 2013-12-01 09:56:12.000000000 -0500
-+++ ./cmake/templates/OpenCVConfig.cmake.in 2013-12-01 09:56:42.000000000 -0500
-@@ -195,7 +195,7 @@
- set(OpenCV_LIB_SUFFIX "")
- endif()
-
--SET(OpenCV_LIBS "${OpenCV_LIB_COMPONENTS}")
-+SET(OpenCV_LIBS "${OpenCV_FIND_COMPONENTS}")
-
- foreach(__opttype OPT DBG)
- SET(OpenCV_LIBS_${__opttype} "${OpenCV_LIBS}")
diff --git a/graphics/opencv/files/patch-modules__core__src__system.cpp b/graphics/opencv/files/patch-modules__core__src__system.cpp
index 52d8857f72da..88d9f7e75463 100644
--- a/graphics/opencv/files/patch-modules__core__src__system.cpp
+++ b/graphics/opencv/files/patch-modules__core__src__system.cpp
@@ -4,8 +4,8 @@
#include <stdarg.h>
--#if defined __linux__ || defined __APPLE__
-+#if defined __linux__ || defined __APPLE__ || defined __FreeBSD__
+-#if defined __linux__ || defined __APPLE__ || defined __EMSCRIPTEN__
++#if defined __linux__ || defined __APPLE__ || defined __EMSCRIPTEN__ || defined __FreeBSD__
#include <unistd.h>
#include <stdio.h>
#include <sys/types.h>
diff --git a/graphics/py-opencv/Makefile b/graphics/py-opencv/Makefile
index a8b1562a09b5..0cf27270fe93 100644
--- a/graphics/py-opencv/Makefile
+++ b/graphics/py-opencv/Makefile
@@ -1,7 +1,7 @@
# Created by: Martin Matuska <mm@FreeBSD.org>
# $FreeBSD$
-PORTREVISION= 1
+PORTREVISION= 0
CATEGORIES= graphics python
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -12,4 +12,13 @@ OCV_PYTHON= yes
MASTERDIR= ${.CURDIR:H}/opencv
PLIST= ${.CURDIR}/pkg-plist
+.if defined(PYTHON_REL) && ${PYTHON_REL} >= 320
+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 43896397c33d..e59c20d3c2a0 100644
--- a/graphics/py-opencv/pkg-plist
+++ b/graphics/py-opencv/pkg-plist
@@ -1,2 +1,7 @@
%%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%%/cv2.so
+%%PYTHON3%%@dirrmtry %%PYTHON_SITELIBDIR%%/__pycache__