# $Id: Portfile 111007 2013-09-13 12:22:46Z mww@macports.org $ PortSystem 1.0 name ocaml epoch 1 version 4.01.0 revision 0 # When updating ocaml, also update camlp5 to a compatible version (c.f. #26769, #20219, #18292) set major_vers [join [lrange [split ${version} .] 0 1] .] platforms darwin maintainers mww openmaintainer categories lang ml description Objective Caml is an implementation of the ML language license {QPL LGPL} homepage http://www.ocaml.org/ master_sites http://caml.inria.fr/pub/distrib/ocaml-${major_vers}/ \ ftp://ftp.inria.fr/INRIA/Projects/cristal/ocaml/ocaml-${major_vers} checksums rmd160 eedf28f446489c6b2c1f82782f5ee852293fc0b7 \ sha256 b1ca708994180236917ae79e17606da5bd334ca6acd6873a550027e1c0ec874a 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 depends_lib port:ncurses use_parallel_build no universal_variant no set docdir ${prefix}/share/doc/${name} # Configure. configure.pre_args -prefix ${prefix} configure.args -no-tk -cc ${configure.cc} -aspp \"${configure.cc} -c\" \ -x11include \"${prefix}/include\" -x11lib \"${prefix}/lib\" # 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 xinstall -d ${destroot}${docdir} xinstall -m 0644 -W ${worksrcpath} Changes LICENSE README ${destroot}${docdir} } # Variants. variant profile description {Enable profiling} { configure.env-append CC="gcc -pg" } variant labltk description {Include TK bindings and ocamlbrowser} { depends_lib-append port:xorg-libX11 port:tcl port:tk configure.args-delete -no-tk } livecheck.type regex livecheck.url http://caml.inria.fr/download.en.html livecheck.regex "ocaml-\[0-9\.]+/ocaml-(\[0-9\.\]+).tar"