diff options
author | Sam James <sam@gentoo.org> | 2021-10-02 06:09:09 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-10-02 06:09:09 +0100 |
commit | f570bf2b0a65911fc4b9759e20f748cda8d00d17 (patch) | |
tree | 9c73263a16dc1d67052a77988327ced57f07ee64 /dev-lang | |
parent | dev-lang/ocaml: add 4.12.1 (diff) | |
download | gentoo-f570bf2b0a65911fc4b9759e20f748cda8d00d17.tar.gz gentoo-f570bf2b0a65911fc4b9759e20f748cda8d00d17.tar.bz2 gentoo-f570bf2b0a65911fc4b9759e20f748cda8d00d17.zip |
dev-lang/ocaml: add 4.13.0
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/ocaml/Manifest | 1 | ||||
-rw-r--r-- | dev-lang/ocaml/ocaml-4.13.0.ebuild | 97 |
2 files changed, 98 insertions, 0 deletions
diff --git a/dev-lang/ocaml/Manifest b/dev-lang/ocaml/Manifest index 15b20c48f7db..a9db051fa41f 100644 --- a/dev-lang/ocaml/Manifest +++ b/dev-lang/ocaml/Manifest @@ -4,4 +4,5 @@ DIST ocaml-4.10.2.tar.gz 4933135 BLAKE2B ec5e92adb23c28a254247182c79ab555fd82603 DIST ocaml-4.11.2.tar.gz 5075323 BLAKE2B bdc503d9a8d0e39dd11060febcd0287657b460e50ed81e55578a3e778af990ca5d4ef9011753eee4e1a144da33eb76c95b1672dc99b76e65a2e107eee472fe06 SHA512 03d8a9f6e130142c121ff2eb3d54f584f1e7c8475f066a5803bb0edd2fa172ca06a56a3ec548b225f5c8b12112d7a68511b1e16f3ade075b5f02610d4247bbb3 DIST ocaml-4.12.0.tar.gz 5179734 BLAKE2B 318be7e306157102d7ad22802db381dfa9c675e43325395695c3564e5ffee87d9b55d1152ea1603edb5ef715a28cbde85d835dbf1b5aface2dc415c67192c208 SHA512 951e44cdda613f9c6c5f988434c84249a2d63ba14e21938a9e74c174ebaf9d81a3160d1e5021d57fcd4882732ae6aefc05239ac38116f39ca83d53879d5d4eaf DIST ocaml-4.12.1.tar.gz 5181696 BLAKE2B 9d21438e09b1a9680eabb65f5c78d9fe84459592ef7bb797a1933e5383f7b6d5cefffa8cdc184abc102417f5dbc0fca8ef624c9b560f89eaff6537544b5b395f SHA512 e942e5cf5530804690ec45c40936ad2acbb60e11279fc676e0f04181fe1855f84ee5c3cb9c337fc5d01f6ee0e7b2251a6c04f7de56d99c20bb62026dff6c5671 +DIST ocaml-4.13.0.tar.gz 5323007 BLAKE2B 56cbb64272ac2b4b8894b3bb91ec184eb977cb056ae75ace2fce716fdb9853d5626b8f91dcc339d1d0f9f033f032f99bc6e49c443ee142f6005aaabeef9a670a SHA512 553c94ba5c5332d134f2695b3323e4be60ef2d0a404652cbcc56968ec91b1de19a6d894c6e365e418fe814595bb926450d7b109e328e25fc317f13ed6b703080 DIST ocaml-patches-9.tar.bz2 1700 BLAKE2B 4e46b8fb490db28f815414e285f54e251394ea53e1d25c529bbea9f03e426fd19132b1e2c7c2be7d14983fceb4cad073d191b001f6da522fee4226371d4a2eca SHA512 cc19f9104fac69aecc5effa8cb772342e1fb61cdcd38ba0176efe04cf3d710b1c56d5178748f3bd29099af91fa684da432a8ef8d42de76dbd1b6954a255ea6c0 diff --git a/dev-lang/ocaml/ocaml-4.13.0.ebuild b/dev-lang/ocaml/ocaml-4.13.0.ebuild new file mode 100644 index 000000000000..da99522c6e38 --- /dev/null +++ b/dev-lang/ocaml/ocaml-4.13.0.ebuild @@ -0,0 +1,97 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic + +HOMEPAGE="https://ocaml.org/" +SRC_URI="https://github.com/ocaml/ocaml/archive/${PV}.tar.gz -> ${P}.tar.gz" +DESCRIPTION="Programming language supporting functional, imperative & object-oriented styles" + +LICENSE="QPL-1.0 LGPL-2" +SLOT="0/$(ver_cut 1-2)" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris" +IUSE="emacs flambda latex +ocamlopt xemacs" + +RDEPEND="sys-libs/binutils-libs:=" +BDEPEND="${RDEPEND} + virtual/pkgconfig" +PDEPEND="emacs? ( app-emacs/ocaml-mode ) + xemacs? ( app-xemacs/ocaml )" + +src_prepare() { + default + + cp "${FILESDIR}"/ocaml.conf "${T}" || die + + # OCaml generates textrels on 32-bit arches + # We can't do anything about it, but disabling it means that tests + # for OCaml-based packages won't fail on unexpected output + # bug #773226 + if use arm || use ppc || use x86 ; then + append-ldflags "-Wl,-z,notext" + fi + + # Upstream build ignores LDFLAGS in several places. + sed -i -e 's/\(^MKDLL=.*\)/\1 $(LDFLAGS)/' \ + -e 's/\(^OC_CFLAGS=.*\)/\1 $(LDFLAGS)/' \ + -e 's/\(^OC_LDFLAGS=.*\)/\1 $(LDFLAGS)/' \ + Makefile.config.in || die "LDFLAGS fix failed" +} + +src_configure() { + local opt=( + --bindir="${EPREFIX}/usr/bin" + --libdir="${EPREFIX}/usr/$(get_libdir)/ocaml" + --mandir="${EPREFIX}/usr/share/man" + --prefix="${EPREFIX}/usr" + $(use_enable flambda) + ) + + econf "${opt[@]}" +} + +src_compile() { + env -u P emake world + + if use ocamlopt ; then + env -u P emake opt + env -u P emake opt.opt + fi +} + +src_test() { + emake -j + + # OCaml tests only work when run sequentially + if use ocamlopt ; then + emake -j1 ocamltest.opt + else + emake -j1 ocamltest + #ewarn "${PN} was built without 'ocamlopt' USE flag; skipping tests." + fi + + emake -j1 tests +} + +src_install() { + default + + dodir /usr/include + # Create symlink for header files + dosym "../$(get_libdir)/ocaml/caml" /usr/include/caml + dodoc Changes README.adoc + + # Create envd entry for latex input files + if use latex ; then + echo "TEXINPUTS=\"${EPREFIX}/usr/$(get_libdir)/ocaml/ocamldoc:\"" > "${T}"/99ocamldoc || die + doenvd "${T}"/99ocamldoc + fi + + sed -i -e "s:lib:$(get_libdir):" "${T}"/ocaml.conf || die + + # Install ocaml-rebuild portage set + insinto /usr/share/portage/config/sets + doins "${T}"/ocaml.conf +} |