[99684] trunk/dports/graphics/opencv
Jeremy Huddleston Sequoia
jeremyhu at apple.com
Sun Jan 27 11:03:05 PST 2013
Why was clang blacklisted here? There's no comment in the Portfile or the commit message, and the referenced ticket number has nothing to do with clang. Was a ticket or radar filed for the reason of this blacklisting?
--Jeremy
On Nov 14, 2012, at 3:17 AM, stromnov at macports.org wrote:
> Revision: 99684
> https://trac.macports.org/changeset/99684
> Author: stromnov at macports.org
> Date: 2012-11-14 03:17:29 -0800 (Wed, 14 Nov 2012)
> Log Message:
> -----------
> opencv: add eigen, opencl, openni variants; add fix for #36841
>
> Modified Paths:
> --------------
> trunk/dports/graphics/opencv/Portfile
>
> Added Paths:
> -----------
> trunk/dports/graphics/opencv/files/patch-cmake-OpenCVFindOpenNI.cmake.diff
>
> Removed Paths:
> -------------
> trunk/dports/graphics/opencv/files/patch-pch-CMakeLists.txt.diff
>
> Modified: trunk/dports/graphics/opencv/Portfile
> ===================================================================
> --- trunk/dports/graphics/opencv/Portfile 2012-11-14 09:24:23 UTC (rev 99683)
> +++ trunk/dports/graphics/opencv/Portfile 2012-11-14 11:17:29 UTC (rev 99684)
> @@ -6,7 +6,7 @@
>
> name opencv
> version 2.4.3
> -revision 0
> +revision 1
> categories graphics science
> license BSD
> platforms darwin
> @@ -33,51 +33,100 @@
> depends_build-append port:pkgconfig
>
> depends_lib-append port:zlib \
> - path:lib/libavcodec.dylib:ffmpeg \
> + port:bzip2 \
> port:libpng \
> + port:jpeg \
> port:tiff \
> - port:jasper \
> - port:jpeg \
> - port:bzip2 \
> + port:ilmbase \
> port:openexr \
> - port:ilmbase \
> - port:eigen3
> + path:lib/libavcodec.dylib:ffmpeg
>
> patchfiles patch-fix_dirname_case.diff \
> patch-install_name.diff
>
> -configure.args-append -DBUILD_NEW_PYTHON_SUPPORT=OFF \
> - -DBUILD_EXAMPLES=ON \
> - -DINSTALL_C_EXAMPLES=ON \
> - -DBZIP2_LIBRARIES=${prefix}/lib/libbz2.dylib \
> - -DZLIB_LIBRARY=${prefix}/lib/libz.dylib \
> +configure.args-append -DWITH_1394=OFF \
> + -DWITH_CARBON=OFF \
> + -DWITH_CUBLAS=OFF \
> + -DWITH_CUDA=OFF \
> + -DWITH_CUFFT=OFF \
> + -DWITH_EIGEN=OFF \
> + -DWITH_FFMPEG=ON \
> + -DWITH_GSTREAMER=OFF \
> + -DWITH_GTK=OFF \
> + -DWITH_IMAGEIO=OFF \
> + -DWITH_IPP=OFF \
> + -DWITH_JASPER=ON \
> + -DWITH_JPEG=ON \
> -DWITH_OPENEXR=ON \
> - -DWITH_1394=OFF \
> - -DWITH_EIGEN=ON \
> - -DEIGEN_INCLUDE_PATH=${prefix}/include/eigen3 \
> + -DWITH_OPENGL=ON \
> + -DWITH_OPENNI=OFF \
> + -DWITH_PNG=ON \
> + -DWITH_PVAPI=OFF \
> + -DWITH_GIGEAPI=OFF \
> + -DWITH_QT=OFF \
> + -DWITH_QUICKTIME=OFF \
> + -DWITH_TBB=OFF \
> + -DWITH_CSTRIPES=OFF \
> + -DWITH_TIFF=ON \
> + -DWITH_UNICAP=OFF \
> + -DWITH_V4L=OFF \
> + -DWITH_VIDEOINPUT=OFF \
> + -DWITH_XIMEA=OFF \
> + -DWITH_XINE=OFF \
> + -DWITH_OPENCL=OFF \
> + -DWITH_OPENCLAMDFFT=OFF \
> + -DWITH_OPENCLAMDBLAS=OFF \
> + -DBUILD_SHARED_LIBS=ON \
> + -DBUILD_DOCS=OFF \
> + -DBUILD_EXAMPLES=OFF \
> + -DBUILD_PERF_TESTS=OFF \
> + -DBUILD_TESTS=OFF \
> + -DBUILD_ZLIB=OFF \
> + -DBUILD_TIFF=OFF \
> -DBUILD_JASPER=OFF \
> -DBUILD_JPEG=OFF \
> -DBUILD_PNG=OFF \
> - -DBUILD_TIFF=OFF \
> - -DBUILD_ZLIB=OFF
> + -DBUILD_OPENEXR=OFF \
> + -DPYTHON_EXECUTABLE=OFF \
> + -DINSTALL_C_EXAMPLES=OFF \
> + -DINSTALL_PYTHON_EXAMPLES=OFF \
> + -DENABLE_PRECOMPILED_HEADERS=ON \
> + -DCMAKE_VERBOSE=ON \
> + -DZLIB_LIBRARY=${prefix}/lib/libz.dylib \
> + -DBZIP2_LIBRARIES=${prefix}/lib/libbz2.dylib
>
> +set opencv_linker_libs {"-Wl,-headerpad_max_install_names"}
> +
> # gcc-4.0 exits with a bus error
> -if {${configure.compiler} == "gcc-4.0"} {
> - configure.compiler gcc-4.2
> +compiler.blacklist gcc-4.0
> +
> +# llvm-gcc-4.2 appears to be broken on old XCode (#35368)
> +if {[vercmp $xcodeversion 4.4] <= 0} {
> + compiler.blacklist-append llvm-gcc-4.2
> +}
> +
> +compiler.blacklist-append clang
> +
> +# GCC-4.2 workaround
> +if {${configure.compiler} == "gcc-4.2"} {
> if {![file executable ${configure.cc}]} {
> - depends_build-append port:apple-gcc42
> + depends_build-append port:apple-gcc42
> depends_skip_archcheck-append apple-gcc42
> - configure.compiler apple-gcc-4.2
> + configure.compiler apple-gcc-4.2
> }
> }
>
> -platform darwin {
> - if {${os.major} <= 9} {
> - # Video Decode Acceleration Framework is not available
> - patchfiles-append patch-highgui_CMakeLists.txt.diff
> - }
> +# PCH broken when universal
> +if {[variant_isset universal]} {
> + configure.args-delete -DENABLE_PRECOMPILED_HEADERS=ON
> + configure.args-append -DENABLE_PRECOMPILED_HEADERS=OFF
> }
>
> +# Video Decode Acceleration Framework is not available
> +if {${os.major} <= 9} {
> + patchfiles-append patch-highgui_CMakeLists.txt.diff
> +}
> +
> post-destroot {
> xinstall -d ${destroot}${prefix}/lib/cmake
> move ${destroot}${prefix}/share/OpenCV/OpenCVConfig-version.cmake \
> @@ -85,50 +134,79 @@
> ${destroot}${prefix}/lib/cmake/
> }
>
> +variant eigen description {Enable eigen support.} {
> + depends_lib-append port:eigen3
> + configure.args-delete -DWITH_EIGEN=OFF
> + configure.args-append -DWITH_EIGEN=ON \
> + -DEIGEN_INCLUDE_PATH=${prefix}/include/eigen3
> +}
> +
> +variant opencl description {Enable OpenCL support.} {
> + configure.args-delete -DWITH_OPENCL=OFF
> + configure.args-append -DWITH_OPENCL=ON
> +}
> +
> +variant openni description {Enable OpenNI support.} {
> + depends_lib-append port:openni
> + patchfiles-append patch-cmake-OpenCVFindOpenNI.cmake.diff
> + configure.args-delete -DWITH_OPENNI=OFF
> + configure.args-append -DWITH_OPENNI=ON
> +
> + post-patch {
> + reinplace "s,@@PREFIX@@,${prefix},g" ${worksrcpath}/cmake/OpenCVFindOpenNI.cmake
> + }
> +}
> +
> variant dc1394 description {Use libdc1394 for FireWire camera. Breaks compatibility with Apple iSight FireWire camera.} {
> depends_lib-append port:libdc1394
> configure.args-delete -DWITH_1394=OFF
> configure.args-append -DWITH_1394=ON \
> - -DHAVE_1394=ON
> + -DHAVE_DC1394_2=ON
> }
>
> -variant qt4 description {Use qt4 backend for graphical interface.} {
> +variant qt4 description {Build with Qt Backend support.} {
> PortGroup qt4 1.0
> + configure.args-delete -DWITH_QT=OFF
> configure.args-append -DWITH_QT=ON
> }
>
> -variant python26 conflicts python27 description {Add Python 2.6 bindings} {
> +variant python26 conflicts python27 description {Add Python 2.6 bindings.} {
> depends_lib-append port:python26 \
> port:py26-numpy
> - configure.args-delete -DBUILD_NEW_PYTHON_SUPPORT=OFF
> + configure.args-delete -DINSTALL_PYTHON_EXAMPLES=OFF \
> + -DPYTHON_EXECUTABLE=OFF
> configure.args-append -DINSTALL_PYTHON_EXAMPLES=ON \
> - -DBUILD_NEW_PYTHON_SUPPORT=ON \
> -DPYTHON_EXECUTABLE=${prefix}/bin/python2.6 \
> -DPYTHON_LIBRARY=${prefix}/lib/libpython2.6.dylib \
> -DPYTHON_INCLUDE_DIR=${frameworks_dir}/Python.framework/Versions/2.6/Headers \
> -DPYTHON_PACKAGES_PATH=${frameworks_dir}/Python.framework/Versions/2.6/lib/python2.6/site-packages
> }
>
> -variant python27 conflicts python26 description {Add Python 2.7 bindings} {
> +variant python27 conflicts python26 description {Add Python 2.7 bindings.} {
> depends_lib-append port:python27 \
> port:py27-numpy
> - configure.args-delete -DBUILD_NEW_PYTHON_SUPPORT=OFF
> + configure.args-delete -DINSTALL_PYTHON_EXAMPLES=OFF \
> + -DPYTHON_EXECUTABLE=OFF
> configure.args-append -DINSTALL_PYTHON_EXAMPLES=ON \
> - -DBUILD_NEW_PYTHON_SUPPORT=ON \
> -DPYTHON_EXECUTABLE=${prefix}/bin/python2.7 \
> -DPYTHON_LIBRARY=${prefix}/lib/libpython2.7.dylib \
> -DPYTHON_INCLUDE_DIR=${frameworks_dir}/Python.framework/Versions/2.7/Headers \
> -DPYTHON_PACKAGES_PATH=${frameworks_dir}/Python.framework/Versions/2.7/lib/python2.7/site-packages
> }
>
> -variant tbb description {Use Intel TBB} {
> +variant tbb description {Use Intel TBB.} {
> depends_lib-append port:tbb
> + configure.args-delete -DWITH_TBB=OFF
> configure.args-append -DWITH_TBB=ON \
> -DHAVE_TBB=ON \
> - -DTBB_INCLUDE_DIRS=${prefix}/include \
> - -DOPENCV_LINKER_LIBS="-ltbb -ltbbmalloc"
> + -DTBB_INCLUDE_DIRS=${prefix}/include
> + lappend opencv_linker_libs "-ltbb" "-ltbbmalloc"
> }
>
> +pre-configure {
> + configure.args-append -DOPENCV_LINKER_LIBS=\"[join ${opencv_linker_libs} " "]\"
> +}
> +
> livecheck.type sourceforge
> livecheck.name opencvlibrary
> livecheck.regex /OpenCV-(\[0-9a-z.\]+)${extract.suffix}
>
> Added: trunk/dports/graphics/opencv/files/patch-cmake-OpenCVFindOpenNI.cmake.diff
> ===================================================================
> --- trunk/dports/graphics/opencv/files/patch-cmake-OpenCVFindOpenNI.cmake.diff (rev 0)
> +++ trunk/dports/graphics/opencv/files/patch-cmake-OpenCVFindOpenNI.cmake.diff 2012-11-14 11:17:29 UTC (rev 99684)
> @@ -0,0 +1,13 @@
> +--- cmake/OpenCVFindOpenNI.cmake.orig 2012-11-14 03:26:38.000000000 +0400
> ++++ cmake/OpenCVFindOpenNI.cmake 2012-11-14 11:19:10.000000000 +0400
> +@@ -26,8 +26,8 @@
> + find_library(OPENNI_LIBRARY "OpenNI64" PATHS $ENV{OPEN_NI_LIB64} DOC "OpenNI library")
> + endif()
> + elseif(UNIX OR APPLE)
> +- find_file(OPENNI_INCLUDES "XnCppWrapper.h" PATHS "/usr/include/ni" "/usr/include/openni" DOC "OpenNI c++ interface header")
> +- find_library(OPENNI_LIBRARY "OpenNI" PATHS "/usr/lib" DOC "OpenNI library")
> ++ find_file(OPENNI_INCLUDES "XnCppWrapper.h" PATHS "@@PREFIX@@/include/ni" "@@PREFIX@@/include/openni" DOC "OpenNI c++ interface header")
> ++ find_library(OPENNI_LIBRARY "OpenNI" PATHS "@@PREFIX@@/lib" DOC "OpenNI library")
> + endif()
> +
> + if(OPENNI_LIBRARY AND OPENNI_INCLUDES)
>
> Deleted: trunk/dports/graphics/opencv/files/patch-pch-CMakeLists.txt.diff
> ===================================================================
> --- trunk/dports/graphics/opencv/files/patch-pch-CMakeLists.txt.diff 2012-11-14 09:24:23 UTC (rev 99683)
> +++ trunk/dports/graphics/opencv/files/patch-pch-CMakeLists.txt.diff 2012-11-14 11:17:29 UTC (rev 99684)
> @@ -1,10 +0,0 @@
> ---- CMakeLists.txt.orig 2012-05-11 15:34:43.000000000 +0200
> -+++ CMakeLists.txt 2012-05-11 15:35:19.000000000 +0200
> -@@ -295,7 +295,6 @@
> - include(CheckIncludeFile)
> - endif()
> -
> --include(cmake/OpenCVPCHSupport.cmake REQUIRED)
> - include(cmake/OpenCVModule.cmake REQUIRED)
> -
> - # ----------------------------------------------------------------------------
> _______________________________________________
> macports-changes mailing list
> macports-changes at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo/macports-changes
More information about the macports-dev
mailing list