Ticket #42048: apple-gcc42.diff

File apple-gcc42.diff, 2.8 KB (added by ryandesign (Ryan Carsten Schmidt), 11 years ago)

proposed patch

  • Portfile

     
    7171#+  --with-mpfr=$DEST_ROOT \
    7272#depends_lib             port:gmp port:mpfr
    7373
    74 #depends_lib             port:libiconv
    75 depends_lib             port:ld64 port:cctools
    7674depends_run             port:gcc_select
    77 depends_skip_archcheck  ld64 cctools
    7875
    7976use_configure no
    8077variant universal {}
     
    166163compiler.cpath /usr/include
    167164compiler.library_path /usr/lib
    168165
    169 # TODO: Better use of MacPorts dependencies
    170166build.env \
    171     LIBRARY_PATH="/usr/lib" \
    172     CPATH="/usr/include" \
    173167    PATH="/bin:/usr/bin:/sbin:/usr/sbin" \
    174     LANGUAGES="c,c++,objc,obj-c++" \
    175     AR_FOR_TARGET=${prefix}/bin/ar \
    176     AS_FOR_TARGET=${prefix}/bin/as \
    177     LD_FOR_TARGET=${prefix}/bin/ld \
    178     NM_FOR_TARGET=${prefix}/bin/nm \
    179     OBJDUMP_FOR_TARGET=${prefix}/bin/objdump \
    180     RANLIB_FOR_TARGET=${prefix}/bin/ranlib \
    181     STRIP_FOR_TARGET=${prefix}/bin/strip \
    182     DSYMUTIL_FOR_HOST=${prefix}/bin/dsymutil \
    183     RANLIB_FOR_HOST=${prefix}/bin/ranlib \
    184     STRIP_FOR_HOST=${prefix}/bin/strip \
    185     OTOOL=${prefix}/bin/otool \
    186     OTOOL64=${prefix}/bin/otool
     168    LANGUAGES="c,c++,objc,obj-c++"
    187169
     170if {![variant_isset bootstrap]} {
     171    #depends_lib-append              port:libiconv
     172    depends_lib-append              port:ld64 port:cctools
     173    depends_skip_archcheck-append   ld64 cctools
     174   
     175    # TODO: Better use of MacPorts dependencies
     176    build.env-append \
     177        AR_FOR_TARGET=${prefix}/bin/ar \
     178        AS_FOR_TARGET=${prefix}/bin/as \
     179        LD_FOR_TARGET=${prefix}/bin/ld \
     180        NM_FOR_TARGET=${prefix}/bin/nm \
     181        OBJDUMP_FOR_TARGET=${prefix}/bin/objdump \
     182        RANLIB_FOR_TARGET=${prefix}/bin/ranlib \
     183        STRIP_FOR_TARGET=${prefix}/bin/strip \
     184        DSYMUTIL_FOR_HOST=${prefix}/bin/dsymutil \
     185        RANLIB_FOR_HOST=${prefix}/bin/ranlib \
     186        STRIP_FOR_HOST=${prefix}/bin/strip \
     187        OTOOL=${prefix}/bin/otool \
     188        OTOOL64=${prefix}/bin/otool
     189}
     190
    188191build.args-append \
    189192    CC="${configure.cc} -pipe -std=gnu89" \
    190193    PREFIX="${prefix}" \
     
    200203
    201204# On Tiger, we need apple-gcc42 to build llvm, which is needed for cctools
    202205variant bootstrap description {Variant to break a dependency cycle on Tiger by first building an apple-gcc42 using host ld and cctools} {
    203 #    depends_lib-delete      port:libiconv
    204     depends_lib-delete      port:ld64 port:cctools
    205 
    206     build.env \
    207         LIBRARY_PATH="/usr/lib" \
    208         CPATH="/usr/include" \
    209         PATH="/bin:/usr/bin:/sbin:/usr/sbin" \
    210         LANGUAGES="c,c++,objc,obj-c++"
    211 
    212206    pre-fetch {
    213207        if {([file exists ${prefix}/bin/ld] && [file exists ${prefix}/bin/as]) || ${os.major} > 8} {
    214208            ui_error "Please install this port without the bootstrap variant."