Ticket #13190: Portfile.patch

File Portfile.patch, 2.3 KB (added by takeshi@…, 17 years ago)
  • Portfile

    old new  
    33PortSystem 1.0
    44name            g95
    55version         0.90
    6 revision        1
     6revision        2
    77platforms       darwin
    88categories      lang
    99maintainers     takeshi@mac.com
     
    3434
    3535pre-configure {
    3636    file mkdir ${workpath}/gcc-${version_gcc}/${name}
    37     reinplace "s|/usr/bin/libtool|${prefix}/bin/odlibtool|" ${workpath}/gcc-${version_gcc}/gcc/config/darwin.h
    38     system "unset CPPFLAGS; unset LDFLAGS; \
    39            cd ${workpath}/gcc-${version_gcc}/${name}; \
    40            ../configure --prefix=${prefix}/${gcclib} --enable-languages=c --with-as=${prefix}/bin/odas --with-ld=${prefix}/bin/odld --with-nm=${prefix}/bin/odnm --with-included-gettext; \
    41            make"
     37    if {[variant_isset darwin_9]} {
     38        reinplace "s|i686|i386|" ${workpath}/gcc-${version_gcc}/gcc/config/i386/darwin.h
     39        reinplace "s|tjmp %%edx|tjmp *%%edx|" ${workpath}/gcc-${version_gcc}/gcc/config/i386/i386.c
     40        set gcc_configargs "--with-as=/usr/bin/as --with-ld=/usr/bin/ld --with-nm=/usr/bin/nm"
     41                } else {
     42        reinplace "s|/usr/bin/libtool|${prefix}/bin/odlibtool|" ${workpath}/gcc-${version_gcc}/gcc/config/darwin.h
     43        set gcc_configargs "--with-as=${prefix}/bin/odas --with-ld=${prefix}/bin/odld --with-nm=${prefix}/bin/odnm"
     44          }
     45    system "unset CPPFLAGS; unset LDFLAGS; \
     46            cd ${workpath}/gcc-${version_gcc}/${name}; \
     47            ../configure --prefix=${prefix}/${gcclib} \
     48            --enable-languages=c ${gcc_configargs} --with-included-gettext \
     49            --with-gmp=${prefix} --with-mpfr=${prefix}; \
     50            make"
    4251}
    4352
    44 configure.cppflags      ""
    45 configure.ldflags       ""
     53#configure.cppflags     ""
     54#configure.ldflags      ""
    4655configure.args  --with-gcc-dir=${workpath}/gcc-${version_gcc}
    4756
    4857post-build {
     
    7281    system "ln -sf ${prefix}/${gcclib}/libgcc_s.1.0.dylib ${destroot}${prefix}/${gcclib}/lib/libgcc_s.1.0.dylib"
    7382    system "ln -sf ${prefix}/${gcclib}/libgcc_s.1.0.dylib ${destroot}${prefix}/${gcclib}/lib/libgcc_s.dylib"
    7483}
     84
     85platform darwin 9 {
     86    patchfiles-append patch-host-darwin.c patch-darwin-fallback.c
     87    depends_lib-delete port:odcctools
     88}