Skip to content
Permalink
Browse files

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 https://trac.macports.org/ticket/15049.

git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@37806 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
Jochen Küpper
Jochen Küpper committed Jun 24, 2008
1 parent 1b4f219 commit 581c43183bac781dcf04ae48d6e71be6d081c789
Showing with 83 additions and 79 deletions.
  1. +83 −79 lang/gcc43/Portfile
@@ -1,117 +1,121 @@
# -*- 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
# $Id$

PortSystem 1.0

name gcc43
version 4.3.1
platforms darwin
categories lang
maintainers mww
description The GNU compiler collection
long_description The GNU compiler collection, including front ends for \
C, C++, Objective-C, Objective-C++, Java and Fortran95.
name gcc43
version 4.3.1
revision 1
platforms darwin
categories lang
maintainers mww
description The GNU compiler collection
long_description The GNU compiler collection, including front ends for \
C, C++, Objective-C, Objective-C++, Java and Fortran95.

homepage http://gcc.gnu.org/
master_sites ftp://ftp.funet.fi/pub/mirrors/sources.redhat.com/pub/gcc/releases/gcc-${version}/ \
ftp://ftp.gwdg.de/pub/linux/gcc/releases/gcc-${version}/ \
ftp://gcc.ftp.nluug.nl/mirror/languages/gcc/releases/gcc-${version}/ \
ftp://gcc.gnu.org/pub/gcc/releases/gcc-${version}/ \
gnu:/gcc/gcc-${version}
homepage http://gcc.gnu.org/
master_sites ftp://ftp.funet.fi/pub/mirrors/sources.redhat.com/pub/gcc/releases/gcc-${version}/ \
ftp://ftp.gwdg.de/pub/linux/gcc/releases/gcc-${version}/ \
ftp://gcc.ftp.nluug.nl/mirror/languages/gcc/releases/gcc-${version}/ \
ftp://gcc.gnu.org/pub/gcc/releases/gcc-${version}/ \
gnu:/gcc/gcc-${version}

set dcore gcc-core-${version}.tar.bz2
set dfort gcc-fortran-${version}.tar.bz2
set dcxx gcc-g++-${version}.tar.bz2
set djava gcc-java-${version}.tar.bz2
set dobjc gcc-objc-${version}.tar.bz2
distfiles ${dcore} ${dfort} ${dcxx} ${djava} ${dobjc}
set dcore gcc-core-${version}.tar.bz2
set dfort gcc-fortran-${version}.tar.bz2
set dcxx gcc-g++-${version}.tar.bz2
set djava gcc-java-${version}.tar.bz2
set dobjc gcc-objc-${version}.tar.bz2
distfiles ${dcore} ${dfort} ${dcxx} ${djava} ${dobjc}

checksums ${dcore} sha1 2d47e33344b7978a59af04885c1d3947c3dc360e \
${dfort} sha1 9cdd7eb07784d66bf78d687b8f50b5cc66ea4cca \
${dcxx} sha1 3d29de4077a9deeb1de512321c7961b7b97513c5 \
${djava} sha1 91f32153b9a6628ae920a723153011bd70515af1 \
${dobjc} sha1 351e251040e0437ab6651f43a665d0ffdf24ee9c
checksums ${dcore} sha1 2d47e33344b7978a59af04885c1d3947c3dc360e \
${dfort} sha1 9cdd7eb07784d66bf78d687b8f50b5cc66ea4cca \
${dcxx} sha1 3d29de4077a9deeb1de512321c7961b7b97513c5 \
${djava} sha1 91f32153b9a6628ae920a723153011bd70515af1 \
${dobjc} sha1 351e251040e0437ab6651f43a665d0ffdf24ee9c

use_bzip2 yes
use_bzip2 yes

depends_lib port:gmp port:mpfr port:libiconv
depends_lib port:gmp port:mpfr port:libiconv

set major 4.3
set major 4.3

worksrcdir build
worksrcdir build

pre-configure {
file mkdir ${worksrcpath}
file mkdir ${worksrcpath}
}

configure.cmd ../gcc-${version}/configure
configure.args --enable-languages=c,c++,objc,obj-c++,java,fortran \
--libdir=${prefix}/lib/${name} \
--includedir=${prefix}/include/${name} \
--infodir=${prefix}/share/info \
--mandir=${prefix}/share/man \
--with-local-prefix=${prefix} \
--with-system-zlib \
--disable-nls \
--program-suffix=-mp-${major} \
--with-gxx-include-dir=${prefix}/include/${name}/c++/ \
--with-gmp=${prefix} \
--with-mpfr=${prefix}
configure.cmd ../gcc-${version}/configure
configure.args --enable-languages=c,c++,objc,obj-c++,java,fortran \
--libdir=${prefix}/lib/${name} \
--includedir=${prefix}/include/${name} \
--infodir=${prefix}/share/info \
--mandir=${prefix}/share/man \
--with-local-prefix=${prefix} \
--with-system-zlib \
--disable-nls \
--program-suffix=-mp-${major} \
--with-gxx-include-dir=${prefix}/include/${name}/c++/ \
--with-gmp=${prefix} \
--with-mpfr=${prefix}
# do NOT use MacPorts binutils -- they do not work
configure.env-append AR_FOR_TARGET=/usr/bin/ar \
AS_FOR_TARGET=/usr/bin/as \
LD_FOR_TARGET=/usr/bin/ld \
NM_FOR_TARGET=/usr/bin/nm \
OBJDUMP_FOR_TARGET=/usr/bin/objdump \
RANLIB_FOR_TARGET=/usr/bin/ranlib \
STRIP_FOR_TARGET=/usr/bin/strip
AS_FOR_TARGET=/usr/bin/as \
LD_FOR_TARGET=/usr/bin/ld \
NM_FOR_TARGET=/usr/bin/nm \
OBJDUMP_FOR_TARGET=/usr/bin/objdump \
RANLIB_FOR_TARGET=/usr/bin/ranlib \
STRIP_FOR_TARGET=/usr/bin/strip

