Ticket #36408: mercury-11.07.2.diff

File mercury-11.07.2.diff, 15.1 KB (added by ryandesign (Ryan Carsten Schmidt), 12 years ago)

incomplete patch

  • Portfile

     
    33PortSystem 1.0
    44
    55name            mercury
    6 version         11.01
     6version             11.07.2
    77categories      lang
    88maintainers     nomaintainer
    99platforms       darwin
     
    2929
    3030distname        ${name}-compiler-${version}
    3131
    32 checksums           md5     5d7dc00ab06f87ee5ddfb8dca088be56 \
    33                     sha1    508f9fbebdf061f706a44db5c77868cb4e769066 \
    34                     rmd160  bee82b6037fa1f14f27b43d6f7d751d232941bc7
     32checksums           rmd160  5bad71e0a16289c837b8827f209d78326bdc5528 \
     33                    sha256  8afee5732d6d52343fbba8d6b9dd3f87b819673743a408a564eede17956ea659
    3534
    36 worksrcdir      ${name}-compiler-${version}
    37 
    3835depends_lib \
    3936    port:readline
    4037
    41 patchfiles \
    42     asm.patch \
    43     nolibgcc.patch
     38#patchfiles \
     39#    nolibgcc.patch
    4440
    4541post-patch {
    4642    reinplace "s:\*gcc\*:*gcc*|*clang*:" ${worksrcpath}/scripts/ml.in ${worksrcpath}/scripts/mgnuc.in
    4743}
    4844
    49 # Release notes state that gcc-4.0 generates a broken mercury compiler
    50 # llvm-gcc-4.2 fails to build
    51 if {${configure.compiler} == "gcc-4.0"} {
    52     configure.compiler gcc-4.2
    53     if {![file executable ${configure.cc}]} {
    54         depends_build-append port:apple-gcc42
    55         configure.compiler apple-gcc-4.2
    56     }
    57 } elseif {${configure.compiler} == "llvm-gcc-4.2"} {
    58     configure.compiler clang
    59 }
     45# From README.MacOS: "Mercury does NOT work with llvm-gcc."
     46# "As llvm-gcc is no longer supported as of version 3.0 of LLVM,
     47# we have no intention of ever supporting Mercury with it."
     48compiler.blacklist-append llvm-gcc-4.2
    6049
    61 # mercury doesn't honor $CFLAGS
    62 configure.cc ${configure.cc} -std=gnu89
     50# From README.MacOS: "Apple gcc 4.0 does not work with Mercury."
     51compiler.blacklist-append gcc-4.0
    6352
    64 # mercury's bootstrapping doesn't work with DESTDIR, so do it an ugly way...
    65 configure.pre_args-delete --prefix=${prefix}
    66 configure.pre_args-append --prefix=${destroot}${prefix}
    67 destroot.destdir ""
     53# From README.MacOS: "Apple gcc 3.3 works with Mercury"
     54# We recommend that users of Mac OS X 10.3 and 10.4 use this version."
    6855
    69 post-destroot {
    70     system "install_name_tool -id ${prefix}/lib/mercury/lib/hlc.gc/libmer_browser.dylib ${destroot}${prefix}/lib/mercury/lib/hlc.gc/libmer_browser.dylib"
    71     system "install_name_tool -id ${prefix}/lib/mercury/lib/hlc.gc/libmer_eventspec.dylib ${destroot}${prefix}/lib/mercury/lib/hlc.gc/libmer_eventspec.dylib"
    72     system "install_name_tool -id ${prefix}/lib/mercury/lib/hlc.gc/libmer_mdbcomp.dylib ${destroot}${prefix}/lib/mercury/lib/hlc.gc/libmer_mdbcomp.dylib"
    73     system "install_name_tool -id ${prefix}/lib/mercury/lib/hlc.gc/libmer_rt.dylib ${destroot}${prefix}/lib/mercury/lib/hlc.gc/libmer_rt.dylib"
    74     system "install_name_tool -id ${prefix}/lib/mercury/lib/hlc.gc/libmer_ssdb.dylib ${destroot}${prefix}/lib/mercury/lib/hlc.gc/libmer_ssdb.dylib"
    75     system "install_name_tool -id ${prefix}/lib/mercury/lib/hlc.gc/libmer_std.dylib ${destroot}${prefix}/lib/mercury/lib/hlc.gc/libmer_std.dylib"
    76     system "install_name_tool -id ${prefix}/lib/mercury/lib/hlc.gc/libmer_trace.dylib ${destroot}${prefix}/lib/mercury/lib/hlc.gc/libmer_trace.dylib"
    77     system "install_name_tool -id ${prefix}/lib/mercury/lib/hlc.gc.memprof/libmer_browser.dylib ${destroot}${prefix}/lib/mercury/lib/hlc.gc.memprof/libmer_browser.dylib"
    78     system "install_name_tool -id ${prefix}/lib/mercury/lib/hlc.gc.memprof/libmer_eventspec.dylib ${destroot}${prefix}/lib/mercury/lib/hlc.gc.memprof/libmer_eventspec.dylib"
    79     system "install_name_tool -id ${prefix}/lib/mercury/lib/hlc.gc.memprof/libmer_mdbcomp.dylib ${destroot}${prefix}/lib/mercury/lib/hlc.gc.memprof/libmer_mdbcomp.dylib"
    80     system "install_name_tool -id ${prefix}/lib/mercury/lib/hlc.gc.memprof/libmer_rt.dylib ${destroot}${prefix}/lib/mercury/lib/hlc.gc.memprof/libmer_rt.dylib"
    81     system "install_name_tool -id ${prefix}/lib/mercury/lib/hlc.gc.memprof/libmer_ssdb.dylib ${destroot}${prefix}/lib/mercury/lib/hlc.gc.memprof/libmer_ssdb.dylib"
    82     system "install_name_tool -id ${prefix}/lib/mercury/lib/hlc.gc.memprof/libmer_std.dylib ${destroot}${prefix}/lib/mercury/lib/hlc.gc.memprof/libmer_std.dylib"
    83     system "install_name_tool -id ${prefix}/lib/mercury/lib/hlc.gc.memprof/libmer_trace.dylib ${destroot}${prefix}/lib/mercury/lib/hlc.gc.memprof/libmer_trace.dylib"
    84     system "install_name_tool -id ${prefix}/lib/mercury/lib/hlc.gc.prof/libmer_browser.dylib ${destroot}${prefix}/lib/mercury/lib/hlc.gc.prof/libmer_browser.dylib"
    85     system "install_name_tool -id ${prefix}/lib/mercury/lib/hlc.gc.prof/libmer_eventspec.dylib ${destroot}${prefix}/lib/mercury/lib/hlc.gc.prof/libmer_eventspec.dylib"
    86     system "install_name_tool -id ${prefix}/lib/mercury/lib/hlc.gc.prof/libmer_mdbcomp.dylib ${destroot}${prefix}/lib/mercury/lib/hlc.gc.prof/libmer_mdbcomp.dylib"
    87     system "install_name_tool -id ${prefix}/lib/mercury/lib/hlc.gc.prof/libmer_rt.dylib ${destroot}${prefix}/lib/mercury/lib/hlc.gc.prof/libmer_rt.dylib"
    88     system "install_name_tool -id ${prefix}/lib/mercury/lib/hlc.gc.prof/libmer_ssdb.dylib ${destroot}${prefix}/lib/mercury/lib/hlc.gc.prof/libmer_ssdb.dylib"
    89     system "install_name_tool -id ${prefix}/lib/mercury/lib/hlc.gc.prof/libmer_std.dylib ${destroot}${prefix}/lib/mercury/lib/hlc.gc.prof/libmer_std.dylib"
    90     system "install_name_tool -id ${prefix}/lib/mercury/lib/hlc.gc.prof/libmer_trace.dylib ${destroot}${prefix}/lib/mercury/lib/hlc.gc.prof/libmer_trace.dylib"
    91     system "install_name_tool -id ${prefix}/lib/mercury/lib/hlc.gc.trseg/libmer_browser.dylib ${destroot}${prefix}/lib/mercury/lib/hlc.gc.trseg/libmer_browser.dylib"
    92     system "install_name_tool -id ${prefix}/lib/mercury/lib/hlc.gc.trseg/libmer_eventspec.dylib ${destroot}${prefix}/lib/mercury/lib/hlc.gc.trseg/libmer_eventspec.dylib"
    93     system "install_name_tool -id ${prefix}/lib/mercury/lib/hlc.gc.trseg/libmer_mdbcomp.dylib ${destroot}${prefix}/lib/mercury/lib/hlc.gc.trseg/libmer_mdbcomp.dylib"
    94     system "install_name_tool -id ${prefix}/lib/mercury/lib/hlc.gc.trseg/libmer_rt.dylib ${destroot}${prefix}/lib/mercury/lib/hlc.gc.trseg/libmer_rt.dylib"
    95     system "install_name_tool -id ${prefix}/lib/mercury/lib/hlc.gc.trseg/libmer_ssdb.dylib ${destroot}${prefix}/lib/mercury/lib/hlc.gc.trseg/libmer_ssdb.dylib"
    96     system "install_name_tool -id ${prefix}/lib/mercury/lib/hlc.gc.trseg/libmer_std.dylib ${destroot}${prefix}/lib/mercury/lib/hlc.gc.trseg/libmer_std.dylib"
    97     system "install_name_tool -id ${prefix}/lib/mercury/lib/hlc.gc.trseg/libmer_trace.dylib ${destroot}${prefix}/lib/mercury/lib/hlc.gc.trseg/libmer_trace.dylib"
    98     system "install_name_tool -id ${prefix}/lib/mercury/lib/hlc.par.gc/libmer_browser.dylib ${destroot}${prefix}/lib/mercury/lib/hlc.par.gc/libmer_browser.dylib"
    99     system "install_name_tool -id ${prefix}/lib/mercury/lib/hlc.par.gc/libmer_eventspec.dylib ${destroot}${prefix}/lib/mercury/lib/hlc.par.gc/libmer_eventspec.dylib"
    100     system "install_name_tool -id ${prefix}/lib/mercury/lib/hlc.par.gc/libmer_mdbcomp.dylib ${destroot}${prefix}/lib/mercury/lib/hlc.par.gc/libmer_mdbcomp.dylib"
    101     system "install_name_tool -id ${prefix}/lib/mercury/lib/hlc.par.gc/libmer_rt.dylib ${destroot}${prefix}/lib/mercury/lib/hlc.par.gc/libmer_rt.dylib"
    102     system "install_name_tool -id ${prefix}/lib/mercury/lib/hlc.par.gc/libmer_ssdb.dylib ${destroot}${prefix}/lib/mercury/lib/hlc.par.gc/libmer_ssdb.dylib"
    103     system "install_name_tool -id ${prefix}/lib/mercury/lib/hlc.par.gc/libmer_std.dylib ${destroot}${prefix}/lib/mercury/lib/hlc.par.gc/libmer_std.dylib"
    104     system "install_name_tool -id ${prefix}/lib/mercury/lib/hlc.par.gc/libmer_trace.dylib ${destroot}${prefix}/lib/mercury/lib/hlc.par.gc/libmer_trace.dylib"
    105     system "install_name_tool -id ${prefix}/lib/mercury/lib/libgc.dylib ${destroot}${prefix}/lib/mercury/lib/libgc.dylib"
    106     system "install_name_tool -id ${prefix}/lib/mercury/lib/libgc_prof.dylib ${destroot}${prefix}/lib/mercury/lib/libgc_prof.dylib"
    107     system "install_name_tool -id ${prefix}/lib/mercury/lib/libpar_gc.dylib ${destroot}${prefix}/lib/mercury/lib/libpar_gc.dylib"
    108     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.gc/libmer_browser.dylib ${destroot}${prefix}/lib/mercury/lib/none.gc/libmer_browser.dylib"
    109     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.gc/libmer_eventspec.dylib ${destroot}${prefix}/lib/mercury/lib/none.gc/libmer_eventspec.dylib"
    110     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.gc/libmer_mdbcomp.dylib ${destroot}${prefix}/lib/mercury/lib/none.gc/libmer_mdbcomp.dylib"
    111     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.gc/libmer_rt.dylib ${destroot}${prefix}/lib/mercury/lib/none.gc/libmer_rt.dylib"
    112     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.gc/libmer_ssdb.dylib ${destroot}${prefix}/lib/mercury/lib/none.gc/libmer_ssdb.dylib"
    113     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.gc/libmer_std.dylib ${destroot}${prefix}/lib/mercury/lib/none.gc/libmer_std.dylib"
    114     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.gc/libmer_trace.dylib ${destroot}${prefix}/lib/mercury/lib/none.gc/libmer_trace.dylib"
    115     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.gc.debug/libmer_browser.dylib ${destroot}${prefix}/lib/mercury/lib/none.gc.debug/libmer_browser.dylib"
    116     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.gc.debug/libmer_eventspec.dylib ${destroot}${prefix}/lib/mercury/lib/none.gc.debug/libmer_eventspec.dylib"
    117     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.gc.debug/libmer_mdbcomp.dylib ${destroot}${prefix}/lib/mercury/lib/none.gc.debug/libmer_mdbcomp.dylib"
    118     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.gc.debug/libmer_rt.dylib ${destroot}${prefix}/lib/mercury/lib/none.gc.debug/libmer_rt.dylib"
    119     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.gc.debug/libmer_ssdb.dylib ${destroot}${prefix}/lib/mercury/lib/none.gc.debug/libmer_ssdb.dylib"
    120     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.gc.debug/libmer_std.dylib ${destroot}${prefix}/lib/mercury/lib/none.gc.debug/libmer_std.dylib"
    121     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.gc.debug/libmer_trace.dylib ${destroot}${prefix}/lib/mercury/lib/none.gc.debug/libmer_trace.dylib"
    122     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.gc.decldebug/libmer_browser.dylib ${destroot}${prefix}/lib/mercury/lib/none.gc.decldebug/libmer_browser.dylib"
    123     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.gc.decldebug/libmer_eventspec.dylib ${destroot}${prefix}/lib/mercury/lib/none.gc.decldebug/libmer_eventspec.dylib"
    124     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.gc.decldebug/libmer_mdbcomp.dylib ${destroot}${prefix}/lib/mercury/lib/none.gc.decldebug/libmer_mdbcomp.dylib"
    125     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.gc.decldebug/libmer_rt.dylib ${destroot}${prefix}/lib/mercury/lib/none.gc.decldebug/libmer_rt.dylib"
    126     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.gc.decldebug/libmer_ssdb.dylib ${destroot}${prefix}/lib/mercury/lib/none.gc.decldebug/libmer_ssdb.dylib"
    127     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.gc.decldebug/libmer_std.dylib ${destroot}${prefix}/lib/mercury/lib/none.gc.decldebug/libmer_std.dylib"
    128     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.gc.decldebug/libmer_trace.dylib ${destroot}${prefix}/lib/mercury/lib/none.gc.decldebug/libmer_trace.dylib"
    129     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.gc.prof/libmer_browser.dylib ${destroot}${prefix}/lib/mercury/lib/none.gc.prof/libmer_browser.dylib"
    130     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.gc.prof/libmer_eventspec.dylib ${destroot}${prefix}/lib/mercury/lib/none.gc.prof/libmer_eventspec.dylib"
    131     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.gc.prof/libmer_mdbcomp.dylib ${destroot}${prefix}/lib/mercury/lib/none.gc.prof/libmer_mdbcomp.dylib"
    132     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.gc.prof/libmer_rt.dylib ${destroot}${prefix}/lib/mercury/lib/none.gc.prof/libmer_rt.dylib"
    133     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.gc.prof/libmer_ssdb.dylib ${destroot}${prefix}/lib/mercury/lib/none.gc.prof/libmer_ssdb.dylib"
    134     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.gc.prof/libmer_std.dylib ${destroot}${prefix}/lib/mercury/lib/none.gc.prof/libmer_std.dylib"
    135     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.gc.prof/libmer_trace.dylib ${destroot}${prefix}/lib/mercury/lib/none.gc.prof/libmer_trace.dylib"
    136     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.gc.profdeep/libmer_browser.dylib ${destroot}${prefix}/lib/mercury/lib/none.gc.profdeep/libmer_browser.dylib"
    137     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.gc.profdeep/libmer_eventspec.dylib ${destroot}${prefix}/lib/mercury/lib/none.gc.profdeep/libmer_eventspec.dylib"
    138     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.gc.profdeep/libmer_mdbcomp.dylib ${destroot}${prefix}/lib/mercury/lib/none.gc.profdeep/libmer_mdbcomp.dylib"
    139     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.gc.profdeep/libmer_rt.dylib ${destroot}${prefix}/lib/mercury/lib/none.gc.profdeep/libmer_rt.dylib"
    140     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.gc.profdeep/libmer_ssdb.dylib ${destroot}${prefix}/lib/mercury/lib/none.gc.profdeep/libmer_ssdb.dylib"
    141     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.gc.profdeep/libmer_std.dylib ${destroot}${prefix}/lib/mercury/lib/none.gc.profdeep/libmer_std.dylib"
    142     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.gc.profdeep/libmer_trace.dylib ${destroot}${prefix}/lib/mercury/lib/none.gc.profdeep/libmer_trace.dylib"
    143     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.par.gc/libmer_browser.dylib ${destroot}${prefix}/lib/mercury/lib/none.par.gc/libmer_browser.dylib"
    144     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.par.gc/libmer_eventspec.dylib ${destroot}${prefix}/lib/mercury/lib/none.par.gc/libmer_eventspec.dylib"
    145     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.par.gc/libmer_mdbcomp.dylib ${destroot}${prefix}/lib/mercury/lib/none.par.gc/libmer_mdbcomp.dylib"
    146     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.par.gc/libmer_rt.dylib ${destroot}${prefix}/lib/mercury/lib/none.par.gc/libmer_rt.dylib"
    147     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.par.gc/libmer_ssdb.dylib ${destroot}${prefix}/lib/mercury/lib/none.par.gc/libmer_ssdb.dylib"
    148     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.par.gc/libmer_std.dylib ${destroot}${prefix}/lib/mercury/lib/none.par.gc/libmer_std.dylib"
    149     system "install_name_tool -id ${prefix}/lib/mercury/lib/none.par.gc/libmer_trace.dylib ${destroot}${prefix}/lib/mercury/lib/none.par.gc/libmer_trace.dylib"
    150 
    151     file delete ${destroot}${prefix}/var/macports/build
     56# https://trac.macports.org/ticket/32542
     57if {${configure.compiler} == "apple-gcc-4.2"} {
     58    depends_build-append port:apple-gcc42
     59    depends_skip_archcheck-append apple-gcc42
    15260}
     61
     62# mercury doesn't honor $CFLAGS
     63configure.cc ${configure.cc} -std=gnu89