Ticket #33107: Portfile-avrgcc.diff

File Portfile-avrgcc.diff, 4.3 KB (added by titus@…, 12 years ago)

Corrected patch for review

  • Portfile

     
    22
    33PortSystem                      1.0
    44name                    avr-gcc
    5 version                 4.0.2
    6 
    7 # Parameters for this port.
    8 set crossgcc-target avr
    9 set default-languages --enable-languages="c,c++"
    10 
    11 description             gcc cross-compilers for avr
    12 long_description        GNU compilers collection (c and c++) for avr.
    13 homepage                        http://gcc.gnu.org/
     5version                 4.6.2
    146platforms               darwin
    157categories              cross devel
    168maintainers             nomaintainer
     9license                 {GPL-3+ Permissive}
     10description             GNU cross compilers for Atmel AVR
     11long_description        GNU compilers collection (c and c++) for Atmel AVR 8bit microcontrollers..
     12homepage                http://gcc.gnu.org/
    1713master_sites            gnu:gcc/gcc-${version}/
    1814distfiles                       gcc-${version}.tar.bz2
     15use_bzip2               yes
    1916worksrcdir                      gcc-${version}
    20 checksums                       md5 a659b8388cac9db2b13e056e574ceeb0 \
    21                                         sha1 f1b714c6398393d8f7f4ad5be933b462a95b075d \
    22                                         rmd160 70c7e21820da4d29ce6e8e48329d906ee19333aa
     17checksums               md5 028115c4fbfb6cfd75d6369f4a90d87e \
     18                        sha256 60b05463dfe18d40d68fb8a71b25b408a01f86cc6ceaf5e6b22238b6b0f450c2 \
     19                        rmd160 e7041933b39629f9524848dcf81a1a4c02a225c6
     20
     21# Parameters for this port.
     22set crossgcc-target avr
     23set default-languages --enable-languages="c,c++"
    2324
    2425# All cross ports violate the mtree layout.
    2526destroot.violate_mtree  yes
     
    3132                                        bin:${crossgcc-target}-as:${crossgcc-target}-binutils \
    3233                                        bin:${crossgcc-target}-ld:${crossgcc-target}-binutils \
    3334                                        bin:${crossgcc-target}-nm:${crossgcc-target}-binutils \
    34                                         bin:${crossgcc-target}-ranlib:${crossgcc-target}-binutils
     35                        bin:${crossgcc-target}-ranlib:${crossgcc-target}-binutils \
     36                        port:gmp port:mpfr port:libiconv port:libmpc port:ppl
     37
    3538depends_build           bin:msgfmt:gettext
    3639
    37 # gcc is .bz2.
    38 use_bzip2                       yes
    3940# Since we don't build gcc and binutils at the same time, gcc's Makefile will try to transform
    4041# program names as gcc's name (add -${version} with ${version} being the version of gcc).
    4142# But it won't work because binutils binaries don't have the ${version} suffix, and even if they
     
    5354pre-configure   {
    5455        file mkdir "${workpath}/build"
    5556}
     57
     58patchfiles-append       lto-plugin-osx.diff
     59
    5660configure.dir   ${workpath}/build
    5761configure.cmd   ${workpath}/gcc-${version}/configure
    58 configure.cc    "cc -no-cpp-precomp"
     62# configure.cc           "cc -no-cpp-precomp"
    5963configure.env   ${environment}
    6064configure.args  --infodir='${prefix}/share/info' \
    6165                                --mandir='${prefix}/share/man' \
     
    6367                                --program-prefix=${crossgcc-target}- \
    6468                                --with-included-gettext \
    6569                                --enable-obsolete \
     70                        --disable-nls \
     71                        --enable-lto \
     72                        --with-plugin-ld=${crossgcc-target}-ld \
     73                        --disable-libquadmath \
    6674                                --with-gxx-include-dir=${prefix}/${crossgcc-target}/include/c++/${version}/ \
    6775                                ${default-languages}
     76
    6877if {$build_arch != "" && ${os.platform} == "darwin"} {
    6978    configure.cc_archflags
    7079    configure.cxx_archflags
     
    7887build.args              ${environment}
    7988destroot.args   ${environment}
    8089
    81 patchfiles              gcc-config-avr-avr.c.diff \
    82                                 gcc-config-avr-avr.h.diff \
    83                                 gcc-config-avr-t-avr.diff
    84 
    8590platform darwin 9 {
    8691        patchfiles-append       gcc-config-rs6000-host-darwin.c.diff
    8792}
     
    168173        # gcc/doc/gccint.texi
    169174        crossgcc::fixinfo gcc/doc/ gcc/Makefile.in gccint texi
    170175
     176        # libquadmath/libquadmath.texi
     177        crossgcc::fixinfo libquadmath libquadmath/Makefile.in libquadmath texi
     178
    171179        # gcc/f/g77.texi
    172180        crossgcc::fixinfo gcc/fortran/ gcc/fortran/Make-lang.in gfortran texi
    173181
     
    175183        crossgcc::fixinfo gcc/java/ gcc/java/Make-lang.in gcj texi
    176184
    177185        # fastjar/fastjar.texi
    178         crossgcc::fixinfo fastjar/ fastjar/Makefile.in fastjar texi
     186        #crossgcc::fixinfo fastjar/ fastjar/Makefile.in fastjar texi
    179187       
    180188        # gcc/doc/gccinstall.info
    181189        crossgcc::fixinfo gcc/doc/ gcc/Makefile.in gccinstall info
     
    220228        file delete -force "${destroot}${prefix}/share/man/man7"
    221229
    222230        # (host) libiberty
    223         file delete "${destroot}${prefix}/lib/libiberty.a"
     231        file delete "${destroot}${prefix}/lib/${build_arch}/libiberty.a"
    224232
    225233        # aliases for charsets (should already be there)
    226234        file delete "${destroot}${prefix}/lib/charset.alias"