New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Changeset 81847


Ignore:
Timestamp:
08/05/11 13:17:58 (4 years ago)
Author:
raimue@…
Message:

cross/arm-none-eabi-gdb:
New port

Location:
trunk/dports/cross/arm-none-eabi-gdb
Files:
2 copied

Legend:

Unmodified
Added
Removed
  • trunk/dports/cross/arm-none-eabi-gdb/Portfile

    r81783 r81847  
    44PortSystem      1.0 
    55 
    6 name            gdb 
     6name            arm-none-eabi-gdb 
    77version         7.3 
    88categories      devel 
    9 maintainers     dweber openmaintainer 
    10 description     GDB: The GNU Project Debugger 
     9platforms       darwin 
     10license         GPL-3+ 
     11maintainers     nomaintainer 
     12description     GDB: The GNU Project Debugger for arm-none-eabi 
    1113 
    1214long_description \ 
    13 GDB, the GNU Project debugger, allows you to see what is going on 'inside' \ 
    14 another program while it executes -- or what another program was doing at the \ 
    15 moment it crashed.  GDB can do four main kinds of things (plus other things \ 
    16 in support of these) to help you catch bugs in the act: \ 
    17     a) start your program, specifying anything that might affect its behavior, \ 
    18     b) make your program stop on specified conditions, \ 
    19     c) examine what has happened, when your program has stopped, \ 
    20     d) change things in your program, so you can experiment with correcting \ 
    21        the effects of one bug and go on to learn about another. \ 
    22 The program being debugged can be written in Ada, C, C++, Objective-C, \ 
    23 Pascal (and many other languages). Those programs might be executing on \ 
    24 the same machine as GDB (native) or on another machine (remote). GDB \ 
    25 can run on most popular UNIX and Microsoft Windows variants. 
     15GDB, the GNU Project Debugger, for arm-none-eabi cross development. 
    2616 
    2717homepage        http://www.gnu.org/software/gdb/ 
    28 platforms       darwin 
    29  
    3018master_sites    gnu 
    31  
     19distname        gdb-${version} 
     20dist_subdir     gdb 
    3221use_bzip2       yes 
    3322 
     
    3524                rmd160  3df9a15e2d276f4f7f30e5d2a7d86a8c63f30a34 
    3625 
    37 depends_build   port:gettext 
    38  
     26set crossgdb-target     arm-none-eabi 
    3927 
    4028if {${configure.build_arch} == "ppc" || ${configure.build_arch} == "ppc64"} { 
     
    4634} 
    4735 
     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 etc/ etc/Makefile.in configure texi 
     75        crossgdb::fixinfo etc/ etc/Makefile.in standards texi 
     76        crossgdb::fixinfo gdb/doc/ gdb/doc/Makefile.in annotate texinfo 
     77        crossgdb::fixinfo gdb/doc/ gdb/doc/Makefile.in gdb texinfo 
     78        crossgdb::fixinfo gdb/doc/ gdb/doc/Makefile.in gdbint texinfo 
     79        crossgdb::fixinfo gdb/doc/ gdb/doc/Makefile.in stabs texinfo 
     80} 
     81 
     82configure.args  --target=${crossgdb-target} \ 
     83                --infodir=${prefix}/share/info \ 
     84                --mandir=${prefix}/share/man \ 
     85                --with-docdir=${prefix}/share/doc \ 
     86                --with-gdb-datadir=${prefix}/share/${name} \ 
     87                --disable-nls \ 
     88                --enable-multilib 
     89 
     90# specific to ARM 
    4891configure.args-append \ 
    49     --infodir=${prefix}/share/info \ 
    50     --mandir=${prefix}/share/man \ 
    51     --with-docdir=${prefix}/share/doc \ 
    52     --program-prefix=g 
    53  
    54 configure.cflags-append     -I${prefix}/include 
    55 configure.cxxflags-append   -I${prefix}/include 
     92                --enable-interwork 
    5693 
    5794post-destroot { 
    58     system "chgrp procmod ${destroot}${prefix}/bin/ggdb*" 
    59     system "chmod g+s ${destroot}${prefix}/bin/ggdb*" 
     95        # (host) libiberty 
     96        file delete "${destroot}${prefix}/lib/${build_arch}/libiberty.a" 
    6097 
    61     foreach info [glob -tails -directory ${destroot}${prefix}/share/info g*] { 
    62         move ${destroot}${prefix}/share/info/${info} ${destroot}${prefix}/share/info/g${info} 
    63     } 
    64     move ${destroot}${prefix}/share/info/standards.info ${destroot}${prefix}/share/info/ggdb-standards.info 
     98        # avoid conflicts with arm-none-eabi-binutils port 
     99        file delete ${destroot}${prefix}/share/info/arm-none-eabi-bfd.info 
     100} 
    65101 
    66     xinstall -m 755 -d ${destroot}${prefix}/libexec/gnubin 
    67     foreach binary [glob -tails -directory ${destroot}${prefix}/bin g*] { 
    68         ln -s ${prefix}/bin/${binary} ${destroot}${prefix}/libexec/gnubin/[string range $binary 1 end] 
    69     } 
    70 } 
     102livecheck.type  regex 
     103livecheck.url   http://ftp.gnu.org/gnu/gdb/ 
     104livecheck.regex gdb-(\\d+(?:\\.\\d+)+)\\.tar 
Note: See TracChangeset for help on using the changeset viewer.