source: trunk/dports/cross/arm-none-eabi-gdb/Portfile

Last change on this file was 135529, checked in by cal@…, 2 years ago

arm-non-eabi-gdb: update to 7.9, closes #45806

  • 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 135529 2015-04-25 17:18:55Z ryandesign@macports.org $
3
4PortSystem      1.0
5
6name            arm-none-eabi-gdb
7version         7.9
8categories      cross devel
9platforms       darwin
10license         GPL-3+
11maintainers     gmail.com:stuartwesterman openmaintainer
12description     GDB: The GNU Project Debugger for arm-none-eabi
13
14long_description \
15GDB, the GNU Project Debugger, for arm-none-eabi cross development.
16
17homepage        http://www.gnu.org/software/gdb/
18master_sites    gnu:gdb
19distname        gdb-${version}
20dist_subdir     gdb
21use_xz          yes
22
23checksums       rmd160  abdaaf9e8b05774e3a3b571f8326484dfda6c867 \
24                sha256  9b315651a16528f7af8c7d8284699fb0c965df316cc7339bb0b7bae335848392
25
26set crossgdb-target     arm-none-eabi
27
28if {${configure.build_arch} eq "ppc" || ${configure.build_arch} eq "ppc64"} {
29    notes "${name} does not support building on ${configure.build_arch}."
30    pre-fetch {
31        ui_error "${name} does not support building on ${configure.build_arch}."
32        return -code error "Unsupported architecture."
33    }
34}
35
36depends_build   port:${crossgdb-target}-gcc \
37                port:gettext
38
39post-patch {
40        namespace eval crossgdb {}
41
42        # Fix the info pages and related stuff.
43        #
44        # path: path to the doc directory (e.g. gas/doc/)
45        # makefile: path to Makefile.in (e.g. gas/doc/Makefile.in)
46        # name: name of the info page (e.g. as)
47        # suffix: suffix of the source page (texinfo or texi)
48        proc crossgdb::fixinfo { path makefile name suffix } {
49                global crossgdb-target workpath version
50
51                # Fix the source
52                reinplace "s|setfilename ${name}.info|setfilename ${crossgdb-target}-${name}.info|g" \
53                        ${workpath}/gdb-${version}/${path}/${name}.${suffix}
54                reinplace "s|(${name})|(${crossgdb-target}-${name})|g" \
55                        ${workpath}/gdb-${version}/${path}/${name}.${suffix}
56                reinplace "s|@file{${name}}|@file{${crossgdb-target}-${name}}|g" \
57                        ${workpath}/gdb-${version}/${path}/${name}.${suffix}
58
59                # Fix the Makefile
60                reinplace -E "s:^${name}\\.(info|pod|${suffix}):${crossgdb-target}-${name}.\\1:g" \
61                        ${workpath}/gdb-${version}/${makefile}
62                reinplace -E "s:(\[ /'`\])${name}\\.(info|pod|${suffix}):\\1${crossgdb-target}-${name}.\\2:g" \
63                        ${workpath}/gdb-${version}/${makefile}
64
65                # Rename the source
66                file rename ${workpath}/gdb-${version}/${path}/${name}.${suffix} \
67                        ${workpath}/gdb-${version}/${path}/${crossgdb-target}-${name}.${suffix}
68
69                reinplace "s|--info-dir=\$(DESTDIR)\$(infodir)|--dir-file=\$(DESTDIR)\$(infodir)/${crossgdb-target}-gdb-dir|g" \
70                        ${workpath}/gdb-${version}/${makefile}
71        }
72
73        crossgdb::fixinfo bfd/doc/ bfd/doc/Makefile.in bfd texinfo
74        crossgdb::fixinfo gdb/doc/ gdb/doc/Makefile.in annotate texinfo
75        crossgdb::fixinfo gdb/doc/ gdb/doc/Makefile.in gdb texinfo
76        crossgdb::fixinfo gdb/doc/ gdb/doc/Makefile.in stabs texinfo
77}
78
79configure.args  --target=${crossgdb-target} \
80                --infodir=${prefix}/share/info \
81                --mandir=${prefix}/share/man \
82                --with-docdir=${prefix}/share/doc \
83                --with-gdb-datadir=${prefix}/share/${name} \
84                --disable-nls \
85                --enable-multilib
86
87# specific to ARM
88configure.args-append \
89                --enable-interwork
90
91post-destroot {
92        # (host) libiberty
93        file delete "${destroot}${prefix}/lib/${build_arch}/libiberty.a"
94
95        # avoid conflicts with arm-none-eabi-binutils port
96        file delete ${destroot}${prefix}/share/info/arm-none-eabi-bfd.info
97}
98
99livecheck.type  regex
100livecheck.url   http://ftp.gnu.org/gnu/gdb/
101livecheck.regex gdb-(\\d+(?:\\.\\d+)+)\\.tar
Note: See TracBrowser for help on using the repository browser.