Fetching contributors…
Cannot retrieve contributors at this time
87 lines (69 sloc) 3.11 KB
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
PortSystem 1.0
PortGroup compiler_blacklist_versions 1.0
name ocaml
epoch 1
version 4.05.0
revision 1
# When updating ocaml, also update ocaml-camlp4 and camlp5 to compatible versions
# (c.f. #26769, #20219, #18292) or increase their revisions to rebuild them.
# When ocaml is next updated, please update lablgtk2 as well
set major_vers [join [lrange [split ${version} .] 0 1] .]
platforms darwin
supported_archs i386 x86_64
maintainers {pmetzger @pmetzger} openmaintainer
categories lang ocaml
description OCaml is an implementation of the ML language
license {QPL LGPL}
checksums rmd160 d54f32412a47988eb6d5bf8521237277bce8af2d \
sha256 04a527ba14b4d7d1b2ea7b2ae21aefecfa8d304399db94f35a96df1459e02ef9
long_description OCaml, originally named Objective Caml, is an industrial strength \
programming language in the ML family, supporting \
functional, imperative and object-oriented styles.
use_xz yes
depends_lib port:ncurses
use_parallel_build no
universal_variant no
set docdir ${prefix}/share/doc/${name}
compiler.blacklist gcc-4.0 *gcc-4.2 {clang < 400}
platform darwin {
if {${os.major} < 11} {
# need to add strnlen patch as not in library
patchfiles-append patch-strnlen-socketaddr.diff
# compiler selection pulls in clang-3.4 on 10.6 and less
# and this compiler is needed for this port to run once installed
# so force this compiler and require it at runtime
compiler.whitelist macports-clang-3.4
depends_run-append port:clang-3.4
if {${build_arch} eq "i386"} {
patchfiles-append patch-configure-darwin32.diff
# Configure.
configure.pre_args -prefix ${prefix}
configure.args -cc ${} -as \"${} -c\" -aspp \"${} -c\" \ -no-graph
# Building. world.opt
# Install. install
destroot.destdir BINDIR=${destroot}${prefix}/bin \
LIBDIR=${destroot}${prefix}/lib/ocaml \
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.adoc ${destroot}${docdir}
system -W ${worksrcpath}/emacs "make EMACSDIR=${destroot}${prefix}/share/emacs/site-lisp NOCOMPILE=true simple-install"
# Variants.
variant profile description {Enable profiling} {
configure.env-append CC="gcc -pg"
livecheck.type regex
livecheck.regex "ocaml-\[0-9\.]+/ocaml-(\[0-9\.\]+).tar"