use_parallel_build yes
use_parallel_build yes

destroot.target install install-info-host
destroot.target install install-info-host
# install-info # errors on objc-info files

post-destroot {
file delete -force ${destroot}${prefix}/share/man/man7 \
${destroot}${prefix}/share/info
# install/copy ffitarget.h only if we have it
if {![catch {set ffitarget.h [glob ${destroot}${prefix}/lib/${name}/gcc/*/${version}/include/ffitarget.h]} result]} {
file copy ${ffitarget.h} ${destroot}${prefix}/include/${name}/
}

# install select file for gcc_select
xinstall -m 755 -d ${destroot}${prefix}/etc/select/gcc
xinstall -m 444 ${filespath}/mp-gcc43 ${destroot}${prefix}/etc/select/gcc/
# move manuals to gcc43-specific directory
xinstall -m 755 -d ${destroot}${prefix}/share/gcc43/man/man7
xinstall -m 755 -d ${destroot}${prefix}/share/gcc43/info
eval xinstall -m 0644 [glob ${destroot}${prefix}/share/man/man7/*] ${destroot}${prefix}/share/gcc43/man/man7
eval xinstall -m 0644 [glob ${destroot}${prefix}/share/info/*] ${destroot}${prefix}/share/gcc43/info
# install/copy ffitarget.h only if we have it
if {![catch {set ffitarget.h [glob ${destroot}${prefix}/lib/${name}/gcc/*/${version}/include/ffitarget.h]} result]} {
file copy ${ffitarget.h} ${destroot}${prefix}/include/${name}/
}
# install select file for gcc_select
xinstall -m 755 -d ${destroot}${prefix}/etc/select/gcc
xinstall -m 444 ${filespath}/mp-gcc43 ${destroot}${prefix}/etc/select/gcc/
}

#platform darwin 7 {
# configure.cflags-append -force_cpusubtype_ALL
# confgiure.env BOOT_CFLAGS="-g -O2 -force_cpusubtype_ALL"
# build.args-append XCFLAGS=-force_cpusubtype_ALL
# configure.cflags-append -force_cpusubtype_ALL
# configure.env BOOT_CFLAGS="-g -O2 -force_cpusubtype_ALL"
# build.args-append XCFLAGS=-force_cpusubtype_ALL
#}

platform powerpc {
configure.args-append --disable-multilib
configure.args-append --disable-multilib
}

# Java support does not compile on 10.4
platform darwin 8 {
configure.args-delete --enable-languages=c,c++,objc,obj-c++,java,fortran
configure.args-append --enable-languages=c,c++,objc,obj-c++,fortran
configure.args-delete --enable-languages=c,c++,objc,obj-c++,java,fortran
configure.args-append --enable-languages=c,c++,objc,obj-c++,fortran
}
# odcctools currently do not compile for x64 - move to variant for the time being
#variant odcctools \
# description "Use the odcctools instead of the system provided ones - does not work for x64 currently!" {
# depends_lib-append port:odcctools
# patch {
# reinplace "s|/usr/bin/libtool|${prefix}/bin/odlibtool|g" \
# ${workpath}/gcc-${version}/gcc/config/darwin.h
# }
# configure.args-append --with-as=${prefix}/bin/odas \
# --with-ld=${prefix}/bin/odld \
# --with-ar=${prefix}/bin/odar
# description "Use the odcctools instead of the system provided ones - does not work for x64 currently!" {
# depends_lib-append port:odcctools
# patch {
# reinplace "s|/usr/bin/libtool|${prefix}/bin/odlibtool|g" \
# ${workpath}/gcc-${version}/gcc/config/darwin.h
# }
# configure.args-append --with-as=${prefix}/bin/odas \
# --with-ld=${prefix}/bin/odld \
# --with-ar=${prefix}/bin/odar
#}

livecheck.check regex
livecheck.url http://gcc.gnu.org/gcc-4.3/
livecheck.regex GCC (4\\.3\\.\[0-9\])
livecheck.check regex
livecheck.url http://gcc.gnu.org/gcc-4.3/
livecheck.regex GCC (4\\.3\\.\[0-9\])

0 comments on commit 581c431

Please sign in to comment.
You can’t perform that action at this time.