Ticket #38090: Portfile.2

File Portfile.2, 3.6 KB (added by cooljeanius (Eric Gallager), 12 years ago)

New portfile

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
52post-configure {
53# When Qt is installed without +universal, and qmake is called with
54# "QMAKE_LDFLAGS += -arch foo", and "foo" is the native arch, then, at
55# least sometimes, qmake will erroneously remove the second "foo" but
56# leave the "-arch" flag -- generating an error at linking.  Not sure
57# if this is the case with +debug though...
58    if {![variant_isset universal]} {
59        reinplace "s|\\(-arch ${build_arch}\\) -arch|\\1|" \
60            ${worksrcpath}/Makefile
61    }
62}
63
64# allow ccache, if specified by the user (this was taken from the djview portfile)
65pre-build {
66    if {[tbool configure.ccache]} {
67        build.post_args "CCACHE=ccache"
68    }
69}
70
71# Just in case
72build.env-append      ${configure.env}
73
74# This variant could have been left empty but I felt like I had to put something in it
75variant debug description {Set for debugging} {
76    use_parallel_build no
77}
78
79# Apparently putting stuff in ${applications_dir} counts as violating the mtree...
80destroot.violate_mtree      yes
81
82# Setting destroot.destdir just in case
83destroot.destdir      ${destroot}${prefix}
84post-destroot {
85    xinstall -d ${destroot}${prefix}/share/${name}-${version}
86    xinstall -m 755 -d ${destroot}${applications_dir}
87    copy [glob ${destroot}/*/local/bin/*.app] ${destroot}${applications_dir}
88    foreach png [glob ${worksrcpath}/icons/*.png] {
89        system -W ${worksrcpath}/icons "makeicns -in ${png}"
90    }
91    eval xinstall [glob ${worksrcpath}/icons/*] ${destroot}${applications_dir}/valkyrie.app/Contents/Resources
92    delete ${destroot}/usr
93}
94
95livecheck.type        regex
96livecheck.url         ${homepage}
97# The livecheck regex is broken; I'm not sure how to fix it...
98livecheck.regex       ${name}-(\\d(?:\\.\\d)+)