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

Last change on this file since 130993 was 130993, checked in by larryv@…, 3 years ago

gdb: Replace all Python variants with +python{27,34}

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.0 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 130993 2015-01-04 22:44:39Z larryv@macports.org $
3
4PortSystem      1.0
5PortGroup       muniversal 1.0
6
7name            gdb
8version         7.7.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
36use_bzip2       yes
37
38checksums       rmd160  523b0b2ac61e62d98c1df379571331604c4f62e1 \
39                sha256  0dbd5260406f1b0c70fcf027c6488527fadde0cd9bb574593491fe076eb03aa5
40
41depends_build   port:gettext port:zlib
42
43patchfiles      patch-darwin-nat.c.diff
44
45configure.args \
46    --infodir=${prefix}/share/info \
47    --mandir=${prefix}/share/man \
48    --with-docdir=${prefix}/share/doc \
49    --program-prefix=g \
50    --disable-werror
51
52post-destroot {
53    system "chgrp procmod ${destroot}${prefix}/bin/ggdb*"
54    system "chmod g+s ${destroot}${prefix}/bin/ggdb*"
55
56    foreach info [glob -tails -directory ${destroot}${prefix}/share/info g*] {
57        move ${destroot}${prefix}/share/info/${info} ${destroot}${prefix}/share/info/g${info}
58    }
59    move ${destroot}${prefix}/share/info/standards.info ${destroot}${prefix}/share/info/ggdb-standards.info
60
61    xinstall -m 755 -d ${destroot}${prefix}/libexec/gnubin
62    foreach binary [glob -tails -directory ${destroot}${prefix}/bin g*] {
63        ln -s ${prefix}/bin/${binary} ${destroot}${prefix}/libexec/gnubin/[string range $binary 1 end]
64    }
65}
66
67# TODO: Remove after 2016-01-04.
68variant python25 requires python27 description {Legacy variant} {}
69variant python26 requires python27 description {Legacy variant} {}
70variant python31 requires python34 description {Legacy variant} {}
71variant python32 requires python34 description {Legacy variant} {}
72variant python33 requires python34 description {Legacy variant} {}
73
74set pythons_suffixes {27 34}
75
76set pythons_ports {}
77foreach s ${pythons_suffixes} {
78    lappend pythons_ports python${s}
79}
80
81foreach s ${pythons_suffixes} {
82    set p python${s}
83    set v [string index ${s} 0].[string index ${s} 1]
84    set i [lsearch -exact ${pythons_ports} ${p}]
85    set c [lreplace ${pythons_ports} ${i} ${i}]
86    eval [subst {
87        variant ${p} description "Build GDB with Python ${v} Scripting" conflicts ${c} {
88            depends_lib-append      port:${p}
89            configure.args-append   --with-python=${prefix}/bin/python${v}
90            patchfiles-append       patch-python-config.py.diff
91        }
92    }]
93}
94
95if {${os.platform} eq "darwin" && ${os.major} >= 12} {
96    notes "
97You will need to make sure /System/Library/LaunchDaemons/com.apple.taskgated.plist\
98has the '-p' option, e.g.
99            <key>ProgramArguments</key>
100            <array>
101                    <string>/usr/libexec/taskgated</string>
102                    <string>-sp</string>
103            </array>
104
105Due to kernel caching, you usually need to restart Mac OS X for this option to effect.
106"
107}
108
109
110livecheck.type  regex
111livecheck.url   http://ftp.gnu.org/gnu/gdb/
112livecheck.regex gdb-(\\d+(?:\\.\\d+)+)\\.tar
Note: See TracBrowser for help on using the repository browser.