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

Last change on this file since 154482 was 153903, checked in by khindenburg@…, 13 months ago

gdb: add multiarch variant #52182

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.1 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 153903 2016-10-15 15:17:32Z ryandesign@macports.org $
3
4PortSystem      1.0
5PortGroup       muniversal 1.0
6
7name            gdb
8version         7.9.1
9revision        3
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# port:guile should also be a dependency, but currently does not build universally. (#48767)
43
44depends_lib     port:boehmgc \
45                port:expat \
46                port:gettext \
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    --without-guile \
56    --program-prefix=g \
57    --disable-werror
58
59post-destroot {
60    system "chgrp procmod ${destroot}${prefix}/bin/ggdb*"
61    system "chmod g+s ${destroot}${prefix}/bin/ggdb*"
62
63    foreach info [glob -tails -directory ${destroot}${prefix}/share/info g*] {
64        move ${destroot}${prefix}/share/info/${info} ${destroot}${prefix}/share/info/g${info}
65    }
66
67    xinstall -m 755 -d ${destroot}${prefix}/libexec/gnubin
68    foreach binary [glob -tails -directory ${destroot}${prefix}/bin g*] {
69        ln -s ${prefix}/bin/${binary} ${destroot}${prefix}/libexec/gnubin/[string range $binary 1 end]
70    }
71}
72
73set pythons_suffixes {27 34}
74
75set pythons_ports {}
76foreach s ${pythons_suffixes} {
77    lappend pythons_ports python${s}
78}
79
80foreach s ${pythons_suffixes} {
81    set p python${s}
82    set v [string index ${s} 0].[string index ${s} 1]
83    set i [lsearch -exact ${pythons_ports} ${p}]
84    set c [lreplace ${pythons_ports} ${i} ${i}]
85    eval [subst {
86        variant ${p} description "Build GDB with Python ${v} Scripting" conflicts ${c} {
87            depends_lib-append      port:${p}
88            configure.args-append   --with-python=${prefix}/bin/python${v}
89            patchfiles-append       patch-python-config.py.diff
90        }
91    }]
92}
93
94variant multiarch description {Support all target architectures} {
95    configure.args-append    --enable-targets=all
96}
97
98if {${os.platform} eq "darwin" && ${os.major} >= 12} {
99    notes "
100You will need to make sure /System/Library/LaunchDaemons/com.apple.taskgated.plist\
101has the '-p' option, e.g.
102            <key>ProgramArguments</key>
103            <array>
104                    <string>/usr/libexec/taskgated</string>
105                    <string>-sp</string>
106            </array>
107
108Due to kernel caching, you usually need to restart Mac OS X for this option to effect.
109"
110}
111
112
113livecheck.type  regex
114livecheck.url   http://ftp.gnu.org/gnu/gdb/
115livecheck.regex gdb-(\\d+(?:\\.\\d+)+)\\.tar
Note: See TracBrowser for help on using the repository browser.