Ticket #2920: Portfile

File Portfile, 1.6 KB (added by yves@…, 19 years ago)

New Portfile that works

Line 
1# $Id: Portfile,v 1.2 2005/04/08 06:02:08 mww Exp $
2
3PortSystem 1.0
4
5name                    gcc40
6version                 4.0-20050402
7revision                1
8platforms               darwin
9categories              lang
10maintainers             mww@opendarwin.org
11description             The GNU compiler collection, beta version
12long_description        ${description}
13
14homepage                http://gcc.gnu.org/
15master_sites    ftp://ftp.gwdg.de/pub/linux/gcc/snapshots/${version} \
16                                ftp://ftp.nluug.nl/mirror/languages/gcc/snapshots/${version} \
17                                http://mirrors.rcn.net/pub/sourceware/gcc/snapshots/${version}
18
19distname                gcc-${version}
20checksums               md5 638325368cd4e7a37dae40bb4eeee902
21use_bzip2               yes
22
23depends_lib             lib:libgmp.3:gmp
24
25set major               4.0
26
27worksrcdir              build
28
29pre-configure {
30        file mkdir ${worksrcpath}
31}
32
33configure.cmd   ${workpath}/gcc-${version}/configure
34configure.args  --enable-languages=c,objc \
35                                --libdir=${prefix}/lib/gcc-${major} \
36                                --infodir=${prefix}/share/info \
37                                --mandir=${prefix}/share/man \
38                                --with-system-zlib \
39                                --disable-nls \
40                                --with-gmp=${prefix} \
41                                --with-local-prefix=${prefix} \
42                                --program-suffix=-${major}
43
44build.target    bootstrap STAGE1_CFLAGS="-force_cpusubtype_ALL"
45
46post-destroot {
47        cd ${destroot}${prefix}
48        file delete -force share/man/man7
49        file delete -force share/info
50}
51
52variant puredarwin {
53        depends_build   bin:odas:odcctools
54        patch {
55                system "perl -pi -e 's,/usr/bin/libtool,${prefix}/bin/odlibtool,;' ${workpath}/gcc-${version}/gcc/config/darwin.h"
56        }
57        post-patch {
58                if { ! [ file exists /usr/lib/libmx.dylib ] } {
59                        file link -symbolic /usr/lib/libmx.dylib /usr/lib/libSystem.B.dylib
60                }
61        }
62        configure.args-append   --with-as=${prefix}/bin/odas \
63                                                        --with-ld=${prefix}/bin/odld
64}