Ticket #35882: Portfile

File Portfile, 2.8 KB (added by samuel@…, 12 years ago)
Line 
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
4PortSystem 1.0
5PortGroup       muniversal 1.0
6
7name            cmake
8version         2.8.9
9revision    1
10set branch      [join [lrange [split ${version} .] 0 1] .]
11categories      devel
12license         BSD
13installs_libs no
14maintainers css
15description Cross-platform make
16long_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.
21homepage        http://www.cmake.org/
22master_sites    http://www.cmake.org/files/v${branch}/
23platforms       darwin freebsd
24
25checksums           md5     801f4c87f8b604f727df5bf1f05a59e7 \
26                    sha1    b96663c0757a5edfbddc410aabf7126a92131e2b \
27                    rmd160  66808a280eb8e4ae798df3283fab8bcc3f512777
28
29depends_lib-append port:libidn port:openssl
30
31configure.env-append CMAKE_PREFIX_PATH=${prefix} \
32                                CMAKE_INCLUDE_PATH=${prefix}/include/ncurses \
33                                CMAKE_LIBRARY_PATH=${prefix}/lib
34
35configure.args  --mandir=/share/man --docdir=/share/doc/cmake \
36                                --parallel=${build.jobs} \
37                                --init=${worksrcpath}/macports.cmake
38configure.universal_args
39configure.post_args
40
41# Leopard's Rosetta has some difficulties configuring the ppc slice
42platform 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
52patchfiles      patch-CMakeFindFrameworks.cmake.diff \
53                        patch-Modules-FindQt4.cmake.diff \
54            patch-Modules_FindPkgConfig_cmake.diff
55
56post-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
65post-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
76variant 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
82livecheck.type  regex
83livecheck.regex {Latest Release \((\d(?:\.\d+)*)\)}
84livecheck.url   ${homepage}cmake/resources/software.html