summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2011-06-11 17:39:25 +0000
committerAlexis Ballier <aballier@gentoo.org>2011-06-11 17:39:25 +0000
commit6213096d4679cff7ca3e28c867555ea317061cbf (patch)
tree59f1c7a4c8c2bab6b7200d240ee11e1147144af0 /dev-lang/ocaml
parentInitial import (diff)
downloadhistorical-6213096d4679cff7ca3e28c867555ea317061cbf.tar.gz
historical-6213096d4679cff7ca3e28c867555ea317061cbf.tar.bz2
historical-6213096d4679cff7ca3e28c867555ea317061cbf.zip
Install a portage set for @ocaml-rebuild to replace ocaml-rebuild.sh
Package-Manager: portage-2.2.0_alpha39/cvs/Linux x86_64
Diffstat (limited to 'dev-lang/ocaml')
-rw-r--r--dev-lang/ocaml/ChangeLog8
-rw-r--r--dev-lang/ocaml/Manifest10
-rw-r--r--dev-lang/ocaml/files/ocaml.conf5
-rw-r--r--dev-lang/ocaml/ocaml-3.12.0-r1.ebuild130
4 files changed, 148 insertions, 5 deletions
diff --git a/dev-lang/ocaml/ChangeLog b/dev-lang/ocaml/ChangeLog
index 29a86edfa20f..6ad51f954489 100644
--- a/dev-lang/ocaml/ChangeLog
+++ b/dev-lang/ocaml/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-lang/ocaml
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/ocaml/ChangeLog,v 1.189 2011/02/27 13:09:10 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/ocaml/ChangeLog,v 1.190 2011/06/11 17:39:25 aballier Exp $
+
+*ocaml-3.12.0-r1 (11 Jun 2011)
+
+ 11 Jun 2011; Alexis Ballier <aballier@gentoo.org> +ocaml-3.12.0-r1.ebuild,
+ +files/ocaml.conf:
+ Install a portage set for @ocaml-rebuild to replace ocaml-rebuild.sh
27 Feb 2011; Alexis Ballier <aballier@gentoo.org> ocaml-3.12.0.ebuild:
Add a patch to pass libs as last argument to the linker when linking, fixes
diff --git a/dev-lang/ocaml/Manifest b/dev-lang/ocaml/Manifest
index 3f0e44e5ad65..4d1770b96a37 100644
--- a/dev-lang/ocaml/Manifest
+++ b/dev-lang/ocaml/Manifest
@@ -2,18 +2,20 @@
Hash: SHA1
AUX ocaml-rebuild.sh 1120 RMD160 a5138feb7cadc22f89fd5b1ad628d67e6e6734e0 SHA1 b563c2895858146bd9aa1794298990c5a79cb505 SHA256 893320630726c58ea3b501ef16913c150c50ea9d6cd38ecd26fa0679597d3a7c
+AUX ocaml.conf 177 RMD160 3a0d91eabe02ccf823931bb3256322c15f38b38a SHA1 603ac7177e01542c74bb95e836fd341cef5dfe2c SHA256 b7f7ad0ff15bec096dcb87265d87f9b0ce8f946d4a2676dd7638ca0e14bb05c1
DIST ocaml-3.11.2.tar.bz2 2346284 RMD160 a407e579b7fa134fc8126c5c5b544dd60cedecb1 SHA1 59053ce0078da2367f4ce61da886d22c6e86a46d SHA256 86f3387a0d7e7c8be2a3c53af083a5a726e333686208d5ea0dd6bb5ac3f58143
DIST ocaml-3.12.0.tar.bz2 2639049 RMD160 3d10d5f7431d8200688fa74122e7ed528126a0fa SHA1 33ebbfb1115806f117808f37e40d206c8994943d SHA256 17811756209ec9658e1027b0d3b8e5dedb772ca1c43e0bdfa630a2a183ffec3b
DIST ocaml-patches-1.tar.bz2 3108 RMD160 ad56f8be4b15347794f3167be82124fcdbf6f6dc SHA1 542ae4c2b1515730fe0c9050b6658106ef69ad19 SHA256 ad1c252cba7cc50f70d19049fcd78aa359672e436ab9906424548229a04afa49
DIST ocaml-patches-3.tar.bz2 4101 RMD160 f830b0be28a96f8892776d0372fa10fb56a605ee SHA1 f165b9fce29cc4d96a81abbc7edbde35e33b4c0c SHA256 c4ceb604f4480c78d1cf4f848b0903c8d37798d9761f582d8d1643d4e38b8658
EBUILD ocaml-3.11.2.ebuild 4127 RMD160 af407baa063d742b0a1d60f4604c72363963ff91 SHA1 179506aecc9e48cd9e4c7f6319584467d7a137d9 SHA256 89abc74d30c03d2755623f3b9eadcb1a4b975fb9b668616f380640b6af76aeea
+EBUILD ocaml-3.12.0-r1.ebuild 4042 RMD160 2467c9813ffda62843763471d8cee3445a3c73c6 SHA1 ddd04923cd91f62f263278bc515c3fed1154c0f6 SHA256 c4684a7d29730187bf799bf38dbcb1bbdb94d60262fbc6c2fde8932d19274090
EBUILD ocaml-3.12.0.ebuild 4134 RMD160 faa3071fa8b1b4d524abc1e6c3f1191d6dc9b931 SHA1 91b69aebf944fa29e1ab79fb647e3359f5f21e59 SHA256 cfd950545519033379929e51473de15be899441997d8bf289b38a4ba24a531dc
-MISC ChangeLog 29764 RMD160 7d9f975e451891372cb719446ac4aec7afce0971 SHA1 5e1b898981a9994bf09d8d071aa89388c44f1b8a SHA256 d263e3328cae0699c17b1b60b72be61a0291da76d5afa7d6631873a6f1167b4e
+MISC ChangeLog 29966 RMD160 2e0ae8fca62635c0bff9779f35728034aa9ebfa6 SHA1 088f6ab53237897bb1b551899524432486da8f57 SHA256 32dde754f854c869f4ef235bb86c6069cae59436f97d7ac7ef8e241d5ce7c319
MISC metadata.xml 155 RMD160 dfaa057e679b01302a807c75a32a910098b26809 SHA1 94024f83dcacbb53e92be090dd0f994ec93dc90d SHA256 118048376ebb76f57628b0819f3de4856e73959c2578c88715d37ea2d1e0af81
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
-iEYEARECAAYFAk1qTPwACgkQvFcC4BYPU0rUowCZASRUs6yw/baVUjQHbUaCKNpq
-InMAnjDMVVAe9lXaYu99D5oW77g0rNbY
-=rEJg
+iEYEARECAAYFAk3zqFMACgkQvFcC4BYPU0rYnACghe5qhEwZdMh8TGe4vfeg6JeP
+XZkAn12TJ/87SUWa4FswjWpnYbbUcnVi
+=irK7
-----END PGP SIGNATURE-----
diff --git a/dev-lang/ocaml/files/ocaml.conf b/dev-lang/ocaml/files/ocaml.conf
new file mode 100644
index 000000000000..083b8cef960b
--- /dev/null
+++ b/dev-lang/ocaml/files/ocaml.conf
@@ -0,0 +1,5 @@
+# Rebuild all ocaml modules (must be rebuilt after each ocaml upgrade)
+[ocaml-rebuild]
+class = portage.sets.dbapi.OwnerSet
+files = /usr/lib/ocaml
+exclude-files = /usr/bin/ocaml
diff --git a/dev-lang/ocaml/ocaml-3.12.0-r1.ebuild b/dev-lang/ocaml/ocaml-3.12.0-r1.ebuild
new file mode 100644
index 000000000000..4019ca24eac3
--- /dev/null
+++ b/dev-lang/ocaml/ocaml-3.12.0-r1.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/ocaml/ocaml-3.12.0-r1.ebuild,v 1.1 2011/06/11 17:39:25 aballier Exp $
+
+EAPI="1"
+
+inherit flag-o-matic eutils multilib versionator toolchain-funcs
+
+PATCHLEVEL="3"
+MY_P="${P/_/+}"
+DESCRIPTION="Fast modern type-inferring functional programming language descended from the ML family"
+HOMEPAGE="http://www.ocaml.org/"
+SRC_URI="ftp://ftp.inria.fr/INRIA/Projects/cristal/ocaml/ocaml-$(get_version_component_range 1-2)/${MY_P}.tar.bz2
+ mirror://gentoo/${PN}-patches-${PATCHLEVEL}.tar.bz2"
+
+LICENSE="QPL-1.0 LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="emacs gdbm latex ncurses +ocamlopt tk X xemacs"
+
+DEPEND="tk? ( >=dev-lang/tk-3.3.3 )
+ ncurses? ( sys-libs/ncurses )
+ X? ( x11-libs/libX11 x11-proto/xproto )
+ gdbm? ( sys-libs/gdbm )"
+RDEPEND="${DEPEND}"
+
+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_unpack() {
+ unpack ${A}
+ cd "${S}"
+ EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
+}
+
+src_compile() {
+ 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"
+ # Fails to build on arm if >O0 is used
+ use arm && replace-flags "-O?" -O0
+
+ use tk || myconf="${myconf} -no-tk"
+ use ncurses || myconf="${myconf} -no-curses"
+ use X || myconf="${myconf} -no-graph"
+ use gdbm || myconf="${myconf} -no-dbm"
+
+ # ocaml uses a home-brewn configure script, preventing it to use econf.
+ RAW_LDFLAGS="$(raw-ldflags)" ./configure -prefix /usr \
+ --bindir /usr/bin \
+ --libdir /usr/$(get_libdir)/ocaml \
+ --mandir /usr/share/man \
+ -host "${CHOST}" \
+ -cc "$(tc-getCC)" \
+ -as "$(tc-getAS)" \
+ -aspp "$(tc-getCC) -c" \
+ -partialld "$(tc-getLD) -r" \
+ --with-pthread ${myconf} || die "configure failed!"
+
+ emake -j1 world || die "make world failed!"
+
+ # Native code generation can be disabled now
+ if use ocamlopt ; then
+ # bug #279968
+ emake -j1 opt || die "make opt failed!"
+ emake -j1 opt.opt || die "make opt.opt failed!"
+ fi
+}
+
+src_install() {
+ make BINDIR="${D}"/usr/bin \
+ LIBDIR="${D}"/usr/$(get_libdir)/ocaml \
+ MANDIR="${D}"/usr/share/man \
+ install || die "make install failed!"
+
+ # Install the compiler libs
+ dodir /usr/$(get_libdir)/ocaml/compiler-libs
+ insinto /usr/$(get_libdir)/ocaml/compiler-libs
+ doins {utils,typing,parsing}/*.{mli,cmi,cmo}
+ use ocamlopt && doins {utils,typing,parsing}/*.{cmx,o}
+
+ # Symlink the headers to the right place
+ dodir /usr/include
+ dosym /usr/$(get_libdir)/ocaml/caml /usr/include/
+
+ # Remove ${D} from ld.conf, as the buildsystem isn't $(DESTDIR) aware
+ dosed "s:${D}::g" /usr/$(get_libdir)/ocaml/ld.conf
+
+ dodoc Changes INSTALL README Upgrading
+
+ # Create and envd entry for latex input files (this definitely belongs into
+ # CONTENT and not in pkg_postinst.
+ if use latex ; then
+ echo "TEXINPUTS=/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" || die
+}
+
+pkg_postinst() {
+ echo
+ ewarn "OCaml is not binary compatible from version to version, so you"
+ ewarn "need to rebuild all packages depending on it, that are actually"
+ ewarn "installed on your system. To do so, you can run:"
+ ewarn "emerge @ocaml-rebuild"
+ echo
+}