Ticket #10243: Portfile

File Portfile, 2.7 KB (added by aknapp@…, 18 years ago)

gcc42 Portfile

Line 
1# $Id: Portfile,v 1.10 2006/05/30 16:34:07 mww Exp $
2
3PortSystem 1.0
4
5name                    gcc42
6version                 4.2-20060729
7revision                1
8platforms               darwin
9categories              lang
10maintainers             mww@opendarwin.org
11description             The GNU compiler collection, prerelease BETA
12long_description        The GNU compiler collection, including front ends for C, \
13                                C++, Objective-C, Objective-C++, Java and Fortran95, \
14                                prerelease BETA version.
15
16homepage                http://gcc.gnu.org/
17master_sites    ftp://ftp.funet.fi/pub/mirrors/sources.redhat.com/pub/gcc/snapshots/${version}/ \
18                                ftp://ftp.gwdg.de/pub/linux/gcc/snapshots/${version}/ \
19                                ftp://gcc.gnu.org/pub/gcc/snapshots/${version}/
20
21set dcore               gcc-core-${version}.tar.bz2
22set dfort               gcc-fortran-${version}.tar.bz2
23set dcxx                gcc-g++-${version}.tar.bz2
24set djava               gcc-java-${version}.tar.bz2
25set dobjc               gcc-objc-${version}.tar.bz2
26distfiles               ${dcore} ${dfort} ${dcxx} ${djava} ${dobjc}
27
28checksums               ${dcore} sha1 be3b0632283b1c117f7a20964aa462184c35b19d \
29                                ${dfort} sha1 df25b05af2da2fd0ea7e0d59f2fbb5816640f463 \
30                                ${dcxx} sha1 dfce7384ec5941b625f3e5238b8b26e1aac6b6a7 \
31                                ${djava} sha1 3801bb518b19b4109d0ee9db638e87f7bee659b5 \
32                                ${dobjc} sha1 cb3677708f8a86bebb29712c932eedcc534f4ccf
33
34use_bzip2               yes
35
36depends_lib             port:gmp port:mpfr port:libiconv port:odcctools
37
38set major               4.2
39
40worksrcdir              build
41
42patch {
43        reinplace "s|/usr/bin/libtool|${prefix}/bin/odlibtool|g" \
44                ${workpath}/gcc-${version}/gcc/config/darwin.h
45}
46
47pre-configure {
48        file mkdir ${worksrcpath}
49}
50
51configure.cmd   ../gcc-${version}/configure
52configure.args  --enable-languages=c,c++,java,objc,obj-c++,fortran \
53                                --libdir=${prefix}/lib/${name} \
54                                --includedir=${prefix}/include/${name} \
55                                --infodir=${prefix}/share/info \
56                                --mandir=${prefix}/share/man \
57                                --with-local-prefix=${prefix} \
58                                --with-system-zlib \
59                                --disable-nls \
60                                --program-suffix=-dp-${major} \
61                                --with-gxx-include-dir=${prefix}/include/${name}/c++/ \
62                                --with-gmp=${prefix} \
63                                --with-mpfr=${prefix} \
64                                --with-as=${prefix}/bin/odas \
65                                --with-ld=${prefix}/bin/odld \
66                                --with-ar=${prefix}/bin/odar
67
68build.target    bootstrap
69build.args              -j 2
70
71post-destroot {
72        file delete -force ${destroot}${prefix}/share/man/man7 \
73                ${destroot}${prefix}/share/info
74}
75
76#platform darwin 7 {
77#       configure.env   CFLAGS=-force_cpusubtype_ALL \
78#                                       BOOT_CFLAGS="-g -O2 -force_cpusubtype_ALL"
79#       build.args-append       XCFLAGS=-force_cpusubtype_ALL
80#}
81
82platform darwin 8 {
83        configure.env CC=/usr/bin/gcc-4.0 CPP=/usr/bin/cpp-4.0 CXX=/usr/bin/g++-4.0
84}
85
86platform powerpc {
87        configure.args-append --disable-multilib
88        post-destroot {
89                system "cd ${destroot}${prefix}/include/${name} && \
90                        cp ../../lib/${name}/gcc/*/4.2.0/include/libffi/ffitarget.h ."
91        }
92}
93