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

Last change on this file since 98404 was 98404, checked in by blair@…, 5 years ago

gdb: prevent compiler failure: do not compile if cctools-headers is installed.

This prevents the following compile failure which is caused by
bfd/mach-o.h including mach-o/loader.h, which is found in
${prefix}/include instead of gdb's source directory. The file in
${prefix}/include doesn't define the symbols that gdb needs.

/usr/bin/clang -pipe -O2 -I/opt/local/include -Wno-unused-value -arch x86_64 -I. -I. -I./common -I./config -DLOCALEDIR="\"/opt/local/share/locale\"" -DHAVE_CONFIG_H -I./../include/opcode -I./../opcodes/.. -I./../readline/.. -I../bfd -I./../bfd -I./../include -I../libdecnumber -I./../libdecnumber -I./gnulib/import -Ibuild-gnulib/import -DTUI=1 -I/opt/local/include -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -Wall -Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral -Wno-pointer-sign -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wmissing-prototypes -Wdeclaration-after-statement -c -o solib-darwin.o -MT solib-darwin.o -MMD -MP -MF .deps/solib-darwin.Tpo solib-darwin.c
In file included from solib-darwin.c:43:
../bfd/mach-o.h:510:3: error: unknown type name 'bfd_mach_o_load_command_type'; did you mean 'bfd_mach_o_uuid_command'?

bfd_mach_o_load_command_type type;
~
bfd_mach_o_uuid_command

../bfd/mach-o.h:438:1: note: 'bfd_mach_o_uuid_command' declared here
bfd_mach_o_uuid_command;

../bfd/mach-o.h:592:39: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
int bfd_mach_o_lookup_command (bfd *, bfd_mach_o_load_command_type, bfd_mach_o_load_command );

~

../bfd/mach-o.h:613:43: warning: declaration of 'enum bfd_mach_o_cpu_type' will not be visible outside of this function [-Wvisibility]
unsigned long bfd_mach_o_stack_addr (enum bfd_mach_o_cpu_type);


../bfd/mach-o.h:619:47: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
const bfd_target *bfd_mach_o_header_p (bfd *, bfd_mach_o_filetype,


../bfd/mach-o.h:620:40: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]

bfd_mach_o_cpu_type);

solib-darwin.c:223:38: error: use of undeclared identifier 'BFD_MACH_O_LC_LOAD_DYLINKER'

BFD_MACH_O_LC_LOAD_DYLINKER, &cmd) == 1)

solib-darwin.c:295:22: error: use of undeclared identifier 'BFD_MACH_O_MH_MAGIC'

if (hdr_val != BFD_MACH_O_MH_MAGIC && hdr_val != BFD_MACH_O_MH_MAGIC_64)


solib-darwin.c:295:56: error: use of undeclared identifier 'BFD_MACH_O_MH_MAGIC_64'

if (hdr_val != BFD_MACH_O_MH_MAGIC && hdr_val != BFD_MACH_O_MH_MAGIC_64)


solib-darwin.c:300:22: error: use of undeclared identifier 'BFD_MACH_O_MH_EXECUTE'

if (hdr_val == BFD_MACH_O_MH_EXECUTE)


4 warnings and 5 errors generated.
make[2]: * [solib-darwin.o] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_gdb/gdb/work/gdb-7.5/gdb'
make[1]:
* [all-gdb] Error 2
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_gdb/gdb/work/gdb-7.5'
make: * [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_gdb/gdb/work/gdb-7.5'
Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_gdb/gdb/work/gdb-7.5" && /usr/bin/make -w all
Exit code: 2

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.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 98404 2012-10-04 19:19:06Z blair@macports.org $
3
4PortSystem      1.0
5PortGroup       muniversal 1.0
6
7name            gdb
8version         7.5
9categories      devel
10maintainers     dweber openmaintainer
11description     GDB: The GNU Project Debugger
12
13long_description \
14GDB, the GNU Project debugger, allows you to see what is going on 'inside' \
15another program while it executes -- or what another program was doing at the \
16moment it crashed.  GDB can do four main kinds of things (plus other things \
17in support of these) to help you catch bugs in the act: \
18    a) start your program, specifying anything that might affect its behavior, \
19    b) make your program stop on specified conditions, \
20    c) examine what has happened, when your program has stopped, \
21    d) change things in your program, so you can experiment with correcting \
22       the effects of one bug and go on to learn about another. \
23The program being debugged can be written in Ada, C, C++, Objective-C, \
24Pascal (and many other languages). Those programs might be executing on \
25the same machine as GDB (native) or on another machine (remote). GDB \
26can run on most popular UNIX and Microsoft Windows variants.
27
28homepage        http://www.gnu.org/software/gdb/
29platforms       darwin
30
31master_sites    gnu
32
33use_bzip2       yes
34
35checksums       sha1    79b61152813e5730fa670c89e5fc3c04b670b02c \
36                rmd160  0eff835dde6e059a6e4e5c63586939fb2e74e4f1 \
37                sha256  d178c45c328369ae4f24f9a0ec53b7d009e2bfa1d41b7027280b24f58ae61932
38
39depends_build   port:gettext
40
41if {${configure.build_arch} == "ppc" || ${configure.build_arch} == "ppc64"} {
42    notes "${name} does not support building on ${configure.build_arch}."
43    pre-fetch {
44        ui_error "${name} does not support building on ${configure.build_arch}."
45        return -code error "Unsupported architecture."
46    }
47}
48
49pre-configure {
50    if {[file exists ${prefix}//include/mach-o/loader.h]} {
51        ui_error "cctools-headers must be deactivated before upgrade." 
52        error "Please run `sudo port deactivate cctools-headers` and try again." 
53    }
54}
55
56configure.args-append \
57    --infodir=${prefix}/share/info \
58    --mandir=${prefix}/share/man \
59    --with-docdir=${prefix}/share/doc \
60    --program-prefix=g
61
62configure.cflags-append     -I${prefix}/include
63configure.cxxflags-append   -I${prefix}/include
64
65if {${configure.compiler} == "clang"} {
66    configure.cflags-append -Wno-unused-value
67}
68
69post-destroot {
70    system "chgrp procmod ${destroot}${prefix}/bin/ggdb*"
71    system "chmod g+s ${destroot}${prefix}/bin/ggdb*"
72
73    foreach info [glob -tails -directory ${destroot}${prefix}/share/info g*] {
74        move ${destroot}${prefix}/share/info/${info} ${destroot}${prefix}/share/info/g${info}
75    }
76    move ${destroot}${prefix}/share/info/standards.info ${destroot}${prefix}/share/info/ggdb-standards.info
77
78    xinstall -m 755 -d ${destroot}${prefix}/libexec/gnubin
79    foreach binary [glob -tails -directory ${destroot}${prefix}/bin g*] {
80        ln -s ${prefix}/bin/${binary} ${destroot}${prefix}/libexec/gnubin/[string range $binary 1 end]
81    }
82}
83
84livecheck.type  regex
85livecheck.url   http://ftp.gnu.org/gnu/gdb/
86livecheck.regex gdb-(\\d+(?:\\.\\d+)+)\\.tar
Note: See TracBrowser for help on using the repository browser.