Ignore:
Timestamp:
Jan 10, 2005, 6:31:49 PM (15 years ago)
Author:
pguyot (Paul Guyot)
Message:

Version bump to 3.4.3.
Please note that you need binutils 2.15 to get this compiled.

Location:
trunk/dports/cross/m68k-elf-gcc
Files:
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/cross/m68k-elf-gcc/Portfile

    r6122 r10310  
    1 # $Id: Portfile,v 1.1 2004/03/30 20:51:21 pguyot Exp $
     1# $Id: Portfile,v 1.2 2005/01/10 18:31:48 pguyot Exp $
    22
    33PortSystem                      1.0
    44name                    m68k-elf-gcc
    5 version                 3.3.2
    6 revision                        1
     5version                 3.4.3
    76
    87# Parameters for this port.
    9 set newlibversion       1.11.0
     8set newlibversion       1.13.0
    109set crossgcc-target m68k-elf
     10set default-languages --enable-languages="c,c++,f77,objc"
    1111
    1212description             gcc cross-compilers for m68k-elf, with newlib runtime library.
    13 long_description        gnu compilers collection (including c++, fortran and java) for \
     13long_description        gnu compilers collection (including c++, fortran and objc) for \
    1414                                        m68k-elf, with newlib runtime library.
    1515homepage                        http://gcc.gnu.org/
     
    1717categories              cross devel
    1818maintainers             pguyot@kallisys.net
    19 master_sites            gnu:gcc/gcc-${version}/:gcc \
     19master_sites            gnu:gcc/gcc-${version}/ \
    2020                                        ftp://sources.redhat.com/pub/newlib/:newlib \
    2121                                        ftp://ftp.mirror.ac.uk/sites/sources.redhat.com/pub/newlib/:newlib
    22 distfiles                       gcc-${version}.tar.gz:gcc newlib-${newlibversion}.tar.gz:newlib
     22distfiles                       gcc-${version}.tar.bz2:gcc newlib-${newlibversion}.tar.gz:newlib
    2323worksrcdir                      gcc-${version}
    24 checksums                       gcc-${version}.tar.gz md5 60ab4d3431786a81be6522cc04bc1827 \
    25                                         newlib-${newlibversion}.tar.gz md5 74de7de0c9624cd757df63f2ed17a9b4
     24checksums                       gcc-${version}.tar.bz2 md5 e744b30c834360fccac41eb7269a3011 \
     25                                        newlib-${newlibversion}.tar.gz md5 3d07cc367a22b78c44227456b0d3b7dc
    2626
    2727# Download everything to gcc/
    2828dist_subdir                     gcc
    29 
    30 # Patches for info's dir
    31 patchfiles                      patch-gcc-Makefile.in \
    32                                         patch-gcc-f-Make-lang.in \
    33                                         patch-gcc-java-Make-lang.in \
    34                                         patch-fastjar-Makefile.in
    3529
    3630depends_lib                     bin:${crossgcc-target}-ar:${crossgcc-target}-binutils \
     
    3933                                        bin:${crossgcc-target}-nm:${crossgcc-target}-binutils \
    4034                                        bin:${crossgcc-target}-ranlib:${crossgcc-target}-binutils
    41 
    42 # Link newlib to gcc, so gcc will find its include files and this will also build newlib.
     35depends_build           bin:msgfmt:gettext
     36
     37# gcc is .bz2, newlib is .gz.
     38# let's extract only gcc with DP infrastructure, we'll do newlib manually.
     39use_bzip2                       yes
     40extract.only            gcc-${version}.tar.bz2
     41
     42# Extract newlib and create a symlink of newlib/newlib in gcc directory.
    4343post-extract    {
    44         system "ln -s ${workpath}/newlib-${newlibversion}/newlib ${workpath}/gcc-${version}"
    45 }
     44        system "cd ${workpath} && gzip -dc ${distpath}/newlib-${newlibversion}.tar.gz | tar -xf -"
     45        system "ln -s ${workpath}/newlib-${newlibversion}/newlib ${workpath}/gcc-${version}/"
     46}
     47
     48# Since we don't build gcc and binutils at the same time, gcc's Makefile will try to transform
     49# program names as gcc's name (add -${version} with ${version} being the version of gcc).
     50# But it won't work because binutils binaries don't have the ${version} suffix, and even if they
     51# had, they would actually have the binutils' version suffix (and not gcc's version).
     52# So let's tell gcc's Makefile not to do that mistake.
     53
     54set environment [list AR_FOR_TARGET=${crossgcc-target}-ar \
     55                                AS_FOR_TARGET=${crossgcc-target}-as \
     56                                LD_FOR_TARGET=${crossgcc-target}-ld \
     57                                NM_FOR_TARGET=${crossgcc-target}-nm \
     58                                RANLIB_FOR_TARGET=${crossgcc-target}-ranlib]
    4659
    4760# Build in a different directory, as advised in the README file.
    48 pre-configure   { system "cd ${workpath} && mkdir -p build"}
     61pre-configure   {
     62        file mkdir "${workpath}/build"
     63}
    4964configure.dir   ${workpath}/build
    5065configure.cmd   ${workpath}/gcc-${version}/configure
    51 configure.env   CC="cc -no-cpp-precomp"
     66configure.env   CC="cc -no-cpp-precomp" \
     67                                ${environment}
    5268configure.args  --infodir='${prefix}/share/info' \
    5369                                --mandir='${prefix}/share/man' \
     
    5571                                --program-prefix=${crossgcc-target}- \
    5672                                --program-suffix=-${version} \
     73                                --with-included-gettext \
    5774                                --enable-obsolete \
    58                                 --with-gnu-as --with-gnu-ld \
    5975                                --with-newlib \
    60                                 --with-gxx-include-dir=${prefix}/${crossgcc-target}/include/c++/${version}/
     76                                --enable-multilib \
     77                                --with-gxx-include-dir=${prefix}/${crossgcc-target}/include/c++/${version}/ \
     78                                ${default-languages}
     79
    6180build.dir       ${workpath}/build
    62 destroot.args   \
    63         --with-gxx-include-dir=${destroot}/${prefix}/${crossgcc-target}/include/c++/${version}/
    64 
    65 # Since we don't build gcc and binutils at the same time, gcc's Makefile will try to transform
    66 # program names as gcc's name (add -${version} with ${version} being the version of gcc).
    67 # But it won't work because binutils binaries don't have the ${version} suffix, and even if they
    68 # had, they would actually have the binutils' version suffix (and not gcc's version).
    69 # So let's tell gcc's Makefile it not to do that.
    70 
    71 build.args              AR_FOR_TARGET=${crossgcc-target}-ar \
    72                                 AS_FOR_TARGET=${crossgcc-target}-as \
    73                                 LD_FOR_TARGET=${crossgcc-target}-ld \
    74                                 NM_FOR_TARGET=${crossgcc-target}-nm \
    75                                 RANLIB_FOR_TARGET=${crossgcc-target}-ranlib
    76 
    77 destroot.args   AR_FOR_TARGET=${crossgcc-target}-ar \
    78                                 AS_FOR_TARGET=${crossgcc-target}-as \
    79                                 LD_FOR_TARGET=${crossgcc-target}-ld \
    80                                 NM_FOR_TARGET=${crossgcc-target}-nm \
    81                                 RANLIB_FOR_TARGET=${crossgcc-target}-ranlib
    82 
    83 post-patch {
     81
     82build.args              ${environment}
     83destroot.args   ${environment}
     84
     85# Variant to include java tools.
     86# I'm not exactly sure what the interest of this variant is except to measure
     87# the speed of your Xserve G5 farm. Or your patience if you don't have such
     88# a farm.
     89variant java {
     90        configure.args-delete ${default-languages}
     91}
     92
     93patch {
    8494        namespace eval crossgcc {}
    8595
     
    102112               
    103113                # Fix the Makefile
    104                 reinplace "s|${name}.info|${crossgcc-target}-${name}.info|g" \
    105                         ${worksrcpath}/${makefile}
    106                 reinplace "s|${name}.${suffix}|${crossgcc-target}-${name}.${suffix}|g" \
     114                reinplace "s| ${name}.info| ${crossgcc-target}-${name}.info|g" \
     115                        ${worksrcpath}/${makefile}
     116                reinplace "s|/${name}.info|/${crossgcc-target}-${name}.info|g" \
     117                        ${worksrcpath}/${makefile}
     118                reinplace "s|^${name}.info|${crossgcc-target}-${name}.info|g" \
     119                        ${worksrcpath}/${makefile}
     120                reinplace "s| ${name}.pod| ${crossgcc-target}-${name}.pod|g" \
     121                        ${worksrcpath}/${makefile}
     122                reinplace "s|/${name}.pod|/${crossgcc-target}-${name}.pod|g" \
     123                        ${worksrcpath}/${makefile}
     124                reinplace "s|^${name}.pod|${crossgcc-target}-${name}.pod|g" \
     125                        ${worksrcpath}/${makefile}
     126                reinplace "s| ${name}.${suffix}| ${crossgcc-target}-${name}.${suffix}|g" \
     127                        ${worksrcpath}/${makefile}
     128                reinplace "s|/${name}.${suffix}|/${crossgcc-target}-${name}.${suffix}|g" \
     129                        ${worksrcpath}/${makefile}
     130                reinplace "s|^${name}.${suffix}|${crossgcc-target}-${name}.${suffix}|g" \
    107131                        ${worksrcpath}/${makefile}
    108132               
     
    113137                # Fix install-info's dir.
    114138                # (note: this may be effectless if there was no info dir to be fixed)
    115                 reinplace "s|__TARGET|${crossgcc-target}|g" \
     139                reinplace "s|--info-dir=\$(DESTDIR)\$(infodir)|--dir-file=\$(DESTDIR)\$(infodir)/${crossgcc-target}-gcc-dir|g" \
    116140                        "${worksrcpath}/${makefile}"
    117141        }
     
    158182        crossgcc::fixinfo fastjar/ fastjar/Makefile.in fastjar texi
    159183       
     184        # gcc/doc/gccinstall.info
     185        crossgcc::fixinfo gcc/doc/ gcc/Makefile.in gccinstall info
     186
    160187        # gettext stuff.
    161188        crossgcc::fixgettext gcc
     
    163190}
    164191
     192pre-destroot {
     193        # gcc needs the cross directory structure to be present
     194        # in order to fill it during installation.
     195        file mkdir "${destroot}/${prefix}/${crossgcc-target}/bin"
     196        file mkdir "${destroot}/${prefix}/${crossgcc-target}/lib"
     197}
     198
    165199post-destroot {
     200        namespace eval crossgcc {}
     201
     202        # Rename a man page if it exists.
     203        #
     204        # section: section of the man page (e.g. 1)
     205        # manpage: name of the man page (e.g. cpp)
     206        proc crossgcc::rename_man_page { section manpage } {
     207                global crossgcc-target destroot prefix
     208
     209                set manpage_path "${destroot}/${prefix}/share/man/man${section}/${manpage}.${section}"
     210                if { [ file exists ${manpage_path} ] } {
     211                        file rename ${manpage_path} \
     212                                "${destroot}/${prefix}/share/man/man${section}/${crossgcc-target}-${manpage}.${section}"
     213                }
     214        }
     215
    166216        # Stuff I don't want (either because they're in the system
    167217        # or because they would conflict with other FSF ports)
     
    188238        # For some reason, some man pages are not prefixed while they should have been
    189239        # (to avoid conflicting).
    190         file rename "${destroot}/${prefix}/share/man/man1/cpp.1" \
    191                 "${destroot}/${prefix}/share/man/man1/${crossgcc-target}-cpp.1"
    192         file rename "${destroot}/${prefix}/share/man/man1/gcjh.1" \
    193                 "${destroot}/${prefix}/share/man/man1/${crossgcc-target}-gcjh.1"
    194         file rename "${destroot}/${prefix}/share/man/man1/gcov.1" \
    195                 "${destroot}/${prefix}/share/man/man1/${crossgcc-target}-gcov.1"
    196         file rename "${destroot}/${prefix}/share/man/man1/jcf-dump.1" \
    197                 "${destroot}/${prefix}/share/man/man1/${crossgcc-target}-jcf-dump.1"
    198         file rename "${destroot}/${prefix}/share/man/man1/jv-scan.1" \
    199                 "${destroot}/${prefix}/share/man/man1/${crossgcc-target}-jv-scan.1"
    200 }
     240        crossgcc::rename_man_page 1 cpp
     241        crossgcc::rename_man_page 1 gcjh
     242        crossgcc::rename_man_page 1 gcov
     243        crossgcc::rename_man_page 1 jcf-dump
     244        crossgcc::rename_man_page 1 jv-scan
     245       
     246        # There is a bug in gcc/Makefile::install-driver
     247        # For cross compilers, $(GCC_INSTALL_NAME) is equal to
     248        # $(target_noncanonical)-gcc-$(version)
     249        # and hence the driver isn't installed.
     250        xinstall -c "${workpath}/build/gcc/xgcc" \
     251                "${destroot}/${prefix}/bin/${crossgcc-target}-gcc-${version}"
     252}
Note: See TracChangeset for help on using the changeset viewer.