Changeset 80177


Ignore:
Timestamp:
Jul 6, 2011, 6:51:22 AM (8 years ago)
Author:
jeremyhu@…
Message:

mercury: Update version to 11.01 for x86_64 support, clang build fixes

Location:
trunk/dports/lang/mercury
Files:
3 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/lang/mercury/Portfile

    r71437 r80177  
    44
    55name            mercury
    6 version         0.13.1
     6version         11.01
    77categories      lang
    88maintainers     nomaintainer
     
    2828distname        ${name}-compiler-${version}
    2929
    30 checksums       md5 f75f2241a974792d30c18c4325c763d0
     30checksums           md5     5d7dc00ab06f87ee5ddfb8dca088be56 \
     31                    sha1    508f9fbebdf061f706a44db5c77868cb4e769066 \
     32                    rmd160  bee82b6037fa1f14f27b43d6f7d751d232941bc7
    3133
    3234worksrcdir      ${name}-${version}
    33 post-extract    { file rename \
    34                         ${workpath}/${name}-compiler-${version} \
    35                         ${workpath}/${name}-${version}
    36                 }
    3735
    38 post-patch      { reinplace \
    39                         s|\$(INSTALL_ELISP_DIR)|${prefix}/lib/${name}/elisp| \
    40                         ${worksrcpath}/Mmakefile
    41                 }
     36depends_lib \
     37    port:readline
    4238
    43 depends_lib     port:readline
    44 
    45 platform darwin 8 {
    46     depends_build-append port:gcc44
    47     configure.compiler macports-gcc-4.4
    48 }
    49 platform darwin 9 {
    50     configure.compiler gcc-4.2
     39post-extract {
     40    file rename ${workpath}/${name}-compiler-${version} ${workpath}/${name}-${version}
    5141}
    5242
    53 configure.args  --mandir=${prefix}/share/man \
    54                 --infodir=${prefix}/share/info
     43patchfiles \
     44    asm.patch \
     45    nolibgcc.patch
    5546
    56 # Note that most of the building actually takes place in the
    57 # destroot phase.  This is a consequence of the mercury build
    58 # scheme.
     47post-patch {
     48    reinplace "s:\*gcc\*:*gcc*|*clang*:" ${worksrcpath}/scripts/ml.in ${worksrcpath}/scripts/mgnuc.in
     49}
    5950
    60 build           {
    61                   system "cd ${worksrcpath} && make INSTALL_PREFIX=${destroot}${prefix}"
    62                 }
     51# Release notes state that gcc-4.0 generates a broken mercury compiler
     52# llvm-gcc-4.2 fails to build
     53if {${configure.compiler} == "gcc-4.0"} {
     54    configure.compiler gcc-4.2
     55    if {![file executable ${configure.cc}]} {
     56        depends_build-append port:apple-gcc42
     57        configure.compiler apple-gcc-4.2
     58    }
     59} elseif {${configure.compiler} == "llvm-gcc-4.2"} {
     60    configure.compiler clang
     61}
    6362
    64 destroot        {
    65                   system "cd ${worksrcpath} && make INSTALL_PREFIX=${destroot}${prefix} \
    66                                MERCURY_COMPILER=${worksrcpath}/compiler/mercury_compile install"
    67                 }
     63# mercury doesn't honor $CFLAGS
     64configure.cc ${configure.cc} -std=gnu89
     65
     66# mercury's bootstrapping doesn't work with DESTDIR, so do it an ugly way...
     67set real_prefix ${prefix}
     68prefix ${destroot}${prefix}
     69destroot.destdir ""
     70
     71post-destroot {
     72    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/hlc.gc/libmer_browser.dylib ${prefix}/lib/mercury/lib/hlc.gc/libmer_browser.dylib"
     73    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/hlc.gc/libmer_eventspec.dylib ${prefix}/lib/mercury/lib/hlc.gc/libmer_eventspec.dylib"
     74    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/hlc.gc/libmer_mdbcomp.dylib ${prefix}/lib/mercury/lib/hlc.gc/libmer_mdbcomp.dylib"
     75    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/hlc.gc/libmer_rt.dylib ${prefix}/lib/mercury/lib/hlc.gc/libmer_rt.dylib"
     76    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/hlc.gc/libmer_ssdb.dylib ${prefix}/lib/mercury/lib/hlc.gc/libmer_ssdb.dylib"
     77    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/hlc.gc/libmer_std.dylib ${prefix}/lib/mercury/lib/hlc.gc/libmer_std.dylib"
     78    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/hlc.gc/libmer_trace.dylib ${prefix}/lib/mercury/lib/hlc.gc/libmer_trace.dylib"
     79    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/hlc.gc.memprof/libmer_browser.dylib ${prefix}/lib/mercury/lib/hlc.gc.memprof/libmer_browser.dylib"
     80    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/hlc.gc.memprof/libmer_eventspec.dylib ${prefix}/lib/mercury/lib/hlc.gc.memprof/libmer_eventspec.dylib"
     81    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/hlc.gc.memprof/libmer_mdbcomp.dylib ${prefix}/lib/mercury/lib/hlc.gc.memprof/libmer_mdbcomp.dylib"
     82    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/hlc.gc.memprof/libmer_rt.dylib ${prefix}/lib/mercury/lib/hlc.gc.memprof/libmer_rt.dylib"
     83    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/hlc.gc.memprof/libmer_ssdb.dylib ${prefix}/lib/mercury/lib/hlc.gc.memprof/libmer_ssdb.dylib"
     84    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/hlc.gc.memprof/libmer_std.dylib ${prefix}/lib/mercury/lib/hlc.gc.memprof/libmer_std.dylib"
     85    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/hlc.gc.memprof/libmer_trace.dylib ${prefix}/lib/mercury/lib/hlc.gc.memprof/libmer_trace.dylib"
     86    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/hlc.gc.prof/libmer_browser.dylib ${prefix}/lib/mercury/lib/hlc.gc.prof/libmer_browser.dylib"
     87    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/hlc.gc.prof/libmer_eventspec.dylib ${prefix}/lib/mercury/lib/hlc.gc.prof/libmer_eventspec.dylib"
     88    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/hlc.gc.prof/libmer_mdbcomp.dylib ${prefix}/lib/mercury/lib/hlc.gc.prof/libmer_mdbcomp.dylib"
     89    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/hlc.gc.prof/libmer_rt.dylib ${prefix}/lib/mercury/lib/hlc.gc.prof/libmer_rt.dylib"
     90    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/hlc.gc.prof/libmer_ssdb.dylib ${prefix}/lib/mercury/lib/hlc.gc.prof/libmer_ssdb.dylib"
     91    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/hlc.gc.prof/libmer_std.dylib ${prefix}/lib/mercury/lib/hlc.gc.prof/libmer_std.dylib"
     92    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/hlc.gc.prof/libmer_trace.dylib ${prefix}/lib/mercury/lib/hlc.gc.prof/libmer_trace.dylib"
     93    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/hlc.gc.trseg/libmer_browser.dylib ${prefix}/lib/mercury/lib/hlc.gc.trseg/libmer_browser.dylib"
     94    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/hlc.gc.trseg/libmer_eventspec.dylib ${prefix}/lib/mercury/lib/hlc.gc.trseg/libmer_eventspec.dylib"
     95    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/hlc.gc.trseg/libmer_mdbcomp.dylib ${prefix}/lib/mercury/lib/hlc.gc.trseg/libmer_mdbcomp.dylib"
     96    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/hlc.gc.trseg/libmer_rt.dylib ${prefix}/lib/mercury/lib/hlc.gc.trseg/libmer_rt.dylib"
     97    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/hlc.gc.trseg/libmer_ssdb.dylib ${prefix}/lib/mercury/lib/hlc.gc.trseg/libmer_ssdb.dylib"
     98    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/hlc.gc.trseg/libmer_std.dylib ${prefix}/lib/mercury/lib/hlc.gc.trseg/libmer_std.dylib"
     99    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/hlc.gc.trseg/libmer_trace.dylib ${prefix}/lib/mercury/lib/hlc.gc.trseg/libmer_trace.dylib"
     100    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/hlc.par.gc/libmer_browser.dylib ${prefix}/lib/mercury/lib/hlc.par.gc/libmer_browser.dylib"
     101    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/hlc.par.gc/libmer_eventspec.dylib ${prefix}/lib/mercury/lib/hlc.par.gc/libmer_eventspec.dylib"
     102    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/hlc.par.gc/libmer_mdbcomp.dylib ${prefix}/lib/mercury/lib/hlc.par.gc/libmer_mdbcomp.dylib"
     103    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/hlc.par.gc/libmer_rt.dylib ${prefix}/lib/mercury/lib/hlc.par.gc/libmer_rt.dylib"
     104    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/hlc.par.gc/libmer_ssdb.dylib ${prefix}/lib/mercury/lib/hlc.par.gc/libmer_ssdb.dylib"
     105    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/hlc.par.gc/libmer_std.dylib ${prefix}/lib/mercury/lib/hlc.par.gc/libmer_std.dylib"
     106    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/hlc.par.gc/libmer_trace.dylib ${prefix}/lib/mercury/lib/hlc.par.gc/libmer_trace.dylib"
     107    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/libgc.dylib ${prefix}/lib/mercury/lib/libgc.dylib"
     108    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/libgc_prof.dylib ${prefix}/lib/mercury/lib/libgc_prof.dylib"
     109    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/libpar_gc.dylib ${prefix}/lib/mercury/lib/libpar_gc.dylib"
     110    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.gc/libmer_browser.dylib ${prefix}/lib/mercury/lib/none.gc/libmer_browser.dylib"
     111    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.gc/libmer_eventspec.dylib ${prefix}/lib/mercury/lib/none.gc/libmer_eventspec.dylib"
     112    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.gc/libmer_mdbcomp.dylib ${prefix}/lib/mercury/lib/none.gc/libmer_mdbcomp.dylib"
     113    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.gc/libmer_rt.dylib ${prefix}/lib/mercury/lib/none.gc/libmer_rt.dylib"
     114    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.gc/libmer_ssdb.dylib ${prefix}/lib/mercury/lib/none.gc/libmer_ssdb.dylib"
     115    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.gc/libmer_std.dylib ${prefix}/lib/mercury/lib/none.gc/libmer_std.dylib"
     116    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.gc/libmer_trace.dylib ${prefix}/lib/mercury/lib/none.gc/libmer_trace.dylib"
     117    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.gc.debug/libmer_browser.dylib ${prefix}/lib/mercury/lib/none.gc.debug/libmer_browser.dylib"
     118    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.gc.debug/libmer_eventspec.dylib ${prefix}/lib/mercury/lib/none.gc.debug/libmer_eventspec.dylib"
     119    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.gc.debug/libmer_mdbcomp.dylib ${prefix}/lib/mercury/lib/none.gc.debug/libmer_mdbcomp.dylib"
     120    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.gc.debug/libmer_rt.dylib ${prefix}/lib/mercury/lib/none.gc.debug/libmer_rt.dylib"
     121    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.gc.debug/libmer_ssdb.dylib ${prefix}/lib/mercury/lib/none.gc.debug/libmer_ssdb.dylib"
     122    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.gc.debug/libmer_std.dylib ${prefix}/lib/mercury/lib/none.gc.debug/libmer_std.dylib"
     123    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.gc.debug/libmer_trace.dylib ${prefix}/lib/mercury/lib/none.gc.debug/libmer_trace.dylib"
     124    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.gc.decldebug/libmer_browser.dylib ${prefix}/lib/mercury/lib/none.gc.decldebug/libmer_browser.dylib"
     125    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.gc.decldebug/libmer_eventspec.dylib ${prefix}/lib/mercury/lib/none.gc.decldebug/libmer_eventspec.dylib"
     126    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.gc.decldebug/libmer_mdbcomp.dylib ${prefix}/lib/mercury/lib/none.gc.decldebug/libmer_mdbcomp.dylib"
     127    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.gc.decldebug/libmer_rt.dylib ${prefix}/lib/mercury/lib/none.gc.decldebug/libmer_rt.dylib"
     128    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.gc.decldebug/libmer_ssdb.dylib ${prefix}/lib/mercury/lib/none.gc.decldebug/libmer_ssdb.dylib"
     129    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.gc.decldebug/libmer_std.dylib ${prefix}/lib/mercury/lib/none.gc.decldebug/libmer_std.dylib"
     130    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.gc.decldebug/libmer_trace.dylib ${prefix}/lib/mercury/lib/none.gc.decldebug/libmer_trace.dylib"
     131    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.gc.prof/libmer_browser.dylib ${prefix}/lib/mercury/lib/none.gc.prof/libmer_browser.dylib"
     132    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.gc.prof/libmer_eventspec.dylib ${prefix}/lib/mercury/lib/none.gc.prof/libmer_eventspec.dylib"
     133    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.gc.prof/libmer_mdbcomp.dylib ${prefix}/lib/mercury/lib/none.gc.prof/libmer_mdbcomp.dylib"
     134    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.gc.prof/libmer_rt.dylib ${prefix}/lib/mercury/lib/none.gc.prof/libmer_rt.dylib"
     135    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.gc.prof/libmer_ssdb.dylib ${prefix}/lib/mercury/lib/none.gc.prof/libmer_ssdb.dylib"
     136    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.gc.prof/libmer_std.dylib ${prefix}/lib/mercury/lib/none.gc.prof/libmer_std.dylib"
     137    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.gc.prof/libmer_trace.dylib ${prefix}/lib/mercury/lib/none.gc.prof/libmer_trace.dylib"
     138    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.gc.profdeep/libmer_browser.dylib ${prefix}/lib/mercury/lib/none.gc.profdeep/libmer_browser.dylib"
     139    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.gc.profdeep/libmer_eventspec.dylib ${prefix}/lib/mercury/lib/none.gc.profdeep/libmer_eventspec.dylib"
     140    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.gc.profdeep/libmer_mdbcomp.dylib ${prefix}/lib/mercury/lib/none.gc.profdeep/libmer_mdbcomp.dylib"
     141    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.gc.profdeep/libmer_rt.dylib ${prefix}/lib/mercury/lib/none.gc.profdeep/libmer_rt.dylib"
     142    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.gc.profdeep/libmer_ssdb.dylib ${prefix}/lib/mercury/lib/none.gc.profdeep/libmer_ssdb.dylib"
     143    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.gc.profdeep/libmer_std.dylib ${prefix}/lib/mercury/lib/none.gc.profdeep/libmer_std.dylib"
     144    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.gc.profdeep/libmer_trace.dylib ${prefix}/lib/mercury/lib/none.gc.profdeep/libmer_trace.dylib"
     145    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.par.gc/libmer_browser.dylib ${prefix}/lib/mercury/lib/none.par.gc/libmer_browser.dylib"
     146    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.par.gc/libmer_eventspec.dylib ${prefix}/lib/mercury/lib/none.par.gc/libmer_eventspec.dylib"
     147    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.par.gc/libmer_mdbcomp.dylib ${prefix}/lib/mercury/lib/none.par.gc/libmer_mdbcomp.dylib"
     148    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.par.gc/libmer_rt.dylib ${prefix}/lib/mercury/lib/none.par.gc/libmer_rt.dylib"
     149    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.par.gc/libmer_ssdb.dylib ${prefix}/lib/mercury/lib/none.par.gc/libmer_ssdb.dylib"
     150    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.par.gc/libmer_std.dylib ${prefix}/lib/mercury/lib/none.par.gc/libmer_std.dylib"
     151    system "install_name_tool -id ${real_prefix}/lib/mercury/lib/none.par.gc/libmer_trace.dylib ${prefix}/lib/mercury/lib/none.par.gc/libmer_trace.dylib"
     152
     153    file delete ${prefix}/var/macports/build
     154}
Note: See TracChangeset for help on using the changeset viewer.