Ticket #52328: opencv_Portfile.diff
File opencv_Portfile.diff, 3.8 KB (added by mkae (Marko Käning), 8 years ago) |
---|
-
Portfile
1 1 # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 2 2 # $Id$ 3 # $Id$ 4 # $Id$ 3 5 4 6 PortSystem 1.0 5 PortGroup cmake 1. 07 PortGroup cmake 1.1 6 8 PortGroup compiler_blacklist_versions 1.0 7 9 8 10 name opencv 9 11 version 3.1.0 10 revision 312 revision 4 11 13 categories graphics science 12 14 platforms darwin 13 15 license BSD … … 55 57 56 58 patchfiles-append patch-install_name.diff \ 57 59 patch-modules_python_CMakeLists.txt.diff \ 58 patch-modules_java_CMakeLists.txt.diff 60 patch-modules_java_CMakeLists.txt.diff \ 61 patch-find-openexr.diff 62 platform linux { 63 patchfiles-append \ 64 patch-pchsupport.diff 65 } 59 66 67 post-patch { 68 reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/cmake/OpenCVFindOpenEXR.cmake 69 } 70 60 71 # TODO: check and adapt those patches 61 72 # patch-modules_imgcodecs_src_grfmt_tiff.cpp.diff 62 73 # patch-modules_core_src_parallel.cpp.diff … … 134 145 -DINSTALL_PYTHON_EXAMPLES=OFF \ 135 146 -DENABLE_PRECOMPILED_HEADERS=ON \ 136 147 -DCMAKE_VERBOSE=ON \ 148 -DENABLE_SSSE3=ON 149 platform darwin { 150 if {${os.major} >= 13} { 151 configure.args-append \ 152 -DWITH_AVFOUNDATION=ON 153 patchfiles-append \ 154 patch-use-avfound-no-qtkit.diff 155 } 156 configure.args-append \ 137 157 -DZLIB_LIBRARY=${prefix}/lib/libz.dylib \ 138 158 -DBZIP2_LIBRARIES=${prefix}/lib/libbz2.dylib 159 } 160 platform linux { 161 configure.args-append \ 162 -DWITH_VA=ON \ 163 -DZLIB_LIBRARY=${prefix}/lib/libz.so \ 164 -DBZIP2_LIBRARIES=${prefix}/lib/libbz2.so 139 165 166 variant sse4 description {Enable SSE4* support} { 167 configure.args-append \ 168 -DENABLE_SSE41=ON -DENABLE_SSE42=ON 169 } 170 } 171 140 172 set opencv_linker_libs "" 141 173 142 174 # gcc-4.0 exits with a bus error … … 168 200 -DENABLE_PRECOMPILED_HEADERS=OFF 169 201 } 170 202 203 variant avx description {Enable AVX (and SSE4*) support} { 204 configure.args-append -DENABLE_AVX=ON \ 205 -DENABLE_SSE41=ON -DENABLE_SSE42=ON 206 } 207 171 208 variant eigen description {Enable eigen support.} { 172 209 depends_lib-append port:eigen3 173 210 configure.args-replace -DWITH_EIGEN=OFF \ … … 208 245 variant qt4 conflicts qt5 description {Build with Qt4 Backend support.} { 209 246 PortGroup qt4 1.0 210 247 configure.args-replace -DWITH_QT=OFF \ 211 -DWITH_QT= ON248 -DWITH_QT=4 212 249 } 213 250 214 251 variant qt5 conflicts qt4 description {Build with Qt5 Backend support.} { 215 252 PortGroup qt5 1.0 216 253 configure.args-replace -DWITH_QT=OFF \ 217 -DWITH_QT= ON254 -DWITH_QT=5 218 255 } 219 256 220 257 variant java description {Add Java bindings.} { … … 313 350 reinplace {/Libs: /s:\.dylib::g} ${destroot}${prefix}/lib/pkgconfig/opencv.pc 314 351 reinplace {s|Libs: |Libs: -L\${exec_prefix}/lib |g} ${destroot}${prefix}/lib/pkgconfig/opencv.pc 315 352 reinplace {s:-l-framework|-framework::g} ${destroot}${prefix}/lib/pkgconfig/opencv.pc 353 if {[variant_isset qt4]} { 354 reinplace "s|-lAGL|-framework AGL|g" ${destroot}${prefix}/lib/pkgconfig/opencv.pc 355 reinplace "s|-lOpenGL|-framework OpenGL|g" ${destroot}${prefix}/lib/pkgconfig/opencv.pc 356 } 316 357 } 317 358 318 359 livecheck.type sourceforge