Ticket #52328: opencv_Portfile.2.diff
File opencv_Portfile.2.diff, 3.6 KB (added by nortcele, 8 years ago) |
---|
-
Portfile
old new 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 3 3 PortSystem 1.0 4 PortGroup cmake 1. 04 PortGroup cmake 1.1 5 5 PortGroup compiler_blacklist_versions 1.0 6 6 7 7 name opencv 8 8 version 3.1.0 9 revision 49 revision 5 10 10 categories graphics science 11 11 platforms darwin 12 12 license BSD … … 54 54 55 55 patchfiles-append patch-install_name.diff \ 56 56 patch-modules_python_CMakeLists.txt.diff \ 57 patch-modules_java_CMakeLists.txt.diff 57 patch-modules_java_CMakeLists.txt.diff \ 58 patch-find-openexr.diff 59 60 platform linux { 61 patchfiles-append \ 62 patch-pchsupport.diff 63 } 64 65 post-patch { 66 reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/cmake/OpenCVFindOpenEXR.cmake 67 } 58 68 59 69 # TODO: check and adapt those patches 60 70 # patch-modules_imgcodecs_src_grfmt_tiff.cpp.diff … … 133 143 -DINSTALL_PYTHON_EXAMPLES=OFF \ 134 144 -DENABLE_PRECOMPILED_HEADERS=ON \ 135 145 -DCMAKE_VERBOSE=ON \ 146 -DENABLE_SSSE3=ON 147 platform darwin { 148 if {${os.major} >= 13} { 149 configure.args-append \ 150 -DWITH_AVFOUNDATION=ON 151 patchfiles-append \ 152 patch-use-avfound-no-qtkit.diff 153 } 154 configure.args-append \ 136 155 -DZLIB_LIBRARY=${prefix}/lib/libz.dylib \ 137 156 -DBZIP2_LIBRARIES=${prefix}/lib/libbz2.dylib 157 } 158 platform linux { 159 configure.args-append \ 160 -DWITH_VA=ON \ 161 -DZLIB_LIBRARY=${prefix}/lib/libz.so \ 162 -DBZIP2_LIBRARIES=${prefix}/lib/libbz2.so 163 164 variant sse4 description {Enable SSE4* support} { 165 configure.args-append \ 166 -DENABLE_SSE41=ON -DENABLE_SSE42=ON 167 } 168 } 138 169 139 170 set opencv_linker_libs "" 140 171 … … 167 198 -DENABLE_PRECOMPILED_HEADERS=OFF 168 199 } 169 200 201 variant avx description {Enable AVX (and SSE4*) support} { 202 configure.args-append -DENABLE_AVX=ON \ 203 -DENABLE_SSE41=ON -DENABLE_SSE42=ON 204 } 205 170 206 variant eigen description {Enable eigen support.} { 171 207 depends_lib-append port:eigen3 172 208 configure.args-replace -DWITH_EIGEN=OFF \ … … 207 243 variant qt4 conflicts qt5 description {Build with Qt4 Backend support.} { 208 244 PortGroup qt4 1.0 209 245 configure.args-replace -DWITH_QT=OFF \ 210 -DWITH_QT= ON246 -DWITH_QT=4 211 247 } 212 248 213 249 variant qt5 conflicts qt4 description {Build with Qt5 Backend support.} { 214 250 PortGroup qt5 1.0 215 251 configure.args-replace -DWITH_QT=OFF \ 216 -DWITH_QT= ON252 -DWITH_QT=5 217 253 } 218 254 219 255 variant java description {Add Java bindings.} { … … 312 348 reinplace {/Libs: /s:\.dylib::g} ${destroot}${prefix}/lib/pkgconfig/opencv.pc 313 349 reinplace {s|Libs: |Libs: -L\${exec_prefix}/lib |g} ${destroot}${prefix}/lib/pkgconfig/opencv.pc 314 350 reinplace {s:-l-framework|-framework::g} ${destroot}${prefix}/lib/pkgconfig/opencv.pc 351 if {[variant_isset qt4]} { 352 reinplace "s|-lAGL|-framework AGL|g" ${destroot}${prefix}/lib/pkgconfig/opencv.pc 353 reinplace "s|-lOpenGL|-framework OpenGL|g" ${destroot}${prefix}/lib/pkgconfig/opencv.pc 354 } 315 355 } 316 356 317 357 livecheck.type sourceforge