Changeset 37806


Ignore:
Timestamp:
Jun 24, 2008, 11:50:22 AM (12 years ago)
Author:
jochen@…
Message:

Provide modeline according to the guide:
http://guide.macports.org/#development.practices and fix whitespace
accordingly.

Change post-destroot in order to copy documentation (info and man
pages) to a gcc43-specific directory in order to avoid clashes with
other GCC versions installed.

Closes ticket #15049.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/lang/gcc43/Portfile

    r37489 r37806  
     1# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
    12# $Id$
    23
    34PortSystem 1.0
    45
    5 name                    gcc43
    6 version                 4.3.1
    7 platforms               darwin
    8 categories              lang
    9 maintainers             mww
    10 description             The GNU compiler collection
    11 long_description        The GNU compiler collection, including front ends for \
    12                         C, C++, Objective-C, Objective-C++, Java and Fortran95.
     6name            gcc43
     7version         4.3.1
     8revision        1
     9platforms       darwin
     10categories      lang
     11maintainers     mww
     12description     The GNU compiler collection
     13long_description The GNU compiler collection, including front ends for \
     14                C, C++, Objective-C, Objective-C++, Java and Fortran95.
    1315
    14 homepage                http://gcc.gnu.org/
    15 master_sites            ftp://ftp.funet.fi/pub/mirrors/sources.redhat.com/pub/gcc/releases/gcc-${version}/ \
    16                         ftp://ftp.gwdg.de/pub/linux/gcc/releases/gcc-${version}/ \
    17                         ftp://gcc.ftp.nluug.nl/mirror/languages/gcc/releases/gcc-${version}/ \
    18                         ftp://gcc.gnu.org/pub/gcc/releases/gcc-${version}/ \
    19                         gnu:/gcc/gcc-${version}
     16homepage        http://gcc.gnu.org/
     17master_sites    ftp://ftp.funet.fi/pub/mirrors/sources.redhat.com/pub/gcc/releases/gcc-${version}/ \
     18                ftp://ftp.gwdg.de/pub/linux/gcc/releases/gcc-${version}/ \
     19                ftp://gcc.ftp.nluug.nl/mirror/languages/gcc/releases/gcc-${version}/ \
     20                ftp://gcc.gnu.org/pub/gcc/releases/gcc-${version}/ \
     21                gnu:/gcc/gcc-${version}
    2022
    21 set dcore               gcc-core-${version}.tar.bz2
    22 set dfort               gcc-fortran-${version}.tar.bz2
    23 set dcxx                gcc-g++-${version}.tar.bz2
    24 set djava               gcc-java-${version}.tar.bz2
    25 set dobjc               gcc-objc-${version}.tar.bz2
    26 distfiles               ${dcore} ${dfort} ${dcxx} ${djava} ${dobjc}
     23set dcore       gcc-core-${version}.tar.bz2
     24set dfort       gcc-fortran-${version}.tar.bz2
     25set dcxx        gcc-g++-${version}.tar.bz2
     26set djava       gcc-java-${version}.tar.bz2
     27set dobjc       gcc-objc-${version}.tar.bz2
     28distfiles       ${dcore} ${dfort} ${dcxx} ${djava} ${dobjc}
    2729
    28 checksums               ${dcore} sha1 2d47e33344b7978a59af04885c1d3947c3dc360e \
    29                         ${dfort} sha1 9cdd7eb07784d66bf78d687b8f50b5cc66ea4cca \
    30                         ${dcxx} sha1 3d29de4077a9deeb1de512321c7961b7b97513c5 \
    31                         ${djava} sha1 91f32153b9a6628ae920a723153011bd70515af1 \
    32                         ${dobjc} sha1 351e251040e0437ab6651f43a665d0ffdf24ee9c
     30checksums       ${dcore} sha1 2d47e33344b7978a59af04885c1d3947c3dc360e \
     31                ${dfort} sha1 9cdd7eb07784d66bf78d687b8f50b5cc66ea4cca \
     32                ${dcxx} sha1 3d29de4077a9deeb1de512321c7961b7b97513c5 \
     33                ${djava} sha1 91f32153b9a6628ae920a723153011bd70515af1 \
     34                ${dobjc} sha1 351e251040e0437ab6651f43a665d0ffdf24ee9c
    3335
    34 use_bzip2               yes
     36use_bzip2       yes
    3537
    36 depends_lib             port:gmp port:mpfr port:libiconv
     38depends_lib     port:gmp port:mpfr port:libiconv
    3739
    38 set major               4.3
     40set major       4.3
    3941
    40 worksrcdir              build
     42worksrcdir      build
    4143
    4244pre-configure {
    43         file mkdir ${worksrcpath}
     45    file mkdir ${worksrcpath}
    4446}
    4547
    46 configure.cmd   ../gcc-${version}/configure
    47 configure.args  --enable-languages=c,c++,objc,obj-c++,java,fortran \
    48                 --libdir=${prefix}/lib/${name} \
    49                 --includedir=${prefix}/include/${name} \
    50                 --infodir=${prefix}/share/info \
    51                 --mandir=${prefix}/share/man \
    52                 --with-local-prefix=${prefix} \
    53                 --with-system-zlib \
    54                 --disable-nls \
    55                 --program-suffix=-mp-${major} \
    56                 --with-gxx-include-dir=${prefix}/include/${name}/c++/ \
    57                 --with-gmp=${prefix} \
    58                 --with-mpfr=${prefix}
     48configure.cmd   ../gcc-${version}/configure
     49configure.args  --enable-languages=c,c++,objc,obj-c++,java,fortran \
     50        --libdir=${prefix}/lib/${name} \
     51        --includedir=${prefix}/include/${name} \
     52        --infodir=${prefix}/share/info \
     53        --mandir=${prefix}/share/man \
     54        --with-local-prefix=${prefix} \
     55        --with-system-zlib \
     56        --disable-nls \
     57        --program-suffix=-mp-${major} \
     58        --with-gxx-include-dir=${prefix}/include/${name}/c++/ \
     59        --with-gmp=${prefix} \
     60        --with-mpfr=${prefix}
    5961# do NOT use MacPorts binutils -- they do not work
    6062configure.env-append    AR_FOR_TARGET=/usr/bin/ar \
    61                         AS_FOR_TARGET=/usr/bin/as \
    62                         LD_FOR_TARGET=/usr/bin/ld \
    63                         NM_FOR_TARGET=/usr/bin/nm \
    64                         OBJDUMP_FOR_TARGET=/usr/bin/objdump \
    65                         RANLIB_FOR_TARGET=/usr/bin/ranlib \
    66                         STRIP_FOR_TARGET=/usr/bin/strip
     63            AS_FOR_TARGET=/usr/bin/as \
     64            LD_FOR_TARGET=/usr/bin/ld \
     65            NM_FOR_TARGET=/usr/bin/nm \
     66            OBJDUMP_FOR_TARGET=/usr/bin/objdump \
     67            RANLIB_FOR_TARGET=/usr/bin/ranlib \
     68            STRIP_FOR_TARGET=/usr/bin/strip
    6769
    68 use_parallel_build      yes
     70use_parallel_build  yes
    6971
    70 destroot.target install install-info-host
     72destroot.target install install-info-host
    7173# install-info # errors on objc-info files
    7274
    7375post-destroot {
    74         file delete -force ${destroot}${prefix}/share/man/man7 \
    75                 ${destroot}${prefix}/share/info
    76         # install/copy ffitarget.h only if we have it
    77         if {![catch {set ffitarget.h [glob ${destroot}${prefix}/lib/${name}/gcc/*/${version}/include/ffitarget.h]} result]} {
    78                 file copy ${ffitarget.h} ${destroot}${prefix}/include/${name}/
    79         }
    80 
    81         # install select file for gcc_select
    82         xinstall -m 755 -d ${destroot}${prefix}/etc/select/gcc
    83         xinstall -m 444 ${filespath}/mp-gcc43 ${destroot}${prefix}/etc/select/gcc/
     76    # move manuals to gcc43-specific directory
     77    xinstall -m 755 -d ${destroot}${prefix}/share/gcc43/man/man7
     78    xinstall -m 755 -d ${destroot}${prefix}/share/gcc43/info
     79    eval xinstall -m 0644 [glob ${destroot}${prefix}/share/man/man7/*]  ${destroot}${prefix}/share/gcc43/man/man7
     80    eval xinstall -m 0644 [glob ${destroot}${prefix}/share/info/*] ${destroot}${prefix}/share/gcc43/info
     81    # install/copy ffitarget.h only if we have it
     82    if {![catch {set ffitarget.h [glob ${destroot}${prefix}/lib/${name}/gcc/*/${version}/include/ffitarget.h]} result]} {
     83        file copy ${ffitarget.h} ${destroot}${prefix}/include/${name}/
     84    }
     85    # install select file for gcc_select
     86    xinstall -m 755 -d ${destroot}${prefix}/etc/select/gcc
     87    xinstall -m 444 ${filespath}/mp-gcc43 ${destroot}${prefix}/etc/select/gcc/
    8488}
    8589
    8690#platform darwin 7 {
    87 #       configure.cflags-append -force_cpusubtype_ALL
    88 #       confgiure.env   BOOT_CFLAGS="-g -O2 -force_cpusubtype_ALL"
    89 #       build.args-append       XCFLAGS=-force_cpusubtype_ALL
     91#   configure.cflags-append -force_cpusubtype_ALL
     92#   configure.env           BOOT_CFLAGS="-g -O2 -force_cpusubtype_ALL"
     93#   build.args-append   XCFLAGS=-force_cpusubtype_ALL
    9094#}
    9195
    9296platform powerpc {
    93         configure.args-append --disable-multilib
     97    configure.args-append --disable-multilib
    9498}
    9599
    96100# Java support does not compile on 10.4
    97101platform darwin 8 {
    98         configure.args-delete --enable-languages=c,c++,objc,obj-c++,java,fortran
    99         configure.args-append   --enable-languages=c,c++,objc,obj-c++,fortran
     102    configure.args-delete  --enable-languages=c,c++,objc,obj-c++,java,fortran
     103    configure.args-append   --enable-languages=c,c++,objc,obj-c++,fortran
    100104}
    101105# odcctools currently do not compile for x64 - move to variant for the time being
    102106#variant odcctools \
    103 #       description "Use the odcctools instead of the system provided ones - does not work for x64 currently!" {
    104 #       depends_lib-append      port:odcctools
    105 #       patch {
    106 #               reinplace "s|/usr/bin/libtool|${prefix}/bin/odlibtool|g" \
    107 #                       ${workpath}/gcc-${version}/gcc/config/darwin.h
    108 #       }
    109 #       configure.args-append   --with-as=${prefix}/bin/odas \
    110 #                               --with-ld=${prefix}/bin/odld \
    111 #                               --with-ar=${prefix}/bin/odar
     107#   description "Use the odcctools instead of the system provided ones - does not work for x64 currently!" {
     108#   depends_lib-append  port:odcctools
     109#   patch {
     110#       reinplace "s|/usr/bin/libtool|${prefix}/bin/odlibtool|g" \
     111#           ${workpath}/gcc-${version}/gcc/config/darwin.h
     112#   }
     113#   configure.args-append   --with-as=${prefix}/bin/odas \
     114#               --with-ld=${prefix}/bin/odld \
     115#               --with-ar=${prefix}/bin/odar
    112116#}
    113117
    114 livecheck.check regex
    115 livecheck.url   http://gcc.gnu.org/gcc-4.3/
    116 livecheck.regex GCC (4\\.3\\.\[0-9\])
     118livecheck.check regex
     119livecheck.url   http://gcc.gnu.org/gcc-4.3/
     120livecheck.regex GCC (4\\.3\\.\[0-9\])
    117121
Note: See TracChangeset for help on using the changeset viewer.