Ignore:
Timestamp:
Mar 13, 2012, 6:42:08 PM (8 years ago)
Author:
g5pw@…
Message:

Changes to the crossgcc portgroup:

  • info and man directories (mainly GNU propaganda) removed _if present_.
  • enable NLS, I think it should be on by default
  • enable parallel building
  • build and configure in the right directory.
  • quite dirty fix to eliminate default CPATH, which, if present, gives a build error if unwind.h is present in /opt/local/include.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/_resources/port1.0/group/crossgcc-1.0.tcl

    r82038 r90720  
    6767        set dobjc       gcc-objc-${version}.tar.bz2
    6868       
    69         master_sites    gnu:gcc/gcc-${version}/:gcc
     69        master_sites    gnu:gcc/gcc-${version}/:gcc \
     70                                                ftp://ftp.gnu.org/pub/gnu/gcc/gcc-${version}
     71
    7072        distfiles       ${dcore}:gcc \
    7173                        ${dcxx}:gcc \
    7274                        ${dobjc}:gcc
    73         dist_subdir     gcc
    74         use_bzip2 yes
    75         worksrcdir      build
     75        use_bzip2               yes
     76               
     77        worksrcdir      gcc-${version}
    7678
    7779        depends_lib     port:${crossgcc.target}-binutils \
     
    8082                        port:libiconv \
    8183                        port:libmpc
    82 
    83         extract.only    ${dcore} ${dcxx} ${dobjc}
     84                                               
     85        depends_build   port:gettext
     86
     87        # I don't know why is this here, it looks redundant.
     88        # macports should already extract all the distfiles!
     89        #extract.only    ${dcore} ${dcxx} ${dobjc}
     90
     91       
     92        # Build in a different directory, as advised in the README file.
     93        post-extract {
     94            file mkdir "${workpath}/build"
     95        }
    8496
    8597        post-patch {
     
    90102                # name: name of the info page (e.g. as)
    91103                # suffix: suffix of the source page (texinfo or texi)
    92            
    93104                # path makefile name suffix
    94105                set infopages {
     
    98109                    gcc/doc/ gcc/Makefile.in gccint texi
    99110                    gcc/doc/ gcc/Makefile.in gccinstall info
    100                     libquadmath libquadmath/Makefile.in libquadmath info
     111                    libquadmath libquadmath/Makefile.in libquadmath info
    101112                }
    102113           
    103114                foreach { path makefile name suffix } $infopages {
    104                     set src      ${workpath}/gcc-${version}/${path}/${name}.${suffix}
    105                     set makefile ${workpath}/gcc-${version}/${makefile}
     115                    set src      ${worksrcpath}/${path}/${name}.${suffix}
     116                    set makefile ${worksrcpath}/${makefile}
     117                    # If the makefile doesn't exists, skip it.
     118                    if { ! [file exists ${makefile}] } {continue}
    106119
    107120                    # Fix the source
     
    111124
    112125                    # Rename the source
    113                     file rename ${workpath}/gcc-${version}/${path}/${name}.${suffix} \
    114                                 ${workpath}/gcc-${version}/${path}/${crossgcc.target}-${name}.${suffix}
     126                    file rename ${worksrcpath}/${path}/${name}.${suffix} \
     127                                ${worksrcpath}/${path}/${crossgcc.target}-${name}.${suffix}
    115128
    116129                    # Fix the Makefile
     
    123136
    124137                # Do not install libiberty
    125                 reinplace {/^install:/s/ .*//} ${workpath}/gcc-${version}/libiberty/Makefile.in
     138                reinplace {/^install:/s/ .*//} ${worksrcpath}/libiberty/Makefile.in
    126139        }
    127140
     
    132145        configure.ld_archflags
    133146
    134         pre-configure   {
    135             file mkdir ${worksrcpath}
    136         }
    137 
    138         configure.cmd   ../gcc-${version}/configure
     147        # We don't need system includes(this prevents xgcc to include system-wide
     148        # unwind.h if it is present)!
     149        compiler.cpath
     150       
     151        configure.dir   ${workpath}/build
     152        configure.cmd   ${worksrcpath}/configure
    139153        configure.args  --target=${crossgcc.target} \
    140154                        --enable-languages="c,objc,c++,obj-c++" \
     
    143157                        --datarootdir=${prefix}/share/${name} \
    144158                        --with-system-zlib \
    145                         --disable-nls \
    146159                        --with-gmp=${prefix} \
    147160                        --with-mpfr=${prefix} \
     
    166179        universal_variant no
    167180
     181        #GCC suports parallel building
     182        use_parallel_build yes
     183        build.dir               ${workpath}/build
     184
    168185        destroot.violate_mtree yes
    169186
Note: See TracChangeset for help on using the changeset viewer.