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-4.00.1-r1.ebuild
Date: Sat, 02 Mar 2013 17:30:43
Message-Id: 20130302173038.F32C82171D@flycatcher.gentoo.org
1 aballier 13/03/02 17:30:38
2
3 Modified: ChangeLog
4 Added: ocaml-4.00.1-r1.ebuild
5 Log:
6 Import a patch from archlinux to build against tk8.6, drop a useless patch for LDFLAGS and set the right variable
7
8 (Portage version: 2.2.0_alpha164/cvs/Linux x86_64, signed Manifest commit with key 160F534A)
9
10 Revision Changes Path
11 1.212 dev-lang/ocaml/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ocaml/ChangeLog?rev=1.212&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ocaml/ChangeLog?rev=1.212&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ocaml/ChangeLog?r1=1.211&r2=1.212
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-lang/ocaml/ChangeLog,v
20 retrieving revision 1.211
21 retrieving revision 1.212
22 diff -u -r1.211 -r1.212
23 --- ChangeLog 18 Feb 2013 18:09:14 -0000 1.211
24 +++ ChangeLog 2 Mar 2013 17:30:38 -0000 1.212
25 @@ -1,6 +1,12 @@
26 # ChangeLog for dev-lang/ocaml
27 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/ocaml/ChangeLog,v 1.211 2013/02/18 18:09:14 aballier Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/ocaml/ChangeLog,v 1.212 2013/03/02 17:30:38 aballier Exp $
30 +
31 +*ocaml-4.00.1-r1 (02 Mar 2013)
32 +
33 + 02 Mar 2013; Alexis Ballier <aballier@g.o> +ocaml-4.00.1-r1.ebuild:
34 + Import a patch from archlinux to build against tk8.6, drop a useless patch
35 + for LDFLAGS and set the right variable
36
37 18 Feb 2013; Alexis Ballier <aballier@g.o> ocaml-4.00.1.ebuild:
38 stop installing compiler-libs manually, let it be the standard way
39
40
41
42 1.1 dev-lang/ocaml/ocaml-4.00.1-r1.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ocaml/ocaml-4.00.1-r1.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ocaml/ocaml-4.00.1-r1.ebuild?rev=1.1&content-type=text/plain
46
47 Index: ocaml-4.00.1-r1.ebuild
48 ===================================================================
49 # Copyright 1999-2013 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/dev-lang/ocaml/ocaml-4.00.1-r1.ebuild,v 1.1 2013/03/02 17:30:38 aballier Exp $
52
53 EAPI="5"
54
55 inherit flag-o-matic eutils multilib versionator toolchain-funcs
56
57 PATCHLEVEL="5"
58 MY_P="${P/_/+}"
59 DESCRIPTION="Fast modern type-inferring functional programming language descended from the ML family"
60 HOMEPAGE="http://www.ocaml.org/"
61 SRC_URI="ftp://ftp.inria.fr/INRIA/Projects/cristal/ocaml/ocaml-$(get_version_component_range 1-2)/${MY_P}.tar.bz2
62 mirror://gentoo/${PN}-patches-${PATCHLEVEL}.tar.bz2"
63
64 LICENSE="QPL-1.0 LGPL-2"
65 # Everytime ocaml is updated to a new version, everything ocaml must be rebuilt,
66 # so here we go with the subslot.
67 SLOT="0/${PV}"
68 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
69 IUSE="emacs latex ncurses +ocamlopt tk X xemacs"
70
71 DEPEND="tk? ( >=dev-lang/tk-3.3.3 )
72 ncurses? ( sys-libs/ncurses )
73 X? ( x11-libs/libX11 x11-proto/xproto )"
74 RDEPEND="${DEPEND}"
75
76 PDEPEND="emacs? ( app-emacs/ocaml-mode )
77 xemacs? ( app-xemacs/ocaml )"
78
79 S="${WORKDIR}/${MY_P}"
80 pkg_setup() {
81 # dev-lang/ocaml creates its own objects but calls gcc for linking, which will
82 # results in relocations if gcc wants to create a PIE executable
83 if gcc-specs-pie ; then
84 append-ldflags -nopie
85 ewarn "Ocaml generates its own native asm, you're using a PIE compiler"
86 ewarn "We have appended -nopie to ocaml build options"
87 ewarn "because linking an executable with pie while the objects are not pic will not work"
88 fi
89 }
90
91 src_prepare() {
92 EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
93 }
94
95 src_configure() {
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
108 use tk || myconf="${myconf} -no-tk"
109 use ncurses || myconf="${myconf} -no-curses"
110 use X || myconf="${myconf} -no-graph"
111
112 # ocaml uses a home-brewn configure script, preventing it to use econf.
113 RAW_LDFLAGS="$(raw-ldflags)" ./configure -prefix /usr \
114 --bindir /usr/bin \
115 --libdir /usr/$(get_libdir)/ocaml \
116 --mandir /usr/share/man \
117 -host "${CHOST}" \
118 -cc "$(tc-getCC)" \
119 -as "$(tc-getAS)" \
120 -aspp "$(tc-getCC) -c" \
121 -partialld "$(tc-getLD) -r" \
122 --with-pthread ${myconf} || die "configure failed!"
123
124 # http://caml.inria.fr/mantis/view.php?id=4698
125 export CCLINKFLAGS="${LDFLAGS}"
126 }
127
128 src_compile() {
129 emake -j1 world
130
131 # Native code generation can be disabled now
132 if use ocamlopt ; then
133 # bug #279968
134 emake -j1 opt
135 emake -j1 opt.opt
136 fi
137 }
138
139 src_install() {
140 make BINDIR="${D}"/usr/bin \
141 LIBDIR="${D}"/usr/$(get_libdir)/ocaml \
142 MANDIR="${D}"/usr/share/man \
143 install
144
145 # Symlink the headers to the right place
146 dodir /usr/include
147 dosym /usr/$(get_libdir)/ocaml/caml /usr/include/
148
149 dodoc Changes INSTALL README Upgrading
150
151 # Create and envd entry for latex input files
152 if use latex ; then
153 echo "TEXINPUTS=/usr/$(get_libdir)/ocaml/ocamldoc:" > "${T}"/99ocamldoc
154 doenvd "${T}"/99ocamldoc
155 fi
156
157 # Install ocaml-rebuild portage set
158 insinto /usr/share/portage/config/sets
159 doins "${FILESDIR}/ocaml.conf"
160 }
161
162 pkg_postinst() {
163 echo
164 ewarn "OCaml is not binary compatible from version to version, so you"
165 ewarn "need to rebuild all packages depending on it, that are actually"
166 ewarn "installed on your system. To do so, you can run:"
167 if has_version '>=sys-apps/portage-2.2' ; then
168 ewarn "emerge @ocaml-rebuild"
169 else
170 ewarn "emerge -1 /usr/$(get_libdir)/ocaml"
171 fi
172 echo
173 }