Gentoo Archives: gentoo-commits

From: "Alexis Ballier (aballier)" <aballier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-lang/ocaml: ChangeLog ocaml-3.12.1.ebuild
Date: Mon, 04 Jul 2011 22:11:43
Message-Id: 20110704221134.262662004B@flycatcher.gentoo.org
1 aballier 11/07/04 22:11:34
2
3 Modified: ChangeLog
4 Added: ocaml-3.12.1.ebuild
5 Log:
6 bump to 3.12.1
7
8 (Portage version: 2.2.0_alpha43/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.192 dev-lang/ocaml/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ocaml/ChangeLog?rev=1.192&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ocaml/ChangeLog?rev=1.192&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ocaml/ChangeLog?r1=1.191&r2=1.192
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-lang/ocaml/ChangeLog,v
20 retrieving revision 1.191
21 retrieving revision 1.192
22 diff -u -r1.191 -r1.192
23 --- ChangeLog 26 Jun 2011 18:09:41 -0000 1.191
24 +++ ChangeLog 4 Jul 2011 22:11:34 -0000 1.192
25 @@ -1,6 +1,11 @@
26 # ChangeLog for dev-lang/ocaml
27 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/ocaml/ChangeLog,v 1.191 2011/06/26 18:09:41 aballier Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/ocaml/ChangeLog,v 1.192 2011/07/04 22:11:34 aballier Exp $
30 +
31 +*ocaml-3.12.1 (04 Jul 2011)
32 +
33 + 04 Jul 2011; Alexis Ballier <aballier@g.o> +ocaml-3.12.1.ebuild:
34 + bump to 3.12.1
35
36 *ocaml-3.12.1_rc1 (26 Jun 2011)
37
38
39
40
41 1.1 dev-lang/ocaml/ocaml-3.12.1.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ocaml/ocaml-3.12.1.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ocaml/ocaml-3.12.1.ebuild?rev=1.1&content-type=text/plain
45
46 Index: ocaml-3.12.1.ebuild
47 ===================================================================
48 # Copyright 1999-2011 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/dev-lang/ocaml/ocaml-3.12.1.ebuild,v 1.1 2011/07/04 22:11:34 aballier Exp $
51
52 EAPI="1"
53
54 inherit flag-o-matic eutils multilib versionator toolchain-funcs
55
56 PATCHLEVEL="3"
57 MY_P="${P/_/+}"
58 DESCRIPTION="Fast modern type-inferring functional programming language descended from the ML family"
59 HOMEPAGE="http://www.ocaml.org/"
60 SRC_URI="ftp://ftp.inria.fr/INRIA/Projects/cristal/ocaml/ocaml-$(get_version_component_range 1-2)/${MY_P}.tar.bz2
61 mirror://gentoo/${PN}-patches-${PATCHLEVEL}.tar.bz2"
62
63 LICENSE="QPL-1.0 LGPL-2"
64 SLOT="0"
65 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
66 IUSE="emacs gdbm latex ncurses +ocamlopt tk X xemacs"
67
68 DEPEND="tk? ( >=dev-lang/tk-3.3.3 )
69 ncurses? ( sys-libs/ncurses )
70 X? ( x11-libs/libX11 x11-proto/xproto )
71 gdbm? ( sys-libs/gdbm )"
72 RDEPEND="${DEPEND}"
73
74 PDEPEND="emacs? ( app-emacs/ocaml-mode )
75 xemacs? ( app-xemacs/ocaml )"
76
77 S="${WORKDIR}/${MY_P}"
78 pkg_setup() {
79 # dev-lang/ocaml creates its own objects but calls gcc for linking, which will
80 # results in relocations if gcc wants to create a PIE executable
81 if gcc-specs-pie ; then
82 append-ldflags -nopie
83 ewarn "Ocaml generates its own native asm, you're using a PIE compiler"
84 ewarn "We have appended -nopie to ocaml build options"
85 ewarn "because linking an executable with pie while the objects are not pic will not work"
86 fi
87 }
88
89 src_unpack() {
90 unpack ${A}
91 cd "${S}"
92 EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
93 }
94
95 src_compile() {
96 export LC_ALL=C
97 local myconf=""
98
99 # Causes build failures because it builds some programs with -pg,
100 # bug #270920
101 filter-flags -fomit-frame-pointer
102 # Bug #285993
103 filter-mfpmath sse
104
105 # It doesn't compile on alpha without this LDFLAGS
106 use alpha && append-ldflags "-Wl,--no-relax"
107 # Fails to build on arm if >O0 is used
108 use arm && replace-flags "-O?" -O0
109
110 use tk || myconf="${myconf} -no-tk"
111 use ncurses || myconf="${myconf} -no-curses"
112 use X || myconf="${myconf} -no-graph"
113 use gdbm || myconf="${myconf} -no-dbm"
114
115 # ocaml uses a home-brewn configure script, preventing it to use econf.
116 RAW_LDFLAGS="$(raw-ldflags)" ./configure -prefix /usr \
117 --bindir /usr/bin \
118 --libdir /usr/$(get_libdir)/ocaml \
119 --mandir /usr/share/man \
120 -host "${CHOST}" \
121 -cc "$(tc-getCC)" \
122 -as "$(tc-getAS)" \
123 -aspp "$(tc-getCC) -c" \
124 -partialld "$(tc-getLD) -r" \
125 --with-pthread ${myconf} || die "configure failed!"
126
127 emake -j1 world || die "make world failed!"
128
129 # Native code generation can be disabled now
130 if use ocamlopt ; then
131 # bug #279968
132 emake -j1 opt || die "make opt failed!"
133 emake -j1 opt.opt || die "make opt.opt failed!"
134 fi
135 }
136
137 src_install() {
138 make BINDIR="${D}"/usr/bin \
139 LIBDIR="${D}"/usr/$(get_libdir)/ocaml \
140 MANDIR="${D}"/usr/share/man \
141 install || die "make install failed!"
142
143 # Install the compiler libs
144 dodir /usr/$(get_libdir)/ocaml/compiler-libs
145 insinto /usr/$(get_libdir)/ocaml/compiler-libs
146 doins {utils,typing,parsing}/*.{mli,cmi,cmo}
147 use ocamlopt && doins {utils,typing,parsing}/*.{cmx,o}
148
149 # Symlink the headers to the right place
150 dodir /usr/include
151 dosym /usr/$(get_libdir)/ocaml/caml /usr/include/
152
153 # Remove ${D} from ld.conf, as the buildsystem isn't $(DESTDIR) aware
154 dosed "s:${D}::g" /usr/$(get_libdir)/ocaml/ld.conf
155
156 dodoc Changes INSTALL README Upgrading
157
158 # Create and envd entry for latex input files (this definitely belongs into
159 # CONTENT and not in pkg_postinst.
160 if use latex ; then
161 echo "TEXINPUTS=/usr/$(get_libdir)/ocaml/ocamldoc:" > "${T}"/99ocamldoc
162 doenvd "${T}"/99ocamldoc
163 fi
164
165 # Install ocaml-rebuild portage set
166 insinto /usr/share/portage/config/sets
167 doins "${FILESDIR}/ocaml.conf" || die
168 }
169
170 pkg_postinst() {
171 echo
172 ewarn "OCaml is not binary compatible from version to version, so you"
173 ewarn "need to rebuild all packages depending on it, that are actually"
174 ewarn "installed on your system. To do so, you can run:"
175 ewarn "emerge @ocaml-rebuild"
176 echo
177 }