Ticket #45161: Portfile

File Portfile, 1.8 KB (added by adexter@…, 10 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$
3
4PortSystem          1.0
5
6name                oclint
7version             0.9.dev
8categories          devel
9platforms           darwin
10maintainers         nomaintainer
11description         Static code analysis for C, C++, and Objective-C
12long_description    OCLint is a static code analysis tool for improving \
13                    quality and reducing defects by inspecting C, C++ and \
14                    Objective-C code and looking for potential problems.
15homepage            http://oclint.org
16license             BSD
17
18fetch.type          git
19git.url             https://github.com/oclint/oclint.git
20git.branch          5dba345
21
22depends_build       port:cmake \
23                    port:git \
24                    port:python27 \
25                    port:subversion
26
27use_configure       no
28
29set cmake_install_prefix ${prefix}/share/${name}
30build.env-append    VERBOSE=1 \
31                    CMAKE_INSTALL_PREFIX=${cmake_install_prefix}
32build.cmd           cd oclint-scripts && ./make
33build.target
34
35destroot {
36    set builddir ${worksrcpath}/build/${distname}.${git.branch}
37
38    foreach bin [glob ${builddir}/bin/*] {
39        set n [strsed ${bin} /^.*\\///]
40        set destbin ${destroot}${prefix}/bin/${n}
41
42        xinstall -m 755 ${filespath}/oclint_wrapper ${destbin}
43        reinplace -locale C "s|__PREFIX__|${prefix}|g" ${destbin}
44        reinplace -locale C "s|__BINARY__|${n}|g" ${destbin}
45    }
46
47    xinstall -d ${destroot}${cmake_install_prefix}/bin
48    system "cp -R ${builddir}/bin ${destroot}${cmake_install_prefix}"
49
50    xinstall -d ${destroot}${cmake_install_prefix}/lib
51    system "cp -R ${builddir}/lib ${destroot}${cmake_install_prefix}"
52}