1 | # $Id: $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | |
---|
5 | name arm-elf-gdb |
---|
6 | version 7.1 |
---|
7 | revision 1 |
---|
8 | categories cross devel |
---|
9 | maintainers nomaintainer |
---|
10 | description GDB for the ARM processors |
---|
11 | long_description arm-elf-gdb is a version of the GNU Debugger \ |
---|
12 | for the arm-elf toolchain. |
---|
13 | homepage http://www.gnu.org/software/gdb/gdb.html |
---|
14 | platforms darwin |
---|
15 | master_sites http://ftp.gnu.org/gnu/gdb/ \ |
---|
16 | ftp://mirrors.usc.edu/pub/gnu/gdb \ |
---|
17 | ftp://ftp.mcc.ac.uk/pub/gnu/gdb |
---|
18 | distfiles gdb-${version}.tar.bz2 |
---|
19 | worksrcdir gdb-${version} |
---|
20 | use_bzip2 yes |
---|
21 | checksums md5 21dce610476c054687b52770d2ddc657 |
---|
22 | |
---|
23 | set crossgdb-target arm-elf |
---|
24 | |
---|
25 | # All cross ports violate the mtree layout. |
---|
26 | destroot.violate_mtree yes |
---|
27 | |
---|
28 | # Build in a different directory, as advised in the README file. |
---|
29 | pre-configure { |
---|
30 | file mkdir "${workpath}/build" |
---|
31 | } |
---|
32 | configure.dir ${workpath}/build |
---|
33 | configure.cmd ${workpath}/gdb-${version}/configure |
---|
34 | configure.cc "cc -no-cpp-precomp -I${prefix}/include" |
---|
35 | |
---|
36 | configure.args --mandir=${prefix}/share/man \ |
---|
37 | --infodir=${prefix}/share/info \ |
---|
38 | --target=${crossgdb-target} \ |
---|
39 | --enable-interwork \ |
---|
40 | --enable-multilib |
---|
41 | |
---|
42 | build.dir ${workpath}/build |
---|
43 | |
---|
44 | post-patch { |
---|
45 | namespace eval crossgdb {} |
---|
46 | |
---|
47 | # Fix the info pages and related stuff. |
---|
48 | # |
---|
49 | # path: path to the doc directory (e.g. gas/doc/) |
---|
50 | # makefile: path to Makefile.in (e.g. gas/doc/Makefile.in) |
---|
51 | # name: name of the info page (e.g. as) |
---|
52 | # suffix: suffix of the souce page (texinfo or texi) |
---|
53 | proc crossgdb::fixinfo { path makefile name suffix } { |
---|
54 | global crossgdb-target worksrcpath |
---|
55 | |
---|
56 | # Fix the source |
---|
57 | reinplace "s|setfilename ${name}.info|setfilename ${crossgdb-target}-${name}.info|g" \ |
---|
58 | ${worksrcpath}/${path}/${name}.${suffix} |
---|
59 | reinplace "s|(${name})|(${crossgdb-target}-${name})|g" \ |
---|
60 | ${worksrcpath}/${path}/${name}.${suffix} |
---|
61 | reinplace "s|@file{${name}}|@file{${crossgdb-target}-${name}}|g" \ |
---|
62 | ${worksrcpath}/${path}/${name}.${suffix} |
---|
63 | |
---|
64 | # Fix the Makefile |
---|
65 | reinplace "s| ${name}.info| ${crossgdb-target}-${name}.info|g" \ |
---|
66 | ${worksrcpath}/${makefile} |
---|
67 | reinplace "s|/${name}.info|/${crossgdb-target}-${name}.info|g" \ |
---|
68 | ${worksrcpath}/${makefile} |
---|
69 | reinplace "s|^${name}.info|${crossgdb-target}-${name}.info|g" \ |
---|
70 | ${worksrcpath}/${makefile} |
---|
71 | reinplace "s| ${name}.pod| ${crossgdb-target}-${name}.pod|g" \ |
---|
72 | ${worksrcpath}/${makefile} |
---|
73 | reinplace "s|/${name}.pod|/${crossgdb-target}-${name}.pod|g" \ |
---|
74 | ${worksrcpath}/${makefile} |
---|
75 | reinplace "s|^${name}.pod|${crossgdb-target}-${name}.pod|g" \ |
---|
76 | ${worksrcpath}/${makefile} |
---|
77 | reinplace "s| ${name}.${suffix}| ${crossgdb-target}-${name}.${suffix}|g" \ |
---|
78 | ${worksrcpath}/${makefile} |
---|
79 | reinplace "s|/${name}.${suffix}|/${crossgdb-target}-${name}.${suffix}|g" \ |
---|
80 | ${worksrcpath}/${makefile} |
---|
81 | reinplace "s|^${name}.${suffix}|${crossgdb-target}-${name}.${suffix}|g" \ |
---|
82 | ${worksrcpath}/${makefile} |
---|
83 | |
---|
84 | # Rename the source |
---|
85 | file rename ${worksrcpath}/${path}/${name}.${suffix} \ |
---|
86 | ${worksrcpath}/${path}/${crossgdb-target}-${name}.${suffix} |
---|
87 | |
---|
88 | # Fix install-info's dir. |
---|
89 | # (note: this may be effectless if there was no info dir to be fixed) |
---|
90 | reinplace "s|--info-dir=\$(DESTDIR)\$(infodir)|--dir-file=\$(DESTDIR)\$(infodir)/${crossgdb-target}-gdb-dir|g" \ |
---|
91 | "${worksrcpath}/${makefile}" |
---|
92 | } |
---|
93 | # etc/standards.info |
---|
94 | crossgdb::fixinfo etc/ etc/Makefile.in standards info |
---|
95 | |
---|
96 | } |
---|
97 | |
---|
98 | post-destroot { |
---|
99 | # Don't overwrite libiberty installed by gcc. |
---|
100 | file delete "${destroot}/${prefix}/lib/${build_arch}/libiberty.a" |
---|
101 | } |
---|