Ticket #24503: Portfile.diff
File Portfile.diff, 4.8 KB (added by raphael-st (Raphael Straub), 14 years ago) |
---|
-
Portfile
old new 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 1 2 # $Id: Portfile 66756 2010-04-22 04:18:46Z ryandesign@macports.org $ 2 3 3 4 PortSystem 1.0 5 PortGroup cmake 1.0 4 6 5 7 name opencv 6 version 2.0.0 7 revision 1 8 version 2.1.0 8 9 categories graphics science 9 10 platforms darwin 10 11 maintainers gmail.com:stante … … 24 25 use_bzip2 yes 25 26 distname OpenCV-${version} 26 27 27 checksums md5 ed27520514baacc5edad7b06ad24130e\28 sha1 2090c2aaff77c3b0cc669c2ee81bea389db0a366\29 rmd160 f46b993ded3d579dc52175131e5485476ac1f56928 checksums md5 1d71584fb4e04214c0085108f95e24c8 \ 29 sha1 8e2d6b653296364ab2ca0fa5a5e6b0edfca114a7 \ 30 rmd160 e31cdbd30e7925e3725f5957616ffc59c58db247 30 31 31 32 depends_build-append port:pkgconfig 32 33 33 depends_lib-append port:gtk2 port:zlib port:jpeg \ 34 port:libpng port:tiff path:lib/libavcodec.dylib:ffmpeg 34 depends_lib-append port:zlib \ 35 path:lib/libavcodec.dylib:ffmpeg \ 36 port:bzip2 \ 37 port:dirac \ 38 port:faac \ 39 port:faad2 \ 40 port:lame \ 41 port:schroedinger \ 42 port:liboil \ 43 port:libtheora \ 44 port:libvorbis \ 45 port:libogg \ 46 port:x264 \ 47 port:libdc1394 \ 48 port:orc 49 50 patchfiles patch-CMakeLists.txt.diff 51 if {[variant_isset universal]} { 52 patchfiles-append patch-pch-CMakeLists.txt.diff 53 } 35 54 36 # ffmpeg is not universal. 37 # If universal support is to be added to opencv, careful consideration has 38 # to be given to the 64-bit issues with QuickTime and Carbon. 39 universal_variant no 40 41 configure.args --without-python 42 43 switch ${build_arch} { 44 ppc64 - 45 x86_64 { 46 configure.args-append --without-quicktime \ 47 --without-carbon 55 post-patch { 56 if {[variant_isset python26]} { 57 reinplace "s|@@PYTHON_PKGD@@|${frameworks_dir}/Python.framework/Versions/2.6/lib/python2.6/site-packages|g" ${worksrcpath}/CMakeLists.txt 48 58 } 49 ppc { 50 patchfiles-append patch-G4.diff 59 } 60 61 configure.args-append -DBUILD_NEW_PYTHON_SUPPORT=OFF \ 62 -DBUILD_EXAMPLES=ON \ 63 -DINSTALL_C_EXAMPLES=ON \ 64 -DBZIP2_LIBRARIES=${prefix}/lib/libbz2.dylib 65 66 # use macros in /usr/include/stdint.h with C++ compiler; see <https://roundup.ffmpeg.org/issue2093> 67 platform darwin { 68 if {${os.major} <= 9} { 69 configure.args-append -DCMAKE_CXX_FLAGS=-D__STDC_CONSTANT_MACROS 51 70 } 52 71 } 53 72 54 # For some reason the highgui module forgets to link against libavutil 55 configure.ldflags-append -lavutil 73 variant python26 description {Add Python 2.6 bindings} { 74 depends_lib-append port:python26 75 configure.args-delete -DBUILD_NEW_PYTHON_SUPPORT=OFF 76 configure.args-append -DINSTALL_PYTHON_EXAMPLES=ON \ 77 -DPYTHON_LIBRARY=${prefix}/lib/libpython2.6.dylib \ 78 -DPYTHON_INCLUDE_DIR=${frameworks_dir}/Python.framework/Versions/2.6/Headers 79 } 56 80 57 post-destroot { 58 xinstall -m 644 ${worksrcpath}/cvconfig.h ${destroot}${prefix}/include/${name} 81 variant tbb description {Use Intel TBB} { 82 depends_lib-append port:tbb 83 configure.args-append -DWITH_TBB=ON \ 84 -DHAVE_TBB=ON \ 85 -DTBB_INCLUDE_DIRS=${prefix}/include \ 86 -DTBB_LIBRARY_DIRS=${prefix}/lib \ 87 -DOPENCV_LINKER_LIBS="-ltbb -ltbbmalloc" 59 88 } 60 89 61 90 livecheck.type regex 62 91 livecheck.url http://sourceforge.net/projects/opencvlibrary/files/ 63 livecheck.regex {OpenCV-([0-9.]+)\.tar}92 livecheck.regex "OpenCV-(\\d+(?:\\.\\d+)*)${extract.suffix}/download"