source: trunk/dports/devel/gdb/Portfile @ 139728

Last change on this file since 139728 was 139728, checked in by devans@…, 2 years ago

gdb: change build deps to lib deps and explicitly add some additional ports that will link with gdb if installed, see comments, increment revision.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.2 KB
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 139728 2015-08-25 16:22:47Z devans@macports.org $
3
4PortSystem      1.0
5PortGroup       muniversal 1.0
6
7name            gdb
8version         7.9.1
9revision        1
10categories      devel
11license         GPL-3+
12maintainers     gmail.com:stuartwesterman openmaintainer
13description     GDB: The GNU Project Debugger
14
15long_description \
16GDB, the GNU Project debugger, allows you to see what is going on 'inside' \
17another program while it executes -- or what another program was doing at the \
18moment it crashed.  GDB can do four main kinds of things (plus other things \
19in support of these) to help you catch bugs in the act: \
20    a) start your program, specifying anything that might affect its behavior, \
21    b) make your program stop on specified conditions, \
22    c) examine what has happened, when your program has stopped, \
23    d) change things in your program, so you can experiment with correcting \
24       the effects of one bug and go on to learn about another. \
25The program being debugged can be written in Ada, C, C++, Objective-C, \
26Pascal (and many other languages). Those programs might be executing on \
27the same machine as GDB (native) or on another machine (remote). GDB \
28can run on most popular UNIX and Microsoft Windows variants.
29
30homepage        http://www.gnu.org/software/gdb/
31platforms       darwin
32supported_archs x86_64 i386
33
34master_sites    gnu
35
36checksums       rmd160  0dee316b422399512a8f604d169d217ba84ea2cc \
37                sha256  4994ad986726ac4128a6f1bd8020cd672e9a92aa76b80736563ef992992764ef
38
39# these dependencies are listed under depends_lib rather than depends_build
40# because gdb will link with libraries they provide if installed.
41# there may be more. See variable host_libs in configure.ac.
42
43depends_lib     port:boehmgc \
44                port:expat \
45                port:gettext \
46                port:guile \
47                port:libiconv \
48                port:ncurses \
49                port:zlib
50
51configure.args \
52    --infodir=${prefix}/share/info \
53    --mandir=${prefix}/share/man \
54    --with-docdir=${prefix}/share/doc \
55    --program-prefix=g \
56    --disable-werror
57
58post-destroot {
59    system "chgrp procmod ${destroot}${prefix}/bin/ggdb*"
60    system "chmod g+s ${destroot}${prefix}/bin/ggdb*"
61
62    foreach info [glob -tails -directory ${destroot}${prefix}/share/info g*] {
63        move ${destroot}${prefix}/share/info/${info} ${destroot}${prefix}/share/info/g${info}
64    }
65
66    xinstall -m 755 -d ${destroot}${prefix}/libexec/gnubin
67    foreach binary [glob -tails -directory ${destroot}${prefix}/bin g*] {
68        ln -s ${prefix}/bin/${binary} ${destroot}${prefix}/libexec/gnubin/[string range $binary 1 end]
69    }
70}
71
72# TODO: Remove after 2016-01-04.
73variant python25 requires python27 description {Legacy variant} {}
74variant python26 requires python27 description {Legacy variant} {}
75variant python31 requires python34 description {Legacy variant} {}
76variant python32 requires python34 description {Legacy variant} {}
77variant python33 requires python34 description {Legacy variant} {}
78
79set pythons_suffixes {27 34}
80
81set pythons_ports {}
82foreach s ${pythons_suffixes} {
83    lappend pythons_ports python${s}
84}
85
86foreach s ${pythons_suffixes} {
87    set p python${s}
88    set v [string index ${s} 0].[string index ${s} 1]
89    set i [lsearch -exact ${pythons_ports} ${p}]
90    set c [lreplace ${pythons_ports} ${i} ${i}]
91    eval [subst {
92        variant ${p} description "Build GDB with Python ${v} Scripting" conflicts ${c} {
93            depends_lib-append      port:${p}
94            configure.args-append   --with-python=${prefix}/bin/python${v}
95            patchfiles-append       patch-python-config.py.diff
96        }
97    }]
98}
99
100if {${os.platform} eq "darwin" && ${os.major} >= 12} {
101    notes "
102You will need to make sure /System/Library/LaunchDaemons/com.apple.taskgated.plist\
103has the '-p' option, e.g.
104            <key>ProgramArguments</key>
105            <array>
106                    <string>/usr/libexec/taskgated</string>
107                    <string>-sp</string>
108            </array>
109
110Due to kernel caching, you usually need to restart Mac OS X for this option to effect.
111"
112}
113
114
115livecheck.type  regex
116livecheck.url   http://ftp.gnu.org/gnu/gdb/
117livecheck.regex gdb-(\\d+(?:\\.\\d+)+)\\.tar
Note: See TracBrowser for help on using the repository browser.