Ticket #38090: Portfile.3

File Portfile.3, 3.8 KB (added by raimue (Rainer Müller), 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 102485 2013-02-04 16:02:38Z raimue@macports.org $
3
4PortSystem            1.0
5PortGroup             qt4 1.0
6
7name                  valkyrie
8version               2.0.0
9revision              0
10categories            devel aqua
11platforms             darwin
12supported_archs       i386 x86_64
13universal_variant     yes
14license               GPL-2
15maintainers           raimue gwmail.gwu.edu:egall openmaintainer
16
17description           A Qt4-based GUI for valgrind.
18long_description \
19    Valkyrie is a graphical frontend to valgrind: what ddd is to gdb, valkyrie is to valgrind. \
20    It uses Qt4 and works with the Memcheck and Helgrind tools. \
21    It also has an XML merging tool for Memcheck outputs (vk_logmerge).
22
23homepage              http://valgrind.org
24master_sites          http://valgrind.org/downloads/
25use_bzip2             yes
26
27checksums             md5     a411dfb803f548dae5f988de0160aeb5 \
28                      sha1    999a6623eea5b7b8d59b55d59b8198f4fcd08add \
29                      rmd160  ae7d9905a22311af3261347b5c39e7ca7fccaaa7 \
30                      sha256  a70b9ffb2409c96c263823212b4be6819154eb858825c9a19aad0ae398d59b43
31
32# This was taken from the valgrind portfile; I don't know if it actually applies to valkyrie, too, though...
33pre-configure {
34    if {"darwin" == ${os.platform} && (${os.major} < 9 || ${os.major} > 12)} {
35        ui_error "${name} ${version} is only compatible with OS X 10.5, 10.6, 10.7 and 10.8"
36        return -code error "incompatible OS X version"
37    }
38}
39
40configure.cmd         "${qt_qmake_cmd}"
41configure.args-append  QMAKESPEC=${qt_mkspecs_dir}/macx-g++ PREFIX=${prefix}
42configure.pre_args
43configure.post_args
44configure.ldflags
45configure.universal_args
46configure.env-append  PREFIX=${prefix}
47
48depends_build-append  port:makeicns
49depends_lib-append    path:bin/valgrind:valgrind \
50                      port:xpm
51
52patchfiles            patch-binary-paths.diff
53
54post-patch {
55    reinplace "s:@PREFIX@:${prefix}:g" ${worksrcpath}/src/objects/valkyrie_object.cpp
56}
57
58post-configure {
59# When Qt is installed without +universal, and qmake is called with
60# "QMAKE_LDFLAGS += -arch foo", and "foo" is the native arch, then, at
61# least sometimes, qmake will erroneously remove the second "foo" but
62# leave the "-arch" flag -- generating an error at linking.  Not sure
63# if this is the case with +debug though...
64    if {![variant_isset universal]} {
65        reinplace "s|\\(-arch ${build_arch}\\) -arch|\\1|" \
66            ${worksrcpath}/Makefile
67    }
68}
69
70# allow ccache, if specified by the user (this was taken from the djview portfile)
71pre-build {
72    if {[tbool configure.ccache]} {
73        build.post_args "CCACHE=ccache"
74    }
75}
76
77# Just in case
78build.env-append      ${configure.env}
79
80# This variant could have been left empty but I felt like I had to put something in it
81variant debug description {Set for debugging} {
82    use_parallel_build no
83}
84
85# Apparently putting stuff in ${applications_dir} counts as violating the mtree...
86destroot.violate_mtree      yes
87
88# Setting destroot.destdir just in case
89destroot.destdir      ${destroot}${prefix}
90post-destroot {
91    xinstall -d ${destroot}${prefix}/share/${name}-${version}
92    xinstall -m 755 -d ${destroot}${applications_dir}
93    copy [glob ${destroot}/*/local/bin/*.app] ${destroot}${applications_dir}
94    foreach png [glob ${worksrcpath}/icons/*.png] {
95        system -W ${worksrcpath}/icons "makeicns -in ${png}"
96    }
97    eval xinstall [glob ${worksrcpath}/icons/*] ${destroot}${applications_dir}/valkyrie.app/Contents/Resources
98    delete ${destroot}/usr
99}
100
101livecheck.type        regex
102livecheck.url         ${homepage}
103# The livecheck regex is broken; I'm not sure how to fix it...
104livecheck.regex       ${name}-(\\d(?:\\.\\d)+)