dev-lang/ocaml: add 4.03 beta1 without keywords
authorAlexis Ballier <aballier@gentoo.org>
Tue, 1 Mar 2016 17:24:02 +0000 (18:24 +0100)
committerAlexis Ballier <aballier@gentoo.org>
Tue, 1 Mar 2016 18:47:37 +0000 (19:47 +0100)
Package-Manager: portage-2.2.27
Signed-off-by: Alexis Ballier <aballier@gentoo.org>
dev-lang/ocaml/Manifest
dev-lang/ocaml/ocaml-4.03.0_beta1.ebuild [new file with mode: 0644]

index 70893c37f861f95ffe74b1c4aabd364a94106fbe..c2f401677085dce6719cd2145ff773db1572f8a9 100644 (file)
@@ -1,4 +1,6 @@
 DIST ocaml-3.12.1.tar.bz2 2949124 SHA256 edcf563da75e0b91f09765649caa98ab1535e0c7498f0737b5591b7de084958d SHA512 cbb050aabcbe19a4aa070d6cb74f3774cb136692dfd9433ca977f0f9520ad2f583b6cfb1a9cedfedc92e7dc794ac4a869e20aa5a67a4739002feb290435dc7e7 WHIRLPOOL b7bf4844452ab52027e6b785159df6e4defc548d2f3d31eb73dc0dc05214e7c19ed654c8b3ff234a85691599df0be568ba02fafe257856be7f603177584a7ca0
 DIST ocaml-4.02.3.tar.xz 2058552 SHA256 83c6697e135b599a196fd7936eaf8a53dd6b8f3155a796d18407b56f91df9ce3 SHA512 a815421f6a320b18e7f351bd66884024ad4a33525ba161a198ea356892ce331be6c1ddf4cd07d120ebe9a902bcf815ce1b17e45f405e4e0b2d55ce1b6d2adada WHIRLPOOL 1104cdcf23b773ebf0c0ef8d8ee36b2b4b58b1fab10a41ff7f2d522c34ae6161bc6cba28b279eea03ac183a111fc332557084b017d0c2ad6f9c969204e309597
+DIST ocaml-4.03.0+beta1.tar.xz 2277268 SHA256 ef7e50846b101229f0c2a3a3699c719400c90f1ecdf7d4e038459612e9de6116 SHA512 9d02bfc5bc1f0d412bf026a826c6411ff96c5fbb93118c64103787a17279c42fb5e4f51e5a0e54580f87a9e4a5ba0db536549ba45adddcb974efd7c8285f0a5b WHIRLPOOL 7e68702fd64a14e4ae7221d48ef9baff4e4b2850812002a067711a248c273406ba74109ac23ea78fb2a3f9cb0ec86b9490a50530105d908500c1cccfc6290717
 DIST ocaml-patches-3.tar.bz2 4101 SHA256 c4ceb604f4480c78d1cf4f848b0903c8d37798d9761f582d8d1643d4e38b8658 SHA512 8be5c44de5a6b0b7c14723e41d92fe807b881b218cc5eee38ea7519c0f971415cb7fe30035303da275089dcb8a61c4f334c4a88e0bdbced3953503794b8308a7 WHIRLPOOL f1920606785702c44dead01b1426145653bc1931acba2d614c6818baddc051e4f74ca0322cae66ade63ba0cd0df5651cfd67f511fca5f12973b67a0c50ebab6d
 DIST ocaml-patches-7.tar.bz2 2194 SHA256 71e9496af89ded9852d8e1f32be18a5f0d7e11270958fb4bc8c588420b1e9156 SHA512 63bca96f009e2de24ff6f7a4b37b97c5b7655d5ad6196f06cc2b18ca213e87878a310d169378c341c00aaac698530e458e301620bcc21284bc8b9ea143f642dd WHIRLPOOL 02d17436f901c70b2fa8a104d8b7a6526c65ab9b40408b549c4f4dfe7a1eeae8213620d151fb181833782504e4d7cb6fa3ff7ddebe77efcb88d32fe057cbd8cc
