Gentoo Archives: gentoo-commits

From: Alexis Ballier <aballier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/ocaml/
Date: Sat, 15 Apr 2017 10:28:02
Message-Id: 1492252066.62b5205e8441853746d90d11ca8c3fe2aa90873a.aballier@gentoo
1 commit: 62b5205e8441853746d90d11ca8c3fe2aa90873a
2 Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
3 AuthorDate: Fri Apr 14 13:01:58 2017 +0000
4 Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
5 CommitDate: Sat Apr 15 10:27:46 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=62b5205e
7
8 dev-lang/ocaml: Bump to 4.04.1
9
10 Package-Manager: Portage-2.3.5, Repoman-2.3.2
11
12 dev-lang/ocaml/Manifest | 1 +
13 dev-lang/ocaml/ocaml-4.04.1.ebuild | 127 +++++++++++++++++++++++++++++++++++++
14 2 files changed, 128 insertions(+)
15
16 diff --git a/dev-lang/ocaml/Manifest b/dev-lang/ocaml/Manifest
17 index c65cf2ee741..8e8baed18ba 100644
18 --- a/dev-lang/ocaml/Manifest
19 +++ b/dev-lang/ocaml/Manifest
20 @@ -1,4 +1,5 @@
21 DIST ocaml-4.04.0.tar.gz 4057711 SHA256 03e49d09d5a509216ca0cc8fccd10df3ad9dd441d7633e89974a74e149be3c51 SHA512 288c514e7ccfe29fe9a65239d04f000b3b05df71f15bc05b3e5af50cb233544b4fec22baad69f60de587e8f0f8f65ee023a5b709896a1a68f9fd6fe30b81344d WHIRLPOOL 91fea4195ed84fb97f2ae68e30f47ce60a2404bc47ca809f6e0d182dd755833ea16a2e033ee0a02fab008f5905a2a9b6fa8dc2194c75b8d9daa353eb6b1d70e9
22 +DIST ocaml-4.04.1.tar.gz 4061830 SHA256 9aea1867848e370ae79f9aea4d48b04daf416478b0f43dfcb3a0f4d3ecf5f8e4 SHA512 d1bb536cd4c596752fb9e508f6b37b2d23a41350ecda866b8a890e15e5248b16e08bb99c9d02ed6cab8eed73162ae555cf6ef250f498e27f7463e6a724a5c103 WHIRLPOOL 56d16ba29596fb3952580643b5103415a46231af30cb0e86a9c8d3d200aa689d1cdeeda260494435ee958abbc3caab70b34a42622e9e9a61f3ad8d3c4e146a7d
23 DIST ocaml-4.05.0-beta3.tar.gz 4424084 SHA256 3d82d5b32310d1c010981c12508e0ff63fb71b0c89457bcac813b7c291d4b61c SHA512 4c31f2b1f43d2c81ea9e8a6b86439806ab3b4b1ab6c6ae35bc98bbd2a993d94b9e26744febebe1d2424c5ee2deb8b5c9c45ff6fbf96bc629758dec86877fff80 WHIRLPOOL c2ecf0f8d4a9ee9fe92d1a0cbd3c16a4a341d6b8c1acd7077f8602aa730c88f7d58cf15f867da5f93c54de8c9f4984f5f12ae27ce3accedc0e4eeb0e0d73fc77
24 DIST ocaml-patches-8.tar.bz2 1803 SHA256 bce7ea483842f6e201cdf3de266928b39b5b45322315010291ed28f811720525 SHA512 fc477fbb5bdec60a3c4d3dfa110119bb579560ac0e0e57e30e076da72643bda6359c06fd3745fd3436c5d611dbbd888ec2921e9d1920f4929df633c35a797411 WHIRLPOOL ae73b5377744add3afce012b5745fafd70c0f92f75cd6cf91560e0f2ba359a91f7276afed13db145c307be9fdf79c339c2c69be6946565354c68d701fa61a4be
25 DIST ocaml-patches-9.tar.bz2 1700 SHA256 1709c257536e9a8fdd25bfa651c4fb1aaff4c97596dbaa70eb4d4afc7020ae92 SHA512 cc19f9104fac69aecc5effa8cb772342e1fb61cdcd38ba0176efe04cf3d710b1c56d5178748f3bd29099af91fa684da432a8ef8d42de76dbd1b6954a255ea6c0 WHIRLPOOL 185406937ff0fdbfba3eed0e2e4267efac5aff1a15fc3cc5ea4434a57bf4a790bd21a801613d768328f3ab5046a0c85a0b73681c6711c348d0d0755a723c4857
26
27 diff --git a/dev-lang/ocaml/ocaml-4.04.1.ebuild b/dev-lang/ocaml/ocaml-4.04.1.ebuild
28 new file mode 100644
29 index 00000000000..7c0d656a3ef
30 --- /dev/null
31 +++ b/dev-lang/ocaml/ocaml-4.04.1.ebuild
32 @@ -0,0 +1,127 @@
33 +# Copyright 1999-2017 Gentoo Foundation
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI="5"
37 +
38 +inherit flag-o-matic eutils multilib versionator toolchain-funcs
39 +
40 +PATCHLEVEL="8"
41 +MY_P="${P/_/-}"
42 +DESCRIPTION="Type-inferring functional programming language descended from the ML family"
43 +HOMEPAGE="http://www.ocaml.org/"
44 +SRC_URI="https://github.com/ocaml/ocaml/archive/${PV/_/+}.tar.gz -> ${MY_P}.tar.gz
45 + mirror://gentoo/${PN}-patches-${PATCHLEVEL}.tar.bz2"
46 +
47 +LICENSE="QPL-1.0 LGPL-2"
48 +# Everytime ocaml is updated to a new version, everything ocaml must be rebuilt,
49 +# so here we go with the subslot.
50 +SLOT="0/${PV}"
51 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
52 +IUSE="emacs flambda latex ncurses +ocamlopt X xemacs"
53 +
54 +RDEPEND="
55 + sys-libs/binutils-libs:=
56 + ncurses? ( sys-libs/ncurses:0= )
57 + X? ( x11-libs/libX11 x11-proto/xproto )"
58 +DEPEND="${RDEPEND}
59 + virtual/pkgconfig"
60 +
61 +PDEPEND="emacs? ( app-emacs/ocaml-mode )
62 + xemacs? ( app-xemacs/ocaml )"
63 +
64 +S="${WORKDIR}/${MY_P}"
65 +pkg_setup() {
66 + # dev-lang/ocaml creates its own objects but calls gcc for linking, which will
67 + # results in relocations if gcc wants to create a PIE executable
68 + if gcc-specs-pie ; then
69 + append-ldflags -nopie
70 + ewarn "Ocaml generates its own native asm, you're using a PIE compiler"
71 + ewarn "We have appended -nopie to ocaml build options"
72 + ewarn "because linking an executable with pie while the objects are not pic will not work"
73 + fi
74 +}
75 +
76 +src_prepare() {
77 + EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
78 +}
79 +
80 +src_configure() {
81 + export LC_ALL=C
82 + local myconf=""
83 +
84 + # Causes build failures because it builds some programs with -pg,
85 + # bug #270920
86 + filter-flags -fomit-frame-pointer
87 + # Bug #285993
88 + filter-mfpmath sse
89 +
90 + # -ggdb3 & co makes it behave weirdly, breaks sexplib
91 + replace-flags -ggdb* -ggdb
92 +
93 + # It doesn't compile on alpha without this LDFLAGS
94 + use alpha && append-ldflags "-Wl,--no-relax"
95 +
96 + use ncurses || myconf="${myconf} -no-curses"
97 + use X || myconf="${myconf} -no-graph"
98 + use flambda && myconf="${myconf} -flambda"
99 +
100 + # ocaml uses a home-brewn configure script, preventing it to use econf.
101 + RAW_LDFLAGS="$(raw-ldflags)" ./configure \
102 + --prefix "${EPREFIX}"/usr \
103 + --bindir "${EPREFIX}"/usr/bin \
104 + --target-bindir "${EPREFIX}"/usr/bin \
105 + --libdir "${EPREFIX}"/usr/$(get_libdir)/ocaml \
106 + --mandir "${EPREFIX}"/usr/share/man \
107 + -target "${CHOST}" \
108 + -host "${CBUILD}" \
109 + -cc "$(tc-getCC)" \
110 + -as "$(tc-getAS)" \
111 + -aspp "$(tc-getCC) -c" \
112 + -partialld "$(tc-getLD) -r" \
113 + --with-pthread ${myconf} || die "configure failed!"
114 +
115 + # http://caml.inria.fr/mantis/view.php?id=4698
116 + export CCLINKFLAGS="${LDFLAGS}"
117 +}
118 +
119 +src_compile() {
120 + emake world
121 +
122 + # Native code generation can be disabled now
123 + if use ocamlopt ; then
124 + # bug #279968
125 + emake opt
126 + emake opt.opt
127 + fi
128 +}
129 +
130 +src_test() {
131 + if use ocamlopt ; then
132 + emake -j1 tests
133 + else
134 + ewarn "${PN} testsuite requires ocamlopt useflag"
135 + fi
136 +}
137 +
138 +src_install() {
139 + emake BINDIR="${ED}"/usr/bin \
140 + LIBDIR="${ED}"/usr/$(get_libdir)/ocaml \
141 + MANDIR="${ED}"/usr/share/man \
142 + install
143 +
144 + # Symlink the headers to the right place
145 + dodir /usr/include
146 + dosym /usr/$(get_libdir)/ocaml/caml /usr/include/caml
147 +
148 + dodoc Changes README.adoc
149 +
150 + # Create and envd entry for latex input files
151 + if use latex ; then
152 + echo "TEXINPUTS=${EPREFIX}/usr/$(get_libdir)/ocaml/ocamldoc:" > "${T}"/99ocamldoc
153 + doenvd "${T}"/99ocamldoc
154 + fi
155 +
156 + # Install ocaml-rebuild portage set
157 + insinto /usr/share/portage/config/sets
158 + doins "${FILESDIR}/ocaml.conf"
159 +}