Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/ocaml/
Date: Mon, 28 Dec 2020 11:49:13
Message-Id: 1609147427.fb7b2eeeee1ba02735cc72b20eae7bee9c119c66.sam@gentoo
1 commit: fb7b2eeeee1ba02735cc72b20eae7bee9c119c66
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Mon Dec 28 09:20:07 2020 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Mon Dec 28 09:23:47 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb7b2eee
7
8 dev-lang/ocaml: bump to 4.10.2
9
10 Package-Manager: Portage-3.0.9, Repoman-3.0.2
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 dev-lang/ocaml/Manifest | 1 +
14 dev-lang/ocaml/ocaml-4.10.2.ebuild | 79 ++++++++++++++++++++++++++++++++++++++
15 2 files changed, 80 insertions(+)
16
17 diff --git a/dev-lang/ocaml/Manifest b/dev-lang/ocaml/Manifest
18 index bdcf6a4915f..84240dde1f1 100644
19 --- a/dev-lang/ocaml/Manifest
20 +++ b/dev-lang/ocaml/Manifest
21 @@ -2,6 +2,7 @@ DIST ocaml-4.04.2.tar.gz 4061873 BLAKE2B 756936592c7e0c87da27f154f07850eb3e4b2ed
22 DIST ocaml-4.05.0.tar.gz 4431750 BLAKE2B c2ab003a13e0a581ebd0e1c96eeb8a9baea9bfe6bee08823b0e4541819201ec109f1846e13fc1aefa51a001eefbb8f73320ba854d41975fc68cef41bc75b1ecc SHA512 9a060ae4b741e1687277403e5bdb8f6eda2e2ebf6c45f7c0149b66ea1213cb26d13febfbb3f11c12543e244cfdd053b786b09c4145e2348e5d89a7206f7de225
23 DIST ocaml-4.09.0.tar.gz 4838748 BLAKE2B 80f29d535c64bf2371b480217723ed20b2b21cfd93ce31366a7b91e7ddffdf68db4e88d085288b7e21efee567a13f42ecff24c3a0115507b006acf844239cefd SHA512 dc0271e591bf929b751705835790949a9d741e12d085c8b207c3689b5838a02ea8de80da8b2605d2e6744f2f541b0d1694ffafff9509e99ce01f3a391f6ef2ae
24 DIST ocaml-4.10.0.tar.gz 4927867 BLAKE2B 71b8448a10bf3049e3b005dfbb2030d479e69e4c2ef00055f1dacd38eff838b0a5c18b4883d899b5eb4cbd05bb7ca35867010794ed25682ad51b2fe19ef2114d SHA512 f39269d572b3f7755f7881b7a9fdfe5253e49d847835ae2a8695f67e3309fc1e925523d66ecbe1fb8bc0cc3b5602e077ce7feac4926aab571383766442265179
25 +DIST ocaml-4.10.2.tar.gz 4933135 BLAKE2B ec5e92adb23c28a254247182c79ab555fd82603e02f24799049b8057abf869d18234302408c8ae89b9997a2b210ed6965e45c2c03e4f0cab34262ad3f6ebb528 SHA512 1dd827da07f01e815fd74dd7ee84db0900f24782f8f7fd426e2d71b9fb03c7b8045f22e018120a0446c362315751365d1bd8c1724edef2b182394e76eb0a07b2
26 DIST ocaml-4.11.1.tar.gz 5069552 BLAKE2B a731d4b60d7965c860dda5c9dfb26b968320760501ff3cac908b8cd96e34391c417e16077cdf753b27b85a79857451e6ff0b566a9158178026a0e6bd5240aac4 SHA512 93fa8b2ff71d5f645e3ed72913205e7d35aa523cfa87d1939d77e796495b94c2fdb4a429ea65330cdeecfb0a36f7ab053b15090d9baa151b58e5331148dc8150
27 DIST ocaml-patches-8.tar.bz2 1803 BLAKE2B 5e76a198c2f5ca9f231d4e80499d784cf061ec79bf6b5e3aac917e1260d1f2b927f0f8015d39c01ce4fd481d32a5d211c31e081a7ab87ba1e7c7d5def95bc0fb SHA512 fc477fbb5bdec60a3c4d3dfa110119bb579560ac0e0e57e30e076da72643bda6359c06fd3745fd3436c5d611dbbd888ec2921e9d1920f4929df633c35a797411
28 DIST ocaml-patches-9.tar.bz2 1700 BLAKE2B 4e46b8fb490db28f815414e285f54e251394ea53e1d25c529bbea9f03e426fd19132b1e2c7c2be7d14983fceb4cad073d191b001f6da522fee4226371d4a2eca SHA512 cc19f9104fac69aecc5effa8cb772342e1fb61cdcd38ba0176efe04cf3d710b1c56d5178748f3bd29099af91fa684da432a8ef8d42de76dbd1b6954a255ea6c0
29
30 diff --git a/dev-lang/ocaml/ocaml-4.10.2.ebuild b/dev-lang/ocaml/ocaml-4.10.2.ebuild
31 new file mode 100644
32 index 00000000000..509cb5812df
33 --- /dev/null
34 +++ b/dev-lang/ocaml/ocaml-4.10.2.ebuild
35 @@ -0,0 +1,79 @@
36 +# Copyright 1999-2020 Gentoo Authors
37 +# Distributed under the terms of the GNU General Public License v2
38 +
39 +EAPI=7
40 +
41 +HOMEPAGE="https://ocaml.org/"
42 +SRC_URI="https://github.com/ocaml/ocaml/archive/${PV}.tar.gz -> ${P}.tar.gz"
43 +DESCRIPTION="Programming language supporting functional, imperative & object-oriented styles"
44 +
45 +LICENSE="LGPL-2.1"
46 +SLOT="0/${PV}"
47 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
48 +IUSE="emacs flambda latex +ocamlopt spacetime xemacs"
49 +
50 +RDEPEND="sys-libs/binutils-libs:=
51 + spacetime? ( sys-libs/libunwind:= )"
52 +BDEPEND="${RDEPEND}
53 + virtual/pkgconfig"
54 +PDEPEND="emacs? ( app-emacs/ocaml-mode )
55 + xemacs? ( app-xemacs/ocaml )"
56 +
57 +src_prepare() {
58 + default
59 + # Upstream build ignores LDFLAGS in several places.
60 + sed -i -e 's/\(^MKDLL=.*\)/\1 $(LDFLAGS)/' \
61 + -e 's/\(^OC_CFLAGS=.*\)/\1 $(LDFLAGS)/' \
62 + -e 's/\(^OC_LDFLAGS=.*\)/\1 $(LDFLAGS)/' \
63 + Makefile.config.in || die "LDFLAGS fix failed"
64 + # ${P} overrides upstream build's own P due to a wrong assignment operator.
65 + sed -i -e 's/^P ?=/P =/' stdlib/StdlibModules || die "P fix failed"
66 +}
67 +
68 +src_configure() {
69 + local opt=(
70 + --bindir="${EPREFIX}/usr/bin"
71 + --libdir="${EPREFIX}/usr/$(get_libdir)/ocaml"
72 + --mandir="${EPREFIX}/usr/share/man"
73 + --prefix="${EPREFIX}/usr"
74 + $(use_enable flambda)
75 + $(use_enable spacetime)
76 + )
77 + econf ${opt[@]}
78 +}
79 +
80 +src_compile() {
81 + if use ocamlopt ; then
82 + emake world.opt
83 + else
84 + emake world
85 + fi
86 +}
87 +
88 +src_test() {
89 + if use ocamlopt ; then
90 + # OCaml tests only work when run sequentially
91 + emake -j1 -C testsuite all
92 + else
93 + ewarn "${PN} was built without 'ocamlopt' USE flag; skipping tests."
94 + fi
95 +}
96 +
97 +src_install() {
98 + default
99 + dodir /usr/include
100 +
101 + # Create symlink for header files
102 + dosym "../$(get_libdir)/ocaml/caml" /usr/include/caml
103 + dodoc Changes README.adoc
104 +
105 + # Create envd entry for latex input files
106 + if use latex ; then
107 + echo "TEXINPUTS=\"${EPREFIX}/usr/$(get_libdir)/ocaml/ocamldoc:\"" > "${T}/99ocamldoc"
108 + doenvd "${T}/99ocamldoc"
109 + fi
110 +
111 + # Install ocaml-rebuild portage set
112 + insinto /usr/share/portage/config/sets
113 + doins "${FILESDIR}/ocaml.conf"
114 +}