Ticket #44557: valgrind-Portfile

File valgrind-Portfile, 3.7 KB (added by aaron@…, 10 years ago)

Valgrind 3.10.0 release. Valgrind-devel update.

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 121955 2014-07-12 05:25:40Z sean@macports.org $
3
4PortSystem          1.0
5PortGroup           mpi 1.0
6
7name                valgrind
8version             3.10.0
9revision            1
10categories          devel
11platforms           darwin
12supported_archs     i386 x86_64
13license             GPL-2
14maintainers         raimue \
15                    openmaintainer
16
17description         A powerful open-source memory debugger
18long_description \
19    Valgrind is a powerful open-source memory debugger. When valgrind is \
20    attached to a program, it intercepts calls to malloc/new/free/delete and \
21    all memory operations are checked for invalid read or write.
22
23homepage            http://valgrind.org
24master_sites        http://valgrind.org/downloads/
25
26checksums           md5     7c311a72a20388aceced1aa5573ce970 \
27                    sha1    aec0b8cd042ec36c8cce4f6027b98627ab202f26 \
28                    sha256  03047f82dfc6985a4c7d9d2700e17bc05f5e1a0ca6ad902e5d6c81aeb720edc9
29
30compilers.choose    cc cxx
31mpi.choose
32mpi.setup           -gcc44 -gcc45 -gcc46
33
34# due to -mno-dynamic-no-pic in Makefile.all.am we need to regenerate the
35# configure scripts
36use_autoreconf      yes
37depends_build       bin:perl:perl5
38# Ignore trace reports about boost, Qt and OpenMP
39# as they are only used for tests
40
41configure.args      --mandir=${prefix}/share/man \
42                    --without-mpicc
43
44if {${build_arch} eq "i386"} {
45    configure.args-append --enable-only32bit
46} elseif {${build_arch} eq "x86_64"} {
47    configure.args-append --enable-only64bit
48}
49
50# valgrind sets up -arch by itself, adding our own interferes with the build
51configure.cc_archflags {}
52configure.ld_archflags {}
53
54variant universal {
55    configure.args-delete --enable-only32bit --enable-only64bit
56    configure.universal_cflags {}
57    configure.universal_cxxflags {}
58    configure.universal_ldflags {}
59
60    pre-configure {
61        if {${build_arch} eq "i386"} {
62            # See #25684 and https://bugs.kde.org/show_bug.cgi?id=243362
63            ui_error "valgrind does not build +universal on a 32-bit only CPU!"
64            return -code error "unsupported CPU"
65        }
66    }
67}
68
69pre-patch {
70    if {[gcc_variant_isset]} {
71        patchfiles-append patch-gcc.diff
72    }
73
74    reinplace -W $worksrcpath "s,-mno-dynamic-no-pic,,g" Makefile.all.am
75}
76
77pre-configure {
78    if {[mpi_variant_isset]} {
79        configure.args-delete --without-mpicc
80        configure.args-append --with-mpicc=${mpi.cc}
81    }
82}
83
84if {$subport eq $name} {
85    conflicts           valgrind-devel
86    use_bzip2           yes
87
88    # Avoid conflict of faq.html and FAQ.html, #30541
89    extract.post_args-append --exclude=${distname}/docs/html/FAQ.html
90
91    pre-fetch {
92        if {${os.platform} eq "darwin" && (${os.major} < 9 || ${os.major} > 13)} {
93            ui_error "${name} ${version} is only compatible with Mac OS X 10.5, 10.6, 10.7, 10.8 and 10.9"
94            return -code error "incompatible Mac OS X version"
95        }
96    }
97
98    livecheck.type      regex
99    livecheck.url       ${homepage}
100    livecheck.regex     ${name}-(\\d(?:\\.\\d)+)
101}
102
103subport valgrind-devel {
104    conflicts           valgrind
105
106    svn.revision        14560
107    set vex_revision    2953
108    version             3.10.0-r${svn.revision}
109    revision            1
110
111    fetch.type      svn
112    svn.url         svn://svn.valgrind.org/valgrind/trunk
113    svn.args        --ignore-externals
114    worksrcdir      trunk
115
116    post-fetch {
117        system -W ${worksrcpath} "${svn.cmd} ${svn.pre_args} ${svn.method} svn://svn.valgrind.org/vex/trunk@${vex_revision} VEX"
118    }
119
120    livecheck.type none
121}