+DIST ocaml-patches-8.tar.bz2 1803 SHA256 bce7ea483842f6e201cdf3de266928b39b5b45322315010291ed28f811720525 SHA512 fc477fbb5bdec60a3c4d3dfa110119bb579560ac0e0e57e30e076da72643bda6359c06fd3745fd3436c5d611dbbd888ec2921e9d1920f4929df633c35a797411 WHIRLPOOL ae73b5377744add3afce012b5745fafd70c0f92f75cd6cf91560e0f2ba359a91f7276afed13db145c307be9fdf79c339c2c69be6946565354c68d701fa61a4be
diff --git a/dev-lang/ocaml/ocaml-4.03.0_beta1.ebuild b/dev-lang/ocaml/ocaml-4.03.0_beta1.ebuild
new file mode 100644 (file)
index 0000000..955952a
--- /dev/null
@@ -0,0 +1,116 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit flag-o-matic eutils multilib versionator toolchain-funcs
+
+PATCHLEVEL="8"
+MY_P="${P/_/+}"
+DESCRIPTION="Fast modern type-inferring functional programming language descended from the ML family"
+HOMEPAGE="http://www.ocaml.org/"
+SRC_URI="http://caml.inria.fr/pub/distrib/ocaml-$(get_version_component_range 1-2)/${MY_P}.tar.xz
+       mirror://gentoo/${PN}-patches-${PATCHLEVEL}.tar.bz2"
+
+LICENSE="QPL-1.0 LGPL-2"
+# Everytime ocaml is updated to a new version, everything ocaml must be rebuilt,
+# so here we go with the subslot.
+SLOT="0/${PV}"
+#KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+KEYWORDS=""
+IUSE="emacs latex ncurses +ocamlopt X xemacs"
+
+RDEPEND="
+       ncurses? ( sys-libs/ncurses:0= )
+       X? ( x11-libs/libX11 x11-proto/xproto )"
+DEPEND="${RDEPEND}
+       virtual/pkgconfig"
+
+PDEPEND="emacs? ( app-emacs/ocaml-mode )
+       xemacs? ( app-xemacs/ocaml )"
+
+S="${WORKDIR}/${MY_P}"
+pkg_setup() {
+       # dev-lang/ocaml creates its own objects but calls gcc for linking, which will
+       # results in relocations if gcc wants to create a PIE executable
+       if gcc-specs-pie ; then
+               append-ldflags -nopie
+               ewarn "Ocaml generates its own native asm, you're using a PIE compiler"
+               ewarn "We have appended -nopie to ocaml build options"
+               ewarn "because linking an executable with pie while the objects are not pic will not work"
+       fi
+}
+
+src_prepare() {
+       EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
+}
+
+src_configure() {
+       export LC_ALL=C
+       local myconf=""
+
+       # Causes build failures because it builds some programs with -pg,
+       # bug #270920
+       filter-flags -fomit-frame-pointer
+       # Bug #285993
+       filter-mfpmath sse
+
+       # It doesn't compile on alpha without this LDFLAGS
+       use alpha && append-ldflags "-Wl,--no-relax"
+
+       use ncurses || myconf="${myconf} -no-curses"
+       use X || myconf="${myconf} -no-graph"
+
+       # ocaml uses a home-brewn configure script, preventing it to use econf.
+       RAW_LDFLAGS="$(raw-ldflags)" ./configure \
+               --prefix "${EPREFIX}"/usr \
+               --bindir "${EPREFIX}"/usr/bin \
+               --target-bindir "${EPREFIX}"/usr/bin \
+               --libdir "${EPREFIX}"/usr/$(get_libdir)/ocaml \
+               --mandir "${EPREFIX}"/usr/share/man \
+               -target "${CHOST}" \
+               -host "${CBUILD}" \
+               -cc "$(tc-getCC)" \
+               -as "$(tc-getAS)" \
+               -aspp "$(tc-getCC) -c" \
+               -partialld "$(tc-getLD) -r" \
+               --with-pthread ${myconf} || die "configure failed!"
+
+       # http://caml.inria.fr/mantis/view.php?id=4698
+       export CCLINKFLAGS="${LDFLAGS}"
+}
+
+src_compile() {
+       emake world
+
+       # Native code generation can be disabled now
+       if use ocamlopt ; then
+               # bug #279968
+               emake opt
+               emake opt.opt
+       fi
+}
+
+src_install() {
+       emake BINDIR="${ED}"/usr/bin \
+               LIBDIR="${ED}"/usr/$(get_libdir)/ocaml \
+               MANDIR="${ED}"/usr/share/man \
+               install
+
+       # Symlink the headers to the right place
+       dodir /usr/include
+       dosym /usr/$(get_libdir)/ocaml/caml /usr/include/caml
+
+       dodoc Changes README.adoc
+
+       # Create and envd entry for latex input files
+       if use latex ; then
+               echo "TEXINPUTS=${EPREFIX}/usr/$(get_libdir)/ocaml/ocamldoc:" > "${T}"/99ocamldoc
+               doenvd "${T}"/99ocamldoc
+       fi
+
+       # Install ocaml-rebuild portage set
+       insinto /usr/share/portage/config/sets
+       doins "${FILESDIR}/ocaml.conf"
+}