Ticket #47256: opencv-OOS.patch

File opencv-OOS.patch, 1.9 KB (added by larryv (Lawrence Velázquez), 10 years ago)

use cmake.out_of_source

  • dports/graphics/opencv/Portfile

    commit 8b7cd6343004d83f2ee07237ae3389f6198a33e6
    Author: Lawrence Velázquez <larryv@macports.org>
    Date:   27 minutes ago
    
        opencv: Use cmake.out_of_source (#47256)
    
    diff --git a/dports/graphics/opencv/Portfile b/dports/graphics/opencv/Portfile
    index e3a71d2..5f82509 100644
    a b long_description OpenCV is a library that is mainly aimed at real time \ 
    2727homepage            http://opencv.org
    2828master_sites        sourceforge:project/opencvlibrary/opencv-unix/${version}
    2929
    30 worksrcdir          ${worksrcdir}/../build
    31 patch.dir           ${workpath}/${distname}
    32 
    33 post-extract {
    34     file mkdir ${worksrcpath}
    35 }
    36 
    3730use_zip             yes
    3831
    3932checksums           rmd160  793391b05b571859005b98612cb176c02352a94f \
    patchfiles patch-fix_dirname_case.diff \ 
    5952                    patch-modules_core_src_parallel.cpp.diff \
    6053                    patch-modules-highgui-src-window_cocoa.mm.diff
    6154
    62 configure.args-append ../${distname}/ \
     55cmake.out_of_source yes
     56
     57configure.args-append \
    6358                    -DWITH_1394=OFF \
    6459                    -DWITH_CARBON=OFF \
    6560                    -DWITH_CUBLAS=OFF \
    compiler.blacklist-append {clang < 318} 
    134129# TODO: Actually fix this
    135130if {[string match "*clang*" ${configure.compiler}]} {
    136131    post-patch {
    137         reinplace "/-Werror=sequence-point/d" ${worksrcpath}/../${distname}/cmake/OpenCVCompilerOptions.cmake
     132        reinplace "/-Werror=sequence-point/d" ${worksrcpath}/cmake/OpenCVCompilerOptions.cmake
    138133    }
    139134}
    140135
    variant openni description {Enable OpenNI support.} { 
    174169    configure.args-append   -DWITH_OPENNI=ON
    175170
    176171    post-patch {
    177          reinplace "s,@@PREFIX@@,${prefix},g" ${worksrcpath}/../${distname}/cmake/OpenCVFindOpenNI.cmake
     172         reinplace "s,@@PREFIX@@,${prefix},g" ${worksrcpath}/cmake/OpenCVFindOpenNI.cmake
    178173    }
    179174}
    180175