pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

graphics/opencv ffmpeg option



Hi again,

The following patch adds the option to build OpenCV with support for
the FFmpeg libraries.

Yours,
Mansour


Index: options.mk
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/opencv/options.mk,v
retrieving revision 1.4
diff -u -p -r1.4 options.mk
--- options.mk	13 Aug 2013 19:47:20 -0000	1.4
+++ options.mk	1 Feb 2015 21:04:02 -0000
@@ -1,7 +1,7 @@
 # $NetBSD: options.mk,v 1.4 2013/08/13 19:47:20 markd Exp $
 
 PKG_OPTIONS_VAR=	PKG_OPTIONS.opencv
-PKG_SUPPORTED_OPTIONS=	python
+PKG_SUPPORTED_OPTIONS=	python ffmpeg
 
 .include "../../mk/bsd.options.mk"
 
@@ -16,6 +16,15 @@ PLIST.python=	yes
 CMAKE_ARGS+=	-D BUILD_NEW_PYTHON_SUPPORT=OFF
 .endif
 
+PLIST_VARS+=	ffmpeg
+.if !empty(PKG_OPTIONS:Mffmpeg)
+CMAKE_ARGS+=	-D WITH_FFMPEG=ON
+CMAKE_ARGS+=	-D FFMPEG_INCLUDE_DIR=${PREFIX}/include/ffmpeg2
+CMAKE_ARGS+=	-D FFMPEG_LIB_DIR=${PREFIX}/lib/ffmpeg2
+.include "../../multimedia/ffmpeg2/buildlink3.mk"
+.else
+CMAKE_ARGS+=	-D WITH_FFMPEG=OFF
+.endif
+
 # FIXME: should be option.mk'ed instead
 CMAKE_ARGS+=	-D BUILD_DOCS=OFF
-CMAKE_ARGS+=	-D WITH_FFMPEG=OFF


Home | Main Index | Thread Index | Old Index