ocaml, add version 5.4.0 (#13487)

This commit is contained in:
Schrijvers Luc
2026-01-24 10:05:32 +01:00
committed by GitHub
parent b652b60f1b
commit 68c74edffb

View File

@@ -0,0 +1,132 @@
SUMMARY="Implementation of the Caml language"
DESCRIPTION="Caml is a general-purpose programming language, designed with \
program safety and reliability in mind. It is very expressive, yet easy to \
learn and use.
Caml supports functional, imperative, and object-oriented programming styles. \
It has been developed and distributed by INRIA, a French research institute in \
computer science and applied mathematics, since 1985.
The OCaml system is the main implementation of the Caml language. It features \
a powerful module system and a full-fledged object-oriented layer. It comes \
with a native-code compiler that supports numerous architectures, for high \
performance; a bytecode compiler, for increased portability; and an \
interactive loop, for experimentation and rapid development."
HOMEPAGE="http://caml.inria.fr/index.en.html"
COPYRIGHT="1996-2018 Institut National de Recherche en Informatique et en Automatique (INRIA)"
LICENSE="GNU LGPL v2"
REVISION="1"
SOURCE_URI="http://caml.inria.fr/pub/distrib/ocaml-5.4/ocaml-$portVersion.tar.gz"
CHECKSUM_SHA256="6fcf1b192e389e54c4f5cb51306ab2baee2a54a25b1770366de5a8b42695996e"
SOURCE_DIR="ocaml-$portVersion"
#PATCHES="ocaml-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="?x86"
portVersionCompat="$portVersion compat >= ${portVersion%%.*}"
PROVIDES="
ocaml5$secondaryArchSuffix = $portVersionCompat
cmd:ocaml = $portVersionCompat
cmd:ocamlc = $portVersionCompat
# cmd:ocamlc.byte = $portVersionCompat
cmd:ocamlc.opt = $portVersionCompat
cmd:ocamlcmt = $portVersionCompat
cmd:ocamlcp = $portVersionCompat
cmd:ocamldebug = $portVersionCompat
cmd:ocamldep = $portVersionCompat
# cmd:ocamldep.byte = $portVersionCompat
cmd:ocamldep.opt = $portVersionCompat
cmd:ocamldoc = $portVersionCompat
cmd:ocamldoc.opt = $portVersionCompat
cmd:ocamllex = $portVersionCompat
# cmd:ocamllex.byte = $portVersionCompat
cmd:ocamllex.opt = $portVersionCompat
cmd:ocamlmklib = $portVersionCompat
cmd:ocamlmktop = $portVersionCompat
cmd:ocamlobjinfo = $portVersionCompat
# cmd:ocamlobjinfo.byte = $portVersionCompat
cmd:ocamlobjinfo.opt = $portVersionCompat
cmd:ocamlopt = $portVersionCompat
# cmd:ocamlopt.byte = $portVersionCompat
cmd:ocamlopt.opt = $portVersionCompat
cmd:ocamloptp = $portVersionCompat
cmd:ocamlprof = $portVersionCompat
cmd:ocamlrun = $portVersionCompat
cmd:ocamlrund = $portVersionCompat
cmd:ocamlruni = $portVersionCompat
cmd:ocamlyacc = $portVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libzstd$secondaryArchSuffix
"
CONFLICTS="
ocaml$secondaryArchSuffix
"
TEST_REQUIRES="
cmd:parallel
"
PATCH()
{
# git diff produces "GIT binary patch"
sed -i 's|arch=amd64; system=beos|has_native_backend=yes; arch=amd64; system=beos|g' configure
}
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libzstd$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:awk
cmd:cmp
cmd:diff
cmd:gcc$secondaryArchSuffix
cmd:grep
cmd:make
cmd:m4
cmd:pkg_config$secondaryArchSuffix
cmd:sed
cmd:xargs
"
BUILD()
{
./configure --prefix $prefix \
--docdir=$documentationDir/packages/ocaml \
--mandir $manDir \
--enable-shared \
--enable-static \
--disable-installing-bytecode-programs \
--disable-ocamltest
make $jobArgs
}
INSTALL()
{
make install
}
TEST()
{
# List of failed tests:
# tests/lib-format/mc_pr586_par.ml
# tests/lib-format/mc_pr586_par2.ml
# tests/lib-runtime-events/test_create_cursor_failures.ml
# tests/lib-sys/signal.ml
# tests/lib-unix/unix-socket/recvfrom_unix.ml
#Summary:
# 1449 tests passed
# 57 tests skipped
# 5 tests failed
# 0 tests not started (parent test skipped or failed)
# 0 unexpected errors
# 1511 tests considered
make ocamltest
make -C testsuite parallel && return 0
}