# $Id: Portfile 50984 2009-05-14 21:08:43Z and.damore@macports.org $ PortSystem 1.0 name ocaml version 3.11.0 set major_vers [join [lrange [split ${version} .] 0 1] .] platforms darwin maintainers kallisys.net:pguyot openmaintainer categories lang ml description Objective Caml is an implementation of the ML language homepage http://www.ocaml.org/ master_sites http://caml.inria.fr/pub/distrib/ocaml-${major_vers}/ checksums ocaml-${version}.tar.bz2 \ md5 6ed1c3ed660a15408362242fa8fa4668 \ sha1 fed19b82828789b8c509049590f0b82f8e5e6eb3 \ rmd160 06f367eacfa3f4d413138fc2386bf3b1ee822cf6 \ ocaml-3.11-refman.html.tar.gz \ md5 bfb4ed960974159f4224014a979baf6d \ sha1 97159cf3d4ea64d0ca03f04997fdfc00982d22b0 \ rmd160 8d77630ee0c3dcdae1ef142a59eb876271f1c335 long_description \ Objective Caml is an implementation of the ML language, based on \ the Caml Light dialect extended with a complete class-based object \ system and a powerful module system in the style of Standard ML. use_bzip2 yes use_parallel_build no universal_variant no set doc_distname ${name}-${major_vers}-refman set docdir ${prefix}/share/doc/${name}-${version} # Configure. configure.pre_args -prefix ${prefix} configure.args -no-tk -cc ${configure.cc} -aspp \"${configure.cc} -c\" # Building. build.target world.opt build.cmd "unset LD_PREBIND LD_PREBIND_ALLOW_OVERLAP && ${build.cmd}" # Install. destroot.target install destroot.destdir BINDIR=${destroot}${prefix}/bin \ LIBDIR=${destroot}${prefix}/lib/ocaml \ MANDIR=${destroot}${prefix}/share/man post-destroot { # Change "ld.conf" to remove ${destroot} in paths. reinplace "s:${destroot}::g" ${destroot}${prefix}/lib/ocaml/ld.conf } # Variants. variant labltk { depends_lib lib:tcl8.4:tcl lib:tk8.4:tk configure.args-delete -no-tk } variant doc description {Install extra documentation} { extract.only ${distfiles} distfiles-append ${doc_distname}.html.tar.gz post-extract { system "tar xzvf ${distpath}/${doc_distname}.html.tar.gz -C ${workpath}" } post-destroot { xinstall -d ${destroot}${docdir} xinstall -m 0644 -W ${worksrcpath} Changes LICENSE README ${destroot}${docdir} xinstall -d ${destroot}${docdir}/html/libref eval xinstall -m 0644 [glob ${workpath}/htmlman/libref/*] \ ${destroot}${docdir}/html/libref eval xinstall -m 0644 [glob ${workpath}/htmlman/*.*] \ ${destroot}${docdir}/html } } livecheck.check regex livecheck.url http://caml.inria.fr/news.en.rss livecheck.regex "Objective Caml (.*) released"