diff options
author | tnn <tnn@pkgsrc.org> | 2015-02-26 17:52:12 +0000 |
---|---|---|
committer | tnn <tnn@pkgsrc.org> | 2015-02-26 17:52:12 +0000 |
commit | e07d45764a5e012aecd36c6c8c0259386094590e (patch) | |
tree | 120e9c4ce9555cac25980f4890817a30d23ba585 /graphics/opencv | |
parent | 661f72dc8687b56bf078fdd3c57eb4a5c3e24cf6 (diff) | |
download | pkgsrc-e07d45764a5e012aecd36c6c8c0259386094590e.tar.gz |
OSX ffmpeg option build fixes adapted from upstream 2.4 branch.
From Mansour Moufid in private mail.
Diffstat (limited to 'graphics/opencv')
-rw-r--r-- | graphics/opencv/distinfo | 3 | ||||
-rw-r--r-- | graphics/opencv/patches/patch-cmake_OpenCVFindLibsVideo.cmake | 75 |
2 files changed, 77 insertions, 1 deletions
diff --git a/graphics/opencv/distinfo b/graphics/opencv/distinfo index a9f46efa7fc..5cf558fb1c2 100644 --- a/graphics/opencv/distinfo +++ b/graphics/opencv/distinfo @@ -1,8 +1,9 @@ -$NetBSD: distinfo,v 1.27 2014/07/24 17:16:02 jperkin Exp $ +$NetBSD: distinfo,v 1.28 2015/02/26 17:52:12 tnn Exp $ SHA1 (opencv-2.4.9.zip) = 4f5166e2bd22bd6167cb56dd04f2c6ed68148b2c RMD160 (opencv-2.4.9.zip) = 1b0b80ecb50270fa7e4b1dea6f075982b5d15d81 Size (opencv-2.4.9.zip) = 91684751 bytes +SHA1 (patch-cmake_OpenCVFindLibsVideo.cmake) = ffe4d102dc9e0bd467dccd8fab02f3cc2d7d7fa3 SHA1 (patch-modules_contrib_src_inputoutput.cpp) = dc3413182c94b670823d509ab38f21ce36d4f432 SHA1 (patch-modules_contrib_src_spinimages.cpp) = b3e465700059616be991d597230bc8dc42f15be1 SHA1 (patch-modules_core_include_opencv2_core_types_c.h) = c056068c01c417dc262f21c00324da7f86c0cd8e diff --git a/graphics/opencv/patches/patch-cmake_OpenCVFindLibsVideo.cmake b/graphics/opencv/patches/patch-cmake_OpenCVFindLibsVideo.cmake new file mode 100644 index 00000000000..f1e3f50c24f --- /dev/null +++ b/graphics/opencv/patches/patch-cmake_OpenCVFindLibsVideo.cmake @@ -0,0 +1,75 @@ +$NetBSD: patch-cmake_OpenCVFindLibsVideo.cmake,v 1.1 2015/02/26 17:52:12 tnn Exp $ + +OSX ffmpeg option build fixes from upstream 2.4 branch. + +--- cmake/OpenCVFindLibsVideo.cmake.orig 2014-04-11 10:15:26.000000000 +0000 ++++ cmake/OpenCVFindLibsVideo.cmake +@@ -177,42 +177,35 @@ if(WITH_FFMPEG) + # Do an other trial + FIND_FILE(BZIP2_LIBRARIES NAMES libbz2.so.1 PATHS /lib) + endif() +- endif(HAVE_FFMPEG) +- endif() +- +- if(APPLE) +- find_path(FFMPEG_INCLUDE_DIR "libavformat/avformat.h" +- PATHS /usr/local /usr /opt +- PATH_SUFFIXES include +- DOC "The path to FFMPEG headers") +- if(FFMPEG_INCLUDE_DIR) +- set(HAVE_GENTOO_FFMPEG TRUE) +- set(FFMPEG_LIB_DIR "${FFMPEG_INCLUDE_DIR}/../lib" CACHE PATH "Full path of FFMPEG library directory") +- if(EXISTS "${FFMPEG_LIB_DIR}/libavcodec.a") +- set(HAVE_FFMPEG_CODEC 1) +- set(ALIASOF_libavcodec_VERSION "Unknown") +- if(EXISTS "${FFMPEG_LIB_DIR}/libavformat.a") +- set(HAVE_FFMPEG_FORMAT 1) ++ else() ++ find_path(FFMPEG_INCLUDE_DIR "libavformat/avformat.h" ++ PATHS /usr/local /usr /opt ++ PATH_SUFFIXES include ++ DOC "The path to FFMPEG headers") ++ if(FFMPEG_INCLUDE_DIR) ++ set(HAVE_GENTOO_FFMPEG TRUE) ++ set(FFMPEG_LIB_DIR "${FFMPEG_INCLUDE_DIR}/../lib" CACHE PATH "Full path of FFMPEG library directory") ++ find_library(FFMPEG_CODEC_LIB "avcodec" HINTS "${FFMPEG_LIB_DIR}") ++ find_library(FFMPEG_FORMAT_LIB "avformat" HINTS "${FFMPEG_LIB_DIR}") ++ find_library(FFMPEG_UTIL_LIB "avutil" HINTS "${FFMPEG_LIB_DIR}") ++ find_library(FFMPEG_SWSCALE_LIB "swscale" HINTS "${FFMPEG_LIB_DIR}") ++ if(FFMPEG_CODEC_LIB AND FFMPEG_FORMAT_LIB AND ++ FFMPEG_UTIL_LIB AND FFMPEG_SWSCALE_LIB) ++ set(ALIASOF_libavcodec_VERSION "Unknown") + set(ALIASOF_libavformat_VERSION "Unknown") +- if(EXISTS "${FFMPEG_LIB_DIR}/libavutil.a") +- set(HAVE_FFMPEG_UTIL 1) +- set(ALIASOF_libavutil_VERSION "Unknown") +- if(EXISTS "${FFMPEG_LIB_DIR}/libswscale.a") +- set(HAVE_FFMPEG_SWSCALE 1) +- set(ALIASOF_libswscale_VERSION "Unknown") +- set(HAVE_FFMPEG 1) +- endif() +- endif() ++ set(ALIASOF_libavutil_VERSION "Unknown") ++ set(ALIASOF_libswscale_VERSION "Unknown") ++ set(HAVE_FFMPEG 1) + endif() +- endif() +- endif(FFMPEG_INCLUDE_DIR) +- if(HAVE_FFMPEG) +- set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} "${FFMPEG_LIB_DIR}/libavcodec.a" +- "${FFMPEG_LIB_DIR}/libavformat.a" "${FFMPEG_LIB_DIR}/libavutil.a" +- "${FFMPEG_LIB_DIR}/libswscale.a") +- ocv_include_directories(${FFMPEG_INCLUDE_DIR}) ++ endif(FFMPEG_INCLUDE_DIR) ++ if(HAVE_FFMPEG) ++ set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} ++ ${FFMPEG_CODEC_LIB} ${FFMPEG_FORMAT_LIB} ++ ${FFMPEG_UTIL_LIB} ${FFMPEG_SWSCALE_LIB}) ++ ocv_include_directories(${FFMPEG_INCLUDE_DIR}) ++ endif(HAVE_FFMPEG) + endif() +- endif(APPLE) ++ endif() + endif(WITH_FFMPEG) + + # --- VideoInput/DirectShow --- |