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 | # $Id: Portfile 93702 2012-05-28 18:54:28Z css@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup muniversal 1.0 |
---|
6 | |
---|
7 | name cmake |
---|
8 | version 2.8.9 |
---|
9 | revision 1 |
---|
10 | set branch [join [lrange [split ${version} .] 0 1] .] |
---|
11 | categories devel |
---|
12 | license BSD |
---|
13 | installs_libs no |
---|
14 | maintainers css |
---|
15 | description Cross-platform make |
---|
16 | long_description \ |
---|
17 | An extensible, open-source system that manages the build \ |
---|
18 | process in an operating system and compiler independent manner. \ |
---|
19 | Unlike many cross-platform systems, CMake is designed to be \ |
---|
20 | used in conjunction with the native build environment. |
---|
21 | homepage http://www.cmake.org/ |
---|
22 | master_sites http://www.cmake.org/files/v${branch}/ |
---|
23 | platforms darwin freebsd |
---|
24 | |
---|
25 | checksums md5 801f4c87f8b604f727df5bf1f05a59e7 \ |
---|
26 | sha1 b96663c0757a5edfbddc410aabf7126a92131e2b \ |
---|
27 | rmd160 66808a280eb8e4ae798df3283fab8bcc3f512777 |
---|
28 | |
---|
29 | depends_lib-append port:libidn port:openssl |
---|
30 | |
---|
31 | configure.env-append CMAKE_PREFIX_PATH=${prefix} \ |
---|
32 | CMAKE_INCLUDE_PATH=${prefix}/include/ncurses \ |
---|
33 | CMAKE_LIBRARY_PATH=${prefix}/lib |
---|
34 | |
---|
35 | configure.args --mandir=/share/man --docdir=/share/doc/cmake \ |
---|
36 | --parallel=${build.jobs} \ |
---|
37 | --init=${worksrcpath}/macports.cmake |
---|
38 | configure.universal_args |
---|
39 | configure.post_args |
---|
40 | |
---|
41 | # Leopard's Rosetta has some difficulties configuring the ppc slice |
---|
42 | platform darwin 9 { |
---|
43 | global universal_archs_supported |
---|
44 | if {${build_arch} == "i386" || ${build_arch} == "x86_64"} { |
---|
45 | supported_archs i386 x86_64 |
---|
46 | } elseif {${build_arch} == "ppc" || ${build_arch} == "ppc64"} { |
---|
47 | supported_archs ppc ppc64 |
---|
48 | } |
---|
49 | set universal_archs_supported ${supported_archs} |
---|
50 | } |
---|
51 | |
---|
52 | patchfiles patch-CMakeFindFrameworks.cmake.diff \ |
---|
53 | patch-Modules-FindQt4.cmake.diff \ |
---|
54 | patch-Modules_FindPkgConfig_cmake.diff |
---|
55 | |
---|
56 | post-patch { |
---|
57 | # copy cmake init file, ready to be patched below |
---|
58 | copy ${filespath}/macports.cmake ${worksrcpath} |
---|
59 | |
---|
60 | # patch PREFIX |
---|
61 | reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/macports.cmake |
---|
62 | reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Modules/CMakeFindFrameworks.cmake |
---|
63 | } |
---|
64 | |
---|
65 | post-destroot { |
---|
66 | xinstall -d -m 0755 ${destroot}${prefix}/share/emacs/site-lisp |
---|
67 | xinstall -m 0644 ${worksrcpath}/Docs/cmake-mode.el \ |
---|
68 | ${destroot}${prefix}/share/emacs/site-lisp |
---|
69 | foreach type {syntax indent} { |
---|
70 | xinstall -d -m 0755 ${destroot}${prefix}/share/vim/vimfiles/${type} |
---|
71 | xinstall -m 0644 -W ${worksrcpath}/Docs cmake-${type}.vim \ |
---|
72 | ${destroot}${prefix}/share/vim/vimfiles/${type} |
---|
73 | } |
---|
74 | } |
---|
75 | |
---|
76 | variant gui description {Qt4 based cmake-gui} { |
---|
77 | PortGroup qt4 1.0 |
---|
78 | patchfiles-append patch-CMakeLists.txt.diff |
---|
79 | configure.args-append --qt-gui --qt-qmake=${qt_qmake_cmd} |
---|
80 | } |
---|
81 | |
---|
82 | livecheck.type regex |
---|
83 | livecheck.regex {Latest Release \((\d(?:\.\d+)*)\)} |
---|
84 | livecheck.url ${homepage}cmake/resources/software.html |
---|